Closed defagos closed 3 years ago
Carthage has Build problem in Xcode 12 : Building scheme "FXReachability" in FXReachability.xcodeproj Build Failed Building for iOS Simulator, but the linked framework 'FXReachability.framework' was built for iOS.
I already tested the new emergency release but it has the same build problem.
Same here. We'll have a look. Thank you @cellos-bot for the feedback.
@cellos-bot , the Carthage issue with Xcode 12 is a known issue on their repository. https://github.com/Carthage/Carthage/issues/3019
From this thread, a workaround exists. Here is a proposition:
carthage-build.sh
like:
#!/usr/bin/env bash
set -euo pipefail
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
echo 'EXCLUDED_ARCHSEFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64XCODE_1200__BUILD_12A8169g = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHSEFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64XCODE_1200__BUILD_12A8179i = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHSEFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64XCODE_1200__BUILD_12A8189h = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHSEFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64XCODE_1200__BUILD_12A8189n = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHSEFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64XCODE_1200__BUILD_12A7208 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHSEFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64XCODE_1200__BUILD_12A7209 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHSEFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64XCODE_1200 = $(EXCLUDED_ARCHSEFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64XCODE_1200BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHSEFFECTIVE_PLATFORMSUFFIX$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64BIT$(NATIVE_ARCH_64_BIT)_XCODE$(XCODE_VERSION_MAJOR))' >> $xcconfig
export XCODE_XCCONFIG_FILE="$xcconfig" carthage build "$@"
2. Update or bootstrap without building, then use this script to build library dependencies:
carthage update --new-resolver --no-build # Or use bootstrap for a CI with a Cartfile.resolved ./carthage-build.sh --cache-builds --platform iOS,tvOS # Add --configuration Release-static if you choose static builds.
We hope it will be an old story soon, when we'll release with SPM support. See #217
thanks for the temporary solution, but I think , we wait for completed Update.
We received the following question:
Dear Letterbox Team,
I hope this email finds you well. I am contacting you regarding the current implementation of the Letterbox 5.0.2 in Meteo. (As we all know, Apple didn't give us much time :D)
We are currently facing two problems in the development of Meteo 2.10:
- The 5.0.2 Version is not supporting XCode 12 which would not allow us to release a version in iOS 14
- In case you are converting to SPM, we might have a problem. We are not sure if SPM works with projects that still contain Objective-C code (which is Meteo's case)
We were wondering if you are planning the next release in the short future.
Yes, we are all facing the same issue and attempting our best to solve it. Sorry this impacts your team as well. To answer your concerns:
Cartfile
to import Letterbox as dependency, you can tweak the carthage
command with a simple shell script to work around this issue (see above). This is not optimal but as unobtrusive as possible. This is the best pragmatic option we can offer so that your migration is kept as simple as possible (though not without a bit of work on your side, of course). There are no API changes involved this way, so once Carthage can build the library dependencies you are good to go. Of course, we can help with this step you should the above instructions not be clear enough.Note we will release a minor update 5.0.3 tomorrow, as comScore delivered an SDK update for iOS 14 which should be integrated in apps as early as possible. This SDK update was released after Letterbox 5.0.2 and we hadn't been informed before it would be required. We will communicate more information about it tomorrow, but the update procedure to 5.0.2 or 5.0.3 is exactly the same.
In general we recommend the following approach for updating a project to 5.0.3:
Once you could deliver your app update to the stores, you can breathe a bit. We are currently working on full iOS 14 SDK support in Letterbox 6.0.0. We plan to deliver this version in the upcoming weeks, with following features:
@import
for Letterbox imports. We'll of course provide a detailed migration guide.Other 6.x versions will further improve compatibility with iOS 14, hopefully solving background video playback (but probably only on iOS 14.2 if we can have Apple deliver a fix for this version).
To build Letterbox 5.0.3 with Xcode 12, Carthage has now an official workaround: https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md This workaround is more flexible with new Xcode version (like 12.0.1 or 12.1 GM version)
Start using Letterbox 6.0.0 with Xcode 12 and SPM support. Here is our migration guide:
https://github.com/SRGSSR/srgletterbox-apple/wiki/Migration-guides
Letterbox 6.0.0 version is not yet released. But you can use develop
branch dependency to start the migration.
🎉 Letterbox 6.0.0 is released.
The proposed migration guide is also available.
Official iOS and tvOS support still needs to be tested and remaining issues have to be fixed: