Skip to content

Conversation

Badlazzor
Copy link
Contributor

This PR helps making it possible to share code between the build-for-simulator and archive steps.

@bitrise-ip-bot
Copy link
Contributor

bitrise-ip-bot commented Sep 17, 2025

Summary

This PR modifies iOS application provisioning profile handling to make it optional for simulator builds. The change allows creating IosBaseApplication instances even when no embedded.mobileprovision file is found, which helps share code between build-for-simulator and archive steps.

Walkthrough

File Summary
xcarchive/ios.go Modified NewIosBaseApplication to handle missing provisioning profiles gracefully for simulator builds

@Badlazzor Badlazzor changed the title Make IosBaseApplication provisioning optional (simulator builds) [ACI-4171] Make IosBaseApplication provisioning optional (simulator builds) Sep 17, 2025
Copy link
Contributor

@bitrise-ip-bot bitrise-ip-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an AI-generated review. Please review it carefully.

Actionable comments posted: 1

Comment on lines +68 to 73
provisioningProfile, err := provisioningProfileCreator()
if err != nil && err != profileNotFoundErr {
return IosBaseApplication{}, err
} else if err == profileNotFoundErr {
log.Printf("No embedded.mobileprovision found for app at: %s", path)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐛 Bug

This change allows creating IosBaseApplication with a zero-value ProvisioningProfile when no embedded.mobileprovision is found. However, the IsXcodeManaged() method (line 310) calls ProvisioningProfile.IsXcodeManaged() directly without checking if the profile is valid, which will cause runtime issues for simulator builds.

🔄 Suggestion:

Suggested change
provisioningProfile, err := provisioningProfileCreator()
if err != nil && err != profileNotFoundErr {
return IosBaseApplication{}, err
} else if err == profileNotFoundErr {
log.Printf("No embedded.mobileprovision found for app at: %s", path)
}
provisioningProfile, err := provisioningProfileCreator()
if err != nil && err != profileNotFoundErr {
return IosBaseApplication{}, err
} else if err == profileNotFoundErr {
log.Printf("No embedded.mobileprovision found for app at: %s", path)
// Note: IsXcodeManaged() method needs to be updated to handle zero-value ProvisioningProfile
}

@Badlazzor Badlazzor requested a review from a team September 18, 2025 09:10
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