instacart / instacart/TrueTime.swift
Xcode 14.3 compatibility needed to resolve error: libarclite_iphonesimulator.a file not found
- Dominant language
- Swift
- Stars
- 634
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
TrueTime is a dependency of our SDK we distribute via CocoaPods. When we build an XCFramework using `xcodebuild` from the 14.3 command line tools and run `pod lib lint` it fails with the following error:
```
Ld /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/Binary/TrueTime normal x86_64 (in target 'TrueTime' from project 'Pods')
cd /var/folders/4t/7g326jh57pg0k71lf8fbhmf80000gn/T/CocoaPods-Lint-20230419-87560-1sy6dj0-OurSDKNameHere/Pods
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target x86_64-apple-ios8.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk -L/Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/EagerLinkingTBDs/Release-iphonesimulator -L/Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Products/Release-iphonesimulator/TrueTime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/lib/swift -F/Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/EagerLinkingTBDs/Release-iphonesimulator -F/Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Products/Release-iphonesimulator/TrueTime -filelist /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/TrueTime.LinkFileList -install_name @rpath/TrueTime.framework/TrueTime -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/TrueTime_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/TrueTime.swiftmodule -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/TrueTime_dependency_info.dat -o /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/Binary/TrueTime
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
... more logs here ...
** BUILD FAILED **
The following build commands failed:
Ld /Users/Jordan/Library/Developer/Xcode/DerivedData/App-hclqfopkuzccksahrrngahsmzywo/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/TrueTime.build/Objects-normal/x86_64/Binary/TrueTime normal x86_64 (in target 'TrueTime' from project 'Pods')
(1 failure)
Testing with `xcodebuild`.
-> OurSDKNameHere (5.0.0)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
```
Flutter had this same error ([issue](https://github.com/flutter/flutter/issues/124340)) and fixed it ([pull request](https://github.com/flutter/flutter/pull/124349)) by updating transitive dependencies to a minimum version of at least iOS 9. It seems TrueTime needs to do the same. Explained in that PR, it happens because:
> Xcode 14.3 (released March 30, 2023) stopped building automatic reference counted (ARC) code targeting < iOS 9 or < macOS 10.11 by removing a libarclite_* library from the toolchain that was needed to link for these older targets.
> I also recommend filing issues with any pods you see hitting this to suggest they updated to a minimum of at least iOS 9 and macOS 10.11. For example https://github.com/openid/AppAuth-iOS/pull/761
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.