urbanairship / ios-library

Urban Airship iOS SDK
http://urbanairship.com
Apache License 2.0
478 stars 265 forks source link

AppIntegration changes ObjC signatures of UNUserNotificationDelegate methods #307

Closed sixten closed 2 years ago

sixten commented 2 years ago

The new Swift AppIntegration class in 16.x has methods that mirror those of UNUserNotificationDelegate, but the Objective-C signatures of those methods no longer match like they did in previous versions of the SDK. Specifically, the first part of each has changed from userNotificationCenter: to userNotificationCenterWithCenter:, which is super awkward.

https://github.com/urbanairship/ios-library/blob/5855d8d7324b6cc8a8b7943451453a5b67332e25/Airship/AirshipCore/Source/AppIntegration.swift#L111

https://github.com/urbanairship/ios-library/blob/5855d8d7324b6cc8a8b7943451453a5b67332e25/Airship/AirshipCore/Source/AppIntegration.swift#L139

The simplest solution would be to fully specify the name in the @objc attribute, like several other methods in that class already do.

rlepinski commented 2 years ago

Thanks for the feedback. Probably wont get to it this next release but hopefully in 16.3 or so. I cant just change the method signatures without breaking APIs so we will need to provide a new method and deprecate the old. I am not sure how to do that without also providing another swift method but I will see if apple provides some annotations.

rlepinski commented 2 years ago

I didnt forget about this, we will resolve it in 16.4 that should be near the end of Feb

rlepinski commented 2 years ago

Fixed in 16.4