bitrise-steplib / steps-ios-auto-provision-appstoreconnect

MIT License
15 stars 16 forks source link

Pull in latest changes from xcode-project #8

Closed ubuntudroid closed 3 years ago

ubuntudroid commented 4 years ago

Over at xcode-project some important fixes regarding target parsing have been done. Would be great if this could be pulled in here as well - our workflows don't build right now which is likely caused by this from looking at the logs.

bitce commented 4 years ago

Hi @ubuntudroid! Can you please include an URL of a build that fails for you, so we can take a look at what are these problems exactly?

ubuntudroid commented 4 years ago

@bitce Sure, here you go: https://app.bitrise.io/build/17bf046e47cb8cc8 (the branch has been renamed in the meantime to feature/appwidget in case you wonder / want to trigger the build manually.

In the end I could fix this particular issue (there is still another unrelated issue with building that branch) by manually adding the following to an otherwise empty target:

CreatedOnToolsVersion = 11.4.1;
ProvisioningStyle = Automatic;

Apparently empty targets are a problem.

So in the end I'm not 100% sure it is caused by the issue fixed in xcode-project, but it might be connected?

bitce commented 4 years ago

I see, that would make sense. Would you be able to turn on Support User access for us? I'd forward this to our engineering team so they can take a look.

ubuntudroid commented 4 years ago

@bitce done ✅

kylebrowning commented 4 years ago

I believe I have a related issue.

Creating AppstoreConnectAPI client
the client created for https://api.appstoreconnect.apple.com/
Analyzing project
configuration: Release
Failed to read project team ID: failed to parse target (1D9B2F1D23898DF7001FB5C8) attributes: key: string("1D9B2F1D23898DF7001FB5C8") not found in: serialized.Object(serialized.Object{"7CB33068200813270043F3A5":map[string]interface {}{"CreatedOnToolsVersion":"9.2", "LastSwiftMigration":"1000"}, "7CB34F1B1D362969004B639D":map[string]interface {}{"CreatedOnToolsVersion":"7.3.1", "LastSwiftMigration":"1020", "SystemCapabilities":map[string]interface {}{"com.apple.ApplicationGroups.iOS":map[string]interface {}{"enabled":"1"}, "com.apple.BackgroundModes":map[string]interface {}{"enabled":"1"}, "com.apple.InAppPurchase":map[string]interface {}{"enabled":"1"}, "com.apple.Keychain":map[string]interface {}{"enabled":"1"}, "com.apple.Push":map[string]interface {}{"enabled":"1"}, "com.apple.SafariKeychain":map[string]interface {}{"enabled":"1"}}}, "7CB6DA0C204841DA001453C5":map[string]interface {}{"CreatedOnToolsVersion":"9.2", "LastSwiftMigration":"1000", "SystemCapabilities":map[string]interface {}{"com.apple.ApplicationGroups.iOS":map[string]interface {}{"enabled":"1"}}}, "7CD7C3F1236B008300059BC8":map[string]interface {}{"CreatedOnToolsVersion":"11.2", "TestTargetID":"7CB34F1B1D362969004B639D"}})
|    
Robert-Bitrise commented 4 years ago

Hi @ubuntudroid and @kylebrowning ! Do you still notice this issue or it has been solved?

kylebrowning commented 4 years ago

I reverted to using the deprecated auto provision step.

Robert-Bitrise commented 4 years ago

@kylebrowning Could you please send a build log with support access which I can use to investigate this issue? Thank you.

kylebrowning commented 4 years ago

Failing Passing before something broke

Robert-Bitrise commented 4 years ago

@kylebrowning Could you please check the following settings?

These settings have to be done to be able to use the iOS Auto Provision with AppStore Connect API step.

kylebrowning commented 4 years ago

Yes all of those are correct and, as I put in my last comment there is a build that did pass with App Store connect API and then it broke.

Robert-Bitrise commented 4 years ago

@kylebrowning

What you were using in that successful build was a step with this id: ios-auto-provision The id of the other auto provision step is: ios-auto-provision-appstoreconnect

So this link didn't use the AppStore Connect API based step: https://app.bitrise.io/build/26b87868df02c676#?tab=log

Robert-Bitrise commented 4 years ago

@kylebrowning Did you notice that you have used the same iOS Auto Provision step in those 2 builds what you have sent to me in your previous comment?

kylebrowning commented 4 years ago

I'll double check when I have time. Sorry for the delayed response.

Robert-Bitrise commented 4 years ago

@kylebrowning No problem, thank you for your reply!

Robert-Bitrise commented 3 years ago

Hi @kylebrowning ! Did you have time to double check that what we were talking about earlier? I am looking forward to your reply.

JakeStoeffler commented 3 years ago

I'm having the same issue and it's blocking me from moving off the deprecated iOS Auto Provision with Apple ID path. Here's an example of a failing build: https://app.bitrise.io/build/c33c41a2823a052b

I found a thread about this where others were affected as well: https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530

Please let me know what else I can help with so this gets fixed.

bitce commented 3 years ago

Hi @JakeStoeffler, can you please enable Support User access in the Settings of your app, so we can take a look at the project?

JakeStoeffler commented 3 years ago

@bitce Done. You'll notice I was able to work around the issue by adding an empty entry for the target to the TargetAttributes section of project.pbxproj. However, I think that could be avoided if xcode-project was updated in this step.

bitce commented 3 years ago

Thanks for the details @JakeStoeffler. The team seems to agree, we've created a task to do this as soon as we can!

godrei commented 3 years ago

@ubuntudroid and @kylebrowning the xcode-project package update was pulled in version 0.1.2 on 1 Dec 2020. Could you please test the latest version of the step?

ubuntudroid commented 3 years ago

@godrei I'm not actively working on our xcode project at the moment, but I'll check once I'm back on it. Might be a month or two though.

godrei commented 3 years ago

@JakeStoeffler and @kylebrowning could you please try the latest version of the step? There was one more code block requiring TargetAttributes, it is fixed in version 0.1.7

godrei commented 3 years ago

I'll close this issue, but if you need more info/help just open a new issue!