【发布时间】:2019-09-24 19:09:46
【问题描述】:
复制步骤
运行flutter build ios
我在为 ios 生成发布版本时遇到问题,在我的应用被 Apple 团队拒绝后我注意到:
TMS-90338: Non-public API usage - The app references non-public symbols in Frameworks/Flutter.framework/Flutter: _ptrace. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/
我查找了这些 API,它似乎发送了一个调试版本而不是发布版本,所以我在终端上运行了发布版本的命令,我得到了这个:
Running Xcode build...
├─Building Dart code... 96,2s
├─Generating dSYM file... 0,4s
├─Stripping debug symbols... 0,1s
├─Assembling Flutter resources... 2,7s
└─Compiling, linking and signing... 6,5s
Xcode build done. 109,5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode 的输出:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled,
and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target.
The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled,
and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
Building AOT snapshot in release mode (ios-release)...
Building App.framework for arm64...
Building App.framework for armv7...
Building AOT snapshot in release mode (ios-release)... 91,0s
Built to build/aot/.
warning: parsing line table prologue at offset 0x6f697463 found unsupported version 0x00
warning: line table parameters mismatch. Cannot emit.
note: while processing /Users/devel/FlutterProjects/ds_token/build/aot/armv7/snapshot_assembly.o
Project /Users/devel/FlutterProjects/ds_token built and packaged successfully.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
Non-fat binary /Users/devel/FlutterProjects/ds_token/build/ios/Release-iphoneos/Runner.app/Frameworks/barcode_scan.framework/barcode_scan is not armv7. Running lipo -info:
Non-fat file: /Users/devel/FlutterProjects/ds_token/build/ios/Release-iphoneos/Runner.app/Frameworks/barcode_scan.framework/barcode_scan is architecture: arm64
Command /bin/sh failed with exit code 1
【问题讨论】:
-
只需检查几个步骤。首先打开runner.xcworkspace并选择runner项目(目标上方),进入产品菜单选择播放按钮旁边的“clean build folder”(或通过产品菜单),“runner”后选择scheme “通用 ios 设备”,然后在产品菜单中选择“存档”
-
我认为问题是你的flutter SDK需要更新