Skip to content

Commit

Permalink
Merge pull request #20 from WebEngage/codePushFix
Browse files Browse the repository at this point in the history
Support for CodePush (Reviewed)
  • Loading branch information
shadowTech827 authored Feb 11, 2021
2 parents cda4830 + 9a2a26a commit 7b19747
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/ios/WEGWebEngageBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ + (id)allocWithZone:(NSZone *)zone {
return sharedInstance;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
Expand Down
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-webengage",
"version": "1.2.6",
"version": "1.2.7",
"description": "WebEngage React Native library.",
"license": "MIT",
"author": "WebEngage",
Expand Down

0 comments on commit 7b19747

Please sign in to comment.