Browse Source

perf: 不能使用http

zengkunsen 4 months ago
parent
commit
f098732b35
2 changed files with 7 additions and 10 deletions
  1. 6 9
      app.json
  2. 1 1
      app/(auth)/(tabs)/(home)/notificationPage.tsx

+ 6 - 9
app.json

@@ -20,16 +20,19 @@
       "bundleIdentifier": "hk.ayf.crazycharge",
       "infoPlist": {
         "LSApplicationQueriesSchemes": [
-          "whatsapp",
           "whatsapp"
         ],
         "UIBackgroundModes": [
-          "remote-notification",
           "remote-notification"
         ],
         "CFBundleAllowMixedLocalizations": true,
         "NSAppTransportSecurity": {
-          "NSAllowsArbitraryLoads": true
+          "NSExceptionDomains": {
+            "exp.direct": {
+              "NSIncludesSubdomains": true,
+              "NSExceptionAllowsInsecureHTTPLoads": true
+            }
+          }
         },
         "ITSAppUsesNonExemptEncryption": false
       },
@@ -57,12 +60,6 @@
       "package": "hk.ayf.crazycharge",
       "versionCode": 30,
       "googleServicesFile": "./google-services.json",
-      "usesCleartextTraffic": true,
-      "extra": {
-        "network_security_config": {
-          "xml": "<network-security-config><base-config cleartextTrafficPermitted=\"true\"/></network-security-config>"
-        }
-      },
       "config": {
         "googleMaps": {
           "apiKey": "AIzaSyAkfen-gfGOQyA9ui0_OjOS6TrA5-viBMI"

+ 1 - 1
app/(auth)/(tabs)/(home)/notificationPage.tsx

@@ -24,7 +24,7 @@ const NotificationPageComponent = () => {
     const parsedReservationAfter2025 = JSON.parse(reservationAfter2025 as string);
     const parsedPassingThisPromotionToBell = JSON.parse(passingThisPromotionToBell as string);
     return (
-        <SafeAreaView className="flex-1 bg-white" edges={['top', 'right', 'left']}>
+        <SafeAreaView className="flex-1 bg-white" edges={['top']}>
             <View style={{ minHeight: screenHeight, flex: 1 }} className="mx-[5%]">
                 <View style={{ marginTop: 25 }}>
                     <Pressable