Troubleshooting iOS build

979 views
Skip to first unread message

Daniel Legut

unread,
Mar 1, 2020, 4:57:47 PM3/1/20
to Flutter Development (flutter-dev)
I am trying to build for iOS and am running into issues. Any help would be appreciated. I am just trying to get the app onto a single physical test device to hand off to a tester. I am encountering the following errors:
Running Xcode build...                                                  
                                                   
Xcode build done.                                            2.5s
Failed to build iOS app
Error output from Xcode build:

   
** BUILD FAILED **


Xcode's output:

    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridgi
    ng-Header.h:1:9: note: in file included from
    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridgi
    ng-Header.h:1:
    #import "GeneratedPluginRegistrant.h"
            ^
    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/GeneratedPlug
    inRegistrant.h:8:9: error: '
Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^
    1 error generated.
    <unknown>:0: error: failed to emit precompiled header
    '
/Users/devmandan/Library/Developer/Xcode/DerivedData/Runner-adlvdhrfpbvcfib
    sbjlbidozndyp
/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging
   
-Header-swift_3Q69OED7FI3U6-clang_2XEA1BH1JYTWY.pch' for bridging header
    '
/Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridg
    ing
-Header.h'
    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridgi
    ng-Header.h:1:9: note: in file included from
    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridgi
    ng-Header.h:1:
    #import "GeneratedPluginRegistrant.h"
            ^
    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridgi
    ng-Header.h:1:9: note: in file included from
    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridgi
    ng-Header.h:1:
    #import "GeneratedPluginRegistrant.h"
            ^
    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/GeneratedPlug
    inRegistrant.h:8:9: error: '
Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^
    1 error generated.
    <unknown>:0: error: failed to emit precompiled header
    '
/Users/devmandan/Library/Developer/Xcode/DerivedData/Runner-adlvdhrfpbvcfib
    sbjlbidozndyp
/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging
   
-Header-swift_1NWFT6323SM2-clang_SY43KHBQG5QK.pch' for bridging header
    '
/Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridg
    ing
-Header.h'
    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridgi
    ng-Header.h:1:9: note: in file included from
    /Users/devmandan/AndroidStudioProjects/super_simple/ios/Runner/Runner-Bridgi
    ng-Header.h:1:
    #import "GeneratedPluginRegistrant.h"
            ^
    note: Using new build system
    note: Planning build
    note: Constructing build description

Encountered error while building for device.
devmandan@Daniels-Mac-mini super_simple % flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.15.3 19D76, locale en-US)
    • Flutter version 1.12.13+hotfix.7 at /Users/devmandan/Desktop/Flutter/flutter
    • Framework revision 9f5ff2306b (5 weeks ago), 2020-01-26 22:38:26 -0800
    • Engine revision a67792536c
    • Dart version 2.7.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/devmandan/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 43.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (1 available)
    • iPhone • 3255727ffc2f4f4c863d521bdf7ca3b0c3f499a9 • ios • iOS 12.4.3

• No issues found!



Tom Gilmour

unread,
Mar 1, 2020, 7:46:46 PM3/1/20
to Daniel Legut, Flutter Development (flutter-dev)
Hi,

Not sure if this will solve your issue, but when I see errors like
this on my Mac, my go to commands are:

flutter clean
(cleans my build folder)

pod outdated
(checks to see if I need to update any of my pod dependencies)

pod update
(updates pod dependencies)

pod install
(installs pod files)

remember, pod commands should be run in the ios subfolder in your project.

Hope that helps!
> --
> You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/12ee653e-066d-4a4a-8309-f4a3a4372831%40googlegroups.com.

Maurice McCabe

unread,
Mar 1, 2020, 11:08:43 PM3/1/20
to Flutter Development (flutter-dev)
If you have an app that was created some time ago, you might want to create a new app and copy the dart code, etc.., to the new app.
Reply all
Reply to author
Forward
0 new messages