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

Xcode 14 drops support for Bitcode #2397

Closed
calvincestari opened this issue Jul 27, 2022 · 13 comments · Fixed by #2398
Closed

Xcode 14 drops support for Bitcode #2397

calvincestari opened this issue Jul 27, 2022 · 13 comments · Fixed by #2398
Assignees
Labels
beta-xcode Issues occurring on a beta version of Xcode build-issue Issues occurring when attempting to build

Comments

@calvincestari
Copy link
Member

calvincestari commented Jul 27, 2022

From the Xcode 14 Beta 3 release notes:

Deprecations
Starting with Xcode 14, bitcode is no longer required for watchOS and tvOS applications, and the App Store no longer accepts bitcode submissions from Xcode 14.

Xcode no longer builds bitcode by default and generates a warning message if a project explicitly enables bitcode: “Building with bitcode is deprecated. Please update your project and/or target settings to disable bitcode.” The capability to build with bitcode will be removed in a future Xcode release. IPAs that contain bitcode will have the bitcode stripped before being submitted to the App Store. Debug symbols for past bitcode submissions remain available for download. (86118779)

This was raised in #2396 but we can't use those changes because the apollo-ios project uses xcconfig files.

I've done some reading and I'm still confused about how to resolve this. We currently enable bitcode with the following build setting

// Enable Bitcode only for actual devices, not for macOS or simulators
ENABLE_BITCODE[sdk=watchos*][config=Release] = YES
ENABLE_BITCODE[sdk=iphoneos*][config=Release] = YES
ENABLE_BITCODE[sdk=appletvos*][config=Release] = YES

We could target the Xcode 14 SDKs to explicitly disable bitcode but I don't think that's necessary because my take on the deprecation notice is that the default to build bitcode will be NO in Xcode 14. So then the question remains how do we enable it for older Xcode versions to still build with Xcode? From what I've read I think the xcconfig conditional values need to either target a specific version iphoneos15.5 or everything iphoneos*; I don't think we can lump versions together, eg: iphoneos<=15.5.

I don't have Xcode 14 yet for further testing but I will come back to this soon. I've created this issue so we don't ignore the deprecation.

@calvincestari calvincestari added beta-xcode Issues occurring on a beta version of Xcode build-issue Issues occurring when attempting to build labels Jul 27, 2022
@calvincestari calvincestari self-assigned this Jul 27, 2022
@calvincestari
Copy link
Member Author

Here is the Apple documentation on xcconfig files; it contains details for conditional settings.

@AnthonyMDev
Copy link
Contributor

Oh I think that we should just remove it completely. If they are removing support for it, then it's probably for good reason (not enough of an actual performance benefit for the cost maybe?). Regardless, it's being removed in a new version of Xcode, not of iOS, so it's not going to be able to build with bit code even for older iOS versions. That tells me Apple doesn't want you using it anymore at all.

@stareque-atlassian
Copy link
Contributor

Should I raise another PR with all references to "bitcode enabled" removed?

@calvincestari
Copy link
Member Author

Removing the ENABLE_BITCODE settings from all xcconfig files should do it @stareque-atlassian.

@stareque-atlassian
Copy link
Contributor

Raised a pr to merge into master with only xcconfig changes #2398

Can I request this branch to also be made into a hotfix 0.51.3. The branch is rebased from 0.51.2

@calvincestari
Copy link
Member Author

Thanks for the new PR. Is there a specific reason you want a hotfix version 0.51.3? Merging this into main will then include this change in a future 0.53.0 release and there were no breaking changes in 0.52.0 so updating to 0.52.0 shouldn't be too painful. To do a hotfix release we would need to merge into a hotfix branch off of 0.51.2 and then cherry-pick into main; not my preferred route to releasing this.

@calvincestari
Copy link
Member Author

Reading your comment on the PR itself I get the impression that a minor release would satisfy your needs, so I'm going to merge your PR into main. We can discuss a hotfix release if that is the only way forward for your project.

@stareque-atlassian
Copy link
Contributor

completely agree, minor release will work!

@calvincestari
Copy link
Member Author

This is done with the merging of #2398.

@stareque-atlassian
Copy link
Contributor

@calvincestari do you have an ETA for the minor release? is it a weekly schedule or will be done asap

@calvincestari
Copy link
Member Author

We don't have a release schedule. It's typically when there is enough built up to release or when there is an urgent bug fix to go out. Here's the current diff between 0.52.0...main.

I'll put together a release PR for 0.53.0 a bit later today. I don't think there is anything else we're waiting on right now but I'll check with the rest of the team.

@stareque-atlassian
Copy link
Contributor

thanks a lot @calvincestari will be a big help for our team to move forward

@calvincestari
Copy link
Member Author

@stareque-atlassian, this is now available with the 0.53.0 release. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-xcode Issues occurring on a beta version of Xcode build-issue Issues occurring when attempting to build
Projects
None yet
3 participants