react-native-push-notification / ios

React Native Push Notification API for iOS.
MIT License
732 stars 281 forks source link

Error with UIUserNotificationSettings #386

Open afzdev13 opened 1 year ago

afzdev13 commented 1 year ago

When i try run my app in IOS using react-native run-ios --simulator='iPhone 14 Pro' brings me the error:

In file included from /Users/goattech/Documents/W2/W2App/ios/W2App/AppDelegate.m:15: /Users/goattech/Documents/W2/W2App/ios/Pods/Headers/Public/RNCPushNotificationIOS/RNCPushNotificationIOS.h:18:46: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] + (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings )notificationSettings; ^ In module 'UIKit' imported from /Users/goattech/Documents/W2/W2App/ios/Pods/Headers/Public/React-Core/React/RCTJavaScriptLoader.h:8: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @ interface UIUserNotificationSettings : NSObject ^ In file included from /Users/goattech/Documents/W2/W2App/ios/W2App/AppDelegate.m:15: /Users/goattech/Documents/W2/W2App/ios/Pods/Headers/Public/RNCPushNotificationIOS/RNCPushNotificationIOS.h:22:38: warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest [-Wdeprecated-declarations] + (void)didReceiveLocalNotification:(UILocalNotification )notification; ^ In module 'UIKit' imported from /Users/goattech/Documents/W2/W2App/ios/Pods/Headers/Public/React-Core/React/RCTJavaScriptLoader.h:8: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalNotification.h:18:12: note: 'UILocalNotification' has been explicitly marked deprecated here @ interface UILocalNotification : NSObject<NSCopying, NSCoding>

i search this error and i found this:

i will keep trying make works but if anyone can help me i will be gratefull

Enviroment:

MacOS Ventura 13.1 XCode 14.2 React Native 0.67.3 "@react-native-community/push-notification-ios": "^1.10.1", "react-native-push-notification": "^8.1.1",