Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols after crashlytics update

I have a problem after update of crashlytics framework in my project, through fabric app of course, it is linker error precisily, log below.

Ld /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Products/Debug-iphonesimulator/InternalApp.app/InternalApp normal x86_64
cd /Users/losiennik/temp/InternalApp-ios-fork_DONOTREMOVE
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk -L/Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Products/Debug-iphonesimulator -F/Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Products/Debug-iphonesimulator -F/Users/losiennik/temp/InternalApp-ios-fork_DONOTREMOVE -filelist /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Intermediates/InternalApp.build/Debug-iphonesimulator/InternalApp.build/Objects-normal/x86_64/InternalApp.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-AFNetworking -lPods-ActivateYourSalon -lPods-CocoaLumberjack -lPods-Foursquare-API-v2 -lPods-GZIP -lPods-MBProgressHUD -lPods-MLPAutoCompleteTextField -lPods-MTDates -lPods-UICKeyChainStore -lPods-UIResponder+KeyboardCache -lPods-WYPopoverController -lPods-zipzap -lc++ -lz -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -stdlib=libc++ -mios-simulator-version-min=7.0 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Intermediates/InternalApp.build/Debug-iphonesimulator/InternalApp.build/InternalApp.app.xcent -framework EventKit -framework MessageUI -framework Crashlytics -framework QuartzCore -framework MapKit -framework CoreLocation -framework CoreGraphics -framework UIKit -framework Foundation -lPods -framework Fabric -Xlinker -dependency_info -Xlinker /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Intermediates/InternalApp.build/Debug-iphonesimulator/InternalApp.build/Objects-normal/x86_64/InternalApp_dependency_info.dat -o /Users/losiennik/Library/Developer/Xcode/DerivedData/InternalApp-cujowfodrnucvoglpkjjfmshsvrs/Build/Products/Debug-iphonesimulator/InternalApp.app/InternalApp

Undefined symbols for architecture x86_64:
  "_CLSLog", referenced from:
      -[IAPSyncManager processSuccessfulHTTPRequest] in IAPSyncManager.o
      -[IAPLogService writeContentsOfURL:toStream:] in IAPLogService.o
      -[IAPServerObjectMapping serializedPrimaryKeyToJSONStringFrom:forObject:] in IAPServerObjectMapping.o
  "_CLSNSLog", referenced from:
      ___65-[IAPWeekDashboardViewController asyncInternalAppFetchSuccess:failure:]_block_invoke in IAPWeekDashboardViewController.o
      -[IAPSyncManager prepareForSynchronizationInForeground:] in IAPSyncManager.o
      ___50-[IAPSyncManager reenableIdleTimerAfterTwoMinutes]_block_invoke in IAPSyncManager.o
      -[IAPSyncManager reenableIdleTimer] in IAPSyncManager.o
      -[IAPJSONValidator validateJSONWithError:] in IAPJSONValidator.o
      -[IAPSynchronisationRelationship stringWithID:] in IAPSynchronisationRelationship.o
      _POSTDataDictionary in IAPSyncConstants.o
      ...
  "_OBJC_CLASS_$_Crashlytics", referenced from:
      objc-class-ref in IAPSyncManager.o
      objc-class-ref in Crashlytics+Utilities.o
      l_OBJC_$_CATEGORY_Crashlytics_$_Utilities in Crashlytics+Utilities.o
      objc-class-ref in IAPAppDelegate.o
     (maybe you meant: _OBJC_CLASS_$_CrashlyticsPlaceholderStatic)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I tried to fix that in a lot of manners, but I cannot. Ways that I tried:

  • Xcode Clean action on the project
  • deleting content of /Users/losiennik/Library/Developer/Xcode/DerivedData
  • removing and adding again Crashlytics.framework and Fabric.framework in Xcode 6.3.1 target Build Phases from Link Binary from Libraries
  • deleting those framework files from the project physically and adding them again from the other project where I've installed frameworks from the scratch
  • deleting /var/folders content

I've made every possible combination of that possible solution, and also tried with running and killed xcode, restarting OS also. Nothing works.

Do you have any other ideas? Maybe somebody know where else Xcode stores temporary files which can be used while compiling and linking processes? Do somebody have similar experience while updating that framework?

like image 776
losiennik Avatar asked Apr 27 '15 11:04

losiennik


1 Answers

It turned out that the cause of the problem was related with the other problem that I had. That problem caused that I couldn't register specific app ID with fabric plugin help which was previously added to our old organization account. I deleted that app ID from that old organization but still couldn't add one to the new organization.

Thanks to fabric support member, it turned out that my app ID was in weird state on backend side. When that was corrected, my app ID appeared on our organization account and then the fabric plugin downloaded the proper version of Crashlytics.framework file. After that I don't have any problems with Apple Mach-O Linker Error related to Crashlytics binaries.

Summarising, when only you have the problem described above or the problem with adding app ID, write directly to fabric support and don't waste your time.

Thanks fabric team :)!

like image 65
losiennik Avatar answered Sep 28 '22 15:09

losiennik