简体   繁体   English

将不支持的框架添加到项目

[英]Adding unsupported Framework to project

I'm trying to add new library to my project.我正在尝试将新库添加到我的项目中。 This library contains code to deal with bar code scanning and uses CoreVideoFramework which was introduced in iOS 4.0.该库包含处理条形码扫描的代码,并使用 iOS 4.0 中引入的 CoreVideoFramework。 Currently I had my iOS deployment target set to 3.1.2 to support those devices.目前,我将 iOS 部署目标设置为 3.1.2 以支持这些设备。 But now when I try to run new version of application on iPhone with 3.1.2 it crashes at very beginning saying it can't find CoreVideoFramework.但是现在当我尝试在 iPhone 上使用 3.1.2 运行新版本的应用程序时,它一开始就崩溃了,说找不到 CoreVideoFramework。 On 4.2 simulator everything work fine.在 4.2 模拟器上一切正常。

I'm wondering if it is possible to add CoreVideoFramework to project without crashes on 3.x devices.我想知道是否可以将 CoreVideoFramework 添加到项目中而不会在 3.x 设备上崩溃。 I'm thinking about a situation when on 3.x BarCodeScanning is turned off and on 4.x it is enabled.我正在考虑在 3.x BarCodeScanning 上关闭并在 4.x 上启用它的情况。

Simply I'm trying to avoid requesting from user to have iOS 4.x.只是我试图避免用户请求拥有 iOS 4.x。 I want my app to still support 3.x.我希望我的应用仍然支持 3.x。

Yes, that's possible是的,这是可能的

In your target settings go to "Link with libraries" section and for CoreVideo.framework set link option to "Optional" (by default it is "Required").在您的目标设置 go 到“与库链接”部分和 CoreVideo.framework 将链接选项设置为“可选”(默认情况下它是“必需的”)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM