...
 
Commits (2)
......@@ -8,7 +8,6 @@
import './global';
import './shim'
import crypto from "crypto"; // DO NOT REMOVE!
import codePush from "react-native-code-push"; // For auto updates
import React, {
Component
......@@ -163,7 +162,6 @@ type Props = {
/**
* App
*/
@codePush
export default class App extends Component<Props, State> {
state = {
......@@ -217,8 +215,6 @@ export default class App extends Component<Props, State> {
logService.info('[App] session initialized');
}
}
await this.checkForUpdates();
} catch(err) {
logService.exception('[App] Error initializing the app', err);
Alert.alert(
......@@ -283,21 +279,6 @@ export default class App extends Component<Props, State> {
}
}
async checkForUpdates() {
try {
const params = {
updateDialog: Platform.OS !== 'ios',
installMode: codePush.InstallMode.ON_APP_RESUME,
};
if (CODE_PUSH_TOKEN) params.deploymentKey = CODE_PUSH_TOKEN;
let response = await codePush.sync(params);
} catch (err) {
logService.exception('[App] Error checking for code push updated', err);
}
}
/**
* Render
*/
......
......@@ -3,7 +3,7 @@ import React from 'react';
import App from '../App';
import videochat from '../src/common/services/videochat.service';
import sqliteStorageProviderService from '../src/common/services/sqlite-storage-provider.service';
import logservice from '../src/common/services/log.service';
import logService from '../src/common/services/log.service';
import {
BackHandler,
} from 'react-native';
......@@ -16,6 +16,7 @@ import renderer from 'react-test-renderer';
BackHandler.addEventListener = jest.fn();
jest.mock('../src/common/services/sqlite-storage-provider.service')
jest.mock('../src/common/services/log.service', () => {});
jest.mock('../src/common/services/push.service');
jest.mock('react-native-gesture-handler', () => {});
jest.mock('react-navigation-stack', () => { Header: {} });
jest.mock('react-navigation', () => {
......
......@@ -79,7 +79,6 @@ project.ext.react = [
]
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
/**
* Set this to true to create two separate APKs instead of one:
......@@ -163,6 +162,7 @@ android {
}
dependencies {
implementation project(':react-native-notifications')
implementation project(':@react-native-community_netinfo')
implementation project(':react-native-screens')
implementation project(':rn-apk')
......@@ -173,7 +173,8 @@ dependencies {
implementation project(':react-native-cookies')
compile project(':react-native-exit-app')
compile project(':react-native-background-timer')
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-messaging:17.3.3' // IMPORTANT: fix the crash when the app receives a push notification
implementation(project(':react-native-jitsi-meet')) {
// solve issues with the packages shared with the jitsi bundle
exclude group: 'com.facebook.react', module:'react-native-vector-icons'
......@@ -182,16 +183,14 @@ dependencies {
exclude group: 'com.facebook.react',module:'react-native-fast-image'
exclude group: 'com.facebook.react',module:'react-native-background-timer'
// exclude group: 'com.facebook.react',module:'react-native-google-signin'
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.firebase'
}
implementation project(':react-native-sqlite-storage')
implementation project(':react-native-code-push')
implementation project(':react-native-background-timer')
implementation project(':react-native-android-sms-listener')
implementation project(':react-native-fs')
implementation project(':react-native-media-meta')
implementation project(':react-native-share-menu')
implementation project(':react-native-notifications')
implementation project(':react-native-keep-awake')
implementation project(':react-native-share')
// implementation project(':react-native-udp')
......@@ -208,17 +207,13 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:0.59.10" // From node_modules
implementation 'com.google.android.gms:play-services-auth:16.0.1'
// implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.facebook.fresco:imagepipeline-okhttp3:1.10.0'
implementation 'com.facebook.fresco:animated-gif:1.10.0'
implementation 'com.facebook.fresco:animated-webp:1.10.0'
implementation 'com.facebook.fresco:webpsupport:1.10.0'
implementation 'com.facebook.fresco:fresco:1.10.0'
// fix 0.58 update
// implementation 'com.facebook.fresco:imagepipeline-okhttp:0.8.1'
implementation 'com.facebook.soloader:soloader:0.6.0'
// Glide
implementation("com.github.bumptech.glide:glide:${glideVersion}") {
exclude group: "com.android.support", module: "glide"
......@@ -236,3 +231,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
}
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
apply plugin: 'com.google.gms.google-services'
{
"project_info": {
"project_number": "216497927604",
"firebase_url": "https://testproyect-b002e.firebaseio.com",
"project_id": "testproyect-b002e",
"storage_bucket": "testproyect-b002e.appspot.com"
"project_number": "81109256529",
"firebase_url": "https://minds-com-api-project-81109256529.firebaseio.com",
"project_id": "minds.com:api-project-81109256529"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:216497927604:android:e9dc243d6758e397",
"mobilesdk_app_id": "1:81109256529:android:471681f082570885",
"android_client_info": {
"package_name": "com.minds.mobiletest"
"package_name": "com.minds.mobile"
}
},
"oauth_client": [
{
"client_id": "216497927604-dslu0dgqa34p7upomu9e0aqnlrkgq7ap.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "216497927604-dslu0dgqa34p7upomu9e0aqnlrkgq7ap.apps.googleusercontent.com",
"client_id": "81109256529-7bnt4565mfv7nelmd1suvb2mkakt3d6o.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAXqcOREGAzA2BFVfl8j9bnswBzau5mReU"
"current_key": "AIzaSyDt4mTYivmWtg1Sb4TUbnObO8YQ-5aZGA0"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
"other_platform_oauth_client": [
{
"client_id": "81109256529-7bnt4565mfv7nelmd1suvb2mkakt3d6o.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
......
......@@ -79,7 +79,6 @@
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity android:name="com.reactnativejitsimeet.JitsiMeetNavigatorActivity" />
<meta-data android:name="com.wix.reactnativenotifications.gcmSenderId" android:value="@string/gcm_sender_id"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_stat_name" />
<provider
android:name="android.support.v4.content.FileProvider"
......
......@@ -3,6 +3,8 @@ package com.minds.mobile;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.reactnativejitsimeet.JitsiMeetPackage;
import com.wix.reactnativenotifications.RNNotificationsPackage;
import com.reactnativecommunity.netinfo.NetInfoPackage;
import com.swmansion.rnscreens.RNScreensPackage;
import be.skyzohlabs.rnapk.ReactNativeAPKPackage;
......@@ -27,15 +29,12 @@ import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import com.reactnative.photoview.PhotoViewPackage;
import com.corbt.keepawake.KCKeepAwakePackage;
import com.wix.reactnativenotifications.RNNotificationsPackage;
import cl.json.RNSharePackage;
import cl.json.ShareApplication;
import com.meedan.ShareMenuPackage;
import com.mybigday.rnmediameta.RNMediaMetaPackage;
import com.rnfs.RNFSPackage;
import com.centaurwarchief.smslistener.SmsListenerPackage;
import com.microsoft.codepush.react.CodePush;
import com.reactnativejitsimeet.JitsiMeetPackage;
import com.ocetnik.timer.BackgroundTimerPackage;
import org.pgsqlite.SQLitePluginPackage;
import java.util.Arrays;
......@@ -46,10 +45,7 @@ public class MainApplication extends Application implements ShareApplication, Re
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected String getJSBundleFile() {
return CodePush.getBundleUrl("app.bundle");
}
@Override
public boolean getUseDeveloperSupport() {
......@@ -60,6 +56,7 @@ public class MainApplication extends Application implements ShareApplication, Re
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new JitsiMeetPackage(),
new NetInfoPackage(),
new RNScreensPackage(),
new ReactNativeAPKPackage(),
......@@ -86,8 +83,6 @@ public class MainApplication extends Application implements ShareApplication, Re
new RNMediaMetaPackage(),
new RNFSPackage(),
new SmsListenerPackage(),
new CodePush("_C083_CqL7CmKwASrv6Xrj1wqH7erJMhIBnRQ", MainApplication.this, BuildConfig.DEBUG),
new JitsiMeetPackage(),
new SQLitePluginPackage(),
new BackgroundTimerPackage()
);
......
<resources>
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey">_C083_CqL7CmKwASrv6Xrj1wqH7erJMhIBnRQ</string>
<string name="app_name">Minds</string>
<string name="gcm_sender_id">81109256529</string>
</resources>
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.google.gms:google-services:4.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
......
rootProject.name = 'Minds'
include ':react-native-jitsi-meet'
project(':react-native-jitsi-meet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-jitsi-meet/android')
include ':react-native-notifications'
project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/android/app')
include ':@react-native-community_netinfo'
project(':@react-native-community_netinfo').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/netinfo/android')
include ':react-native-screens'
......@@ -22,10 +26,6 @@ include ':react-native-exit-app'
project(':react-native-exit-app').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-exit-app/android')
include ':react-native-background-timer'
project(':react-native-background-timer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-timer/android')
include ':react-native-jitsi-meet'
project(':react-native-jitsi-meet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-jitsi-meet/android')
include ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
include ':react-native-android-sms-listener'
project(':react-native-android-sms-listener').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-sms-listener/android')
include ':react-native-fs'
......@@ -34,8 +34,6 @@ include ':react-native-media-meta'
project(':react-native-media-meta').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-media-meta/android')
include ':react-native-share-menu'
project(':react-native-share-menu').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share-menu/android')
include ':react-native-notifications'
project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/android')
include ':react-native-share'
project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')
include ':react-native-tcp'
......
This diff is collapsed.
......@@ -11,7 +11,6 @@
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLinkingManager.h>
#import <CodePush/CodePush.h>
@implementation AppDelegate
......@@ -31,6 +30,7 @@
rootViewController.view = rootView;
self.window.rootViewController = navigationController;
[self.window makeKeyAndVisible];
[RNNotifications startMonitorNotifications];
return YES;
}
......@@ -39,7 +39,7 @@
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [CodePush bundleURL];
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
// return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
......@@ -61,13 +61,7 @@
// Required to register for notifications
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
[RNNotifications didRegisterUserNotificationSettings:notificationSettings];
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[RNNotifications didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
......@@ -75,15 +69,4 @@
[RNNotifications didFailToRegisterForRemoteNotificationsWithError:error];
}
// Required for the notification event.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification {
[RNNotifications didReceiveRemoteNotification:notification];
}
// Required for the localNotification event.
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
[RNNotifications didReceiveLocalNotification:notification];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Minds</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.minds.mobile</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.9.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>minds</string>
<key>CFBundleURLSchemes</key>
<array>
<string>minds</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>5</string>
<key>CodePushDeploymentKey</key>
<string>_C083_CqL7CmKwASrv6Xrj1wqH7erJMhIBnRQ</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>dev.minds.io</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>localhost</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>NSCalendarsUsageDescription</key>
<string>$(PRODUCT_NAME) need access to the calendar to schedule your gatherings</string>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to use your camera in order to upload images or videos</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your microphone in order to record videos </string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your Photo Library in order to upload images</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) would like access to your photo gallery so that you can upload images</string>
<key>UIAppFonts</key>
<array>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
<string>Roboto-Black.ttf</string>
<string>Roboto-BlackItalic.ttf</string>
<string>Roboto-Bold.ttf</string>
<string>Roboto-BoldItalic.ttf</string>
<string>Roboto-Italic.ttf</string>
<string>Roboto-Light.ttf</string>
<string>Roboto-LightItalic.ttf</string>
<string>Roboto-Medium.ttf</string>
<string>Roboto-MediumItalic.ttf</string>
<string>Roboto-Regular.ttf</string>
<string>Roboto-Thin.ttf</string>
<string>Roboto-ThinItalic.ttf</string>
<string>AntDesign.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>voip</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Minds</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleGetInfoString</key>
<string/>
<key>CFBundleIdentifier</key>
<string>com.minds.mobile</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.9.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>minds</string>
<key>CFBundleURLSchemes</key>
<array>
<string>minds</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>5</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
<string/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>dev.minds.io</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>localhost</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>NSCalendarsUsageDescription</key>
<string>$(PRODUCT_NAME) need access to the calendar to schedule your gatherings</string>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to use your camera in order to upload images or videos</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string/>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your microphone in order to record videos </string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your Photo Library in order to upload images</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) would like access to your photo gallery so that you can upload images</string>
<key>UIAppFonts</key>
<array>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
<string>Roboto-Black.ttf</string>
<string>Roboto-BlackItalic.ttf</string>
<string>Roboto-Bold.ttf</string>
<string>Roboto-BoldItalic.ttf</string>
<string>Roboto-Italic.ttf</string>
<string>Roboto-Light.ttf</string>
<string>Roboto-LightItalic.ttf</string>
<string>Roboto-Medium.ttf</string>
<string>Roboto-MediumItalic.ttf</string>
<string>Roboto-Regular.ttf</string>
<string>Roboto-Thin.ttf</string>
<string>Roboto-ThinItalic.ttf</string>
<string>AntDesign.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>voip</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
\ No newline at end of file
export default {
init: jest.fn(),
stop: jest.fn(),
registerToken: jest.fn(),
setBadgeCount: jest.fn(),
setOnInitialNotification: jest.fn(),
handleInitialNotification: jest.fn(),
}
\ No newline at end of file
......@@ -51,7 +51,7 @@ class PushService {
try {
this.push.init();
} catch(err) {
logService.exception('Error on push notification initialization', err);
logService.exception('[PushService] Error on push notification initialization', err);
}
}
......
......@@ -32,8 +32,6 @@ StackActions,
NavigationActions
} from 'react-navigation';
import CodePush from 'react-native-code-push';
import Icon from 'react-native-vector-icons/MaterialIcons';
import authService from './../auth/AuthService';
import { List, ListItem } from 'react-native-elements'
......@@ -112,34 +110,6 @@ export default class MoreScreen extends Component {
// this.props.navigation.navigate('NotificationsSettings');
// }
// },
// {
// name: 'Check for updates',
// hideChevron: true,
// icon: (<Icon name="cloud-download" size={ICON_SIZE} style={ styles.icon }/>),
// onPress: async() => {
// const params = {
// updateDialog: Platform.OS !== 'ios',
// installMode: CodePush.InstallMode.IMMEDIATE,
// };
// if (CODE_PUSH_TOKEN) params.deploymentKey = CODE_PUSH_TOKEN;
// let response = await CodePush.sync(params, (status) => {
// switch (status) {
// case CodePush.SyncStatus.UP_TO_DATE:
// ToastAndroid.show('No updates available', ToastAndroid.LONG);
// break;
// case CodePush.SyncStatus.SYNC_IN_PROGRESS:
// ToastAndroid.show('Updating...', ToastAndroid.LONG);
// break;
// case CodePush.SyncStatus.UPDATE_INSTALLED:
// ToastAndroid.show('Updated', ToastAndroid.LONG);
// break;
// }
// });
// }
// },
{
name: i18n.t('settings.logout'),
hideChevron: true,
......
This diff is collapsed.