mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-08-12 01:17:43 +00:00
Remove codepush
This commit is contained in:
@@ -192,4 +192,4 @@ dependencies {
|
||||
}
|
||||
|
||||
// code-push
|
||||
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
|
||||
// apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.facebook.react.defaults.DefaultReactNativeHost
|
||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping
|
||||
import com.facebook.soloader.SoLoader
|
||||
import com.facebook.react.modules.network.OkHttpClientProvider
|
||||
import com.microsoft.codepush.react.CodePush
|
||||
// import com.microsoft.codepush.react.CodePush
|
||||
|
||||
class MainApplication : Application(), ReactApplication {
|
||||
|
||||
@@ -35,9 +35,9 @@ class MainApplication : Application(), ReactApplication {
|
||||
// 2. Override the getJSBundleFile method in order to let
|
||||
// the CodePush runtime determine where to get the JS
|
||||
// bundle location from on each app start
|
||||
override fun getJSBundleFile(): String {
|
||||
return CodePush.getJSBundleFile()
|
||||
}
|
||||
// override fun getJSBundleFile(): String {
|
||||
// return CodePush.getJSBundleFile()
|
||||
// }
|
||||
}
|
||||
|
||||
override val reactHost: ReactHost
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">Minibits</string>
|
||||
<string moduleConfig="true" name="CodePushDeploymentKey">mockkey</string><!-- real key passed to codepush in .sync method -->
|
||||
<!--string moduleConfig="true" name="CodePushDeploymentKey">mockkey</string--><!-- real key passed to codepush in .sync method -->
|
||||
</resources>
|
||||
|
||||
@@ -24,8 +24,7 @@ class AppDelegate: RCTAppDelegate {
|
||||
#if DEBUG
|
||||
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
|
||||
#else
|
||||
// Bundle.main.url(forResource: "main", withExtension: "jsbundle")
|
||||
CodePush.bundleURL;
|
||||
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CodePushDeploymentKey</key>
|
||||
<string>64rRBkOtdnI3ptGS03latjyfbv6lq4JobNidT</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
|
||||
+1
-2
@@ -54,8 +54,7 @@
|
||||
"react": "18.3.1",
|
||||
"react-native": "0.77.0",
|
||||
"react-native-animated-pagination-dots": "^0.1.73",
|
||||
"react-native-camera-kit": "teslamotors/react-native-camera-kit#7e94541bbfa34f3a74756d7a1a1a7e3468e6a25c",
|
||||
"react-native-code-push": "^9.0.1",
|
||||
"react-native-camera-kit": "teslamotors/react-native-camera-kit#7e94541bbfa34f3a74756d7a1a1a7e3468e6a25c",
|
||||
"react-native-dotenv": "^3.4.11",
|
||||
"react-native-exit-app": "^2.0.0",
|
||||
"react-native-flash-message": "^0.4.2",
|
||||
|
||||
+4
-3
@@ -8,7 +8,7 @@ import {
|
||||
CODEPUSH_PRODUCTION_DEPLOYMENT_KEY,
|
||||
ANDROID_VERSION_NAME,
|
||||
} from '@env'
|
||||
import codePush from 'react-native-code-push'
|
||||
// import codePush from 'react-native-code-push'
|
||||
import FlashMessage from "react-native-flash-message"
|
||||
import {
|
||||
SafeAreaProvider,
|
||||
@@ -126,6 +126,7 @@ const $title: TextStyle = {
|
||||
color: 'white'
|
||||
}
|
||||
|
||||
const deploymentKey = APP_ENV === Env.PROD ? CODEPUSH_PRODUCTION_DEPLOYMENT_KEY : CODEPUSH_STAGING_DEPLOYMENT_KEY
|
||||
/*const deploymentKey = APP_ENV === Env.PROD ? CODEPUSH_PRODUCTION_DEPLOYMENT_KEY : CODEPUSH_STAGING_DEPLOYMENT_KEY
|
||||
const codePushOptions = { deploymentKey, checkFrequency: codePush.CheckFrequency.MANUAL }
|
||||
export default codePush(codePushOptions)(App)
|
||||
export default codePush(codePushOptions)(App)*/
|
||||
export default App
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
CODEPUSH_STAGING_DEPLOYMENT_KEY,
|
||||
CODEPUSH_PRODUCTION_DEPLOYMENT_KEY,
|
||||
} from '@env'
|
||||
import codePush, { RemotePackage } from 'react-native-code-push'
|
||||
// import codePush, { RemotePackage } from 'react-native-code-push'
|
||||
import {ThemeCode, Themes, colors, spacing, useThemeColor} from '../theme'
|
||||
import {ListItem, Screen, Text, Card, NwcIcon, Button, BottomModal, InfoModal, Icon} from '../components'
|
||||
import {useHeader} from '../utils/useHeader'
|
||||
@@ -54,12 +54,12 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
useEffect(() => {
|
||||
const checkForUpdate = async () => {
|
||||
try {
|
||||
const update = await codePush.checkForUpdate(deploymentKey, handleBinaryVersionMismatchCallback)
|
||||
/*const update = await codePush.checkForUpdate(deploymentKey, handleBinaryVersionMismatchCallback)
|
||||
if (update && update.failedInstall !== true) { // do not announce update that failed to install before
|
||||
setUpdateDescription(update.description)
|
||||
setUpdateSize(`${round(update.packageSize * 0.000001, 2)}MB`)
|
||||
setIsUpdateAvailable(true)
|
||||
}
|
||||
}*/
|
||||
|
||||
} catch (e: any) {
|
||||
log.info(e.name, e.message)
|
||||
@@ -137,10 +137,10 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
|
||||
setIsThemeModalVisible(previousState => !previousState)
|
||||
}
|
||||
|
||||
const handleBinaryVersionMismatchCallback = function(update: RemotePackage) {
|
||||
/* const handleBinaryVersionMismatchCallback = function(update: RemotePackage) {
|
||||
// silent
|
||||
setIsNativeUpdateAvailable(true)
|
||||
}
|
||||
} */
|
||||
|
||||
const gotoMints = function() {
|
||||
navigation.navigate('Mints', {})
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
CODEPUSH_STAGING_DEPLOYMENT_KEY,
|
||||
CODEPUSH_PRODUCTION_DEPLOYMENT_KEY,
|
||||
} from '@env'
|
||||
import codePush from "react-native-code-push"
|
||||
// import codePush from "react-native-code-push"
|
||||
import {colors, spacing, useThemeColor} from '../theme'
|
||||
import {
|
||||
Icon,
|
||||
@@ -78,7 +78,7 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
|
||||
|
||||
const handleUpdate = function (): void {
|
||||
try {
|
||||
/*try {
|
||||
codePush.sync({
|
||||
deploymentKey,
|
||||
rollbackRetryOptions: {
|
||||
@@ -102,7 +102,7 @@ export const UpdateScreen = observer(function UpdateScreen({ route }: Props) {
|
||||
})
|
||||
} catch (e: any) {
|
||||
handleError(e)
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
LayoutAnimation,
|
||||
AppStateStatus,
|
||||
} from 'react-native'
|
||||
import codePush, { RemotePackage } from 'react-native-code-push'
|
||||
// import codePush, { RemotePackage } from 'react-native-code-push'
|
||||
import {moderateScale, verticalScale} from '@gocodingnow/rn-size-matters'
|
||||
import { SvgXml } from 'react-native-svg'
|
||||
import { NavigationState, Route, TabBar, TabBarItemProps, TabBarProps, TabView } from 'react-native-tab-view'
|
||||
@@ -113,7 +113,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
const [isNativeUpdateAvailable, setIsNativeUpdateAvailable] = useState<boolean>(false)
|
||||
|
||||
// On app start
|
||||
useEffect(() => {
|
||||
/* useEffect(() => {
|
||||
const checkForUpdate = async () => {
|
||||
try {
|
||||
const update = await codePush.checkForUpdate(deploymentKey, handleBinaryVersionMismatchCallback)
|
||||
@@ -140,15 +140,15 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
|
||||
checkForUpdate()
|
||||
}, 500)
|
||||
|
||||
}, [])
|
||||
}, [])
|
||||
|
||||
|
||||
const handleBinaryVersionMismatchCallback = function(update: RemotePackage) {
|
||||
log.info('[handleBinaryVersionMismatchCallback] triggered', ANDROID_VERSION_NAME, update)
|
||||
setIsNativeUpdateAvailable(true)
|
||||
toggleUpdateModal()
|
||||
}
|
||||
|
||||
} */
|
||||
|
||||
// On app start
|
||||
useEffect(() => {
|
||||
const getInitialData = async () => {
|
||||
|
||||
Reference in New Issue
Block a user