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

[CoreLocation] Update to Xcode 9 Beta 1 #2224

Merged
merged 2 commits into from
Jun 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions src/corelocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#if !MONOMAC
using XamCore.UIKit;
#endif
#if XAMCORE_2_0 && !TVOS
using XamCore.Contacts;
#endif
using System;

namespace XamCore.CoreLocation {
Expand Down Expand Up @@ -387,8 +390,8 @@ partial interface CLLocationManager {
[Export ("requestLocation")]
void RequestLocation ();

[NoWatch][NoTV]
[iOS (9,0)]
[NoTV]
[iOS (9,0), Watch (4,0)]
[Export ("allowsBackgroundLocationUpdates")]
bool AllowsBackgroundLocationUpdates { get; set; }
#endif
Expand Down Expand Up @@ -539,6 +542,9 @@ partial interface CLRegion : NSSecureCoding, NSCopying {
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // will crash, see CoreLocation.cs for compatibility stubs
interface CLPlacemark : NSSecureCoding, NSCopying {
[Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CLPlacemark' properties to access data.")]
[Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CLPlacemark' properties to access data.")]
[Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CLPlacemark' properties to access data.")]
[Export("addressDictionary", ArgumentSemantic.Copy)]
NSDictionary AddressDictionary { get; }

Expand Down Expand Up @@ -593,6 +599,12 @@ interface CLPlacemark : NSSecureCoding, NSCopying {
[Export ("timeZone")]
[iOS (9,0), Mac(10,11)]
NSTimeZone TimeZone { get; }
#if XAMCORE_2_0 && !TVOS
// From CLPlacemark (ContactsAdditions) category.
[Watch (4,0), NoTV, Mac (10,13), iOS (11,0)]
[NullAllowed, Export ("postalAddress")]
CNPostalAddress PostalAddress { get; }
#endif
}

[Mac (10,10)]
Expand Down Expand Up @@ -684,6 +696,14 @@ interface CLGeocoder {
[Async]
void ReverseGeocodeLocation (CLLocation location, CLGeocodeCompletionHandler completionHandler);

[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
[Export ("reverseGeocodeLocation:preferredLocale:completionHandler:")]
[Async]
void ReverseGeocodeLocation (CLLocation location, [NullAllowed] NSLocale locale, CLGeocodeCompletionHandler completionHandler);

[Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")]
[Deprecated (PlatformName.iOS, 11, 0, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")]
[Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")]
[Export ("geocodeAddressDictionary:completionHandler:")]
[Async]
void GeocodeAddress (NSDictionary addressDictionary, CLGeocodeCompletionHandler completionHandler);
Expand All @@ -696,8 +716,25 @@ interface CLGeocoder {
[Async]
void GeocodeAddress (string addressString, CLRegion region, CLGeocodeCompletionHandler completionHandler);

[Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)]
[Async]
[Export ("geocodeAddressString:inRegion:preferredLocale:completionHandler:")]
void GeocodeAddress (string addressString, [NullAllowed] CLRegion region, [NullAllowed] NSLocale locale, CLGeocodeCompletionHandler completionHandler);

[Export ("cancelGeocode")]
void CancelGeocode ();

#if XAMCORE_2_0 && !TVOS
[Watch (4,0), NoTV, Mac (10,13), iOS (11,0)]
[Export ("geocodePostalAddress:completionHandler:")]
[Async]
void GeocodePostalAddress (CNPostalAddress postalAddress, CLGeocodeCompletionHandler completionHandler);

[Watch (4,0), NoTV, Mac (10,13), iOS (11,0)]
[Export ("geocodePostalAddress:preferredLocale:completionHandler:")]
[Async]
void GeocodePostalAddress (CNPostalAddress postalAddress, [NullAllowed] NSLocale locale, CLGeocodeCompletionHandler completionHandler);
#endif
}

#if !MONOMAC
Expand Down