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

[CoreLocationUI] Add new framework for Xcode13 beta1. #11979

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
49 changes: 49 additions & 0 deletions src/corelocationui.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using CoreGraphics;
using ObjCRuntime;
using Foundation;
using UIKit;

using System;

namespace CoreLocationUI {

[NoTV, NoMac, NoWatch, iOS (15,0), MacCatalyst (15,0)]
[Native]
public enum CLLocationButtonIcon : long {
None = 0,
ArrowFilled,
ArrowOutline,
}

[NoTV, NoMac, NoWatch, iOS (15,0), MacCatalyst (15,0)]
[Native]
public enum CLLocationButtonLabel : long {
None = 0,
CurrentLocation,
SendCurrentLocation,
SendMyCurrentLocation,
ShareCurrentLocation,
ShareMyCurrentLocation,
}

[NoTV, NoMac, NoWatch, iOS (15,0), MacCatalyst (15,0)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API_AVAILABLE(ios(15.0),watchos(8.0))
I guess it's not in the watchOS header ?

[BaseType (typeof (UIControl))]
interface CLLocationButton : NSSecureCoding {

[Export ("initWithFrame:")]
[DesignatedInitializer]
IntPtr Constructor (CGRect frame);

[Export ("icon", ArgumentSemantic.Assign)]
CLLocationButtonIcon Icon { get; set; }

[Export ("label", ArgumentSemantic.Assign)]
CLLocationButtonLabel Label { get; set; }

[Export ("fontSize")]
nfloat FontSize { get; set; }

[Export ("cornerRadius")]
nfloat CornerRadius { get; set; }
}
}
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2034,6 +2034,7 @@ IOS_FRAMEWORKS = \
CoreHaptics \
CoreImage \
CoreLocation \
CoreLocationUI \
CoreMIDI \
CoreMotion \
CoreNFC \
Expand Down
1 change: 1 addition & 0 deletions tests/mtouch/RegistrarTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ public void MT4134 ()
new { Framework = "BackgroundTasks", Version = "13.0" },
new { Framework = "QuickLookThumbnailing", Version = "13.0" },
new { Framework = "AutomaticAssessmentConfiguration", Version = "13.4" },
new { Framework = "CoreLocationUI", Version = "15.0" },
};
foreach (var framework in invalidFrameworks)
mtouch.AssertError (4134, $"Your application is using the '{framework.Framework}' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS {framework.Version}, while you're building with the iOS {mtouch.Sdk} SDK.) Please select a newer SDK in your app's iOS Build options.");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# no need to be added
!missing-field! CoreLocationUIVersionNumber not bound
!missing-field! CoreLocationUIVersionString not bound
13 changes: 0 additions & 13 deletions tests/xtro-sharpie/iOS-CoreLocationUI.todo

This file was deleted.

4 changes: 4 additions & 0 deletions tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ public static Frameworks CreateiOSFrameworks (bool is_simulator_build)

{ "AdServices", "AdServices", 14,3 },

{ "CoreLocationUI", "CoreLocationUI", 15,0 },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do we do this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a new framework is added.


// the above MUST be kept in sync with simlauncher
// see tools/mtouch/Makefile
// please also keep it sorted to ease comparison
Expand Down Expand Up @@ -484,6 +486,8 @@ public static Frameworks GetwatchOSFrameworks (bool is_simulator_build)

{ "Accessibility", "Accessibility", 7,0 },
{ "UniformTypeIdentifiers", "UniformTypeIdentifiers", 7,0 },

{ "CoreLocationUI", "CoreLocationUI", 8,0 },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ? it does not look like it's available for watchOS

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove it and add the ignore

};
}
return watch_frameworks;
Expand Down
2 changes: 2 additions & 0 deletions tools/mtouch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ SIMLAUNCHER_FRAMEWORKS = \
-weak_framework NearbyInteraction \
\
-weak_framework AdServices \
\
-weak_framework CoreLocationUI \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?


# keep the above list of weak_framework
# 1. grouped by iOS versions;
Expand Down