flutter_vibrate icon indicating copy to clipboard operation
flutter_vibrate copied to clipboard

Build Failed on iOS

Open gurleensethi opened this issue 6 years ago • 5 comments

My project complies and runs on Android, but when running on iOS I get this error.

Error output from Xcode build:
↳
    ** BUILD FAILED **
    
Xcode's output:
↳
    === BUILD TARGET sqflite OF PROJECT Pods WITH CONFIGURATION Debug ===
    <module-includes>:1:9: note: in file included from <module-includes>:1:
    #import "Headers/vibrate-umbrella.h"
            ^
    /Users/gurleensethi/IdeaProjects/project_name/ios/Pods/Target Support Files/vibrate/vibrate-umbrella.h:13:9: error: include of non-modular header inside framework module 'vibrate': '/Users/gurleensethi/Documents/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/vibrate-0.0.4/ios/Classes/VibratePlugin.h'
    #import "VibratePlugin.h"
            ^
    <unknown>:0: error: could not build Objective-C module 'vibrate'
    <module-includes>:1:9: note: in file included from <module-includes>:1:
    #import "Headers/vibrate-umbrella.h"
            ^
    /Users/gurleensethi/IdeaProjects/project_name/ios/Pods/Target Support Files/vibrate/vibrate-umbrella.h:13:9: error: include of non-modular header inside framework module 'vibrate': '/Users/gurleensethi/Documents/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/vibrate-0.0.4/ios/Classes/VibratePlugin.h'
    #import "VibratePlugin.h"
            ^
    <unknown>:0: error: could not build Objective-C module 'vibrate'
Could not build the precompiled application for the device.

gurleensethi avatar Sep 10 '18 12:09 gurleensethi

Looking forward for this solution as well.

wesleyfantinel avatar Sep 14 '18 15:09 wesleyfantinel

The thing is, better to implement using HapticTatic from Flutter itself.

wesleyfantinel avatar Sep 24 '18 12:09 wesleyfantinel

Hello, did you make sure your project was created using the "swift compatiblity" option ?

If not, you probably need to re-create your project with that option in order to use the plugin

clovisnicolas avatar Sep 24 '18 13:09 clovisnicolas

That worked for me. 🎉 I had to create a new flutter project with flutter create -i swift myapp and copy all the dart files, pubspec, etc to the new project. This should really be a part of the installation guide.

marplx avatar Jan 16 '19 06:01 marplx

I ran into the same issue with package vibrate 0.0.4, and was able to resolved it. Check out this answer. https://github.com/kiwi-bop/flutter_crashlytics/issues/22

Basically, just create a new empty swift file in xcode in your project folder. Then, in your flutter project's ios folder, run pod install.

sseeron avatar Sep 19 '19 14:09 sseeron