可重新定位的dylibs(例如嵌入式框架)只在ios8.0和以后(@rpath/libswift_stdlib_core.dylib)上得到支持。

时间:2022-04-26 21:46:19

I just upgraded from Xcode 6 Beta 2 to Xcode Beta 3 and am now getting the following warning when building my project:

我刚刚从Xcode 6 Beta 2升级到Xcode Beta 3,在构建我的项目时得到了以下警告:

ld: warning: relocatable dylibs (e.g. embedded frameworks) are only supported on iOS 8.0 and later (@rpath/libswift_stdlib_core.dylib)

It is a warning but seems to mean my current setup will not work on iOS 7.1, which is my deployment target. How can I track down which frameworks are embedded, and how can I fix this for iOS < 8.0?

这是一个警告,但似乎意味着我当前的设置不会在ios7.1上运行,这是我的部署目标。我如何追踪哪些框架是嵌入的,以及我如何将其修复为iOS < 8.0?

7 个解决方案

#1


9  

This appears to be a bug of Beta 3. As pointed out by Apple Engineer on this post.

这似乎是Beta 3的错误。正如苹果工程师在这篇文章中指出的那样。

I have also been living with this warning when running apps on iOS 7.1 device.

在iOS 7.1设备上运行应用程序时,我也一直使用这个警告。

#2


4  

You see and add them on the project page when you select the target: tab General->Embedded Binaries (and they then appear in Build Phases->Embed Frameworks).

当您选择目标时,您可以在项目页面上看到并添加它们:tab General->嵌入的二进制文件(然后它们出现在构建阶段->嵌入框架)。

可重新定位的dylibs(例如嵌入式框架)只在ios8.0和以后(@rpath/libswift_stdlib_core.dylib)上得到支持。

Embedded frameworks for OSX were available in Xcode 5, but not for iOS.

OSX的嵌入式框架在Xcode 5中是可用的,但在iOS中没有。

WWDC session regarding new features in Xcode 6 specifically promised dynamic frameworks for iOS 8 (someone please add citation when developer center comes back online). So far, with all Xcode 6 betas, I have had no problems compiling and debugging an app with frameworks on iOS 7.

关于Xcode 6中的新特性的WWDC会议专门为ios8提供了动态框架(当开发者中心上线时,请添加引用)。到目前为止,在所有的Xcode 6 beta版中,我都没有问题编译和调试一个在ios7上有框架的应用程序。

But since this wasn't promised, frameworks for iOS7 is something you cannot depend on (e.g. this may stop working in later betas; an app with embedded framework for iOS 7 may be rejected, etc.). That may explain why they added an explicit warning.

但是由于这并不是承诺,iOS7的框架是您不能依赖的(例如,这可能会在以后的betas中停止工作);iOS 7嵌入式框架的应用程序可能会被拒绝。这也许可以解释为什么他们增加了一个明确的警告。

There's not much you can do if this feature turns out to be indeed unsupported, other than remove the frameworks from the target and use static libraries as we did with Xcode 5. Or go the iOS8-only route.

如果这个特性实际上是不受支持的,除了从目标中删除框架,并像使用Xcode 5那样使用静态库,您可以做的事情不多。或者走iOS8-only路线。

#3


1  

After using XCode 6.1.1 I am able to put the code on iOS 8+ iOS7.1.2 and iOS 6.1.3 Although the warning is still there but the app works absolutely fine on all the 3 OSs

在使用XCode 6.1.1之后,我可以将代码放到iOS 8+ iOS7.1.2和ios6.1.3中,尽管警告仍然存在,但这款应用程序在所有3个操作系统上都运行良好。

====================== Lucky guy... My project keeps failing to compile after I referenced the PushKit framework.

= = = = = = = = = = = = = = = = = = = = = =幸运的家伙……在引用了PushKit框架后,我的项目一直未能编译。

The project is a new project created by Xcode with only 3 new functions for testing Push Notification.

这个项目是Xcode创建的一个新项目,只有3个新功能用于测试推送通知。

The workaround is to put the PushKit framework as "embedded", but this is not a good solution since my working Xcode project will be generated from Unity3d. Making the changes manually will break the auto build process.

解决方案是将PushKit框架作为“嵌入式”,但这不是一个好的解决方案,因为我的Xcode项目将由Unity3d生成。手动进行更改将会破坏自动构建过程。

#4


0  

I had this error after adding a C++ framework (DeepBelief) to a project. Adding an empty .cpp file to the project fixed it.

我在向一个项目添加c++框架(DeepBelief)之后出现了这个错误。将一个空的.cpp文件添加到项目中。

I'm using Beta4, and found the answer on the DeepBelief github site:

我正在使用Beta4,并在DeepBelief github网站上找到了答案:

XCode may be skipping the standard C++ library, and that's needed by the DeepBelief.framework code. One workaround I've found is to include an empty .mm or .cpp file in the project to trick XCode into treating it as a C++ project.

XCode可能跳过了标准c++库,这是DeepBelief.framework代码所需要的。我发现的一个解决方案是在项目中包含一个空的.mm或.cpp文件,以欺骗XCode将其作为一个c++项目处理。

#5


0  

Read this github post from ReactiveCocoa

请阅读ReactiveCocoa的github文章。

The bug is still present in XCode6 GM and so XCode6 final release:

这个bug仍然存在于XCode6 GM中,因此XCode6最终版本:

Well, I get the exact same issue in xcode6GM no matter whether I create framework for swift OR objc :-[[[[[[[[[[[[[[[

嗯,我在xcode6GM中得到了完全相同的问题,无论我是否为swift或objc创建框架:- - -[[[]

According to Apple Extension Programming Guide:

根据苹果扩展编程指南:

You can make a containing app available to users running iOS 7 or earlier, but then must take precautions to safely link embedded frameworks when running in iOS 8 or later.

你可以为运行iOS 7或更早的用户提供一个包含应用程序的应用程序,但在iOS 8或更高版本中运行时,必须注意安全链接嵌入式框架。

talking about app extensions, but if you read it, you can understand that this applies to embedded frameworks in general.

谈到应用程序扩展,但如果你读了它,你就会明白这适用于一般的嵌入式框架。

#6


0  

this is happening because one of your embedded binaries's deployment target is lower than your applications target. lower your embeded binaries's building target and be fine.

这是因为您的一个嵌入式二进制文件的部署目标比您的应用程序目标要低。降低你嵌入的二进制文件的目标,并保持良好的状态。

this was the error cause in xcode 6.1.1

这是xcode 6.1.1中的错误原因。

i was using xcglogger with deployment target ios 8.0, and my application's deployment target 7.0. set the xcglogger's deployment target ios 7.0 and problem solved.

我使用的是xcglogger,部署目标是ios8.0,我的应用程序的部署目标是7.0。设置xcglogger的部署目标ios7.0并解决问题。

#7


0  

After using XCode 6.1.1 I am able to put the code on iOS 8+ iOS7.1.2 and iOS 6.1.3 Although the warning is still there but the app works absolutely fine on all the 3 OSs

在使用XCode 6.1.1之后,我可以将代码放到iOS 8+ iOS7.1.2和ios6.1.3中,尽管警告仍然存在,但这款应用程序在所有3个操作系统上都运行良好。

Yes not able to submit the app for review. Had to do by changing the modern frameworks to Static libs.

是的,不能提交应用程序进行审查。必须通过将现代框架更改为静态libs来实现。

#1


9  

This appears to be a bug of Beta 3. As pointed out by Apple Engineer on this post.

这似乎是Beta 3的错误。正如苹果工程师在这篇文章中指出的那样。

I have also been living with this warning when running apps on iOS 7.1 device.

在iOS 7.1设备上运行应用程序时,我也一直使用这个警告。

#2


4  

You see and add them on the project page when you select the target: tab General->Embedded Binaries (and they then appear in Build Phases->Embed Frameworks).

当您选择目标时,您可以在项目页面上看到并添加它们:tab General->嵌入的二进制文件(然后它们出现在构建阶段->嵌入框架)。

可重新定位的dylibs(例如嵌入式框架)只在ios8.0和以后(@rpath/libswift_stdlib_core.dylib)上得到支持。

Embedded frameworks for OSX were available in Xcode 5, but not for iOS.

OSX的嵌入式框架在Xcode 5中是可用的,但在iOS中没有。

WWDC session regarding new features in Xcode 6 specifically promised dynamic frameworks for iOS 8 (someone please add citation when developer center comes back online). So far, with all Xcode 6 betas, I have had no problems compiling and debugging an app with frameworks on iOS 7.

关于Xcode 6中的新特性的WWDC会议专门为ios8提供了动态框架(当开发者中心上线时,请添加引用)。到目前为止,在所有的Xcode 6 beta版中,我都没有问题编译和调试一个在ios7上有框架的应用程序。

But since this wasn't promised, frameworks for iOS7 is something you cannot depend on (e.g. this may stop working in later betas; an app with embedded framework for iOS 7 may be rejected, etc.). That may explain why they added an explicit warning.

但是由于这并不是承诺,iOS7的框架是您不能依赖的(例如,这可能会在以后的betas中停止工作);iOS 7嵌入式框架的应用程序可能会被拒绝。这也许可以解释为什么他们增加了一个明确的警告。

There's not much you can do if this feature turns out to be indeed unsupported, other than remove the frameworks from the target and use static libraries as we did with Xcode 5. Or go the iOS8-only route.

如果这个特性实际上是不受支持的,除了从目标中删除框架,并像使用Xcode 5那样使用静态库,您可以做的事情不多。或者走iOS8-only路线。

#3


1  

After using XCode 6.1.1 I am able to put the code on iOS 8+ iOS7.1.2 and iOS 6.1.3 Although the warning is still there but the app works absolutely fine on all the 3 OSs

在使用XCode 6.1.1之后,我可以将代码放到iOS 8+ iOS7.1.2和ios6.1.3中,尽管警告仍然存在,但这款应用程序在所有3个操作系统上都运行良好。

====================== Lucky guy... My project keeps failing to compile after I referenced the PushKit framework.

= = = = = = = = = = = = = = = = = = = = = =幸运的家伙……在引用了PushKit框架后,我的项目一直未能编译。

The project is a new project created by Xcode with only 3 new functions for testing Push Notification.

这个项目是Xcode创建的一个新项目,只有3个新功能用于测试推送通知。

The workaround is to put the PushKit framework as "embedded", but this is not a good solution since my working Xcode project will be generated from Unity3d. Making the changes manually will break the auto build process.

解决方案是将PushKit框架作为“嵌入式”,但这不是一个好的解决方案,因为我的Xcode项目将由Unity3d生成。手动进行更改将会破坏自动构建过程。

#4


0  

I had this error after adding a C++ framework (DeepBelief) to a project. Adding an empty .cpp file to the project fixed it.

我在向一个项目添加c++框架(DeepBelief)之后出现了这个错误。将一个空的.cpp文件添加到项目中。

I'm using Beta4, and found the answer on the DeepBelief github site:

我正在使用Beta4,并在DeepBelief github网站上找到了答案:

XCode may be skipping the standard C++ library, and that's needed by the DeepBelief.framework code. One workaround I've found is to include an empty .mm or .cpp file in the project to trick XCode into treating it as a C++ project.

XCode可能跳过了标准c++库,这是DeepBelief.framework代码所需要的。我发现的一个解决方案是在项目中包含一个空的.mm或.cpp文件,以欺骗XCode将其作为一个c++项目处理。

#5


0  

Read this github post from ReactiveCocoa

请阅读ReactiveCocoa的github文章。

The bug is still present in XCode6 GM and so XCode6 final release:

这个bug仍然存在于XCode6 GM中,因此XCode6最终版本:

Well, I get the exact same issue in xcode6GM no matter whether I create framework for swift OR objc :-[[[[[[[[[[[[[[[

嗯,我在xcode6GM中得到了完全相同的问题,无论我是否为swift或objc创建框架:- - -[[[]

According to Apple Extension Programming Guide:

根据苹果扩展编程指南:

You can make a containing app available to users running iOS 7 or earlier, but then must take precautions to safely link embedded frameworks when running in iOS 8 or later.

你可以为运行iOS 7或更早的用户提供一个包含应用程序的应用程序,但在iOS 8或更高版本中运行时,必须注意安全链接嵌入式框架。

talking about app extensions, but if you read it, you can understand that this applies to embedded frameworks in general.

谈到应用程序扩展,但如果你读了它,你就会明白这适用于一般的嵌入式框架。

#6


0  

this is happening because one of your embedded binaries's deployment target is lower than your applications target. lower your embeded binaries's building target and be fine.

这是因为您的一个嵌入式二进制文件的部署目标比您的应用程序目标要低。降低你嵌入的二进制文件的目标,并保持良好的状态。

this was the error cause in xcode 6.1.1

这是xcode 6.1.1中的错误原因。

i was using xcglogger with deployment target ios 8.0, and my application's deployment target 7.0. set the xcglogger's deployment target ios 7.0 and problem solved.

我使用的是xcglogger,部署目标是ios8.0,我的应用程序的部署目标是7.0。设置xcglogger的部署目标ios7.0并解决问题。

#7


0  

After using XCode 6.1.1 I am able to put the code on iOS 8+ iOS7.1.2 and iOS 6.1.3 Although the warning is still there but the app works absolutely fine on all the 3 OSs

在使用XCode 6.1.1之后,我可以将代码放到iOS 8+ iOS7.1.2和ios6.1.3中,尽管警告仍然存在,但这款应用程序在所有3个操作系统上都运行良好。

Yes not able to submit the app for review. Had to do by changing the modern frameworks to Static libs.

是的,不能提交应用程序进行审查。必须通过将现代框架更改为静态libs来实现。