-
-
Notifications
You must be signed in to change notification settings - Fork 197
Implement Automatic and Manual Xcode Signing Styles #2340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7a0185a to
3d77a82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildForDevice method is way too long, can you try extracting some parts of it in a separate methods
lib/services/ios-project-service.ts
Outdated
| "Manual - Select existing provisioning profile for use", | ||
| "Automatic - Select Team ID for signing and let Xcode select managed provisioning profile" | ||
| ]; | ||
| let signingStyleIndex = signingStyles.indexOf(this.$prompter.promptForChoice("Select codesiging style", signingStyles).wait()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen in non-interactive terminal? The prompter will wait for input, but there will be no input, so maybe the execution will hang here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was interactive before my intervention, read getDevelopmentTeam
lib/services/ios-project-service.ts
Outdated
| } | ||
|
|
||
| switch(signingStyle) { | ||
| case "Manual": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you really need the curly brackets { - they seems inconsistent with the other code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I don't.
lib/services/ios-project-service.ts
Outdated
| return result; | ||
| } | ||
|
|
||
| private getProvisioningProfile(): provision.MobileProvision { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method has async operations (.wait() inside it's body), so it must return IFuture<provision.MobileProvision>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readTeamId was not returning future before my intervention
lib/services/ios-project-service.ts
Outdated
| for (let team of teams) { | ||
| choices.push(team.name + " (" + team.id + ")"); | ||
| } | ||
| let choice = this.$prompter.promptForChoice('Found multiple development teams, select one:', choices).wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is async operation, the method getDevelopmentTeam must return IFuture
lib/services/ios-project-service.ts
Outdated
| return teamId; | ||
| } | ||
|
|
||
| private persistProvisioningProfiles(uuid: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method needs return type.
lib/services/ios-project-service.ts
Outdated
| } | ||
| } | ||
|
|
||
| private persistDevelopmentTeam(teamId: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method needs return type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After green build
ec78110 to
cb9eaed
Compare
|
QSF build, as provisioning profiles from xcconfig were propagated as command line args to xcodebuild and as result tried to sign Cocoa pods. This PR: #2356 will resolve this. |
|
When provisioning profile is selected manually it should either be stored in xcconfig or in the pbxproj in the platforms/ios instead of passed as command line arg to xcodebuild, and thus used only for the App build. When it is passed as command line arg xcodebuild will try to sign and add the provisioning profile to the dynamic framework build for Cocoapods, instead they should not be signed. |
|
On clear project without
Must be able to sign cocoa pods. This is important as at some points signing was passed as command line args and forced all build targets to use the provisioning specified. If the provisioning profile targets For the future:
|
|
We need to cover also build for "generic device". |
|
Due to high complexity we will try to relax the supported scenarios and narrow the supported paths to:
|
Upon iOS build for device the user will be prompted to choose between Automatic (the old approach with team id) and Manual (new approach using specific provisioning profile). Once the team id or provisioning profiles are selected, the Xcode project will be updated to match the Xcode 8 behavior where the "Automatically manage signing" checkbox is checked or not.
There are some issues to be resolved in: https://github.com/NativeScript/ios-mobileprovision-finder/issues