iOS - 使用自定义框架仅在模拟器中导致 'unrecognized selector sent to instance'

标签 ios crash frameworks simulator

我正在使用 ClippingBezier框架。我使用提供的步骤编译了框架 here并将其添加到我的项目中。当该项目在实际设备(即 iPhone 和 iPad)上运行时,它运行得非常完美。但是,在模拟器中,应用程序崩溃并出现错误 NSInvalidArgumentException', reason: '-[UIBezierPath findIntersectionsWithClosedPath:andBeginsInside:]: unrecognized selector sent to instance where the method in the error is found in the框架。

有什么解决办法吗?

最佳答案

认为你正在构建没有模拟器架构的框架,你应该在构建框架时选择模拟器,然后导航到 Release/iphonesimulator 并使用该框架,如果你想在模拟器中测试你的框架, release/iphoneos 中的文件仅用于设备目标。

使用运行脚本创建聚合目标可以帮助创建胖框架(包括设备和模拟器架构),但具有此框架的应用程序不会进入 AppStore。示例脚本可以在 here 中找到.

要为模拟器创建框架,请在以设备目标中的任何模拟器为目标时编译框架。

关于iOS - 使用自定义框架仅在模拟器中导致 'unrecognized selector sent to instance',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48700376/

相关文章:

iOS 和 CouchDB 复制

iphone - 是否有针对 Objective C 的预编译 OAuth 框架可供下载?

ios - 如何在iOS中制作通用框架?

ios - 使用CIFilter的链接器错误

ios - Facebook iOS SDK 3.1.1 "closeAndClearTokenInformation"方法无效

ios - 可视化点击 View ,显示点击指示器

crash - dSYM 文件未在 New Relic 上手动上传

ios - 播放来自NSStream的Raw pcm音频数据

javascript - 使用ajax更新内容后jquery点击事件停止工作

Android后退按钮导致崩溃?