mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.5 KiB
Plaintext
43 lines
1.5 KiB
Plaintext
#import "AppDelegate.h"
|
|
#import "RNCConfig.h"
|
|
|
|
#import <React/RCTBundleURLProvider.h>
|
|
|
|
@implementation AppDelegate
|
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
{
|
|
// 接入个推
|
|
[GeTuiSdk startSdkWithAppId:[RNCConfig envFor:@"GETUI_APPID"] appKey:[RNCConfig envFor:@"GETUI_APPKEY"] appSecret:[RNCConfig envFor:@"GETUI_APPSECRET"] delegate:[RCTGetuiModule sharedGetuiModule] launchingOptions:launchOptions];
|
|
// APNs
|
|
[GeTuiSdk registerRemoteNotification: (UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge)];
|
|
|
|
self.moduleName = @"Tailchat";
|
|
// You can add your custom initial props in the dictionary below.
|
|
// They will be passed down to the ViewController used by React Native.
|
|
self.initialProps = @{};
|
|
|
|
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
|
}
|
|
|
|
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
{
|
|
#if DEBUG
|
|
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
|
#else
|
|
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
#endif
|
|
}
|
|
|
|
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
|
|
///
|
|
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
|
|
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
|
|
/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
|
|
- (BOOL)concurrentRootEnabled
|
|
{
|
|
return true;
|
|
}
|
|
|
|
@end
|