6
6

More than 5 years have passed since last update.

iOS向けのGoogleアナリティクスのバージョンを2.0から3.0に差し替えたらエラーが出てしまった

Last updated at Posted at 2013-09-19

Google Analytics Services iOS v2.0 と v3.0 を入れ替えたら以下の様なエラーメッセージが出て困ったので、備忘のためにメモ。
よく読まずに適当に差し替えを行ったのがそもそもの原因です。


Undefined symbols for architecture i386:
  "_llvm_gcda_emit_arcs", referenced from:
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAI.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDictionaryBuilder.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackedViewController.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIFields.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIUncaughtExceptionHandler.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIBatchingDispatcher.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
      ...
  "_llvm_gcda_emit_function", referenced from:
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAI.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDictionaryBuilder.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackedViewController.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIFields.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIUncaughtExceptionHandler.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIBatchingDispatcher.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
      ...
  "_llvm_gcda_end_file", referenced from:
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAI.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDictionaryBuilder.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackedViewController.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIFields.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIUncaughtExceptionHandler.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIBatchingDispatcher.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
      ...
  "_llvm_gcda_increment_indirect_hoge", referenced from:
      -[GAI defaultTracker] in libGoogleAnalytics_debug.a(GAI.o)
      -[GAI setDefaultTracker:] in libGoogleAnalytics_debug.a(GAI.o)
      -[GAI clientId] in libGoogleAnalytics_debug.a(GAI.o)
      -[GAI dispatchInterval] in libGoogleAnalytics_debug.a(GAI.o)
      -[GAI setDispatchInterval:] in libGoogleAnalytics_debug.a(GAI.o)
      -[GAI trackUncaughtExceptions] in libGoogleAnalytics_debug.a(GAI.o)
      -[GAI setTrackUncaughtExceptions:] in libGoogleAnalytics_debug.a(GAI.o)
      ...
  "_llvm_gcda_start_file", referenced from:
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAI.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDictionaryBuilder.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAITrackedViewController.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIFields.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIUncaughtExceptionHandler.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIBatchingDispatcher.o)
      ___llvm_gcov_writeout in libGoogleAnalytics_debug.a(GAIDataStore.o)
      ...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

単純でした。
https://developers.google.com/analytics/devguides/collection/ios/resources
上記のSDKのGoogleAnalyticsServicesiOS_3.0/GoogleAnalytics/Libraryに入っているものをそのまま差し替えたのですが、ファイルがひとつ足りませんでした。

libGoogleAnalyticsServices.a

↑こちらのファイルがGoogleAnalyticsServicesiOS_3.0/においてあるので、Libraryに入っているファイルと一緒にプロジェクトに追加します。
以上。

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6