Skip to content

Commit

Permalink
Release version 1.1.19 (278)
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenduythuc committed Dec 18, 2023
1 parent 9df63dd commit d510b1d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ android {
applicationId "app.subwallet.mobile"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 276
versionCode 278
versionName "1.1.19"
missingDimensionStrategy 'react-native-camera', 'general'
}
Expand Down
4 changes: 2 additions & 2 deletions ios/SubWalletMobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = SubWalletMobile/SubWalletMobile.entitlements;
CURRENT_PROJECT_VERSION = 276;
CURRENT_PROJECT_VERSION = 278;
DEVELOPMENT_TEAM = ZUZ7T3GQMT;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = SubWalletMobile/Info.plist;
Expand Down Expand Up @@ -568,7 +568,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = SubWalletMobile/SubWalletMobile.entitlements;
CURRENT_PROJECT_VERSION = 276;
CURRENT_PROJECT_VERSION = 278;
DEVELOPMENT_TEAM = ZUZ7T3GQMT;
INFOPLIST_FILE = SubWalletMobile/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = SubWallet;
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "SubWalletMobile",
"version": "1.1.19",
"build": "276",
"build": "278",
"bundleVersion": "a(v8)-i(v3)",
"bundleVersionStaging": "a(v4)-i(v5)",
"private": true,
Expand All @@ -21,7 +21,9 @@
"android": "ENVFILE=.env.development react-native run-android",
"ios": "ENVFILE=.env.development react-native run-ios",
"android:production": "cd android && export ENVFILE=.env.production && ./gradlew bundleRelease && open app/build/outputs/bundle/release/",
"android:staging": "cd android && export ENVFILE=.env.development && ./gradlew bundleRelease && open app/build/outputs/bundle/release/",
"ios:production": "scripts/build-ios.sh",
"ios:staging": "scripts/build-ios.sh staging",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"start": "react-native start",
"test": "jest"
Expand Down
18 changes: 17 additions & 1 deletion scripts/build-ios.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
#!/bin/sh

# How to use:
# release Appstore with bundle production: build-ios.sh or build-ios.sh production appstore
# release Appstore with bundle staging: build-ios.sh staging or build-ios.sh staging appstore
# export Adhoc with bundle production: build-ios.sh production adhoc
# export Adhoc with bundle staging: build-ios.sh staging adhoc
cd ./ios
rm -rf ./build && rm -rf ./dist && pod install

ENVIRONMENT=${1-"production"}
APPSTORE=${2-"appstore"}
#Builds the xcarchive
if [ $ENVIRONMENT = "production" ]; then
xcodebuild -workspace ./SubWalletMobile.xcworkspace -scheme SubWalletMobile-Production -sdk iphoneos -configuration Release -quiet -archivePath $PWD/dist/SubWallet.xcarchive clean archive
else
xcodebuild -workspace ./SubWalletMobile.xcworkspace -scheme SubWalletMobile-Staging -sdk iphoneos -configuration Release -quiet -archivePath $PWD/dist/SubWallet.xcarchive clean archive
fi


# Builds the ipa and uploads it to the appstore
xcodebuild -exportArchive -archivePath $PWD/dist/SubWallet.xcarchive -exportOptionsPlist exportOptions.plist -exportPath $PWD/dist
if [ $APPSTORE = "appstore" ]; then
xcodebuild -exportArchive -archivePath $PWD/dist/SubWallet.xcarchive -exportOptionsPlist exportOptions.plist -exportPath $PWD/dist
else
xcodebuild -exportArchive -archivePath $PWD/dist/SubWallet.xcarchive -exportOptionsPlist exportAdhocOptions.plist -exportPath $PWD/dist
fi
10 changes: 10 additions & 0 deletions src/providers/WebRunnerProvider/WebRunner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,15 @@ export const WebRunner = React.memo(({ webRunnerRef, webRunnerStateRef, webRunne
}
};

const onLoadProgress = () => {
// BACKUP-002: Back up local storage for first open app purpose
if (webRunnerRef.current) {
webRunnerRef.current.injectJavaScript(
'window.ReactNativeWebView.postMessage(JSON.stringify({backupStorage: window.localStorage || ""}));',
);
}
};

return (
<View style={{ height: 0 }}>
{runnerGlobalState.uri && (
Expand All @@ -389,6 +398,7 @@ export const WebRunner = React.memo(({ webRunnerRef, webRunnerStateRef, webRunne
injectedJavaScript={runnerGlobalState.injectScript}
webviewDebuggingEnabled
onLoadStart={onLoadStart}
onLoadProgress={onLoadProgress}
onError={e => console.debug('### WebRunner error', e)}
onHttpError={e => console.debug('### WebRunner HttpError', e)}
javaScriptEnabled={true}
Expand Down

0 comments on commit d510b1d

Please sign in to comment.