LoginSignup
8
5

More than 5 years have passed since last update.

【Flutter】iOSビルド時にFlutter Pluginのヘッダーファイルが見つからないエラー対処法

Posted at

FlutterアプリでiOSビルド時にFlutter Pluginのヘッダーファイルが見つからないエラー対処法メモです。

対処法

XCodeで対象のヘッダーファイルを開いて、右ペインの Target MembershipProject から Public に変更する。

:point_down:

ヘッダーファイルが複数ある場合は全てのファイルに対してこの操作をする必要があります。

環境

  • Flutter 0.1.5
  • Dart 2.0.0-dev.28.0
  • iPhone X - 11.2

エラー

エラー抜粋です。

/Users/rkowase/StudioProjects/stopwatch/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'firebase_admob/FirebaseAdMobPlugin.h' file not found
#import <firebase_admob/FirebaseAdMobPlugin.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

補足

FirebaseのPluginを追加するときは、 Add Firebase to your iOS Project  |  Firebase にあるとおり、XCode上から GoogleService-Info.plist を追加する必要があります。(Android Studioから追加してもXCodeで見るとファイルが認識されていない状態になります)

リンク

FirebaseAdMobPlugin.h file not found when using firebase_admob Plugin for Flutter - Stack Overflow
https://stackoverflow.com/questions/49473823/firebaseadmobplugin-h-file-not-found-when-using-firebase-admob-plugin-for-flutte

objective c - Swift compiler error: "non-modular header inside framework module" - Stack Overflow
https://stackoverflow.com/questions/24103169/swift-compiler-error-non-modular-header-inside-framework-module/24317456#24317456

"Made Podfiles use symlinks to local pods" not working · Issue #15099 · flutter/flutter
https://github.com/flutter/flutter/issues/15099

PathProvider not found on iOS build - Google Groups
https://groups.google.com/forum/#!msg/flutter-dev/7QRk1RphLDE/5rLS4CciBwAJ

Firebase for Flutter
https://codelabs.developers.google.com/codelabs/flutter-firebase/#4

Add Firebase to your iOS Project  |  Firebase
https://firebase.google.com/docs/ios/setup

8
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
5