Skip to content

Commit 281deed

Browse files
authored
fix(expo): extend expo config plugin regex to match latest version of AppDelegate (#6957)
1 parent c1fc96d commit 281deed

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/app/plugin/src/ios/appDelegate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import fs from 'fs';
66
const methodInvocationBlock = `[FIRApp configure];`;
77
// https://regex101.com/r/mPgaq6/1
88
const methodInvocationLineMatcher =
9-
/(?:(self\.|_)(\w+)\s?=\s?\[\[UMModuleRegistryAdapter alloc\])|(?:RCTBridge\s?\*\s?(\w+)\s?=\s?\[(\[RCTBridge alloc\]|self\.reactDelegate))/g;
9+
/(?:self\.moduleName\s*=\s*@\"([^"]*)\";)|(?:(self\.|_)(\w+)\s?=\s?\[\[UMModuleRegistryAdapter alloc\])|(?:RCTBridge\s?\*\s?(\w+)\s?=\s?\[(\[RCTBridge alloc\]|self\.reactDelegate))/g;
1010

1111
// https://regex101.com/r/nHrTa9/1/
1212
// if the above regex fails, we can use this one as a fallback:

packages/dynamic-links/plugin/src/ios/appDelegate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import fs from 'fs';
66
const methodInvocationBlock = `[RNFBDynamicLinksAppDelegateInterceptor sharedInstance];`;
77
// https://regex101.com/r/mPgaq6/1
88
const methodInvocationLineMatcher =
9-
/(?:(self\.|_)(\w+)\s?=\s?\[\[UMModuleRegistryAdapter alloc\])|(?:RCTBridge\s?\*\s?(\w+)\s?=\s?\[(\[RCTBridge alloc\]|self\.reactDelegate))/g;
9+
/(?:self\.moduleName\s*=\s*@\"([^"]*)\";)|(?:(self\.|_)(\w+)\s?=\s?\[\[UMModuleRegistryAdapter alloc\])|(?:RCTBridge\s?\*\s?(\w+)\s?=\s?\[(\[RCTBridge alloc\]|self\.reactDelegate))/g;
1010

1111
// https://regex101.com/r/nHrTa9/1/
1212
// if the above regex fails, we can use this one as a fallback:

0 commit comments

Comments
 (0)