Open StartingZhou opened 4 years ago
@StartingZhou Thanks for sharing this issue with us. We will investigate this issue on xcode 12 beta 4, and get back to you soon.
I can concur that this is also happening to me and I'm using Xcode 12 beta 5. It has happened on all of the Xcode 12 betas as well.
Apple Develop chimcanhcutptit@gmail.com has a solution about this issue, I think it maybe the Xcode's bug. Add arm64 to Exclude Architecture of build settings both pods and project target
@chodges-a1 @StartingZhou @hantao-flurrydev Thank you for using Flurry Analytics. We will be fixing this issue in our upcoming release slated for release by the end of this week.
@rajkaur01 @hantao-flurrydev - Hello I just updated to 11.0 and I'm still seeing an error when trying to run my app using the Simulator:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FlurryWatch", referenced from: __OBJC_$_CATEGORY_FlurryWatch_$_ForceLoad in FlurryWatchEmpty.o ld: symbol(s) not found for architecture x86_64
For reference I'm using Xcode 12 Beta 5.
We updated Flurry in our project to 11.0.0 too, but error is still occurring:
in %podsFolderPath/Flurry-iOS-SDK/Flurry/libFlurry_11.0.0.a(libFlurry.a-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS,
Xcode Version 12.0 beta 5
I appreciate you help with that.
Hi @StartingZhou @rubidus1 @chodges-a1, from what I understand, Xcode 12 added support for Apple Silicon. So now it can compile for x86 Simulator and arm64 Simulator. So it is mad when it can’t find arm64 Simulator SDKs. There are some work around fixes in Cocoapods change project settings (App level), such as https://developer.apple.com/forums/thread/656509 which tells Xcode to stick with building what it needs (ie. Simulator x86_64) and don’t try to also build for arm64 Simulator. And later, for Flurry iOS SDK to add arm64 Simulator when build with Xcode 12 instead of Xcode 11. This would mainly be for users trying to develop on Apple Silicon Xcode. Sorry for this inconvenience.
I can confirm that we are facing the same problem on our project building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
. Setting this configuration on post_install
in Podfile, config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
we are able to build & run the app. But, is this the right solution here? Doesn't feel like it.
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
@p-nicolaou can you tell me where do I need to add that? Thanks!
@quetool At the end of your Podfile
add,
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
end
end
end
Thanks @p-nicolaou!
Do I need to pod deintegrate
before or something else? Other than pod install
of course...
@quetool for me, pod install
was enough
@p-nicolaou it didn't work for me, so now I am downloading 7.5 Gb of Xcode 11 🤦
A beta build has been released. Please update your podfile with
pod ‘Flurry-iOS-SDK/FlurrySDK’, :git => ‘https://github.com/flurry/flurry-ios-sdk.git’, :tag => ‘11.2.0.rc1’
For binary integration, you can download the package from here
I’m still getting this with 11.2:
ld: in /Users/david/Transporter/6AS/SixAges/Libraries/Flurry/libFlurry_11.2.0.a(libFlurry.a-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/david/Transporter/6AS/SixAges/Libraries/Flurry/libFlurry_11.2.0.a'
I’m not using pods, just adding libFlurry_11.2.0.a to the project.
@alakoring Please integrate with SDK v11.2.0.xcode12
As near as I can tell, there is no such thing? (That download didn't include any files with "xcode12")
And just to be sure, I downloaded the .zip from GitHub but didn’t see it either. (There’s a line in the changelog but that’s all I see.)
You can download the zip from https://github.com/flurry/flurry-ios-sdk/releases/tag/11.2.0.xcode12. You should be able to add version 11.2.0.xcode12 in your podfile as well.
Thanks!
ENABLE_BITCODE = NO
ONLY_ACTIVE_ARCH = YES
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = %w(arm64 i386)
end
end
@flurrydev To fix the issue building and inlcuding arm64 simulator architecture required for working with simulator on new Apple M1 based Macs, you have to replace yourvendored static fat library
with static xcframework
. Fat library cannot contain two arm64 slices (one for iphoneos and one for simulator). Device static framework (with arm64 and armv7
arch slices) with your current vendored fat library and simulator framework (withi386, x86_64 and new arm64
slices) will be separated inside xcframework container. static xcframework can be easily crated by xcodebuild tool. That what Firebase did recently with their internal vendored static libraries.
Standard procedure for that:
xcodebuild archive .... -sdk iphoneos -archivePath path-to-iphoneos-archive SKIP_INSTALL=NO
xcodebuild archive ... -sdk iphonesimulator -archivePath path-to-simulator-archive SKIP_INSTALL=NO
xcodebuild -create-xframework -library path-to-libfile-inside-iphoneos-archive -headers path-to-folder-with-headers -library path-to-libfile-inside-simulator-archive -headers path-to-folder-with-headers -output Flurry-static-11.2.0.xcframework
Will the static xcframework solution be available shortly?
I'm unable to build for the simulator, using Xcode 12.4, on a new MacBook Air M1. The following error occurs: 'libFlurry_11.2.0.xcode12.a(libFlurry.a-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS,'
Until then it would be good to provide some information/warning on the iOS integration webpages for M1 users, as trying to work out what's going on has been time consuming, and not everyone will find this page.
If you run Xcode using Rosetta you won't experience these Simulator issues. Unfortunately I can no longer do that as I need to work with storyboards and xib files, and they don't currently render in Interface Builder when running Xcode under Rosetta.
To run Xcode using Rosetta, right-click Xcode in Applications, select Get Info, and the option is in there.
@danfordham is right, I wasted considerable time before stumbling on this page and finding the solution to this exact issue.
Yes @danfordham is right - but this really slows your machine down...
I love Flurry, but I am tearing my hair out! The framework works great for my iOS based apps, however, I can not get Flurry to work as a Catalyst-based MacOS app (not even M1, just old canonical Mac). In my Build Settings for the Pods target, I have turned off BitCode, and set Active Architecture Only to YES (these last two make no different in the error results).
My pod file installs Flurry-iOS-SDK (11.2.1). and has the additional loader script:
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['LD_NO_PIE'] = 'NO' config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = %w(arm64 i386) end end end
I get two link errors: 1)
ld: in Dev Cat/Pods/Flurry-iOS-SDK/Flurry/libFlurry_11.2.1.a(libFlurry.a-x86_64-master.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, clang: error: linker command failed with exit code 1 (use -v to see invocation)
2)
ld: framework not found Flurry_iOS_SDK clang: error: linker command failed with exit code 1 (use -v to see invocation)
At this point, can someone please help me just point me in the direction to how to rescript the pod file to not include the Flurry pod in linking the Catalyst target so I can build a viable App Store bundle?
We solve this issue by add the following codes to Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'Flurry-iOS-SDK'
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
end
end
end
end
Hi StartingZhou! Thanks for the quick response! Sadly, Im still having the same project killing bugs here for compiling to Mac (iOS works):
Flurry-iOS-SDK 1 issue
ld: in Cat/Pods/Flurry-iOS-SDK/Flurry/libFlurry_11.2.1.a(libFlurry.a-x86_64-master.o), building for Mac Catalyst, but linking in object file built for iOS Simulator,
App 1 issue
Framework not found
Flurry_iOS_SDK
My Podfile is currently:
# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'
target 'App' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for App
pod 'Flurry-iOS-SDK/FlurrySDK' #Analytics Pod
pod 'CampcotCollectionView'
pod "KenBurns"
# try this to remove -pie warnings
#https://stackoverflow.com/questions/52789127/how-to-remove-warning-pie-being-ignored-it-is-only-used-when-linking-a-main
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['LD_NO_PIE'] = 'NO'
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
if target.name == 'Flurry-iOS-SDK'
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
end
end
end
end
end
end
I would really appreciate any thoughts on how to proceed here! Thanks!
@224XS
We have released a Catalyst compatible version of Flurry here: https://github.com/flurrydev/Flurry-Catalyst-Beta
This will allow you to run Flurry on Catalyst apps and includes M1 mac support.
I get the following error when trying to update to the beta:
[!] No podspec found for Flurry-iOS-SDK
in ~/Downloads/FlurryXCFramework/
On Apr 28, 2021, at 1:07 PM, Flurry Bot @.***> wrote:
@224XS https://github.com/224XS We have released a Catalyst compatible version of Flurry here: https://github.com/flurrydev/Flurry-Catalyst-Beta https://github.com/flurrydev/Flurry-Catalyst-Beta This will allow you to run Flurry on Catalyst apps and includes M1 mac support.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/flurry/flurry-ios-sdk/issues/207#issuecomment-828624759, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMHVBBXIE5B75ZTUK7TUE3TLA6EBANCNFSM4PWEIBRA.
Please let me be more specific, I am have Flurry installed via Cocoapods in an existing app which I am now adding Catalyst to. At the moment, using environment variables, I have turned off all calls to Flurry in the Catalyst environment:
// wait for catFlurry
import Flurry_iOS_SDK
When I try to link into a Catalyst target, I was getting link errors.
Now, when I updated my pod file to the new beta as suggested below, I get a pod error.
Here is my PodFile:
platform :ios, '13.0'
target 'HieroglyphicsPro' do
use_frameworks!
#pod 'Flurry-iOS-SDK/FlurrySDK' #Analytics Pod
pod 'Flurry-iOS-SDK', :path => '~/Downloads/FlurryXCFramework/'
pod 'CampcotCollectionView'
pod "KenBurns"
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['LD_NO_PIE'] = 'NO' config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' if target.name == 'Flurry-iOS-SDK' target.build_configurations.each do |config| config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64' end end end end end
end
What am I missing here? Thanks for your patience!! Ira
On Apr 28, 2021, at 1:07 PM, Flurry Bot @. @.>> wrote:
@224XS https://github.com/224XS We have released a Catalyst compatible version of Flurry here: https://github.com/flurrydev/Flurry-Catalyst-Beta https://github.com/flurrydev/Flurry-Catalyst-Beta This will allow you to run Flurry on Catalyst apps and includes M1 mac support.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/flurry/flurry-ios-sdk/issues/207#issuecomment-828624759, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMHVBBXIE5B75ZTUK7TUE3TLA6EBANCNFSM4PWEIBRA.
My apologies I updated the instructions. pod 'Flurry-iOS-SDK', :path => 'path to Flurry Podspec'
Replace the path with the file location of Flurry-iOS-SDK.podspec
Hello Again!
I am very sorry to bother you about this issue, but I am still having a fatal issue with Flurry in a mixed build for Catalyst
If I use the new beta of flurry-Catalyst, the pod doesn’t make it into the project. I downloaded the beta into a local directory in my project folder. After running “pod update”, Flurry is in ./Pods/Development Pods. And not in. ./Pods or ./Frameworks etc where it probably needs to be So the upshot is that I get a No Such Module ‘Flurry_iOS_SDK’ error on build in iOS target and “ld: framework not found Flurry” in Catalyst target
Here is my PodFile
platform :ios, '13.0'
target 'HieroglyphicsPro' do
use_frameworks!
#pod 'Flurry-iOS-SDK/FlurrySDK' #Analytics Pod
pod 'Flurry-iOS-SDK', :path => './Pods/Flurry-Catalyst-Beta-main'
pod 'CampcotCollectionView'
pod "KenBurns"
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['LD_NO_PIE'] = 'NO' config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' if target.name == 'Flurry-iOS-SDK' target.build_configurations.each do |config| config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64' end end end end end
end
And here is the result of the pod update
(base) ira@Iras-MacBook16-2 HieroglyphicsPro 1.27 Dev Cat % pod update Update all pods Updating local specs repositories
CocoaPods 1.10.1 is available.
To update use: sudo gem install cocoapods
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.10.1
Analyzing dependencies Downloading dependencies Installing Flurry-iOS-SDK 11.2.1.catalyst (was 11.2.1) Generating Pods project Integrating client project Pod installation complete! There are 3 dependencies from the Podfile and 5 total pods installed. (base) ira@Iras-MacBook16-2 HieroglyphicsPro 1.27 Dev Cat %
There seems to be an issue with the beta when I run a lint on it:
(base) ira@Iras-MacBook16-2 HieroglyphicsPro 1.27 Dev Cat % pod spec lint ./Pods/Flurry-Catalyst-Beta-main
-> Flurry-iOS-SDK (11.2.1.catalyst)
Cloning into '/var/folders/9z/bs1q72yj3lldjsmryfr7wm1w0000gn/T/d20210429-3187-1g1v5kg'... warning: Could not find remote branch 11.2.1.catalyst to clone. fatal: Remote branch 11.2.1.catalyst not found in upstream origin ) during validation.
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 1 error. (base) ira@Iras-MacBook16-2 HieroglyphicsPro 1.27 Dev Cat %
Did I do something wrong?
On Apr 28, 2021, at 1:35 PM, Flurry Bot @.***> wrote:
My apologies I updated the instructions. pod 'Flurry-iOS-SDK', :path => 'path to Flurry Podspec'
Replace the path with the file location of Flurry-iOS-SDK.podspec
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/flurry/flurry-ios-sdk/issues/207#issuecomment-828644349, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMHVBGHQVDZWGZRUOKAYSLTLBBOXANCNFSM4PWEIBRA.
@224XS
Put the Catalyst pods into a separate folder like this:
I have uploaded a sample app for you here: https://github.com/flurrydev/Flurry-iOS-core-analytics-sample-ObjC/tree/Catalyst
Flurry-iOS-core-analytics-sample-ObjC % pod lib lint ~/Flurry-iOS-core-analytics-sample-ObjC/Pods/Flurry-Catalyst-Beta/Flurry-iOS-SDK.podspec
-> Flurry-iOS-SDK (11.2.1.catalyst)
Flurry-iOS-SDK passed validation.
@quetool At the end of your
Podfile
add,post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' end end end
Thank you so much, because of this I was able to produce my different schemes(dev, prod,staging) along with pods.
after updating Podfile with above code snippet only pod install
is more than enough.
It will automatically generate schemes settings in to Pod Project.
@flurrydev To fix the issue building and inlcuding arm64 simulator architecture required for working with simulator on new Apple M1 based Macs, you have to replace your
vendored static fat library
withstatic xcframework
. Fat library cannot contain two arm64 slices (one for iphoneos and one for simulator). Device static framework (witharm64 and armv7
arch slices) with your current vendored fat library and simulator framework (withi386, x86_64 and new arm64
slices) will be separated inside xcframework container. static xcframework can be easily crated by xcodebuild tool. That what Firebase did recently with their internal vendored static libraries. Standard procedure for that:
- create libflurry.a for device by
xcodebuild archive .... -sdk iphoneos -archivePath path-to-iphoneos-archive SKIP_INSTALL=NO
- create libflurry.a for simulator by
xcodebuild archive ... -sdk iphonesimulator -archivePath path-to-simulator-archive SKIP_INSTALL=NO
- create xcframework from two above by
xcodebuild -create-xframework -library path-to-libfile-inside-iphoneos-archive -headers path-to-folder-with-headers -library path-to-libfile-inside-simulator-archive -headers path-to-folder-with-headers -output Flurry-static-11.2.0.xcframework
Whatever happened with this issue? I am still experiencing this issue on M1 with Xcode 13.1, Flurry 11.3.0. I can only get it to work using Rosetta, which is slow. If I remove Flurry, I can successfully build our project targeting simulator and get previews to work.
@dmelgar Flurry is available as a xcframework here:
Cocoapods: https://github.com/flurrydev/Flurry-Catalyst-Beta Swift Package Manager: https://github.com/flurry/FlurrySwiftPackage
We plan to transiition from static libraries to xcframework officially in the coming months (Q1 2022)
When use Xcode 12.0 beta 4 We use Flurry Analytics, and with Pods to import the flurry to project, There is no error on Xcode 11.1 and Xcode 12.0 beta 3, but when we update the Xcode version to 12.0 beta 4, the linking stage occur an error :
This Bug is About
Platform Please choose the platform(s) that you are having the issue by replacing
[ ]
with[x]
.Environment Please tell us the versions of Flurry SDK, XCode, and iOS you are using.
When we delete the arm64 arch, There will be another error of linking:
It seems the FlurryEmpty.o force linked the arm64 arch