瀏覽代碼

Resove iOS APP crash issue and Resove Apple Store Connect issue (ITMS-91055)

vbea 2 年之前
父節點
當前提交
43f5233472

+ 4 - 1
Strides-APP/app/api/http.js

@@ -8,7 +8,10 @@ const hostUrl = app.product ? 'https://csms.chargeco.global/' : 'https://uat.cha
 const service = 'chargeco/'
 export const host = hostUrl;
 
-const DEBUG = app.debug && !app.product;
+//在生产模式显示日志
+const DEBUG_PROD = false;
+//日志开关
+const DEBUG = DEBUG_PROD || (app.debug && !app.product);
 
 Axios.defaults.timeout = 30000;
 Axios.defaults.timeoutErrorMessage = "Connection timeout, please check your network.";

+ 4 - 10
Strides-APP/app/pages/home/maps/LocationPermission.js

@@ -10,18 +10,12 @@ import TextView from '../../../components/TextView';
 import LocationEnabler from 'react-native-location-enabler';
 
 //global.hasPermission = false;
-const {
-  PRIORITIES: { HIGH_ACCURACY },
-  addListener,
-  checkSettings,
-  requestResolutionSettings
-} = LocationEnabler;
 
 class LocationListener {
   constructor() {
     this.listener = undefined;
     this.config = {
-      priority: HIGH_ACCURACY, // default BALANCED_POWER_ACCURACY
+      priority: LocationEnabler.PRIORITIES.HIGH_ACCURACY, // default BALANCED_POWER_ACCURACY
       alwaysShow: false, // default false
       needBle: false // default false
     };
@@ -29,12 +23,12 @@ class LocationListener {
   }
   
   addListener() {
-    this.listener = addListener(({ locationEnabled }) => {
+    this.listener = LocationEnabler.addListener(({ locationEnabled }) => {
       if (!locationEnabled) {
         console.log("status: " + this.status  + "," + locationEnabled);
         if (this.status != locationEnabled) {
           this.status = locationEnabled;
-          requestResolutionSettings(this.config);
+          LocationEnabler.requestResolutionSettings(this.config);
         }
       }
     })
@@ -48,7 +42,7 @@ class LocationListener {
 
   check() {
     this.status = undefined;
-    checkSettings(this.config)
+    LocationEnabler.checkSettings(this.config)
   }
 }
 

+ 6 - 0
Strides-APP/ios/Podfile

@@ -129,6 +129,12 @@ target 'Strides' do
       config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
       config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "16.4"
     end
+    installer.pods_project.targets.each do |target|
+      target.build_configurations.each do |config|
+        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
+        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "16.4"
+      end
+    end
     __apply_Xcode_12_5_M1_post_install_workaround(installer)
   end
 end

+ 3 - 2
Strides-APP/ios/PrivacyInfo.xcprivacy

@@ -9,7 +9,8 @@
 			<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
 			<key>NSPrivacyAccessedAPITypeReasons</key>
 			<array>
-				<string>C617.1</string>
+				<string>85F4.1</string>
+				<string>E174.1</string>
 			</array>
 		</dict>
 		<dict>
@@ -17,7 +18,7 @@
 			<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
 			<key>NSPrivacyAccessedAPITypeReasons</key>
 			<array>
-				<string>C617.1</string>
+				<string>35F9.1</string>
 			</array>
 		</dict>
 		<dict>

+ 2 - 0
Strides-APP/ios/Strides/Info.plist

@@ -128,5 +128,7 @@
 	</array>
 	<key>UIViewControllerBasedStatusBarAppearance</key>
 	<false/>
+	<key>LSMinimumSystemVersion</key>
+	<string>14.4</string>
 </dict>
 </plist>

+ 1 - 1
Strides-APP/package.json

@@ -46,7 +46,7 @@
     "react-native-gradients": "2.0.1",
     "react-native-i18n": "https://gitee.com/vbes/react-native-i18n.git",
     "react-native-image-crop-picker": "0.40.0",
-    "react-native-location-enabler": "4.1.1",
+    "react-native-location-enabler": "https://gitee.com/vbes/react-native-location-enabler.git",
     "react-native-map-clustering": "3.4.2",
     "react-native-map-link": "2.11.2",
     "react-native-maps": "https://gitee.com/vbes/react-native-maps.git",