Почему я получаю неопределенный символ _OBJC_CLASS _ $ _ FIRInstanceID? - PullRequest
0 голосов
/ 24 октября 2018

Это приложение для iOS, которое использует Firebase.

Если я закомментирую код, который получает маркеры instanceID Firebase, я смогу скомпилировать и связать.

Я установил Firebase с CocoaPods.Никаких ошибок, никаких предупреждений.(До pod install я сделал pod update. Итак, я получил последнюю версию Firebase.)

Ссылка взята из AppDelegate.oAppDelegate.swift у меня есть

import UserNotifications import Firebase import FirebaseInstanceID import FirebaseMessaging import GoogleUtilities

Я знаю, вы попросите побольше узнать об окружающей среде.Я не уверен, что все, что я должен показать вам.Я отредактирую вопрос, когда вы запросите дополнительную информацию.

ОБНОВЛЕНИЕ 1 : Вот что я также заметил в окне вывода.

<Warning>: 5.8.0 - [Firebase/Core][I-COR000022] Firebase Analytics is not available. To add it, include Firebase/Core in the Podfile or add FirebaseAnalytics.framework to the Link Build Phase

Но мой Podfile выглядит просто отлично.Вот мой Podfile.

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'XKCD' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for XKCD

  pod 'Firebase/Core'
  pod 'Firebase/Messaging'

  target 'XKCDTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'XKCDUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

ОБНОВЛЕНИЕ 2 : Вот то, что кажется довольно значимым событием.Я добавил Firebase / Database в свой Podfile, чтобы посмотреть, смогу ли я использовать базу данных.Я даже не смог скомпилировать проект с большим количеством ошибок компоновки, поэтому я полностью разочаровался в этой задаче, удалил Firebase / Database из моего Podfile и снова сказал pod install моей оболочке, чтобы отразить мое изменение.Вот что произошло:

$ pod install
Analyzing dependencies
Removing FirebaseAuth
Removing FirebaseAuthInterop
Removing FirebaseDatabase
Removing GTMSessionFetcher
Removing leveldb-library
Downloading dependencies
Installing Firebase 5.11.0 (was 5.8.0)
Installing FirebaseAnalytics 5.3.0 (was 5.1.2 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)
Installing FirebaseAnalyticsInterop (1.1.0)
Installing FirebaseCore 5.1.6 (was 5.1.3 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)
Installing FirebaseInstanceID 3.3.0 (was 3.2.1 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)
Installing FirebaseMessaging 3.2.1 (was 3.1.2 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)
Installing GoogleAppMeasurement 5.3.0 (was 5.1.2 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)
Installing GoogleUtilities 5.3.4 (was 5.2.3)
Using Protobuf (3.6.1)
Using nanopb (0.3.8)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 10 total pods installed.

[!] Automatically assigning platform `ios` with version `8.0` on target `XKCD` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

На данный момент я не делаю никаких выводов.(Раскомментирование кода InstanceID и попытка его скомпилировать снова приводит к появлению того же сообщения о неопределенном символе _OBJC_CLASS_$_FIRInstanceID. Комментирование и перекомпиляция запускает приложение просто отлично, хотя я все еще вижу, что сообщение «Firebase Analytics недоступно» в окне вывода.)

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...