开发者

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?

开发者_StackOverflow

Thanks 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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜