universal-tools / UTNotificationsFeedback

7 stars 0 forks source link

[ios]UILocalNotification is deprecated(iOS 4.0–10.0). #71

Closed shinji19 closed 6 years ago

shinji19 commented 6 years ago

Hello, I use UTNotification. It's fine!

But, UILocalNotification is deprecated(iOS 4.0–10.0).

// UTNotifications/Src/iOS/IOSBuildPostprocessor.cs
PatchMethod("- (void)application:(UIApplication*)application didReceiveLocalNotification:(UILocalNotification*)notification", appControllerLines, addition);

https://developer.apple.com/documentation/uikit/uilocalnotification

UILocalNotification insted https://developer.apple.com/documentation/usernotifications/unnotificationrequest .

Are there any plan to fix? Thank you!

yuriy-universal-ivanov commented 6 years ago

Hi @shinji19 ,

Please note that didReceiveLocalNotification is actually generated by Unity, and UTNotifications only patch its contents. This is why we have to work with what's already there. We're currently thinking about rewriting the whole iOS implementation, so instead of using Unity's own API, we'll be based on our own code. But it's quite complicated as we'll have to patch Unity-generated code a lot, and it's very easy to unintentionally break some of Unity functionality, especially if they change something in their iOS code generation.

Currently we'll have to stick to the UILocalNotification-based Unity-generated code.

Best regards, Yuriy, Universal Tools team.