How can I add Yandex Metrika (Metrica) support on my iOS app?

1.1k views Asked by At

How can I add Yandex.Metrika support on my iOS app?

I've added static library libYandexMobileMetrica.a and libsqlite3.dylib but still get the following errors:

(null): "_OBJC_CLASS_$_KSCrashReportFilterAppleFmt", referenced from:
(null): "_OBJC_CLASS_$_PBAppendableArray", referenced from:
(null): "_OBJC_CLASS_$_PBUnknownFieldSet", referenced from:
(null): "_OBJC_CLASS_$_PBExtensionRegistry", referenced from:
(null): "_OBJC_CLASS_$_PBMutableExtensionRegistry", referenced from:
(null): "_OBJC_CLASS_$_PBGeneratedMessage_Builder", referenced from:
(null): "_OBJC_METACLASS_$_PBGeneratedMessage_Builder", referenced from:
(null): "_OBJC_CLASS_$_PBGeneratedMessage", referenced from:
(null): "_computeUInt32Size", referenced from:
(null): "_computeStringSize", referenced from:
(null): "_computeEnumSize", referenced from:
(null): "_computeMessageSize", referenced from:
(null): "_computeUInt64Size", referenced from:
(null): "_computeSInt32Size", referenced from:
(null): "_computeDoubleSize", referenced from:
(null): "_OBJC_IVAR_$_PBGeneratedMessage.memoizedSerializedSize", referenced from:
(null): "_OBJC_METACLASS_$_PBGeneratedMessage", referenced from:
(null): "_OBJC_CLASS_$_ASIdentifierManager", referenced from:
(null): "_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from:
(null): "_OBJC_CLASS_$_KSCrash", referenced from:
(null): Linker command failed with exit code 1 (use -v to see invocation)
3

There are 3 answers

0
Dmitry On BEST ANSWER

ProtobufObjC for iOS is available only via CocoaPods tool.

  1. Run terminal and type: sudo gem install cocoapods.
  2. Save your project as workspace on xCode.
  3. Create on project's folder Podfile like this: https://github.com/yandexmobile/metrica-sample-ios/blob/master/Podfile
  4. Run terminal and type: pod install.

P.S. Google Analytics is poor. But Yandex.Metrika is head-onanism and must die with API like this. Yandex.Metrika doesn't work with x64 processors and can't be published on the App Store.

0
Andrei Shender On

I am currently supporting YandexMetrica. Thank you for sharing this with us. Version 1.2, which is available via CocoaPods supports both x86_64 and arm64 slices. And yes - CocoaPods is a preferable way of distributing our library because it is much easier than adding it manualy. What are the other problems you've encountered?

0
Yury Vasileuski On

Altaveron, about your comment "Yandex.Metrika doesn't work with x64 processors and can't be published on the App Store"

I guess You are talking about first version of library. It should be noted that Yandex.Metrica 1.2 is available for arm64 as well.