3

Created Flutter application built on both an Android and iOS device. Application is working fine with android and when i build my ios build it ends up with error as shown below. Error while executing ios build in android studio using mac device. i try plenty of method to solve this.

**FOLLOWED SETS:**
  • Flutter clean
    Flutter pub get Pod install
    Build.

Output

    Launching lib/main.dart on iPad in debug mode...
    Automatically signing iOS for device deployment using specified development team in Xcode project: 3MDPB894U7
    Running pod install...
    Running Xcode build...
    Xcode build done.                                           52.7s
    Failed to build iOS app
    Error output from Xcode build:
    ↳
        ** BUILD FAILED **


    Xcode's output:
    ↳
        /Users/apple/AndroidStudioProjects/console/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'camera' not found
        @import camera;
        ~~~~~~~^~~~~~
        1 error generated.
        note: Using new build system
        note: Building targets in parallel
        note: Planning build
        note: Constructing build description

    Could not build the precompiled application for the device.

    Error launching application on iPad.
sherin
  • 1,091
  • 2
  • 17
  • 27

2 Answers2

4

Change the target version to above 10.0. Change in the Project Runner (in Xcode), PodFile & Target Runner (in Xcode), then run Pod Install

Manbus
  • 706
  • 4
  • 9
2

Make sure you open the .xcworkspace file instead of the .xcodeproj. This helped me to solve the issue.

Gijs
  • 196
  • 3
  • 9