Handle your app updates
At now the installation is only available locally, you can install the package by adding the following line to your package.json file
"react-native-bundle-updater": "file:path/to/the/package",
In the near future, the package will be available on npm.
Make some modifications to your App files on the react native side.
and then run:
npx react-native-bundle-updater [apiKey] [branch] [version] [-m "Bundle notes" (optional)]
Example:
npx react-native-bundle-updater **YourApiKey** master 1.0.0 -m "New awesome bundle"
Add the following lines to your AppDelegate.m file
#import "AppDelegate.h"
#import "BundleUpdater.h" // <-- Add this line
....some code....
self.initialProps = @{}; // <-- After this line
BundleUpdater *bundleUpdater = [BundleUpdater sharedInstance];
[bundleUpdater initialization:@"YOURKEY" withBranch: @"staging"];
.... some other code ....
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { // <-- Replace this method
BundleUpdater *bundleUpdater = [BundleUpdater sharedInstance];
return [bundleUpdater initializeBundle:bridge withKey:@"YOURKEY"];
}
By default the tracking is disabled, you can enable it by adding the enableTracking boolean flag inside the AppDelegate.m file.
[BundleUpdater setEnableTracking:YES];
In order to inform the user about the tracking, you can add the following lines to your Info.plist file
<key>NSUserTrackingUsageDescription</key>
<string>**Your APP** requires your permission for tracking some basic information to enhance your experience </string>
// TODO
See the contributing guide to learn how to contribute to the repository and the development workflow.
2024 © Impresoft Engage