Всем привет, ребята!
Необходимо подключить в приложение статистику от appmetrika.yandex.ru
Столкнулся с такой проблемой. Пытаюсь ее решить уже более суток. Но ничего не получается.
Использую следующие инструменты:
OS X Yosemite 10.10.5
XCode 7.2.1
Cocoapods 1.1.1
Вылезают 3 ошибки при сборке проекта:
haseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/admin/Library/Developer/Xcode/DerivedData/KalApp-ednjppnnqyitzhewcqqtwyqsnczc/Build/Intermediates/KalApp.build/Debug-iphonesimulator/KalApp.build/Script-CA84DC4D58EFD2C2C6BB56EF.sh
cd /Users/admin/KalApp/KalApp-app/KalApp/bin/sh -c /Users/admin/Library/Developer/Xcode/DerivedData/KalApp-ednjppnnqyitzhewcqqtwyqsnczc/Build/Intermediates/KalApp.build/Debug-iphonesimulator/KalApp.build/Script-CA84DC4D58EFD2C2C6BB56EF.sh
diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Лезу в Build Phases в Check Pods Manifest.lock и меняю путь до Podfile.loc и Manifest.lock:
с этого:
diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
на это:
diff "/Users/admin/KalApp/KalApp-app/KalApp/Podfile.lock" "/Users/admin/KalApp/KalApp-app/KalApp/Pods/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
Но тогда вылезает вообще 15 ошибок:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FMDatabase", referenced from:
_OBJC_CLASS_$_YMMDatabase in libYandexMobileMetrica.a(YMMDatabase.o)
"_OBJC_CLASS_$_FMDatabaseQueue", referenced from:
_OBJC_CLASS_$_YMMDatabaseQueue in libYandexMobileMetrica.a(YMMDatabaseQueue.o)
"_OBJC_CLASS_$_FMResultSet", referenced from:
l_OBJC_$_CATEGORY_FMResultSet_$_YMMAdditions in libYandexMobileMetrica.a(FMResultSet+YMMAdditions.o)
"_OBJC_CLASS_$_KSCrash", referenced from:
objc-class-ref in libYandexMobileMetrica.a(YMMCrashLoader.o)
objc-class-ref in libYandexMobileMetrica.a(YMMCrashReportDecoder.o)
"_OBJC_CLASS_$_KSCrashReportFilterAppleFmt", referenced from:
objc-class-ref in libYandexMobileMetrica.a(YMMCrashReportFilterAppleFmt.o)
"_OBJC_CLASS_$_KSSystemInfo", referenced from:
objc-class-ref in libYandexMobileMetrica.a(YMMException.o)
"_OBJC_CLASS_$_RFC3339DateTool", referenced from:
objc-class-ref in libYandexMobileMetrica.a(YMMException.o)
"_OBJC_METACLASS_$_FMDatabase", referenced from:
_OBJC_METACLASS_$_YMMDatabase in libYandexMobileMetrica.a(YMMDatabase.o)
"_OBJC_METACLASS_$_FMDatabaseQueue", referenced from:
_OBJC_METACLASS_$_YMMDatabaseQueue in libYandexMobileMetrica.a(YMMDatabaseQueue.o)
"_protobuf_c_message_free_unpacked", referenced from:
_ymm__ymmpbtime__free_unpacked in libYandexMobileMetrica.a(Metrica.pb-c.o)
_ymm__ymmpbreport_message__free_unpacked in libYandexMobileMetrica.a(Metrica.pb-c.o)
"_protobuf_c_message_get_packed_size", referenced from:
_ymm__ymmpbtime__get_packed_size in libYandexMobileMetrica.a(Metrica.pb-c.o)
_ymm__ymmpbreport_message__get_packed_size in libYandexMobileMetrica.a(Metrica.pb-c.o)
"_protobuf_c_message_pack", referenced from:
_ymm__ymmpbtime__pack in libYandexMobileMetrica.a(Metrica.pb-c.o)
_ymm__ymmpbreport_message__pack in libYandexMobileMetrica.a(Metrica.pb-c.o)
"_protobuf_c_message_pack_to_buffer", referenced from:
_ymm__ymmpbtime__pack_to_buffer in libYandexMobileMetrica.a(Metrica.pb-c.o)
_ymm__ymmpbreport_message__pack_to_buffer in libYandexMobileMetrica.a(Metrica.pb-c.o)
"_protobuf_c_message_unpack", referenced from:
_ymm__ymmpbtime__unpack in libYandexMobileMetrica.a(Metrica.pb-c.o)
_ymm__ymmpbreport_message__unpack in libYandexMobileMetrica.a(Metrica.pb-c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Переустанавливал cocoapods и все равно те же ошибки.
Cocoapods нужен только лишь для yandex метрики. Пробовал без cocoapods поставить вручную метрику. Но там вообще другие ошибки, о которых даже гугл не знает.
Что делать? Помогите! Уже в отчаянии!