Mob*_* IT 13 ios ionic-framework ionic4
升级到xcode 10.2之后,我的ios版ionic停止使用以下命令构建
离子cordova build ios---buildFlag =“-UseModernBuildSystem = 0”
我试图升级cordova-ios@5.0.0并删除并阅读ios平台,但没有运气。
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 4.0, 4.2, 5.0. This setting can be set in the build settings editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.2'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.
cordova build ios --buildFlag=-UseModernBuildSystem=0 exited with exit code 65.
Re-running this command with the --verbose flag may provide more information.
Run Code Online (Sandbox Code Playgroud)
我遇到了同样的错误。我首先尝试在 Xcode 构建设置中切换 Swift 语言版本,并很快意识到一些用 Swift 编写的插件损坏了。值得庆幸的是,让我崩溃的插件是QR Scanner,它维护得很好,并且已经针对 Swift 5 进行了更新。
因此,我修复它的方法是首先运行以下节点命令来查找并更新过时的节点包。
npm outdated
npm update
Run Code Online (Sandbox Code Playgroud)
然后我识别出过时/损坏的 cordova 插件,将其删除,然后重新安装最新版本。使用
cordova plugin list
Run Code Online (Sandbox Code Playgroud)
为了确保一切都正确更新,请使用插件存储库交叉引用版本号。最后我将其添加到 config.xml 中
<preference name="UseSwiftLanguageVersion" value="5" />
Run Code Online (Sandbox Code Playgroud)
运行时一切都成功构建,
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
Run Code Online (Sandbox Code Playgroud)
不幸的是,如果您使用的 cordova 插件是用 Swift 编写的并且维护得不好,那么您就不走运了。如果你勇敢的话,可以尝试自己更新插件。
希望这对您有所帮助,并且不需要您恢复 Xcode,从而失去构建最新版本 iO 的能力。
| 归档时间: |
|
| 查看次数: |
2440 次 |
| 最近记录: |