dyld:没有加载的库:@rpath/libswift_stdlib_core.dylib。

时间:2021-10-06 21:29:34

I get this error after adding a Swift class to an old Xcode project.

在向旧的Xcode项目添加了一个Swift类之后,我得到了这个错误。

dyld: Library not loaded: @rpath/libswift_stdlib_core.dylib

dyld:没有加载的库:@rpath/libswift_stdlib_core.dylib。

How can I make the project run again?

我怎样才能使这个项目再次运行呢?

35 个解决方案

#1


146  

For me none of the previous solutions worked. We discovered that there is an flag ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES (in earlier versions: "Embedded Content Contains Swift Code") in the Build Settings that needs to be set to YES. It was NO by default!

对我来说,以前的解决方案都不管用。我们发现,在需要设置为YES的构建设置中总是有一个标志ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES(在早期版本中:“嵌入式内容包含Swift代码”)。这不是默认的!

#2


90  

This error can occur if something went wrong during the conversion of an Objective-C project to start using Swift. The issue is that the Linker build settings never got configured properly, so you'll have to do it by hand. Look for the Runpath Search Paths build setting and set it to:

如果在将Objective-C项目转换为使用Swift时发生了错误,则会发生此错误。问题是链接器构建设置从来没有正确配置过,所以您必须手动配置。查找Runpath搜索路径构建设置,设置为:

$(inherited) @executable_path/Frameworks

dyld:没有加载的库:@rpath/libswift_stdlib_core.dylib。

EDIT: I should also add that there has been recent spate of these errors caused by something else entirely - Apple made a change in Swift itself, starting in perhaps Xcode 6.1 or 6.1.1. The only solution seems to be to quit Xcode, destroy your certificates in Keychain Access, go to the Member Center and delete all certificates and profiles (except the profiles for apps in the Store - you can't delete them), and then start the entire certificate request process from scratch.

编辑:我还应该补充说,最近出现了一些完全由其他原因引起的错误——苹果公司在迅速地改变了自己,从Xcode 6.1或6.1.1开始。唯一的解决方案似乎是退出Xcode,在密钥链访问中销毁证书,到成员中心删除所有证书和概要文件(除了商店中应用程序的概要文件之外——您不能删除它们),然后从头开始整个证书请求过程。

#3


79  

I'm not really sure why this question is being downvoted, I had this problem as well when I first tried to use Swift with an existing project. An Xcode restart also fixed this for me.

我不太清楚为什么这个问题会被否决,当我第一次尝试在现有项目中使用Swift时,我也遇到了这个问题。Xcode restart也为我修复了这一点。

#4


53  

I searched long on this issue. There are several reasons causes this issue.

在这个问题上我找了很久。造成这个问题的原因有很多。

If you are facing when you and Swift code/library in an Objectice C project you should try Solution 1-2-3

如果您在objective - C项目中与Swift代码/库一起面对,请尝试解决方案1-2-3

If you are facing this issue with a new a Swift project Solution 4 will fit you best.

如果您正面临这个问题,那么一个新的Swift项目解决方案4将最适合您。

Solution 1:

Restart Xcode, then computer and iPhone

重新启动Xcode,然后是电脑和iPhone

Solution 2:

Go to project build settings and set Always Embed Swift Standard Libraries (previously Embedded Content Contains Swift Code) flag to YES

Go to project build settings and set Always Embed Swift Standard Libraries(先前嵌入的内容包含Swift Code)标志为YES。

Solution 3:

Go to project build settings and add @executable_path/Frameworks to Runpath Search Paths option

转到项目构建设置,并向Runpath搜索路径选项添加@executable_path/框架

Solution 4:

If none of above works, this should. Apple seems to be ninja patched certificates as mentioned in AirSign's post

如果以上任何一种方法都不起作用,那么这应该是可行的。在AirSign的帖子中,苹果似乎是忍者的专利证书。

At InHouse certificates

在自身的证书

Subject: UID=269J2W3P2L, CN=iPhone Distribution: Company Name, O=Company Name, C=FR

主题:UID=269J2W3P2L, CN=iPhone发行版:公司名称,O=公司名称,C=FR。

they added a new field named OU

他们增加了一个叫OU的新领域

Subject: UID=269J2W3P2L, CN=iPhone Distribution: Company Name, OU=269J2W3P2L, O=Company Name, C=FR

主题:UID=269J2W3P2L, CN=iPhone发行:公司名称,OU=269J2W3P2L, O=公司名称,C=FR

so you should just recreate certificate and provision

因此,您应该重新创建证书和规定

#5


40  

In my case I was trying to import a custom framework and was getting the similar error. Turns out I had to import the framework in the Embedded Binaries rather than in to the Linked Frameworks and Libraries.

在我的例子中,我试图导入一个自定义框架并得到了类似的错误。结果我不得不将框架导入到嵌入式二进制文件中,而不是导入到链接框架和库中。

Embedded Binaries are under Projects Settings -> -> General

嵌入式二进制文件在项目设置下——> ->通用

#6


16  

For developers who have had this issue with a Adhoc/Enterprise distribution builds,

对于有过Adhoc/企业发行版问题的开发人员,

Create the production certificate from dev portal and then regenerate the distribution profile. Download and install both of them on your Mac. Ensure you selected the right profile in your Xcode build settings and rebuild your app.

从dev门户创建生产证书,然后重新生成分发概要文件。下载并安装在你的Mac上。确保你在你的Xcode构建设置中选择了正确的配置文件并重新构建你的应用。

Source: https://devforums.apple.com/message/1022908#1022908

来源:https://devforums.apple.com/message/1022908 1022908

#7


14  

Solution 5:

方案五:

In my case, all solutions mentioned in the answer of accfews were very helpful but none has worked. I solved my problem by adding my swift library in the section "Embedded Binaries" in the "General" section of my Project's target. Perhaps is this due to the fact that I have included my swift framework in my workspace? Whatever it compiles now! Get ready Swift, I'm here!

在我的案例中,accfews的回答中提到的所有解决方案都非常有用,但没有一个有效。我在项目目标的“一般”部分的“嵌入式二进制文件”部分中添加了swift库,从而解决了我的问题。这可能是因为我在工作空间中包含了swift框架吗?现在不管它编译!快准备,我在这里!

#8


10  

A simple restart of Xcode solved the issue for me.

Xcode的简单重启为我解决了这个问题。

#9


4  

For me, the issue was due to the fact that my Apple Worldwide Developer Relations Certification Authority was invalid.

对我来说,这个问题是因为我的苹果全球开发者关系认证机构是无效的。

Download it from here: https://developer.apple.com/certificationauthority/AppleWWDRCA.cer

从这里下载:https://developer.apple.com/certificationauthority/AppleWWDRCA.cer

Drag and drop it into Keychain Access, clean the project, and run.

将其拖放到密钥链访问、清理项目并运行。

#10


3  

I tried all the answers given above, nothing worked.

我尝试了上面给出的所有答案,但都没有成功。

Finally worked after updating to Yosemite

最后在更新到Yosemite之后工作

#11


3  

I had an Obj-C project where I started adding swift source files. The following fixed the issue for me:

我有一个object - c项目,我开始添加swift源文件。以下为我解决了这个问题:

  1. Linking: RUNPATH SEARCH PATHS = $(inherited) @executable_path/Frameworks
  2. 链接:RUNPATH搜索路径= $(继承)@executable_path/框架
  3. Swift Compiler - Code Generation: EMBEDDED CONTENT CONTAINS SWIFT = YES
  4. 快速编译器-代码生成:嵌入内容包含Swift = YES。

I just created a new project from the templates Xcode 6.3 and compared the project settings with my old original project.

我刚刚从模板Xcode 6.3中创建了一个新项目,并将项目设置与原来的项目进行了比较。

#12


2  

I had this issue using an Ad Hoc (or enterprise) mobileprovision with a production certificate. Switching to a development certificate and mobileprovision solved the issue.

我使用了一个带有生产证书的临时(或企业)mobile条款来解决这个问题。切换到开发证书和移动设备条款解决了这个问题。

#13


2  

My project is a Swift project with some Objective-C classes. I had the same problem when signed with old inHouse (enterprise) certificate.

我的项目是一个快速的项目,有一些Objective-C类。我在与旧的inHouse(企业)证书签署时也遇到了同样的问题。

The following steps fixed this for me.

以下步骤为我修复了这个问题。

  1. Create and use a new certificate and mobile provision.
    (Ref. AIRSIGN’s blog)
  2. 创建并使用新的证书和移动设备。(Ref AIRSIGN的博客)
  3. Set Runpath Search Paths build setting to: $(inherited) @executable_path/Frameworks.
    (Ref. matt’s answer)
  4. 设置Runpath搜索路径构建设置为:$(继承)@executable_path/框架。(引用马特的回答)

#14


2  

Solution 6:

解决方案6:

In our case, the Enterprise Distribution Certificate had been revoked. Generating a new certificate and updating the provisioning profile fixed the issue.

在我们的案例中,企业分发证书已经被撤销。生成一个新证书并更新配置概要文件解决了这个问题。

(There seems to be many different causes for this error. Hope this helps someone.)

这个错误的原因似乎有很多。希望这可以帮助别人。)

#15


2  

I have faced the same issue, setting the right code sign identity solved the problem(Build settings->Code Signing Identity).

我也遇到过同样的问题,设置正确的代码签名标识解决了这个问题(构建设置—>代码签名标识)。

As per Apple technical question "All Enterprise and standard iOS developer certificates that are created after iOS 8 was released have the new Team ID field in the proper place to allow Swift language apps to run"

根据苹果的技术问题“所有在iOS 8发布后创建的企业和标准iOS开发人员证书都有新的团队ID字段,以允许Swift语言应用程序运行”

#16


2  

If you add the three frameworks via Embedded Binaries, they will be added to Linked Frameworks and Libraries also. Delete the three entries in Linked Frameworks and Libraries will solve the problem.

如果您通过嵌入式二进制文件添加这三个框架,它们也将被添加到链接框架和库中。删除链接框架和库中的三个条目将解决这个问题。

Magic methods such as relaunch Xcode and restart the Mac doesn't work on me.

像重新启动Xcode和重启Mac这样的神奇方法对我不起作用。

#17


2  

Try to hold Alt, then go to Product -> Clean Build Folder...

尝试按住Alt键,然后转到Product ->清洁构建文件夹…

Hope it will help someone..

希望它能帮助某人。

#18


2  

The reasons for this occurring are many. Having just spent a fun weekend finding yet another issue that causes this (the order of code signing), I wanted to create a summary answer that brings all the possible solutions together:

发生这种情况的原因有很多。刚刚花了一个有趣的周末,我发现了另一个导致这个问题的问题(代码签名的顺序),我想创建一个汇总答案,将所有可能的解决方案集合在一起:

  1. Add Embedded Content Contains Swift Code to project. You need to set this flag if your app contains Swift code.
  2. 向项目添加包含Swift代码的嵌入内容。如果您的应用程序包含Swift代码,则需要设置此标志。
  3. Clean project. In addition to a Project > Clean you can also delete the DerivedData and Build directories. Look under the Preferences for the location of DerivedData. Build should be in your project folder.
  4. 清洁项目。除了清理项目>之外,还可以删除派生数据和构建目录。查找派生数据位置的首选项。构建应该在项目文件夹中。
  5. Ensure Runpath Search Paths contains @executable_path/Frameworks.
  6. 确保Runpath搜索路径包含@executable_path/框架。
  7. Ensure that your certificate contains your Apple Team ID in the OU (Organization Unit) field Apple will add this for you, just revoke your existing distribution certificate and create a new one, download, install on KeyChain, regenerate all provisioning profiles, download those and rebuild.
  8. 确保您的证书包含您的Apple Team ID,在OU(组织单元)字段中,Apple将为您添加这个,只需撤销现有的分发证书并创建一个新的分发证书,下载、安装KeyChain,重新生成所有配置文件,下载并重新构建。
  9. Xcode restart. If everything is basically good, but Xcode hasn't gotten there yet.
  10. Xcode重启。如果一切都很好,但是Xcode还没有到达那里。

That's the easy stuff. If you are doing your own command line build you may be creating your own .ipa files to upload. In that case you need to ensure the following:

这是容易的事情。如果您正在进行自己的命令行构建,那么您可能正在创建要上载的.ipa文件。在这种情况下,你需要确保下列事项:

  1. Make sure the version of the Swift files in SwiftSupport/iphoneos is the same as the version in Contents/YourApp.app/Frameworks Because Swift is not yet binary compatible between version, you must ensure these versions are the one that you built your app with. You can find these libraries under /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos.
  2. 确保SwiftSupport/iphoneos中的Swift文件版本与Contents/YourApp中的版本相同。由于Swift在版本之间还不是二进制兼容的,所以您必须确保这些版本是您构建应用程序的版本。您可以在/Applications/Xcode.app/ content /Developer/ toolchain/ XcodeDefault.xctoolchain/usr/lib/swift/iphoneos下找到这些库。
  3. Sign the libraries and frameworks first. You need to codesign the libraries and framework files (under Frameworks in the .app folder) first and then sign the entire .app tree. The .app tree must be signed with an entitlements.plist but not the frameworks.
  4. 先在库和框架上签名。您需要先共同设计库和框架文件(在.app文件夹中的框架下),然后签署整个.app树。应用程序树必须带有授权。plist而不是框架。

Hopefully when Swift 3.0 comes out and we no longer need to bundle Swift with our apps this whole issue will go away.

希望当Swift 3.0发布时,我们不再需要将Swift绑定到我们的应用上,这整个问题将会消失。

#19


1  

Upgrade to Latest Version of OS X (Yosemite)

升级到最新版本的OS X (Yosemite)

After hours of trial & error I came to the resolution of this problem. - If this applies to your case of course.

经过几个小时的反复试验,我终于解决了这个问题。-如果这适用于你的情况。

I had the same problem until I upgraded my Mac OS X from Mavericks to Yosemite. - It fixed my problem, hope it fixes yours as well

我遇到了同样的问题,直到我把我的Mac OS X升级为优胜美地。-它解决了我的问题,希望它也能解决你的问题

#20


1  

I tried all the solutions that found on web, including to Apple and new certificates. Without success.

我尝试了所有在网上找到的解决方案,包括苹果和新证书。没有成功。

The only way I could run xcode, after 6 months of trying, was creating a new account on my macbook.

经过6个月的尝试,我能运行xcode的唯一方法是在我的macbook上创建一个新帐户。

#21


1  

Usually this error will disappear if you add this library to the "Copy Files" segment in your Build Phases.

通常,如果您将这个库添加到构建阶段的“复制文件”部分,这个错误将会消失。

#22


1  

And if all of the above doesn't help you and you really get frustrated... Try the best trick of all: Clean and just to be sure also Clean Build Folder. :) Hope it helps somebody!

如果以上这些都不能帮助你,你真的会感到沮丧……尝试最好的技巧:清理,确保也清理构建文件夹。希望它能帮助某人!

#23


1  

Adding Framework as "Embedded Binary" instead of just "Linked Frameworks and Libraries" - Fixed my issue.

将框架添加为“嵌入式二进制”而不仅仅是“链接框架和库”——解决了我的问题。

I also set Embedded Content Contains Swift Code flag to YES.

我还将包含Swift代码标志的嵌入内容设置为YES。

#24


1  

None of these solutions seemed to be consistently working for me; after every couple of successful runs, it would fail again. The "Embedded Content Contains Swift Code" flag was always set to YES for me.

所有这些解决方案似乎都不能始终如一地对我起作用;每次成功运行后,它都会再次失败。“嵌入的内容包含Swift代码”的标志总是被设置为YES给我。

Turns out I'd set Xcode to be 6.3-compatible. Changing it back to be 3.2-compatible solved it:

我将Xcode设置为6.3兼容。将其更改为3.2兼容解决方案:

dyld:没有加载的库:@rpath/libswift_stdlib_core.dylib。

#25


1  

I've had this problem as well, only it wasn't locating libswiftXCTest.dylib.

我也遇到过这个问题,只是它没有定位libswiftXCTest.dylib。

The solution was to add XCTest.framework to the Tests target, in Build Phases/Link Binary with Library. I was getting this error even when I was trying to build the main target.

解决方案是将XCTest.framework添加到测试目标中,在构建阶段/与库的二进制文件中。我在尝试构建主目标时也犯了这个错误。

#26


0  

This showed up when I added a new Today extension target with Swift language to an old project. Fixed easily by updating the project to recommended settings. Xcode 6.0.1

当我在一个旧的项目中添加了一个新的带有Swift语言的Today扩展目标时,这一点就显现出来了。通过将项目更新为推荐设置,很容易修复。Xcode 6.0.1中

#27


0  

I got the same issue using Mavericks, Xcode 6.1.1, testing on an iPhone5 with iOS 8.1.1. I tried all possible solution including new certificates and provisioning profiles, but nothing helped. I did the changes to Embedded Content Contains Swift Code and Runpath Search Paths both on Project level and Target level.

我用Mavericks的Xcode 6.1.1也遇到了同样的问题,它用iOS 8.1.1测试了iPhone5。我尝试了所有可能的解决方案,包括新的证书和配置文件,但没有任何帮助。我对嵌入的内容进行了修改,其中包含项目级别和目标级别的Swift代码和运行路径搜索路径。

I have now installed Yosemite, and without any further changes, it started to work.

我现在已经安装了约塞米蒂,没有任何进一步的改变,它开始工作。

#28


0  

Same issue here, for me it was Crashlytics/Fabric/Beta/Twitter/Whatever-they-call-themselves uploading a binary that was missing the embedded frameworks. If I made an archive and then exported an Enterprise build in the standard way, they worked a charm.

同样的问题,对我来说,它是崩溃的/组构的/Beta的/Twitter的/随便什么-上传一个缺少嵌入式框架的二进制文件。如果我做了一个归档,然后以标准的方式导出企业的构建,它们就会发挥作用。

#29


0  

My environment: Cocos2d 2.0, Box2d, Objective C

我的环境:Cocos2d 2.0, Box2d, Objective C。

In addition to doing the other answers above I finally went to the General tab and made WatchKit Optional.

除了完成上面的其他答案之外,我最终访问了General选项卡并使WatchKit成为可选的。

dyld:没有加载的库:@rpath/libswift_stdlib_core.dylib。

#30


0  

After months and months trying everything here... Definition of insanity... starting Xcode under a new Mac user solved it for me.

经过几个月和几个月的努力……疯狂的定义……在一个新的Mac用户下启动Xcode为我解决了这个问题。

I removed ~/Library/Developer/* and reinstalled Xcode- so no clue what else to format to make it work.

我删除了~/Library/Developer/*,并重新安装了Xcode——所以不知道还需要什么格式才能使它正常工作。

#1


146  

For me none of the previous solutions worked. We discovered that there is an flag ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES (in earlier versions: "Embedded Content Contains Swift Code") in the Build Settings that needs to be set to YES. It was NO by default!

对我来说,以前的解决方案都不管用。我们发现,在需要设置为YES的构建设置中总是有一个标志ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES(在早期版本中:“嵌入式内容包含Swift代码”)。这不是默认的!

#2


90  

This error can occur if something went wrong during the conversion of an Objective-C project to start using Swift. The issue is that the Linker build settings never got configured properly, so you'll have to do it by hand. Look for the Runpath Search Paths build setting and set it to:

如果在将Objective-C项目转换为使用Swift时发生了错误,则会发生此错误。问题是链接器构建设置从来没有正确配置过,所以您必须手动配置。查找Runpath搜索路径构建设置,设置为:

$(inherited) @executable_path/Frameworks

dyld:没有加载的库:@rpath/libswift_stdlib_core.dylib。

EDIT: I should also add that there has been recent spate of these errors caused by something else entirely - Apple made a change in Swift itself, starting in perhaps Xcode 6.1 or 6.1.1. The only solution seems to be to quit Xcode, destroy your certificates in Keychain Access, go to the Member Center and delete all certificates and profiles (except the profiles for apps in the Store - you can't delete them), and then start the entire certificate request process from scratch.

编辑:我还应该补充说,最近出现了一些完全由其他原因引起的错误——苹果公司在迅速地改变了自己,从Xcode 6.1或6.1.1开始。唯一的解决方案似乎是退出Xcode,在密钥链访问中销毁证书,到成员中心删除所有证书和概要文件(除了商店中应用程序的概要文件之外——您不能删除它们),然后从头开始整个证书请求过程。

#3


79  

I'm not really sure why this question is being downvoted, I had this problem as well when I first tried to use Swift with an existing project. An Xcode restart also fixed this for me.

我不太清楚为什么这个问题会被否决,当我第一次尝试在现有项目中使用Swift时,我也遇到了这个问题。Xcode restart也为我修复了这一点。

#4


53  

I searched long on this issue. There are several reasons causes this issue.

在这个问题上我找了很久。造成这个问题的原因有很多。

If you are facing when you and Swift code/library in an Objectice C project you should try Solution 1-2-3

如果您在objective - C项目中与Swift代码/库一起面对,请尝试解决方案1-2-3

If you are facing this issue with a new a Swift project Solution 4 will fit you best.

如果您正面临这个问题,那么一个新的Swift项目解决方案4将最适合您。

Solution 1:

Restart Xcode, then computer and iPhone

重新启动Xcode,然后是电脑和iPhone

Solution 2:

Go to project build settings and set Always Embed Swift Standard Libraries (previously Embedded Content Contains Swift Code) flag to YES

Go to project build settings and set Always Embed Swift Standard Libraries(先前嵌入的内容包含Swift Code)标志为YES。

Solution 3:

Go to project build settings and add @executable_path/Frameworks to Runpath Search Paths option

转到项目构建设置,并向Runpath搜索路径选项添加@executable_path/框架

Solution 4:

If none of above works, this should. Apple seems to be ninja patched certificates as mentioned in AirSign's post

如果以上任何一种方法都不起作用,那么这应该是可行的。在AirSign的帖子中,苹果似乎是忍者的专利证书。

At InHouse certificates

在自身的证书

Subject: UID=269J2W3P2L, CN=iPhone Distribution: Company Name, O=Company Name, C=FR

主题:UID=269J2W3P2L, CN=iPhone发行版:公司名称,O=公司名称,C=FR。

they added a new field named OU

他们增加了一个叫OU的新领域

Subject: UID=269J2W3P2L, CN=iPhone Distribution: Company Name, OU=269J2W3P2L, O=Company Name, C=FR

主题:UID=269J2W3P2L, CN=iPhone发行:公司名称,OU=269J2W3P2L, O=公司名称,C=FR

so you should just recreate certificate and provision

因此,您应该重新创建证书和规定

#5


40  

In my case I was trying to import a custom framework and was getting the similar error. Turns out I had to import the framework in the Embedded Binaries rather than in to the Linked Frameworks and Libraries.

在我的例子中,我试图导入一个自定义框架并得到了类似的错误。结果我不得不将框架导入到嵌入式二进制文件中,而不是导入到链接框架和库中。

Embedded Binaries are under Projects Settings -> -> General

嵌入式二进制文件在项目设置下——> ->通用

#6


16  

For developers who have had this issue with a Adhoc/Enterprise distribution builds,

对于有过Adhoc/企业发行版问题的开发人员,

Create the production certificate from dev portal and then regenerate the distribution profile. Download and install both of them on your Mac. Ensure you selected the right profile in your Xcode build settings and rebuild your app.

从dev门户创建生产证书,然后重新生成分发概要文件。下载并安装在你的Mac上。确保你在你的Xcode构建设置中选择了正确的配置文件并重新构建你的应用。

Source: https://devforums.apple.com/message/1022908#1022908

来源:https://devforums.apple.com/message/1022908 1022908

#7


14  

Solution 5:

方案五:

In my case, all solutions mentioned in the answer of accfews were very helpful but none has worked. I solved my problem by adding my swift library in the section "Embedded Binaries" in the "General" section of my Project's target. Perhaps is this due to the fact that I have included my swift framework in my workspace? Whatever it compiles now! Get ready Swift, I'm here!

在我的案例中,accfews的回答中提到的所有解决方案都非常有用,但没有一个有效。我在项目目标的“一般”部分的“嵌入式二进制文件”部分中添加了swift库,从而解决了我的问题。这可能是因为我在工作空间中包含了swift框架吗?现在不管它编译!快准备,我在这里!

#8


10  

A simple restart of Xcode solved the issue for me.

Xcode的简单重启为我解决了这个问题。

#9


4  

For me, the issue was due to the fact that my Apple Worldwide Developer Relations Certification Authority was invalid.

对我来说,这个问题是因为我的苹果全球开发者关系认证机构是无效的。

Download it from here: https://developer.apple.com/certificationauthority/AppleWWDRCA.cer

从这里下载:https://developer.apple.com/certificationauthority/AppleWWDRCA.cer

Drag and drop it into Keychain Access, clean the project, and run.

将其拖放到密钥链访问、清理项目并运行。

#10


3  

I tried all the answers given above, nothing worked.

我尝试了上面给出的所有答案,但都没有成功。

Finally worked after updating to Yosemite

最后在更新到Yosemite之后工作

#11


3  

I had an Obj-C project where I started adding swift source files. The following fixed the issue for me:

我有一个object - c项目,我开始添加swift源文件。以下为我解决了这个问题:

  1. Linking: RUNPATH SEARCH PATHS = $(inherited) @executable_path/Frameworks
  2. 链接:RUNPATH搜索路径= $(继承)@executable_path/框架
  3. Swift Compiler - Code Generation: EMBEDDED CONTENT CONTAINS SWIFT = YES
  4. 快速编译器-代码生成:嵌入内容包含Swift = YES。

I just created a new project from the templates Xcode 6.3 and compared the project settings with my old original project.

我刚刚从模板Xcode 6.3中创建了一个新项目,并将项目设置与原来的项目进行了比较。

#12


2  

I had this issue using an Ad Hoc (or enterprise) mobileprovision with a production certificate. Switching to a development certificate and mobileprovision solved the issue.

我使用了一个带有生产证书的临时(或企业)mobile条款来解决这个问题。切换到开发证书和移动设备条款解决了这个问题。

#13


2  

My project is a Swift project with some Objective-C classes. I had the same problem when signed with old inHouse (enterprise) certificate.

我的项目是一个快速的项目,有一些Objective-C类。我在与旧的inHouse(企业)证书签署时也遇到了同样的问题。

The following steps fixed this for me.

以下步骤为我修复了这个问题。

  1. Create and use a new certificate and mobile provision.
    (Ref. AIRSIGN’s blog)
  2. 创建并使用新的证书和移动设备。(Ref AIRSIGN的博客)
  3. Set Runpath Search Paths build setting to: $(inherited) @executable_path/Frameworks.
    (Ref. matt’s answer)
  4. 设置Runpath搜索路径构建设置为:$(继承)@executable_path/框架。(引用马特的回答)

#14


2  

Solution 6:

解决方案6:

In our case, the Enterprise Distribution Certificate had been revoked. Generating a new certificate and updating the provisioning profile fixed the issue.

在我们的案例中,企业分发证书已经被撤销。生成一个新证书并更新配置概要文件解决了这个问题。

(There seems to be many different causes for this error. Hope this helps someone.)

这个错误的原因似乎有很多。希望这可以帮助别人。)

#15


2  

I have faced the same issue, setting the right code sign identity solved the problem(Build settings->Code Signing Identity).

我也遇到过同样的问题,设置正确的代码签名标识解决了这个问题(构建设置—>代码签名标识)。

As per Apple technical question "All Enterprise and standard iOS developer certificates that are created after iOS 8 was released have the new Team ID field in the proper place to allow Swift language apps to run"

根据苹果的技术问题“所有在iOS 8发布后创建的企业和标准iOS开发人员证书都有新的团队ID字段,以允许Swift语言应用程序运行”

#16


2  

If you add the three frameworks via Embedded Binaries, they will be added to Linked Frameworks and Libraries also. Delete the three entries in Linked Frameworks and Libraries will solve the problem.

如果您通过嵌入式二进制文件添加这三个框架,它们也将被添加到链接框架和库中。删除链接框架和库中的三个条目将解决这个问题。

Magic methods such as relaunch Xcode and restart the Mac doesn't work on me.

像重新启动Xcode和重启Mac这样的神奇方法对我不起作用。

#17


2  

Try to hold Alt, then go to Product -> Clean Build Folder...

尝试按住Alt键,然后转到Product ->清洁构建文件夹…

Hope it will help someone..

希望它能帮助某人。

#18


2  

The reasons for this occurring are many. Having just spent a fun weekend finding yet another issue that causes this (the order of code signing), I wanted to create a summary answer that brings all the possible solutions together:

发生这种情况的原因有很多。刚刚花了一个有趣的周末,我发现了另一个导致这个问题的问题(代码签名的顺序),我想创建一个汇总答案,将所有可能的解决方案集合在一起:

  1. Add Embedded Content Contains Swift Code to project. You need to set this flag if your app contains Swift code.
  2. 向项目添加包含Swift代码的嵌入内容。如果您的应用程序包含Swift代码,则需要设置此标志。
  3. Clean project. In addition to a Project > Clean you can also delete the DerivedData and Build directories. Look under the Preferences for the location of DerivedData. Build should be in your project folder.
  4. 清洁项目。除了清理项目>之外,还可以删除派生数据和构建目录。查找派生数据位置的首选项。构建应该在项目文件夹中。
  5. Ensure Runpath Search Paths contains @executable_path/Frameworks.
  6. 确保Runpath搜索路径包含@executable_path/框架。
  7. Ensure that your certificate contains your Apple Team ID in the OU (Organization Unit) field Apple will add this for you, just revoke your existing distribution certificate and create a new one, download, install on KeyChain, regenerate all provisioning profiles, download those and rebuild.
  8. 确保您的证书包含您的Apple Team ID,在OU(组织单元)字段中,Apple将为您添加这个,只需撤销现有的分发证书并创建一个新的分发证书,下载、安装KeyChain,重新生成所有配置文件,下载并重新构建。
  9. Xcode restart. If everything is basically good, but Xcode hasn't gotten there yet.
  10. Xcode重启。如果一切都很好,但是Xcode还没有到达那里。

That's the easy stuff. If you are doing your own command line build you may be creating your own .ipa files to upload. In that case you need to ensure the following:

这是容易的事情。如果您正在进行自己的命令行构建,那么您可能正在创建要上载的.ipa文件。在这种情况下,你需要确保下列事项:

  1. Make sure the version of the Swift files in SwiftSupport/iphoneos is the same as the version in Contents/YourApp.app/Frameworks Because Swift is not yet binary compatible between version, you must ensure these versions are the one that you built your app with. You can find these libraries under /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos.
  2. 确保SwiftSupport/iphoneos中的Swift文件版本与Contents/YourApp中的版本相同。由于Swift在版本之间还不是二进制兼容的,所以您必须确保这些版本是您构建应用程序的版本。您可以在/Applications/Xcode.app/ content /Developer/ toolchain/ XcodeDefault.xctoolchain/usr/lib/swift/iphoneos下找到这些库。
  3. Sign the libraries and frameworks first. You need to codesign the libraries and framework files (under Frameworks in the .app folder) first and then sign the entire .app tree. The .app tree must be signed with an entitlements.plist but not the frameworks.
  4. 先在库和框架上签名。您需要先共同设计库和框架文件(在.app文件夹中的框架下),然后签署整个.app树。应用程序树必须带有授权。plist而不是框架。

Hopefully when Swift 3.0 comes out and we no longer need to bundle Swift with our apps this whole issue will go away.

希望当Swift 3.0发布时,我们不再需要将Swift绑定到我们的应用上,这整个问题将会消失。

#19


1  

Upgrade to Latest Version of OS X (Yosemite)

升级到最新版本的OS X (Yosemite)

After hours of trial & error I came to the resolution of this problem. - If this applies to your case of course.

经过几个小时的反复试验,我终于解决了这个问题。-如果这适用于你的情况。

I had the same problem until I upgraded my Mac OS X from Mavericks to Yosemite. - It fixed my problem, hope it fixes yours as well

我遇到了同样的问题,直到我把我的Mac OS X升级为优胜美地。-它解决了我的问题,希望它也能解决你的问题

#20


1  

I tried all the solutions that found on web, including to Apple and new certificates. Without success.

我尝试了所有在网上找到的解决方案,包括苹果和新证书。没有成功。

The only way I could run xcode, after 6 months of trying, was creating a new account on my macbook.

经过6个月的尝试,我能运行xcode的唯一方法是在我的macbook上创建一个新帐户。

#21


1  

Usually this error will disappear if you add this library to the "Copy Files" segment in your Build Phases.

通常,如果您将这个库添加到构建阶段的“复制文件”部分,这个错误将会消失。

#22


1  

And if all of the above doesn't help you and you really get frustrated... Try the best trick of all: Clean and just to be sure also Clean Build Folder. :) Hope it helps somebody!

如果以上这些都不能帮助你,你真的会感到沮丧……尝试最好的技巧:清理,确保也清理构建文件夹。希望它能帮助某人!

#23


1  

Adding Framework as "Embedded Binary" instead of just "Linked Frameworks and Libraries" - Fixed my issue.

将框架添加为“嵌入式二进制”而不仅仅是“链接框架和库”——解决了我的问题。

I also set Embedded Content Contains Swift Code flag to YES.

我还将包含Swift代码标志的嵌入内容设置为YES。

#24


1  

None of these solutions seemed to be consistently working for me; after every couple of successful runs, it would fail again. The "Embedded Content Contains Swift Code" flag was always set to YES for me.

所有这些解决方案似乎都不能始终如一地对我起作用;每次成功运行后,它都会再次失败。“嵌入的内容包含Swift代码”的标志总是被设置为YES给我。

Turns out I'd set Xcode to be 6.3-compatible. Changing it back to be 3.2-compatible solved it:

我将Xcode设置为6.3兼容。将其更改为3.2兼容解决方案:

dyld:没有加载的库:@rpath/libswift_stdlib_core.dylib。

#25


1  

I've had this problem as well, only it wasn't locating libswiftXCTest.dylib.

我也遇到过这个问题,只是它没有定位libswiftXCTest.dylib。

The solution was to add XCTest.framework to the Tests target, in Build Phases/Link Binary with Library. I was getting this error even when I was trying to build the main target.

解决方案是将XCTest.framework添加到测试目标中,在构建阶段/与库的二进制文件中。我在尝试构建主目标时也犯了这个错误。

#26


0  

This showed up when I added a new Today extension target with Swift language to an old project. Fixed easily by updating the project to recommended settings. Xcode 6.0.1

当我在一个旧的项目中添加了一个新的带有Swift语言的Today扩展目标时,这一点就显现出来了。通过将项目更新为推荐设置,很容易修复。Xcode 6.0.1中

#27


0  

I got the same issue using Mavericks, Xcode 6.1.1, testing on an iPhone5 with iOS 8.1.1. I tried all possible solution including new certificates and provisioning profiles, but nothing helped. I did the changes to Embedded Content Contains Swift Code and Runpath Search Paths both on Project level and Target level.

我用Mavericks的Xcode 6.1.1也遇到了同样的问题,它用iOS 8.1.1测试了iPhone5。我尝试了所有可能的解决方案,包括新的证书和配置文件,但没有任何帮助。我对嵌入的内容进行了修改,其中包含项目级别和目标级别的Swift代码和运行路径搜索路径。

I have now installed Yosemite, and without any further changes, it started to work.

我现在已经安装了约塞米蒂,没有任何进一步的改变,它开始工作。

#28


0  

Same issue here, for me it was Crashlytics/Fabric/Beta/Twitter/Whatever-they-call-themselves uploading a binary that was missing the embedded frameworks. If I made an archive and then exported an Enterprise build in the standard way, they worked a charm.

同样的问题,对我来说,它是崩溃的/组构的/Beta的/Twitter的/随便什么-上传一个缺少嵌入式框架的二进制文件。如果我做了一个归档,然后以标准的方式导出企业的构建,它们就会发挥作用。

#29


0  

My environment: Cocos2d 2.0, Box2d, Objective C

我的环境:Cocos2d 2.0, Box2d, Objective C。

In addition to doing the other answers above I finally went to the General tab and made WatchKit Optional.

除了完成上面的其他答案之外,我最终访问了General选项卡并使WatchKit成为可选的。

dyld:没有加载的库:@rpath/libswift_stdlib_core.dylib。

#30


0  

After months and months trying everything here... Definition of insanity... starting Xcode under a new Mac user solved it for me.

经过几个月和几个月的努力……疯狂的定义……在一个新的Mac用户下启动Xcode为我解决了这个问题。

I removed ~/Library/Developer/* and reinstalled Xcode- so no clue what else to format to make it work.

我删除了~/Library/Developer/*,并重新安装了Xcode——所以不知道还需要什么格式才能使它正常工作。