I've tried adding Azure Mobile Center to a project that already uses HockeyApp for crash reporting (and distribution).
Here is the Podfile:
use_frameworks!
target "MyApp" do
pod 'HockeySDK', '3.8.5'
pod 'MobileCenter'
...and some other pods...
end
On pod install
it adds MobileCenter version 0.9.0.
The app fails to build with the dreaded Apple Mach-O Linker Error
. Here is the relevant error output:
duplicate symbol ___cxa_throw in:
/Users/joncox/Documents/TAB/RTI-Client/Pods/HockeySDK/HockeySDK-iOS/HockeySDK.embeddedframework/HockeySDK.framework/HockeySDK(BITCrashCXXExceptionHandler.o)
/Users/joncox/Documents/TAB/RTI-Client/Pods/MobileCenter/MobileCenter-SDK-iOS/MobileCenterCrashes.framework/MobileCenterCrashes(MSCrashesCXXExceptionHandler.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The same thing happens if you manually add the MobileCenter.framework
, MobileCenterAnalytics.framework
and MobileCenterCrashes.framework
frameworks, as described in the docs.
But not if you only manually add the MobileCenter.framework
and MobileCenterAnalytics.framework
frameworks.
So my question is: Have I screwed up somewhere or have Microsoft screwed up somewhere and given something the same global name to something in both their HockeyApp
and MobileCenterCrashes
frameworks?
On iOS, it's not possible to use more than one third-party crash reporting tool at a time. Therefore, regardless of the duplicate symbols problem, you need to pick either one of the two SDKs which you want to use for your crash reporting.
Note that due to the modular nature of the Mobile Center SDK, you can easily add all other subspecs for e.g. Mobile Center's
Analytics
,Push
, andDistribute
if you decide to keep HockeySDK for crash reporting. The other way around would not be as easy as it would require you to do a custom build of the HockeySDK if you wanted to keep other features except crash reporting.(I work on the Mobile Center team :))