在 iPhone 上弱链接 StoreKit 框架时出错
我正在尝试向我的应用程序添加应用程序内购买支持。我希望该应用程序仍然能够支持 OS2.2.1,但除非操作系统版本为 3.0 或更高版本,否则 IAP 不可用。
我尝试过弱链接 StoreKit 框架。基本上,我已将 StoreKit.framework 添加到框架中,但不在目标中的 Link Binary With Libraries 中,并按照 Apple 说明将weak_framework -StoreKite 添加到其他标志行。现在,当我在 OS2.2.1 上运行该应用程序时,它在执行 main 函数之前就在 _read_images 中崩溃了。我确实需要支持 2.2.1,而且我知道其他应用程序也可以支持。感谢您的任何帮助。
I am trying to add In App Purchase support to my app. I would like the app to still be able to support OS2.2.1, but IAP are not available unless the OS version is 3.0 or higher.
I have tried weak-linking the StoreKit framework. Basically, I have StoreKit.framework added to frameworks, but not in Link Binary With Libraries in the target, and have added weak_framework -StoreKite to the other flags line, as per the Apple instructions. Now when I run the app on OS2.2.1 it crashes in _read_images before the main function is even executed. I really need to support 2.2.1 and I know other apps do it. Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚在 iAd 框架中遇到了类似的问题。嗯,有点像。我以为是 iAd 框架,但当我完全注释掉所有新代码并删除框架时,它仍然崩溃。
它在模拟器上有效,但在设备上无效。我在控制台日志中发现 posix_spawn("/var/mobile/Applications/...", ...): Permission returned 。
这让我相信这是某种类型的代码签名错误。我从设备中删除了该应用程序并重新安装。这成功启动了应用程序。
设备上安装的已发布版本的版本似乎存在一些残留,不允许正确安装调试版本。
I just ran into a similar issue with the iAd Framework. Well sort of. I thought it was the iAd Framework but when I completely commented out all the new code and removed the framework it was still crashing.
It worked on the Simulator just not on the device. I found
posix_spawn("/var/mobile/Applications/...", ...): Permission denied
in the Console logs.This lead me to believe that it was some type of code-signing error. I deleted the app from the device and re-installed. This launched the app successfully.
It appears there was some remnants of the version installed on the device from the released version did not allow the debug version to install correctly.