Few cents about my commits

Fix: Xcode10.1 - Invalid Swift Support

|

UPDATE:

As result of testing rules_apple was wrong and Apple reject such binaries.
In general it would be enough just tp fix issue introduced in PR340 but bitcode strip and SwiftSupport/iphoneos/ will also stay as part of this PR.

Starting from Xcode 10 ARM64E arch has to be stripped from included framworks as this caused Invalid Swift Support at Apple side. There was a fix for it but sadly there was no feedback and another was introduced during the fix. As result investigation continue with Eric Nondahl report and fix is ongoing (not confirmed yet).

To fix this issue PR346 is created and it introduces following changes:

  • fixes issue introduced in PR340: copy of swift libraries in SwiftSupport/ was stripped from ARM64E arch but shell not be touched at all;
  • swift libraries are now being copied into SwiftSupport/iphoneos/ same as XCode does;
  • added code that strips all not used architectures from dynamic binaries (check rules_apple for reference). Probably it is extra as it is enough to remove simulator archs and ARM64E but it is quick win as reduces IPA size. So if it is not breaking anything lets keeping it;
  • added code that strips bitcode from dynamic binaries. Same as Xcode does. Reduces final IPA a lot;
  • as now all extra architectures are being stripped there is no need for stripArchs configuration option that was introduced in PR340. It was removed.

Solution is in progress, please report to gitter channel for any issue found.

Comments