diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 37bc705..ec02146 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -462,6 +462,8 @@ PODS: - React-Core - react-native-pager-view (5.4.25): - React-Core + - react-native-safe-area-context (4.7.4): + - React-Core - react-native-splash-screen (3.3.0): - React-Core - react-native-view-shot (3.8.0): @@ -655,6 +657,7 @@ DEPENDENCIES: - "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)" - react-native-fbsdk-next (from `../node_modules/react-native-fbsdk-next`) - react-native-pager-view (from `../node_modules/react-native-pager-view`) + - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - react-native-splash-screen (from `../node_modules/react-native-splash-screen`) - react-native-view-shot (from `../node_modules/react-native-view-shot`) - react-native-webview (from `../node_modules/react-native-webview`) @@ -769,6 +772,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-fbsdk-next" react-native-pager-view: :path: "../node_modules/react-native-pager-view" + react-native-safe-area-context: + :path: "../node_modules/react-native-safe-area-context" react-native-splash-screen: :path: "../node_modules/react-native-splash-screen" react-native-view-shot: @@ -886,6 +891,7 @@ SPEC CHECKSUMS: react-native-cameraroll: 43049a467518f86545d6aba4caf8e373b03e7bbf react-native-fbsdk-next: 52f81e60eb3e8e0e06cf9728b4572d3509ca9d01 react-native-pager-view: 873aef831fb4fe6e1a2e1ba7a79857e240dea380 + react-native-safe-area-context: 8dba469126c1d5fb9502bfb49996026593292cf4 react-native-splash-screen: 95994222cc95c236bd3cdc59fe45ed5f27969594 react-native-view-shot: d1a701eb0719c6dccbd20b4bb43b1069f304cb70 react-native-webview: 5bb1454f1eb43e0bad229bb428a378d6b865a0ad diff --git a/ios/csareactrn60.xcodeproj/project.pbxproj b/ios/csareactrn60.xcodeproj/project.pbxproj index 9db1e64..fa9e71a 100644 --- a/ios/csareactrn60.xcodeproj/project.pbxproj +++ b/ios/csareactrn60.xcodeproj/project.pbxproj @@ -689,14 +689,14 @@ CODE_SIGN_ENTITLEMENTS = csareactrn60/csareactrn60.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 166; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = 84F3R56BUC; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 84F3R56BUC; INFOPLIST_FILE = csareactrn60/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 2.108; + MARKETING_VERSION = 2.111; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -720,13 +720,13 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 166; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 84F3R56BUC; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 84F3R56BUC; INFOPLIST_FILE = csareactrn60/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 2.108; + MARKETING_VERSION = 2.111; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/src/navigation/AppStack.js b/src/navigation/AppStack.js index e4bd666..a3a2940 100644 --- a/src/navigation/AppStack.js +++ b/src/navigation/AppStack.js @@ -363,7 +363,7 @@ const MainHeader = ({ navigation }) => { }, []) return - - {NavigationService.setTopLevelNavigator(navigatorRef)}}/> - - + if(Platform.OS === 'android') { + return ( + + + {NavigationService.setTopLevelNavigator(navigatorRef)}}/> + + + ) + }else { + return ( + + {NavigationService.setTopLevelNavigator(navigatorRef)}}/> + + ) + } } } diff --git a/src/screens/login/Login.js b/src/screens/login/Login.js index af043b4..b17a515 100644 --- a/src/screens/login/Login.js +++ b/src/screens/login/Login.js @@ -33,6 +33,12 @@ class LoginScreen extends Component { this._login = this._login.bind(this) } + async componentDidMount() { + await messaging().deleteToken() + console.log('deletetoken'); + + } + async _login () { this.setState({ isLoading: true @@ -40,7 +46,7 @@ class LoginScreen extends Component { if (this.state.username && this.state.password) { var regex = /^\d+$/; - const fcmToken = null; + let fcmToken = null; if (regex.test(this.state.username) === true) { console.log('true') try { @@ -57,11 +63,7 @@ class LoginScreen extends Component { if (enabled) { console.log('Notification permission granted.'); - if(Platform.OS === 'android') { - fcmToken = await messaging().getToken(); - }else { - fcmToken = await messaging().getAPNSToken(); - } + fcmToken = await messaging().getToken(); console.log('fcmToken >>>> ', fcmToken) } else { console.log('Notification permission denied.');