Skip to content

Commit 3b99df8

Browse files
xiewei05zhiqingchen
xiewei05
authored andcommitted
解决chrome debug crash问题
1 parent fdf79c1 commit 3b99df8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ios/taroDemo/AppDelegate.m

+7
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ @implementation AppDelegate
3737

3838
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
3939
{
40+
NSDictionary *oldSettins = [[NSUserDefaults standardUserDefaults] valueForKey:@"RCTDevMenu"];
41+
if ([oldSettins.allKeys containsObject:@"isDebuggingRemotely"]) {
42+
NSMutableDictionary *settings = oldSettins?[oldSettins mutableCopy]:[NSMutableDictionary dictionary];
43+
[settings removeObjectForKey:@"isDebuggingRemotely"];
44+
[[NSUserDefaults standardUserDefaults] setObject:settings forKey:@"RCTDevMenu"];
45+
}
46+
4047
#ifdef FB_SONARKIT_ENABLED
4148
InitializeFlipper(application);
4249
#endif

0 commit comments

Comments
 (0)