loup-v / geolocation

Flutter geolocation plugin for Android and iOS.
Apache License 2.0
226 stars 94 forks source link

geolocation not building in iOS #37

Closed pneves001 closed 4 years ago

pneves001 commented 6 years ago

=== BUILD TARGET uni_links OF PROJECT Pods WITH CONFIGURATION Release === /.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.1.6/ios/Classes/FlutterWebviewPlugin.m:59:22: warning: incompatible pointer to integer conversion assigning to 'BOOL' (aka 'signed char') from 'id _Nullable' [-Wint-conversion] _enableAppScheme = call.arguments[@"enableAppScheme"]; ^ ~~~~~~~~~~ /.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.1.6/ios/Classes/FlutterWebviewPlugin.m:188:78: warning: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat] id data = [FlutterError errorWithCode:[NSString stringWithFormat:@"%ld", error.code]


                                                                           %ld   (long)
    2 warnings generated.
    /.pub-cache/hosted/pub.dartlang.org/geolocation-0.2.1/ios/Classes/GeolocationPlugin.m:7:9: fatal error: 'geolocation/geolocation-Swift.h' file not found
    #import <geolocation/geolocation-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    /.pub-cache/hosted/pub.dartlang.org/geolocation-0.2.1/ios/Classes/GeolocationPlugin.m:7:9: fatal error: 'geolocation/geolocation-Swift.h' file not found
    #import <geolocation/geolocation-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:27:31: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
    - (void)safariViewController:(SFSafariViewController *)controller
                                  ^
    In module 'SafariServices' imported from /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:5:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
    @interface SFSafariViewController : UIViewController
               ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:27:1: note: annotate 'safariViewController:didCompleteInitialLoad:' with an availability attribute to silence this warning
    - (void)safariViewController:(SFSafariViewController *)controller
    ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:43:40: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
    - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
                                           ^
    In module 'SafariServices' imported from /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:5:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
    @interface SFSafariViewController : UIViewController
               ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:43:1: note: annotate 'safariViewControllerDidFinish:' with an availability attribute to silence this warning
    - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
    ^
                                                                                API_AVAILABLE(ios(9.0))
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:29:31: warning: comparison between pointer and integer ('NSInteger' (aka 'int') and 'void *')
      if (_previousStatusBarStyle != nil) {
          ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:111:45: warning: comparison between pointer and integer ('NSInteger' (aka 'int') and 'void *')
              if (self->_previousStatusBarStyle != nil) {
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:108:18: warning: 'openURL:options:completionHandler:' is only available on iOS 10.0 or newer [-Wunguarded-availability]
        [application openURL:url
                     ^~~~~~~~~~~
    In module 'UIKit' imported from /NevesSoftware/ns_giftcard2/loyality/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:134:1: note: 'openURL:options:completionHandler:' has been explicitly marked partial here
    - (void)openURL:(NSURL*)url options:(NSDictionary<NSString *, id> *)options completionHandler:(void (^ __nullable)(BOOL success))completion NS_AVAILABLE_IOS(10_0) NS_EXTENSION_UNAVAILABLE_IOS("");
    ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:108:18: note: enclose 'openURL:options:completionHandler:' in an@available check to silence this warning
        [application openURL:url
                     ^~~~~~~~~~~
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:140:3: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
      SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
      ^~~~~~~~~~~~~~~~~~~~~~
    In module 'SafariServices' imported from /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:5:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
    @interface SFSafariViewController : UIViewController
               ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:140:3: note: enclose 'SFSafariViewController' in an @available check to silence this warning
      SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
      ^~~~~~~~~~~~~~~~~~~~~~
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:140:38: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
      SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
                                         ^~~~~~~~~~~~~~~~~~~~~~
    In module 'SafariServices' imported from /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:5:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
    @interface SFSafariViewController : UIViewController
               ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:140:38: note: enclose 'SFSafariViewController' in an @available check to silence this warning
      SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
                                         ^~~~~~~~~~~~~~~~~~~~~~
    7 warnings generated.
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:27:31: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
    - (void)safariViewController:(SFSafariViewController *)controller
                                  ^
    In module 'SafariServices' imported from /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:5:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
    @interface SFSafariViewController : UIViewController
               ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:27:1: note: annotate 'safariViewController:didCompleteInitialLoad:' with an availability attribute to silence this warning
    - (void)safariViewController:(SFSafariViewController *)controller
    ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:43:40: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
    - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
                                           ^
    In module 'SafariServices' imported from /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:5:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
    @interface SFSafariViewController : UIViewController
               ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:43:1: note: annotate 'safariViewControllerDidFinish:' with an availability attribute to silence this warning
    - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
    ^
                                                                                API_AVAILABLE(ios(9.0))
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:29:31: warning: comparison between pointer and integer ('NSInteger' (aka 'long') and 'void *')
      if (_previousStatusBarStyle != nil) {
          ~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:111:45: warning: comparison between pointer and integer ('NSInteger' (aka 'long') and 'void *')
              if (self->_previousStatusBarStyle != nil) {
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:108:18: warning: 'openURL:options:completionHandler:' is only available on iOS 10.0 or newer [-Wunguarded-availability]
        [application openURL:url
                     ^~~~~~~~~~~
    In module 'UIKit' imported from /NevesSoftware/ns_giftcard2/loyality/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:134:1: note: 'openURL:options:completionHandler:' has been explicitly marked partial here
    - (void)openURL:(NSURL*)url options:(NSDictionary<NSString *, id> *)options completionHandler:(void (^ __nullable)(BOOL success))completion NS_AVAILABLE_IOS(10_0) NS_EXTENSION_UNAVAILABLE_IOS("");
    ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:108:18: note: enclose 'openURL:options:completionHandler:' in an@available check to silence this warning
        [application openURL:url
                     ^~~~~~~~~~~
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:140:3: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
      SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
      ^~~~~~~~~~~~~~~~~~~~~~
    In module 'SafariServices' imported from /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:5:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
    @interface SFSafariViewController : UIViewController
               ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:140:3: note: enclose 'SFSafariViewController' in an @available check to silence this warning
      SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
      ^~~~~~~~~~~~~~~~~~~~~~
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:140:38: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
      SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
                                         ^~~~~~~~~~~~~~~~~~~~~~
    In module 'SafariServices' imported from /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:5:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
    @interface SFSafariViewController : UIViewController
               ^
    /.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.3/ios/Classes/UrlLauncherPlugin.m:140:38: note: enclose 'SFSafariViewController' in an @available check to silence this warning
      SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
                                         ^~~~~~~~~~~~~~~~~~~~~~
    7 warnings generated.
Encountered error while building for device.
philipneves@Philips-MacBook-Pro:~/NevesSoftware/ns_giftcard2/loyality$ flutter run
Launching lib/main.dart on Philip Neves’s iPod in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: HDUGN2FSU6
Running pod install...                                       2.0s
Starting Xcode build...
Xcode build done.                                            7.9s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    /.pub-cache/hosted/pub.dartlang.org/geolocation-0.2.1/ios/Classes/GeolocationPlugin.m:7:9: fatal error: 'geolocation/geolocation-Swift.h' file not found
    #import <geolocation/geolocation-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
Could not build the precompiled application for the device.
Dainwright commented 6 years ago

One of my team members is also receiving this error.

pneves001 commented 6 years ago

check out the following url. Its a fork of this project that seems to have the IOS stuff fixed.

https://github.com/slightfoot/flutter_location.git

Dainwright commented 6 years ago

@pneves001 That is not a fork of this project, you linked a fork of https://github.com/Lyokone/flutterlocation which I have also tried and found to be not as good as this one. Although, admittedly, it did work on iOS.

lukaspili commented 4 years ago

Sorry for the delay. It should be fixed in the latest release 1.0.0.