Closed it-hienvv closed 3 years ago
Mình vẫn chạy được ko lỗi gì cả, bạn thử chạy project demo thử xem, hoặc xem log trong xcode hay android studio.
Hi Phú, mình follow theo docs để config, lỗi này gặp trên IOS.
(BOOL)application:(UIApplication )application
didFinishLaunchingWithOptions:(NSDictionary )launchOptions {
...
[[ZaloSDK sharedInstance] initializeWithAppId:@"
(BOOL)application:(UIApplication )application openURL:(nonnull NSURL )url options:(nonnull NSDictionary<NSString ,id> )options { return [[ZDKApplicationDelegate sharedInstance] application:application openURL:url options:options]; }
Đây là file AppDelegate.m của mình /**
static void InitializeFlipper(UIApplication application) { FlipperClient client = [FlipperClient sharedClient]; SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; [client addPlugin:[FlipperKitReactPlugin new]]; [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; [client start]; }
// #import "RNFirebaseNotifications.h" // #import "RNFirebaseMessaging.h"
@implementation AppDelegate
(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions {
InitializeFlipper(application);
RCTBridge bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"AppName" initialProperties:nil];
if (@available(iOS 13.0, )) { rootView.backgroundColor = [UIColor systemBackgroundColor]; } else { rootView.backgroundColor = [UIColor whiteColor]; } [[ZaloSDK sharedInstance] initializeWithAppId:@"4592122697734060894"]; if ([FIRApp defaultApp] == nil) { [FIRApp configure]; } [FBSDKApplicationDelegate initializeSDK:launchOptions]; [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible];
if (@available(iOS 13, *)) { self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight; }
return YES; }
(BOOL)application:(UIApplication )application openURL:(nonnull NSURL )url options:(nonnull NSDictionary<NSString ,id> )options { return [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url options:options] || [[ZDKApplicationDelegate sharedInstance] application:application openURL:url options:options]; }
(NSURL )sourceURLForBridge:(RCTBridge )bridge
{
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
// return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; return [CodePush bundleURL];
}
@end
Bạn xem log bên xcode nó báo lỗi là gì, chứ mình mới chạy cái example lên thì vẫn bình thường
Thanks bạn để mình check lại. Minh close issue nhé
Gọi hàm login zalo -> Máy đã có sẵn ứng dụng zalo -> gọi sang ứng dụng zalo. Nhưng k quay trở lại app và trả lại token