gpt4 book ai didi

ios - ld : file not found: -Obj-C error when building a new XCode project using embeded Cordova webview

转载 作者:行者123 更新时间:2023-11-29 03:17:59 25 4
gpt4 key购买 nike

我正在尝试使用 Cordova webview 创建一个基本的 iOS 应用程序。我跟着 Cordova instructions for iOS webView .具体来说,第 11 步要求我将这两个选项放入目标中的 other linker flags 字段中:

-force_load
-Obj-C

当我尝试构建项目时,最后出现以下错误:

ld: file not found: -Obj-C
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我是 iOS 的新手,但对我来说,链接器认为我正在向它传递路径而不是选项。这是由于 XCode 的更改还是我做错了什么?我正在使用最新的 (v5.0.2) xcode。如果有任何帮助,我将不胜感激。

编辑:我找到了解决方法我的目标是使用 cordova webview 启动一个 xcode 项目。实际上当我们用cordova命令行工具创建一个新的应用程序并在其中添加ios平台时,cordova也会为我们生成一个xcode项目。当我打开项目时,我可以编辑 MainViewContorller.m 或将其他库或 SDK 添加到项目中。所以我的问题已经解决了。

我仍然很好奇为什么官方文档中的说明不起作用。如果您知道原因,请随时分享。

最佳答案

只需删除选项即可-force_load并替换选项-Obj-C-ObjC

关于ios - ld : file not found: -Obj-C error when building a new XCode project using embeded Cordova webview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21448428/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com