Flutter-permission-handler: iOS 13 Xcode 11 - error

Created on 27 Jan 2020  路  2Comments  路  Source: Baseflow/flutter-permission-handler

馃悰 Bug Report

/Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/PhonePermissionStrategy.m:41:35: warning: 'subscriberCellularProvider' is deprecated: first deprecated in iOS 12.0 - Replaced by serviceSubscriberCellularProviders [-Wdeprecated-declarations] CTCarrier *carrier = [netInfo subscriberCellularProvider]; ^ In module 'CoreTelephony' imported from /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/PhonePermissionStrategy.m:8: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h: 110:50: note: property 'subscriberCellularProvider' is declared deprecated here @property(readonly, retain, nullable) CTCarrier *subscriberCellularProvider __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_NA, __MAC_NA, __IPHONE_4_0, __IPHONE_12_0, ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h: 110:50: note: 'subscriberCellularProvider' has been explicitly marked deprecated here 1 warning generated. /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/PermissionManager.m:69:59: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] BOOL success = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; ^~~~~~~ openURL:options:completionHandler: In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:123:1: note: 'openURL:' has been explicitly marked deprecated here - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ 1 warning generated. /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:42:7: warning: 'UIUserNotificationType' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] UIUserNotificationType notificationTypes = 0; ^ In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:3 2: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:43:28: warning: 'UIUserNotificationTypeSound' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] notificationTypes |= UIUserNotificationTypeSound; ^ In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:3 2: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:44:28: warning: 'UIUserNotificationTypeAlert' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] notificationTypes |= UIUserNotificationTypeAlert; ^ In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:3 2: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:45:28: warning: 'UIUserNotificationTypeBadge' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] notificationTypes |= UIUserNotificationTypeBadge; ^ In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:3 2: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:46:7: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil]; ^ In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:1 2: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @interface UIUserNotificationSettings : NSObject ^ /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:46:74: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil]; ^ In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:1 2: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @interface UIUserNotificationSettings : NSObject ^ /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:47:42: warning: 'registerUserNotificationSettings:' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:] [-Wdeprecated-declarations] [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; ^ In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:250:1: note: 'registerUserNotificationSettings:' has been explicitly marked deprecated here - (void)registerUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings API_DEPRECATED("Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:]", ios(8.0, 10.0)) API_UNAVAILABLE(tvos); ^ /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:68:5: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] UIUserNotificationSettings * setting = [[UIApplication sharedApplication] currentUserNotificationSettings]; ^ In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:1 2: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @interface UIUserNotificationSettings : NSObject ^ /Users/uogforceone/documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-4.2.0+hotfix.2/ios/Classes/strategies/NotificationPermissionStrategy.m:68:79: warning: 'currentUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:] [-Wdeprecated-declarations] UIUserNotificationSettings * setting = [[UIApplication sharedApplication] currentUserNotificationSettings]; ^ In module 'UIKit' imported from /Users/uogforceone/Documents/Projects/FanroomApp/Flutter/fanroom/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:253:70: note: property 'currentUserNotificationSettings' is declared deprecated here @property(nonatomic, readonly, nullable) UIUserNotificationSettings *currentUserNotificationSettings API_DEPRECATED("Use UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:]", ios(8.0, 10.0)) API_UNAVAILABLE(tvos);

Version: 4.2.0-hotfix.2

Platform:

  • [ ] :iphone: iOS
ios needs more info

All 2 comments

@pilotviper134 are you really getting an "Error", to me it looks there are only "Warning" messages. There is indeed deprecated code in the permission_handler plugin, this is however tested and left there on purpose to support older iOS versions.

These warnings should not stop you from continuing using the permission_handler plugin.

Closing issue due to lack of response.

Was this page helpful?
0 / 5 - 0 ratings