flutter_vibrate
flutter_vibrate copied to clipboard
Build Failed on iOS
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.
Looking forward for this solution as well.
The thing is, better to implement using HapticTatic from Flutter itself.
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
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.
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
.