user3336295
user3336295

Reputation: 51

A Productivity App Built in Swift

I tried to build the sample code in Swift provided by Apple

A Productivity App Built in Swift

But when I ran it, it pop up an error like this:

"Command /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-stdlib-tool failed with exit code 1"

Does anyone know how to fix it?

Upvotes: 4

Views: 9389

Answers (4)

rsc
rsc

Reputation: 10679

My solution was to set both Code Signing and Provisioning Profiles to "Automatic" under My Project -> Target My Project ->Build Settings -> Code Signing Identity and Provisioning Profile

Upvotes: 0

user3320597
user3320597

Reputation: 146

As the flip side to not being set up with a developer profile, I ran into this problem as a result of having duplicate certificates set up. Once I deleted all but one, Lister finally compiled.

Upvotes: 2

GomiGuchi
GomiGuchi

Reputation: 1

As volatilevar mentioned, it's a problem with the project settings, though I assume you are a registered developer with access to the sample code and Yosemite beta. I had the same issue. The Provisioning Profile isn't selected because you downloaded the code and the previously selected profile doesn't exist!

  1. If you installed Yosemite fresh, make sure you export your profile from Xcode where you were using it before and import it again in Yosemite.
  2. Check that your profile and identity are correctly selected under General and Build Settings for the target.

If you need some guidance on moving your profile see exporting and importing.

Upvotes: 0

volatilevar
volatilevar

Reputation: 1676

The actual cause is because xcode cannot code sign:

iPhone Developer: no identity found
**error: Couldn't codesign /Users/zhaoj5/Library/Developer/Xcode/DerivedData/Lister-hehrkmcyuflnfucnsqcofjotmglo/Build/Products/Debug-iphonesimulator/com.example.apple-samplecode.Lister.ListerToday.appex/Frameworks/libswift_stdlib_core.dylib: codesign failed with exit code 1**
Command /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-stdlib-tool failed with exit code 1

This is because you are not a registered Apple Developer. If you go to project -> General, you will see there is a warning:

"This product type must be built using a provisioning profile, however, no signing identity or provisioning profile was specified, Xcode can resolve this issue by downloading a new provisioning profile from the member center."

There is a button "Fix Issue", you can enter your account information once you become a registered developer.

Upvotes: 10

Related Questions