基于 PhoneGap 模板的应用程序无法编译 AdWhirl 源

发布于 2024-12-26 11:06:23 字数 669 浏览 2 评论 0原文

使用 Xcode4.2.1,以及基于基本 PhoneGap 模板的应用程序。 (我说模板,但我现在找不到它:( - PhoneGap 是一个静态框架)。

该应用程序本身可以正常工作。

现在尝试添加 AdWhirl 作为源文件提供 - 没有自己的库,尽管

我已将文件夹添加到项目中,但似乎没有 。来编译AdWhirl 源 - 如果修改/破坏 AdWhirl 代码,我不会收到编译错误。

在我的应用程序中包含/导入 AdWhirl 标头的地方,我必须调整 AdWhirl 文件中的相关导入以找到它们的依赖关系 - 似乎与 我可以使用该 hack 进行编译

缺少 AdWhirlView,这似乎也是由于第一个问题 - 未编译,因此无法链接。

- 但随后无法链接- Phases/compile 源,我只有 2 个项目:main.m 和 AppDelegate.m - 我需要将 AdWhirl 代码添加到此处吗

? -project" rel="nofollow">这是一个示例项目,仅包含 AdWhirl 内容,没有 PhoneGap,但仍然存在问题:(

提前感谢您的任何提示/指示。

Using Xcode4.2.1, with a basic PhoneGap template based app. (I say template, but I cant find it now :( - PhoneGap is a static framework).

The app works ok on its own.

Now trying to add in AdWhirl. AdWhirl comes as source files - no library of its own, although there are libraries for the specific ad services you use.

I have added the folders to the project, but it does not seem to compile the AdWhirl sources - if amend/break the AdWhirl code, I get no compile errors.

Where I have included/imported the AdWhirl headers into my app, I had to tweak the related imports in AdWhirl files to find their dependancies - seems to be related to issue above.

I can get it compiling with that hack - but then fails to link - missing AdWhirlView, which also seems to be due to first issue - not being compiled, so not available to link.

Under build phases/compile sources, I have just 2 items: main.m and AppDelegate.m - do I need to add the AdWhirl code into here?

Here is a sample project with just the AdWhirl stuff, no PhoneGap, but still has the issue :(

Thanks in advance for any tips/pointers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

死开点丶别碍眼 2025-01-02 11:06:23

只是想在这里发布我在 Twitter 上给出的答案。问题似乎是 Xcode 对文件夹引用不满意。尝试将 AdWhirl 文件重新导入到您的项目中,但告诉 Xcode 添加文件夹组,而不是文件夹引用。 (顺便说一句,如果有人知道为什么 Xcode 会因文件夹引用而卡住,我很想听听。)

然后,您将开始收到有关 ARC 的错误以及与 Google Ads 框架相关的文件缺失。因此,您必须添加 Google Ads 文件才能消除错误;然后,您需要确保项目中禁用 ARC。如果您想使用 ARC,那么最好的选择是将 AdWhirl 重新打包为无需 ARC 即可构建的静态库,并将其作为工作区中的依赖项。

Just wanted to post the answer here that I gave on Twitter. Seems like the issue is that Xcode is unhappy with folder references. Try reimporting the AdWhirl files into your project, but tell Xcode to add groups for folders, rather than folder references. (Incidentally, if anyone knows why Xcode is choking on the folder references, I'd love to hear about it.)

Then, you'll start getting errors about ARC and missing files pertaining to the Google Ads framework. So, you'll have to add the Google Ads files to quell the errors; then, you'll want to make sure ARC is disabled in your project. If you want to use ARC, then your best bet is to repackage AdWhirl as a static library that builds without ARC, and have that as a dependency in your workspace.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文