-
-
Notifications
You must be signed in to change notification settings - Fork 910
Open
Description
Please check the following before submitting a new issue.
- I have searched the existing issues.
- I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
- Android
- iOS
- Windows
Steps to reproduce
In permission_handler_apple/ios/Classes/strategies/PhonePermissionStrategy.m code is copied from stackoverflow and should be replaced or deleted because there code is under a copyleft license.
Expected results
Copied code from stackoverflow will be replaced or deleted
Actual results
Copyleft code from stackoverflow is in the package
Code sample
- (void)checkServiceStatus:(PermissionGroup)permission completionHandler:(ServiceStatusHandler)completionHandler {
// https://stackoverflow.com/a/5095058
if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tel://"]]) {
completionHandler(ServiceStatusNotApplicable);
}
completionHandler([self canDevicePlaceAPhoneCall] ? ServiceStatusEnabled : ServiceStatusDisabled);
}
-(bool)canPlacePhoneCallWithCarrier:(CTCarrier *)carrier {
// https://stackoverflow.com/a/11595365
NSString *mnc = [carrier mobileNetworkCode];
if (([mnc length] == 0) || ([mnc isEqualToString:@"65535"])) {
// Device cannot place a call at this time. SIM might be removed.
return NO;
} else {
// Device can place a phone call
return YES;
}
}
Screenshots or video
No response
Version
main
Flutter Doctor output
Metadata
Metadata
Assignees
Labels
No labels