This commit is contained in:
2026-08-24 14:00:44 +08:00
parent 4f39e85882
commit 63b169a033
2 changed files with 4 additions and 5 deletions
+4 -3
View File
@@ -8,9 +8,10 @@
### 构建与安装
```bash
# 真机必须传 Mac 局域网 IP:默认 API_BASE_URL 是 10.0.2.2(仅 Android 模拟器可用),
# 不传则 iPhone 上所有网络请求(登录/授权/套餐)都会失败
flutter build ios --release --dart-define=API_BASE_URL=http://<Mac局域网IP>:8080
# 生产包直接构建即可:默认 API_BASE_URL 为线上域名(lib/config/app_config.dart),无需传参
flutter build ios --release
# 仅本地联调(后端跑在 Mac 上、手机连同一 Wi-Fi)时才覆盖为 Mac 局域网 IP
# flutter build ios --release --dart-define=API_BASE_URL=http://<Mac局域网IP>:8080
# 安装到真机(UDID 可用 `xcrun devicectl list devices` 查询)
xcrun devicectl device install app --device <UDID> build/ios/iphoneos/Runner.app
-2
View File
@@ -57,8 +57,6 @@
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>需要使用相机进行野生动物实时识别</string>