hemanthrajv / flutter_compass

MIT License
101 stars 170 forks source link

Wh #28

Closed suha-glal closed 4 years ago

suha-glal commented 4 years ago

When building my application -which uses this plugin- on iPhone 11 I got the following error:

(my document dir)/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_compass-0.3.6/ios/Classes/FlutterCompassPlugin.m:2:9: fatal error: 'flutter_compass/flutter_compass-Swift.h' file not found
    #import <flutter_compass/flutter_compass-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the precompiled application for the device.

//========================== This is my flutter doctor output:

(my document dir)/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel beta, v1.13.6, on Mac OS X 10.14.4 18E226, locale en-AE)
    • Flutter version 1.13.6 at (my document dir)/flutter
    • Framework revision 659dc8129d (6 weeks ago), 2019-12-30 09:24:47 -0800
    • Engine revision bdc9708d23
    • Dart version 2.8.0 (build 2.8.0-dev.0.0 c547f5d933)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at(my document dir)/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • ANDROID_HOME = (my document dir)/Library/Android/sdk
    • 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.6.1

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

[✓] Connected device (1 available)
    • 000’s iPhone • XXXXXXXXXXXXXXXX • ios • iOS 13.2.3

• No issues found!
Process finished with exit code 0

//=================== Please note I have no issue when running the application in Android mobile, the issue only with iPhone The current plugin version I am using is: flutter_compass: ^0.3.6 It also did not work with flutter_compass: ^0.3.4

hemanthrajv commented 4 years ago

Is your IOS part in Obj-C, if so, please try enabling Swift support.

Check #3

hemanthrajv commented 4 years ago

Closing the issue with respect to no response. Feel free to reopen, if you are still facing it.