momo-wallet / mobile-sdk

If your business have a mobile app. You can use this SDK to integrate your mobile with MoMo App
80 stars 54 forks source link

Can not handle Event RCTMoMoNoficationCenterRequestTokenReceived #25

Open vt7211 opened 4 years ago

vt7211 commented 4 years ago

Event RCTMoMoNoficationCenterRequestTokenState working ok but event RCTMoMoNoficationCenterRequestTokenReceived not run after i confirm on app Momo. Help me debug it. Thank you so much.

cohedz94 commented 4 years ago

It resolve for my case. In Appdelegate.m - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options { if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) { return YES; }

if([RNGoogleSignin application:app openURL:url options:options]){ return YES; } if([[url absoluteString] rangeOfString:@"momo"].location != NSNotFound){ [RNMomosdk handleOpenUrl:url]; return YES; }

if ([RCTLinkingManager application:app openURL:url options:options]) { return YES; }

return NO; }

xuanmypt commented 3 years ago

thanks @cohedz94, your code works well.