diff --git a/ios/csareactrn60.xcodeproj/project.pbxproj b/ios/csareactrn60.xcodeproj/project.pbxproj
index 8e2908c..0c40881 100644
--- a/ios/csareactrn60.xcodeproj/project.pbxproj
+++ b/ios/csareactrn60.xcodeproj/project.pbxproj
@@ -689,7 +689,7 @@
CODE_SIGN_ENTITLEMENTS = csareactrn60/csareactrn60.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
- CURRENT_PROJECT_VERSION = 162;
+ CURRENT_PROJECT_VERSION = 164;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = 84F3R56BUC;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 84F3R56BUC;
@@ -720,7 +720,7 @@
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 162;
+ CURRENT_PROJECT_VERSION = 164;
DEVELOPMENT_TEAM = 84F3R56BUC;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 84F3R56BUC;
INFOPLIST_FILE = csareactrn60/Info.plist;
diff --git a/ios/csareactrn60/Info.plist b/ios/csareactrn60/Info.plist
index cdecac8..f76acbf 100644
--- a/ios/csareactrn60/Info.plist
+++ b/ios/csareactrn60/Info.plist
@@ -59,29 +59,29 @@
+ NSAppleMusicUsageDescription
+ no use
+ NSBluetoothAlwaysUsageDescription
+ no use
+ NSCalendarsUsageDescription
+ no use
NSCameraUsageDescription
This app needs access to the camera to take photos to upload profile picture and create support ticket.
+ NSContactsUsageDescription
+ no use
NSLocationWhenInUseUsageDescription
Access current location.
NSMicrophoneUsageDescription
Access audio from camera.
+ NSMotionUsageDescription
+ no use
NSPhotoLibraryAddUsageDescription
Choose a picture for user profile image or save image.
NSPhotoLibraryUsageDescription
This app needs access to choose photos to upload profile picture and create support ticket.
- NSContactsUsageDescription
- no use
- NSCalendarsUsageDescription
- no use
- NSAppleMusicUsageDescription
- no use
- NSMotionUsageDescription
- no use
- NSSpeechRecognitionUsageDescription
- no use
NSSiriUsageDescription
no use
- NSBluetoothAlwaysUsageDescription
+ NSSpeechRecognitionUsageDescription
no use
UIAppFonts
@@ -164,6 +164,10 @@
Octicons.ttf
Zocial.ttf
+ UIBackgroundModes
+
+ remote-notification
+
UILaunchStoryboardName
LaunchScreen
UIRequiredDeviceCapabilities
diff --git a/src/screens/login/Login.js b/src/screens/login/Login.js
index 793a380..7b254c4 100644
--- a/src/screens/login/Login.js
+++ b/src/screens/login/Login.js
@@ -40,20 +40,38 @@ class LoginScreen extends Component {
if (this.state.username && this.state.password) {
var regex = /^\d+$/;
+ const fcmToken = null;
if (regex.test(this.state.username) === true) {
console.log('true')
- const fcm = messaging()
- if (!await fcm.hasPermission()) {
- try {
- await messaging().requestPermission()
- } catch (error) {
- this.setState({
- isLoading: false
- })
+ try {
+ const authStatus = await messaging().requestPermission({
+ alert: true,
+ sound: true,
+ badge: true,
+ });
+
+ console.log('authStatus >>> ', authStatus)
+ const enabled =
+ authStatus === messaging.AuthorizationStatus.AUTHORIZED ||
+ authStatus === messaging.AuthorizationStatus.PROVISIONAL;
+
+ if (enabled) {
+ console.log('Notification permission granted.');
+ if(Platform.OS === 'android') {
+ fcmToken = await messaging().getToken();
+ }else {
+ fcmToken = await messaging().getAPNSToken();
+ }
+ console.log('fcmToken >>>> ', fcmToken)
+ } else {
+ console.log('Notification permission denied.');
}
+ } catch (error) {
+ console.error('Failed to request notification permission:', error);
}
- const fcmToken = await messaging().getAPNSToken()
+ // const fcmToken = await messaging().getAPNSToken()
+ console.log('await messaging().getAPNSToken() <<<<<< ', fcmToken)
let params = {