M
M
Madion2016-12-16 14:41:15
Objective-C
Madion, 2016-12-16 14:41:15

Cocoapods throws build errors. What to do?

Hi everybody!
It is necessary to connect statistics from appmetrika.yandex.ru to the application . I encountered
such a problem. I've been trying to figure it out for over a day now. But nothing works.
I use the following tools:

OS X Yosemite 10.10.5
XCode 7.2.1
Cocoapods 1.1.1

There are 3 errors when building the project:
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.

I climb into Build Phases in Check Pods Manifest.lock and change the path to Podfile.loc and Manifest.lock:
from this:
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

on this:
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

But then 15 errors come out in general:
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)

Reinstalled cocoapods and still the same errors.
Cocoapods is needed only for yandex metrics. I tried to manually set the metric without cocoapods. But there are generally other errors that even Google does not know about.
What to do? Help! Already desperate!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DimasSup, 2016-12-28
@DimasSup

In the last version, the error is when you are already building the project? if yes - then try to add to the project in Link Binary With Libraries FMDB.lib

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question