Skip to content

Instantly share code, notes, and snippets.

@yanks
Last active August 29, 2015 14:18
Show Gist options
  • Save yanks/b9d512c032c9d2a8c515 to your computer and use it in GitHub Desktop.
Save yanks/b9d512c032c9d2a8c515 to your computer and use it in GitHub Desktop.
WatchKit + xcodebuild + CI

If you have a Jenkins/CI build machine like we do or just use xcodebuild/xcbuild, you might notice some CodeSign issues with your builds that look something like this:

[ERROR]Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “<my team id>” were found.

You've confirmed you have all the signing set up correctly in your extension, so what gives? Well, it turns out that XCode validates dependencies for all targets including your WatchApp target. You'll notice that the project settings give you a super barebones space for defining your target information (bundle id, team identifier, etc).

What it doesn't let you do is define various scheme level things like the plist to use, and maybe a different signing identity! Here's the solution:

  1. Open up your /project.pbxproj file in your favorite editor
  2. Grep around for your target name (in this case "MyWatchKitApp") and find the configuration list: http://cl.ly/image/3M2p1U1m2w3k
  3. Grep for the identifier listed
  4. Find your signing identity and change it from "iPhone Developer" to whatever it's supposed to be (on both lines)! http://cl.ly/image/3q3D32240y3R

I'll be filing a radar shortly to address this, but wanted to throw this out there.

Enjoy!

Jeff Forbes ([email protected])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment