Skip to content
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

Archiving using Xcode 15.3 Fails Due when Including PPRiskMagnes.framework (minimum OS Version specified in the Info.plist) #1229

Closed
RGG-jayoung opened this issue Mar 20, 2024 · 17 comments

Comments

@RGG-jayoung
Copy link

Braintree SDK Version

6.14.0-16.16.0

Environment

Both

Xcode Version

Xcode 15.3

OS Version & Device

iOS 17.x

Integration type

Swfit Package Manager

Development Processor

Both

Describe the bug

When including PPRiskMagnes.framework, archiving builds fail using Xcode 15.3 locally or using Xcode Cloud. See screenshot.

Previously mentioned here when attempting to submit Privacy Manifest compatible releases to Apple.
#1135 (comment)

To reproduce

Using Xcode 15.3:

  1. Product > Archive
  2. Organizer > Validate App

Using Xcode Cloud with Xcode 15.3 selected produces the same result.

Expected behavior

Archiving the app with Braintree SDK links should work with Xcode 15.3 and pass Apple validation. These errors were once visible for other dependencies like Google Firebase, Crashlytics, etc. but the latest releases of those SDKs resolved this. The only dependency that exhibits this failure is PPRiskMagnes.framework. This blocks us from shipping new releases or updates. Given that all other vendors have resolved this issue, and Braintree is the outlier we believe Braintree needs to address this.

A workaround of archiving with Xcode 15.2 was mentioned as a solution, but this fails with the same validation error. This started failing on March 13, Apple's announced deadline for Privacy manifest submissions. While these issue are technically unrelated, Apple's validation scan's seem stricter about the contents of the .ipa file and the PPRiskMagnes.framework.

Please advise.

Screenshots

311287460-452ecf4f-72d5-49a2-88d6-b201fc147a19
@KunJeongPark
Copy link
Contributor

KunJeongPark commented Mar 20, 2024

Hello,
Which version of the SDK are you using? And what is your minimum deployment target?

We just released 6.15.0 with updates with Magnes version with its own Privacy Manifest yesterday, March 18th. We released 6.16.0 with more minor update today, March 19th.

@RGG-jayoung
Copy link
Author

Hi @KunJeongPark thank you for the quick response.

  • Braintree SDK 16.16.0 (also tried this with 16.14.0, 16.15.0).
  • Minimum Deployment Target: iOS 15.1
image image

@KunJeongPark
Copy link
Contributor

Thank you.

@KunJeongPark
Copy link
Contributor

KunJeongPark commented Mar 20, 2024

I was able to successfully archive our demo app with min deployment changed to 15.1 using Xcode 15.3
with our latest SDK, 6.16.0. The Magnes version that we used in the new releases was built with Xcode 14.1, I believe.
This should be compatible with your minimum deployment target.

I'm wondering if it could be issue with Xcode holding on to cached data. Have you tried removing derived data?

Let me investigate to see if I can reproduce this error and also check with my team.

@RGG-jayoung
Copy link
Author

I was able to successfully archive our demo app with min deployment changed to 15.1 using Xcode 15.3 with our latest SDK, 6.16.0. The Magnes version that we used in the new releases was built with Xcode 14.1, I believe. This should be compatible with your minimum deployment target.

I'm wondering if it could be issue with Xcode holding on to cached data. Have you tried removing derived data?

Let me investigate to see if I can reproduce this error and also check with my team.

Thank you @KunJeongPark. Just cleared derived data and clean build and still seeing the error message. Definitely spooky behavior.

To rule a few more things out, I'm doing some additional tests and will let you know as soon as possible. We have a test app that is free of other dependencies that I can link to Braintree 6.16.0 and see if that builds and validates.

@KunJeongPark
Copy link
Contributor

Thank you. I just tested archiving a new app using SPM and versions that you indicated and I was also able to successfully archive the app with a team member. Please let us know if there are any details in your implementation that might be relevant for us to investigate.

@RGG-jayoung
Copy link
Author

RGG-jayoung commented Mar 21, 2024

After a lot of experimentation, the validation during submission still fails. Findings below:

We saw Firebase listed in a similar fashion, accounting for about 30-60 errors on validation. After updating to the latest version, their workaround modifies their minimum OS version to be "100". This works, clearing out all the errors except PPRiskMagnes.framework.

After archiving the build and opening the .ipa file, here are the contents of the Info.plist of these 2 for comparison.

image image

Validating the app against the store produces the following error (either through Xcode > Organizer > Validate App) or using Xcode Cloud via CI.

Validation Fails

If you modify the PPRiskMagnes.framework > Info.plist inside of the archive, and then submit it again for validation it passes. So its really just the value of this string provided by the framework blocking the validation.

Validation Succeeds

While we could technically implement a post release script as a workaround, it feels quite wrong to be manipulating a framework's internal contents that we don't own. That also means modifying our CI system and changing our standard deployment process.

@KunJeongPark
Copy link
Contributor

KunJeongPark commented Mar 21, 2024

I apologize, I misunderstood your original question, I thought you had failure in archiving and now I see the error was in the validation. I see the same error in validation and I do see the same Info.plist showing MinimumOSVersion as 11.0.
Thank you for the screenshots and giving us more details, that was very helpful.

Looks like this is a known issue: googleads/swift-package-manager-google-mobile-ads#62

I will discuss this with my team tomorrow to see if we need to reach out to the Magnes team.

@KunJeongPark
Copy link
Contributor

KunJeongPark commented Mar 21, 2024

Hello,
I was able to resolve this issue by archiving/validating our demo app with Xcode 15.2.
I also created a sample app to integrate our latest SDK using SPM and archiving/validating with Xcode 15.2
was successful.

The issue with Xcode 15.3 seems to be an Apple bug. Would you be able to file a bug?
I appreciate your bringing this issue to our attention.

Would you be able to give us screenshots/error messages when you use Xcode 15.2?

Thank you.

@RGG-jayoung
Copy link
Author

Hello, I was able to resolve this issue by building our demo app with Xcode 15.2.

Good to hear. Similar to Firebase and others implementing the workaround in their frameworks, what is the plan for PPRiskManges.framework to build with Xcode 15.3 moving forward?

@KunJeongPark
Copy link
Contributor

KunJeongPark commented Mar 21, 2024

I will contact them about this issue today. They are have been very prompt in their responses.
We were focused so far on trying to figure out a work around so that you can get your app approved.

If you continue to have problems with Xcode 15.2, it would be helpful for us to have a sample app where you can reproduce the issue that you are seeing. Thank you.

@RGG-jayoung
Copy link
Author

Appreciate your follow up and us getting to a solution. I'll try to get an answer today on our Xcode 15.2 + Braintree v6. Ideally a Xcode 15.3 solution materializes while we QA our migration.

@KunJeongPark
Copy link
Contributor

KunJeongPark commented Mar 22, 2024

Thank you, this appears to be an Apple bug, seems like many have filed radars for this issue.

I have contacted Magnes team to see if there are viable workarounds for Xcode 15.3.

@RGG-jayoung
Copy link
Author

@KunJeongPark did the Magnes team provide any updates on packaging with Xcode 15.3? Any sense on timing.

@KunJeongPark
Copy link
Contributor

KunJeongPark commented Apr 1, 2024

Yes, they did provide us with the static copy of the framework that we use in the SDK with Info.plist MinOSVersion modified to "100" last Friday afternoon. I verified that this works with the SPMTest app that we have that integrates our SDK 6.16.0 with PPRiskMagnes framework when archiving and validating with Xcode 15.3.

I want to test this a bit more and discuss with the team if this is a solution we want to offer.
Were you able to verify that downgrading to Xcode 15.2 works for your app that others have mentioned as a workaround? I verified with our test app that this solution works with PPRiskMagnes without manually changing the Info.plist MinOSValue to 100.

We will get back to you in the next few days. Thank you for your patience.

@RGG-jayoung
Copy link
Author

We're temporarily downgrading to Xcode 15.2 which is working for submission. While this works, it feels brittle and ideally we should be targeting the latest iOS release. Since Apple introduced the Xcode 15.0 minimum deployment version, I wouldn't be surprised if they chose to enforce 15.3 sometime with all these other requirements in flight.

Thank you for your help and hard work.

@KunJeongPark
Copy link
Contributor

KunJeongPark commented Apr 3, 2024

You're welcome. I felt uncomfortable about workaround of manually changing the plist MinOSVersion because I am not privy to exact nature of the Apple bug with Xcode 15.3 and I couldn't find any documentation on why this workaround causes validation to pass for this scenario.

Although we had validations pass for multiple scenarios with this workaround and verified difference in archive folder structures between Xcode 15.2 and Xcode 15.3, I was in the middle of testing various scenarios by creating my own xcframeworks just to be sure. Another concern I had was with possibility of Apple fixing their validation issue which might break the workaround.

Thank you. I am relieved as I think that would have been my decision as well.

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

No branches or pull requests

2 participants