iosiphoneyandexyandex-apiyandex-metrika

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


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)

Solution

  • 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.