سؤال

In the app delegate, there is this method

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {

I am wondering what the "annotation" is? Also, how would I use it/view it to see what it contains?

Thanks

هل كانت مفيدة؟

المحلول

annotation: A property-list object supplied by the source application to communicate information to the receiving application.

It is what the application that triggered the url opening wants to share with you.

UIApplicationDelegate apple documentation

نصائح أخرى

It is a dictionary. I have only found it useful for determining the referrer when opening deeplinks from mobile Safari:

enter image description here

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top