Skip to content

If Xcode is configured to not require code signing/provisioning then set...#20

Open
Scraft wants to merge 4 commits into
jamplus:nextgenfrom
Scraft:nextgen_stop_workspace_sign_and_provision
Open

If Xcode is configured to not require code signing/provisioning then set...#20
Scraft wants to merge 4 commits into
jamplus:nextgenfrom
Scraft:nextgen_stop_workspace_sign_and_provision

Conversation

@Scraft

@Scraft Scraft commented Mar 8, 2014

Copy link
Copy Markdown
Contributor

With Xcode 5, by default it insists on code signing/provisioning builds. The problem with this is JamPlus handles the provisioning/code signing, and outputs a ready to deploy .app file, Xcode then goes ahead and resigns and provisions the build, this means next time JamPlus goes to build, it seems the build has been modified and resigns and provisions the build. The output you get is along the lines of:

  1. First build; finished with C._CodeSign followed by Xcode's provision/package/sign.

Project Game | Configuration iphone - debug | Destination Steven’s iPod touch | SDK OS X 10.9
Run custom shell script ‘Run Script’
[…]
@ C._CodeSign <iphone!debug:Game>CodeResources
*** updated 2 target(s)…
*** finished in 3.72 sec
ProcessProductPackaging /path/to/provision
ProcessProductPackaging /path/to/Entitlements
CodeSign Game.app …in /path/to/game

  1. Start another build immediate after, JamPlus has to sign build again.

Project Game | Configuration iphone - debug | Destination Steven’s iPod touch | SDK OS X 10.9
Run custom shell script ‘Run Script’
[…]
@ C._CodeSign <iphone!debug:Game>CodeResources
*** updated 2 target(s)…
*** finished in 3.72 sec

This annoying behaviour of Xcode can thankfully be disabled, this is done by modifying /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/SDKSettings.plist and changing the DefaultProperties:CODE_SIGNING_REQUIRED and DefaultProperties:ENTITLEMENTS_REQUIRED to NO.

This pull request will detect if the above plist change has been made (I'd recommend everyone makes this modification, as it makes the workflow better), if the change is detected the Xcode workspace is generated with no entitlements and signing identify set. In this scenario when you build JamPlus generates a ready to deploy .app, Xcode doesn't alter this app, and subsequent build/deploys do not require JamPlus to sign the build again. If the plist change isn't detected, then existing behaviour will be preserved.

@jamplus

jamplus commented Mar 27, 2014

Copy link
Copy Markdown
Owner

I like this, but the latest Xcode update whacked my 7.0 SDK and replaced it with 7.1. Because of that, this code doesn't work.

How do you think we should proceed?

Scraft added 2 commits July 11, 2014 12:05
…n, and use the latest one when searching for SDKSettings.plist (I believe there is only ever one directory, but if the code encounters multiple, it'll use the latest).
…workspace_sign_and_provision

Conflicts:
	bin/scripts/ide/xcode.lua
@Scraft

Scraft commented Jul 11, 2014

Copy link
Copy Markdown
Contributor Author

In commit 94a4d7a I have added a function XcodeHelper_GetLatestIPhoneSDKDirectory which determines the correct SDK directory and then uses this in XcodeHelper_AreEntitlementsRequired and XcodeHelper_IsCodeSigningRequired. This worked for my local tests (I upgraded to 7.1 and had the same issue as you previously).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants