Closed 0xacdc closed 4 years ago
Try clean project and remove DerivedData
ld: warning: ignoring file Pods/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-armv7_arm64/AppsFlyerLib.framework/AppsFlyerLib
,
missing required architecture x86_64
in file Pods/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-armv7_arm64/AppsFlyerLib.framework/AppsFlyerLib (2 slices)
Undefined symbols for architecture x86_64:
it may be an issue related to cocoapods integration of xcframeworks
For my help to be more effective, provide a more extensive log. Also I need this: VALID_ARCHS, SUPPORTED_PLATFORMS, ONLY_ACTIVE_ARCH And can you reproduce an error on an empty project?
I am also facing same issue. After update to version 5.4.0, we are not able to compile the code in debug mode. However build is successfully achieve on CI/CD pipeline.
Error getting while build is 'AppsFlyerLib/AppsFlyerTracker.h' file not found
Build was successfully compile and executed with AppsFlyerFramework 5.3.0
@amitbattan I think this is related to .xcframework. In 5.4.0 we started to use .xcframework instead of .framework. Xcode version, VALID_ARCHS, SUPPORTED_PLATFORMS, ONLY_ACTIVE_ARCH CocoaPods version OS X version
@andr-ggn
Xcode version - 11.4.1 (11E503a) VALID_ARCHS - arm64 arm64e armv7 armv7s SUPPORTED_PLATFORMS - iOS ONLY_ACTIVE_ARCH - Yes CocoaPods version - 1.8.4 OS X version - 10.15.4
Update your CocoaPods version to 1.9.0 or higher. 1.8.4 does not support xcframework
thanks @andr-ggn it works for me after update CocoaPods version
@andr-ggn my setup is :
Xcode version - 11.5
VALID_ARCHS - arm64 arm64e armv7 armv7s
SUPPORTED_PLATFORMS -iOS
ONLY_ACTIVE_ARCH - Yes
CocoaPods version -1.9.3
OS X version - 10.15.5
and it's still not working
@0xacdc Can you create an empty project and integrate AppsFlyer there? I have to know if it is related to versions(CocoaPods, OSX, Xcode) or you have specific configuration of your project. I would appreciate it!
@andr-ggn it works on an empty project, seems like it's a problem related to my project. But I can confirm that your .xcframework
doesn't work only with cocoapods, if I drag the .xcframework
directly into the project, all is working fine
@0xacdc Can you provide your Podfile?
Also can you try clean cache for CocoaPods?
pod cache clean 'AppsFlyerFramework'
and
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "{project_path}/Pods/"
pod update
Unfortunately I can't show you the Podfile, because our project is private and most of our pod dependencies are private too.
On the other hand:
pod cache clean 'AppsFlyerFramework'
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "{project_path}/Pods/"
pod update
didn’t help
Unfortunately I can't show you the Podfile, because our project is private and most of our pod dependencies are private too.
On the other hand:
pod cache clean 'AppsFlyerFramework'
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "{project_path}/Pods/"
pod update
didn’t help
@andr-ggn maybe worth to switch to email because of sensitive info
It seems to me that the reason is that the library are distributing as binary and 5.4.0 version was compiled using Xcode 11.4.1.
Apple resolve issue about armv7 in the Xcode 11.5 (11E608c)
Apple Clang Compiler Resolved Issues Fixed an issue with incorrect code generation when targeting armv7 devices. (61901594)
https://developer.apple.com/documentation/xcode_release_notes/xcode_11_5_release_notes
May be maintainers of the library should just rebuild framework using Xcode 11.5 (11E608c)
So why it works if you import library without CocoaPods? I think the problem in CocoaPods
I was just update dependencies and CocoaPods it self from 1.9.1 up to 1.9.4 in project.
And as a result roll back app flyer from 5.4.0 back to 5.2.0
It seems to me CocoaPods is not a reason
@andr-ggn it works on an empty project, seems like it's a problem related to my project. But I can confirm that your
.xcframework
doesn't work only with cocoapods, if I drag the.xcframework
directly into the project, all is working fine
@navartis 👆
@andr-ggn In my case rolling back AppsFlyerFramework pod from 5.4.0 back to 5.2.0 helps
I found this: https://github.com/CocoaPods/CocoaPods/issues/9794 https://github.com/CocoaPods/CocoaPods/issues/9785
@navartis Can I ask you downgrade CocoaPods from your version to 1.9.1 and try 5.4.0 again?
5.2.0 uses .framework and 5.4.0 .xcframework
@andr-ggn
pod : 1.9.1
AppsFlyerFramework: 5.4.0
same issue Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_AppsFlyerTracker"
@0xacdc
Check please Pods-Project.debug.xcconfig
Is it contains this:
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst" "${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-armv7_arm64" "${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-i386_x86_64-simulator" "${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-x86_64-maccatalyst"
All 4 paths 👆
@andr-ggn
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst" "${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-armv7_arm64" "${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-i386_x86_64-simulator" "${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-x86_64-maccatalyst"
it's absolutely the same
@0xacdc
Framework Search Paths
in your Build Settings
"${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst"
"${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-armv7_arm64"
"${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-i386_x86_64-simulator"
"${PODS_ROOT}/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-x86_64-maccatalyst"
?
Please, add
here it is :
it looks like it takes the first platform it founds
Works?
not in the least, same result Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_AppsFlyerTracker"
PROJECT
or in your Targets
?ios-i386_x86_64-simulator
at first place?here it is :
![]()
it looks like it takes the first platform it founds
ld: warning: ignoring file projectDir/Pods/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-armv7_arm64/AppsFlyerLib.framework/AppsFlyerLib, missing required architecture x86_64 in file projectDir/Pods/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-armv7_arm64/AppsFlyerLib.framework/AppsFlyerLib (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AppsFlyerTracker", referenced from:
Architectures in the fat file: Pods/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-armv7_arm64/AppsFlyerLib.framework/Versions/A/AppsFlyerLib are: armv7 arm64
Architectures in the fat file: Pods/AppsFlyerFramework/Mac Catalyst/AppsFlyerLib.xcframework/ios-i386_x86_64-simulator/AppsFlyerLib.framework/Versions/A/AppsFlyerLib are: i386 x86_64
The arch's on each platform are ok, therefore, the only explanation that I have is that the cocoapods somehow integrate the xcframerwork incorrectly in my case
XCFrameworks doesn't work yet.
On cocoapods master xcframeworks works for simulator and device, but not for archive. (https://github.com/CocoaPods/CocoaPods/issues/9794) On cocoapods stable version xcframeworks only works for device.
same too.
Is someone tried totally remove CocoaPods from project and integrate it again?
I'm experiencing the same error in the same environment.
The solution is to go to the target "Frameworks and Libraries" and We can add the AppsFlyerFramework.xcframework.
but, I feel like this method is a workaround.
Is someone tried totally remove CocoaPods from project and integrate it again?
pod deintegrate
this does not change anything
Small recap: 1 - The problem is not in the framework, but in CocoaPods 2 - The repository has all versions of the framework and you can manually add version 3 - If the problem will persist with CocoaPods - the next release will be with .framework, and .xcframework we will move to a separate Pod
Small recap: 1 - The problem is not in the framework, but in CocoaPods 2 - The repository has all versions of the framework and you can manually add version 3 - If the problem will persist with CocoaPods - the next release will be with .framework, and .xcframework we will move to a separate Pod
Given the current circumstances, I think the 3
is the most optimal solution
Same issue for me, we are waiting for new SDK release that rollback the framework issue.
I think I have a similar problem. I have problem with build my project on CI:
error: Multiple commands produce '/Users/jenkins/Library/Developer/Xcode/DerivedData/xxx/Build/Products/Debug-iphonesimulator/cocoapods-artifacts-Debug.txt':
Testing failed:
Multiple commands produce '/Users/jenkins/Library/Developer/Xcode/DerivedData/xxx/Build/Products/Debug-iphonesimulator/cocoapods-artifacts-Debug.txt':
1) That command depends on command in Target 'xxxApp' (project 'xxxApp'): script phase “[CP] Prepare Artifacts”
2) That command depends on command in Target 'xxxUITests' (project 'xxxApp'): script phase “[CP] Prepare Artifacts”
Do we know when this issue gonna fix? when to expect new version? Also what is the work around this? manually add 5.4.0 to project or use earlier versions?
We decided to create separate pod spec for MacCatalyst (xcframework) and leave old for iOS only.
For MacCatalyst you can use: https://cocoapods.org/pods/AppsFlyerFramework-MacCatalyst
Had the same problem with cocoapods v1.9.3 update to v1.10.1 and it works now.
Report
Undefined symbols for architecture x86_64: "OBJC_CLASS$_AppsFlyerTracker", referenced from:
SDK Version
5.4.0
What did you do?
Run
pod update
AppsFlyerFramework became5.4.0