iOS: Using UIApplicationDelegate Functions in an static library
I want to build a static library that catches incoming push notifications and uses the json objects outside the "aps" namespace. Is there any way to do this without changing the application:didReceiveRemoteNotification: method in the AppDelegate but by simply adding and using the static library?
开发者_StackOverflowThanks in advance!
No, there isn't a way to do what you are asking (that I know of). First, you could do a class extension or category, but both would require the user to import them in the app delegate. Also, with that you could 'override' the method, but it wouldn't allow the user to 'use' that method in their app delegate (if they also wanted to perform some logic in the didReceiveRemoteNotification method).
精彩评论