-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add expo updated workaround to the example iOS app to make sure it do…
…esn't crash
- Loading branch information
Showing
1 changed file
with
24 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,45 @@ | ||
#import "AppDelegate.h" | ||
|
||
#import "OPSQLite.h" | ||
#import <React/RCTBundleURLProvider.h> | ||
|
||
@implementation AppDelegate | ||
|
||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||
{ | ||
self.moduleName = @"OPSQLiteExample"; | ||
return [super application:application didFinishLaunchingWithOptions:launchOptions]; | ||
- (BOOL)application:(UIApplication *)application | ||
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | ||
self.moduleName = @"OPSQLiteExample"; | ||
[OPSQLite expoUpdatesWorkaround]; | ||
return [super application:application | ||
didFinishLaunchingWithOptions:launchOptions]; | ||
} | ||
|
||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge | ||
{ | ||
return [self bundleURL]; | ||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { | ||
return [self bundleURL]; | ||
} | ||
|
||
- (NSURL *)bundleURL | ||
{ | ||
- (NSURL *)bundleURL { | ||
#if DEBUG | ||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; | ||
return [[RCTBundleURLProvider sharedSettings] | ||
jsBundleURLForBundleRoot:@"index"]; | ||
#else | ||
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; | ||
return [[NSBundle mainBundle] URLForResource:@"main" | ||
withExtension:@"jsbundle"]; | ||
#endif | ||
} | ||
|
||
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. | ||
/// 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; | ||
/// @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; | ||
} | ||
|
||
-(BOOL)bridgelessEnabled | ||
{ | ||
return YES; | ||
- (BOOL)bridgelessEnabled { | ||
return YES; | ||
} | ||
|
||
@end |