Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Handle new iOS location permission event (issue 1390)#1487

Merged
mattleibow merged 5 commits intoxamarin:mainfrom
msjogren:dev/fix-1390
Nov 6, 2020
Merged

Handle new iOS location permission event (issue 1390)#1487
mattleibow merged 5 commits intoxamarin:mainfrom
msjogren:dev/fix-1390

Conversation

@msjogren
Copy link
Copy Markdown
Contributor

@msjogren msjogren commented Nov 2, 2020

Description of Change

Adapts code to new CLLocationManager APIs in iOS 14 (tvOS 14, watchOS 7) while keeping existing logic for older versions.

Bugs Fixed

API Changes

None

Behavioral Changes

None

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Updated documentation (see walkthrough)

@ghost
Copy link
Copy Markdown

ghost commented Nov 2, 2020

CLA assistant check
All CLA requirements met.

@mattleibow
Copy link
Copy Markdown
Member

@msjogren thanks for this PR. It pretty much does everything right.

I hope you don't mind that I pushed to your branch. I was trying a few things on what you did and I replaced the events with a delegate class. I as trying to find a way to not use the new members so we can support VS 2017 for a tiny bit longer. I'm going to probably push out a PR NuGet to the preview feed for anyone with VS2017 to test.

@msjogren
Copy link
Copy Markdown
Contributor Author

msjogren commented Nov 5, 2020

@mattleibow Not at all, I like your version even better. I didn't realise it would cause issues with VS2017.

@MitchBomcanhao
Copy link
Copy Markdown

@msjogren does this change force us to be on xcode 12? we're still on xcode 11.5 due to some package namespace conflicts in AppCenter, and when updating to essentials 1.6.0 the build will fail

MTOUCH : error MT2101: Can't resolve the reference 'CoreLocation.CLAuthorizationStatus CoreLocation.CLLocationManager::get_AuthorizationStatus()', referenced from the method 'System.Void Xamarin.Essentials.Permissions/LocationWhenInUse/ManagerDelegate::DidChangeAuthorization(CoreLocation.CLLocationManager)' in 'Xamarin.iOS

@msjogren
Copy link
Copy Markdown
Contributor Author

@MitchBomcanhao It requires Xamarin.iOS 14. I don't have a machine around to try but according to this you may still be able to use an older version of Xcode.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] in iOS 14 await Permissions.RequestAsync<Permissions.LocationXXX>() does not return after the pop-up is closed

3 participants