how to get firebase dynamic link in code in objective-c - ios - cocos creator

hi,
i have an ios version of my game where i use firebase dynamic links to open the app and want the dynamic link to do other stuff as well. i should be able to get the dynamic link to do other stuff if i get the query parameter for “dl” from the dynamic link in my objective-c code. currently the only thing that happens is that the app opens when i click on the dynamic link in a chat app.

now, i put the following code in AppController.mm in :

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    NSURL * urlKey = (NSURL )[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey];
    NSLog(@"firebase NSURL
    : %@", urlKey);
    NSString * stringKey = (NSString )[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey];
    NSLog(@"firebase NSString
    : %@", stringKey);

but i get the value null in both logs above. now, i need two things : the complete url of the dynamic link that was used to open the app, and the value of the “dl” query from the dynamic link. and i need to be able to get them in my objective - c code(whichever file and whichever method…please mention both).

my dynamic link is of the form :

https://mygame.page.link/?link=http://playmygame.com?dl%3DWSzp…&apn=…

Note the dl after the second ? in the link.

can someone please help???

thank you in advance!!!