Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue accessing location after making changes or restarting. #94

Open
dChin84 opened this issue Nov 23, 2017 · 4 comments
Open

Issue accessing location after making changes or restarting. #94

dChin84 opened this issue Nov 23, 2017 · 4 comments

Comments

@dChin84
Copy link

dChin84 commented Nov 23, 2017

I am encountering a issue when trying to use background-location with the simulator after upgrading to ns 3.3 and bg-location to 1.7.0 on IOS. The first time I run the app it prompts ands asks if it should use the location always or only when using the app - All is fine at this point.

If I make any changes or re run the app the location just stops working and doesn't produce any errors. I am making a call to watchPosition and it doesn't execute success or error callbacks this time round

I am unsure if this is a issue or its related to the simulator.

  • Plugin version: 1.70
  • Platform: IOS
  • OS version: 11
  • Device manufacturer / model: Iphone 6s
  • Nativescript version (tns info): 3.3
  • Plugin config

Expected Behavior

BackgroundGeoLocation.watchPosition invokes success or error callbacks

Actual Behavior

BackgroundGeoLocation.watchPosition invokes success callback correctly if any changes or simulator restarts then issue occurs

Steps to Reproduce

  1. Choose always allow location or whilst using app on simulator
  2. Invoke watchPosition (Works normally)
  3. make changes or restart (Doesn't work)
@dChin84
Copy link
Author

dChin84 commented Nov 24, 2017

I have downloaded a simulator running IOS 10.3 and this doesn't seem to be an issue only when running on 11.1

@christocracy
Copy link
Member

iOS 11 added new required plist permission NSLocationAlwaysAndWhenInUseUsageDescription.

The plugin adds this permission automatically when the plugin is added. Either remove / re-add the plugin or add it manually in XCode.

@dChin84
Copy link
Author

dChin84 commented Nov 29, 2017

Sorry for the delay this property is present within my info.plist but the issue is still present

@dChin84
Copy link
Author

dChin84 commented Nov 29, 2017

After stepping through the code when getAdapter tries to run it seems to silently fail.

If I comment this line out

this.adapter.viewController = app_1.keyWindow.rootViewController;

it runs as expected and the success callback is executed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants