!!! MANDATORY TO FILL OUT !!!
I'm using Realm and Realm swift as vendored framework in my library. Executing Cocoapods pod lib lint failt with error:
ERROR | [iOS] xcodebuild: error: module 'RealmSwift' was created for incompatible target arm64-apple-ios9.0: Frameworks/RealmSwift.framework/Modules/RealmSwift.swiftmodule/arm64.swiftmodule
pod lib lin executes successfully
Error like above
Simple project with RealmSwift import and distributed as vendored framework
Realm framework version: 5.4.2
Realm Object Server version: ?
Xcode version: Xcode 12 GM
iOS/OSX version: ?
Dependency manager + version: Cocoapods 1.9.3
Please try updating cocoapods to 1.10.rc1 and pointing it at the lm/pod-xcframework branch. Note that this requires setting the branch for both Realm and RealmSwift even if you only use RealmSwift directly:
pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'lm/pod-xcframework', submodules: true
pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'lm/pod-xcframework', submodules: true
Hello, there is no way that I can use that with pod lib lint as in .podspec you can only define name and version of the dependency. I will try to use that directly in my app and let you know.
Using it in app with Cocoapods 1.9.3 gave me an error: ld: framework not found realm-sync
Edit: Looks like issue is somehow with Cocoapods "lib lint" as app with newest Realm release archives fine
I have the same problem except I use the Realm.Framework and RealmSwift.Framework downloaded directly.
Both version 5.4.3 & 5.4.2's iOS Xcode 12 build have the same error on Xcode 12 GM
@adamszeremeta
there is no way that I can use that with pod lib lint as in .podspec you can only define name and version of the dependency
You could try excluding the arm64 simulator in podspec file with:
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
Which should write this into the .xconfig.

Archives, building, pod installing, etc. worked. But specifically pod lib lint still failed. Now lib lint applied my test framework that excludes arm64 simulators to a target called arm64-apple-ios-simulator:
/var/folders/4j/b9ld7rcn5mb_wn84z9hlh1m80000gn/T/CocoaPods-Lint-20200928-30767-wl561z-framework4/App/main.swift:1:8: error: could not find module 'framework0' for target 'arm64-apple-ios-simulator'; found: i386, x86_64-apple-ios-simulator, x86_64, i386-apple-ios-simulator
import framework0
I couldn't find a way for pod lib lint to skip _just_ arm64 simulators, but maybe pod lib lint --skip-import-validations --verbose is an alternative. It worked for me, but I recommend using verbose because it wasn't immediately clear if I was skipping things that _shouldn't_ be skipped.
Firstly,I try add my podspec file with:
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
and execute pod lib lint error:
Ld /Users/xxxx/Library/Developer/Xcode/DerivedData/App-brhsnyjzdntvcufqhukpqdhzdqzh/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/Realm.build/Objects-normal/arm64/Binary/Realm normal arm64
Secondly,I update realm version:
dependency 'Realm', '5.4.3' and execute pod lib lint with same error
I have same problem with carthage.
@ericjordanmossman i add s.pod_target_xcconfig = { 'VALID_ARCHS' => 'x86_64 armv7 arm64' }
in my podsepc execute pod lib lint sucess
@ericjordanmossman i add
s.pod_target_xcconfig = { 'VALID_ARCHS' => 'x86_64 armv7 arm64' }
in my podsepc executepod lib lintsucess
I do the same but no luck.
I have used Realm version 4.3.2 in my pods and it is working now in Xcode 12.1
Using version 5.5.0 seems to work however 10.1.0 throws the error Framework not found realm-sync
@bstillitano Please install Cocoapods 1.10 to resolve the Framework not found realm-sync error.
@bstillitano Please install Cocoapods 1.10 to resolve the
Framework not found realm-syncerror.
Just Confirming that this did infact fix the issue. Simply running sudo gem install cocoapods and updating fixed it.
Closing as this is no longer an issue in Realm Cocoa v10.1.1
Most helpful comment
@ericjordanmossman i add
s.pod_target_xcconfig = { 'VALID_ARCHS' => 'x86_64 armv7 arm64' }in my podsepc execute
pod lib lintsucess