Ошибка при настройке аналитики google в swift 2 и xcode 7 beta 4

Я настроил свой проект xcode с Cocoapods, добавил аналитику Google в качестве модуля. После этого я импортировал GoogleService-info.plist непосредственно под файлом моего проекта. Также создается заголовок моста и добавляется код в файл AppdDelegate. Во время компиляции все работает нормально, но когда я запускаю отладчик, я получаю эти ошибки:

2015-08-14 16:45:25.866 GetOut[30738:3729265] Client ID must not be nil or empty.
2015-08-14 16:45:25.867 GetOut[30738:3729265] Client ID must not be nil or empty.
2015-08-14 16:45:25.867 GetOut[30738:3729265] GCM Sender ID must not be nil or empty.
2015-08-14 16:45:25.867 GetOut[30738:3729265] Attempted to configure [Identity, Analytics, AdMob, SignIn, AppInvite, CloudMessaging].
2015-08-14 16:45:25.867 GetOut[30738:3729265] Successfully configured [Analytics, AdMob].
2015-08-14 16:45:25.867 GetOut[30738:3729265] Failed to configure [SignIn, AppInvite, CloudMessaging].
2015-08-14 16:45:25.867 GetOut[30738:3729265] Subspecs not present, so not configured [Identity]. 
assertion failed: Error configuring Google services: Optional(Error Domain=com.google.greenhouse Code=-200 "Unable to configure GGL." UserInfo=0x170661400 {NSLocalizedRecoverySuggestion=Check formatting and location of GoogleService-Info.plist., NSLocalizedDescription=Unable to configure GGL., NSLocalizedFailureReason=Unable to parse supplied GoogleService-Info.plist. See log for details.}): file /Users/xxx/Documents/Eigene Dateien/Appdesign/GetOut/GetOut/GetOut/AppDelegate.swift, line 30

Отладчик останавливается с этим экраном:

0x1006bdeec <+144>: bl     0x1006fc228               ; function signature     specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Exploded> of Swift.(_assertionFailed (Swift.StaticString, Swift.String, Swift.StaticString, Swift.UInt) -> ()).(closure #1).(closure #1)
0x1006bdef0 <+148>: mov    x0, x24
0x1006bdef4 <+152>: bl     0x100749c50               ; swift_release
0x1006bdef8 <+156>: mov    x0, x19
0x1006bdefc <+160>: bl     0x100756cc8               ; swift_unknownRelease

Мне кажется, что .plist не может быть найден при обработке - но я не могу понять, почему? Я проверил руководство https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift внимательно, но так и не могу понять, в чем проблема.


person Alexander Ko    schedule 14.08.2015    source источник


Ответы (1)


Я исправил проблему сейчас. Я изменил свой файлcocopods с /Google на /GoogleAnalytics - и это сработало. –

person Alexander Ko    schedule 10.09.2015
comment
Привет, кажется, я столкнулся с той же проблемой, но не могу следовать вашему ответу, о каком файле кокаоподов вы говорите, не могли бы вы помочь мне в этом - person Geet; 09.02.2016
comment
Поскольку мне нужна была только аналитика Google, а не весь пакет с рекламой Google и так далее, я изменил ini-файл какао-бобов и использовал там /GoogleAnalytics вместо /Google. - person Alexander Ko; 10.02.2016