Flutter Не удается выполнить проект ie при использовании плагина Firebase In App Messaging - PullRequest
2 голосов
/ 19 марта 2020

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

Launching lib/main.dart on iPhone 5s in debug mode...
Running pod install...
Warning: Podfile is out of date
  This can cause a mismatched version of Flutter to be embedded in your app, which may result in App Store submission rejection or crashes.
  If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/24641 for instructions.
To regenerate the Podfile, run:
  rm ios/Podfile

Running Xcode build...
Xcode build done.                                           41,0s
Could not build the application for the simulator.
Error launching application on iPhone 5s.
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    While building module 'FirebaseInAppMessaging' imported from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/FirebaseInAppMessagingDisplay/Firebase/InAppMessagingDisplay/FIDBaseRenderingViewController.h:19:
    In file included from <module-includes>:1:
    In file included from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Target Support Files/FirebaseInAppMessaging/FirebaseInAppMessaging-umbrella.h:13:
    /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/FirebaseInAppMessaging/FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging.h:21:2: warning: The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework). [-W#warnings]
    #warning The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework).
     ^
    1 warning generated.
    1 warning generated.
    1 warning generated.
    1 warning generated.
    While building module 'FirebaseInAppMessaging' imported from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Headers/Public/Firebase/Firebase.h:53:
    In file included from <module-includes>:1:
    In file included from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Target Support Files/FirebaseInAppMessaging/FirebaseInAppMessaging-umbrella.h:13:
    /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/FirebaseInAppMessaging/FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging.h:21:2: warning: The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework). [-W#warnings]
    #warning The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework).
     ^
    1 warning generated.
    1 warning generated.
    While building module 'FirebaseInAppMessaging' imported from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Headers/Public/Firebase/Firebase.h:53:
    In file included from <module-includes>:1:
    In file included from /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/Target Support Files/FirebaseInAppMessaging/FirebaseInAppMessaging-umbrella.h:13:
    /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/ios/Pods/FirebaseInAppMessaging/FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging.h:21:2: warning: The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework). [-W#warnings]
    #warning The FirebaseInAppMessagingDisplay subspec is deprecated. Please remove FirebaseInAppMessagingDisplay from your Podfile (or delete the framework).
     ^
    1 warning generated.
    1 warning generated.
    duplicate symbol '_OBJC_CLASS_$_FIRIAMDefaultDisplayImpl' in:
        /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/build/ios/Debug-iphonesimulator/FirebaseInAppMessaging/FirebaseInAppMessaging.framework/FirebaseInAppMessaging(FIRIAMDefaultDisplayImpl.o)
        /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/build/ios/Debug-iphonesimulator/FirebaseInAppMessagingDisplay/FirebaseInAppMessagingDisplay.framework/FirebaseInAppMessagingDisplay(FIRIAMDefaultDisplayImpl.o)
    duplicate symbol '_OBJC_METACLASS_$_FIRIAMDefaultDisplayImpl' in:
        /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/build/ios/Debug-iphonesimulator/FirebaseInAppMessaging/FirebaseInAppMessaging.framework/FirebaseInAppMessaging(FIRIAMDefaultDisplayImpl.o)
        /Users/manolo/Developer/flutterprojects/fitness_recipes_clean/build/ios/Debug-iphonesimulator/FirebaseInAppMessagingDisplay/FirebaseInAppMessagingDisplay.framework/FirebaseInAppMessagingDisplay(FIRIAMDefaultDisplayImpl.o)
    ld: 2 duplicate symbols for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning build
    note: Constructing build description

Кто-нибудь сталкивался с той же проблемой и смог ее исправить?

Ответы [ 2 ]

2 голосов
/ 29 марта 2020

Я исправил это!

  1. комментарий firebase_in_app_messaging т.е. (#firebase_in_app_messaging: ^ 0.1.1 + 3) внутри pubspe c .yaml

  2. Выполнить flutter packages get

  3. Удалить файл Podfile.lock внутри папки ios
  4. , открыть терминал
  5. cd для проекты ios папка
  6. введите Vim Podfile
  7. нажмите «i» для режима вставки
  8. добавьте их в строки внизу:
    pod 'Firebase', '6.15.0'
    pod 'FirebaseInAppMessaging', '0.16.0'
  9. Нажмите «es c» на клавиатуре, чтобы сохранить
  10. введите pod install
  11. введите pod update Firebase/Core
  12. добавить комментарий firebase_in_app_messaging внутри pubspe c .yaml
  13. run flutter packages get
0 голосов
/ 20 марта 2020

Вы можете попробовать следующее:

очистка флаттера.

rm ios / Podfile

rm ios / Podfile.lock

обновление pod

pod install

Это может сделать работу.

...