diff --git a/flutter_app/README.md b/flutter_app/README.md index 2561190..f9b0f1d 100644 --- a/flutter_app/README.md +++ b/flutter_app/README.md @@ -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://: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://:8080 # 安装到真机(UDID 可用 `xcrun devicectl list devices` 查询) xcrun devicectl device install app --device build/ios/iphoneos/Runner.app diff --git a/flutter_app/ios/Runner/Info.plist b/flutter_app/ios/Runner/Info.plist index 1f9a4d8..7007346 100644 --- a/flutter_app/ios/Runner/Info.plist +++ b/flutter_app/ios/Runner/Info.plist @@ -57,8 +57,6 @@ NSAllowsArbitraryLoads - NSAllowsArbitraryLoadsInWebContent - NSCameraUsageDescription 需要使用相机进行野生动物实时识别