Skip to content

Commit

Permalink
[IntentsUI] Update to Xcode 9 Beta 1 & 2 (No changes on later betas) (#…
Browse files Browse the repository at this point in the history
…2497)

* [IntentsUI] Update to Xcode 9 Beta 1 & 2 (No changes on later betas)

* [IntentsUI] Better use a delegate instead so we have named params
  • Loading branch information
dalexsoto authored Aug 16, 2017
1 parent 2a007ef commit 4bf1db1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/intents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2664,6 +2664,11 @@ interface INImage : NSCopying, NSSecureCoding {
[Static]
[Export ("imageSizeForIntentResponse:")]
CGSize GetImageSize (INIntentResponse response);

[NoMac, NoWatch, iOS (11,0)]
[Async]
[Export ("fetchUIImageWithCompletion:")]
void FetchImage (Action<UIImage> completion);
}

[Introduced (PlatformName.iOS, 10, 0)]
Expand Down
20 changes: 20 additions & 0 deletions src/intentsui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,29 @@ public enum INUIHostedViewContext : nuint {
MapsCard
}

[iOS (11,0)]
[Native]
public enum INUIInteractiveBehavior : nuint {
None,
NextView,
Launch,
GenericAction,
}

[iOS (11,0)]
delegate void INUIHostedViewControllingConfigureViewHandler (bool success, NSSet<INParameter> configuredParameters, CGSize desiredSize);

[Introduced (PlatformName.iOS, 10, 0)]
[Protocol]
interface INUIHostedViewControlling {

[Abstract]
[Export ("configureWithInteraction:context:completion:")]
void Configure (INInteraction interaction, INUIHostedViewContext context, Action<CGSize> completion);

[iOS (11,0)]
[Export ("configureViewForParameters:ofInteraction:interactiveBehavior:context:completion:")]
void ConfigureView (NSSet<INParameter> parameters, INInteraction interaction, INUIInteractiveBehavior interactiveBehavior, INUIHostedViewContext context, INUIHostedViewControllingConfigureViewHandler completionHandler);
}

[Introduced (PlatformName.iOS, 10, 0)]
Expand All @@ -44,6 +60,10 @@ interface NSExtensionContext_INUIHostedViewControlling {

[Export ("hostedViewMaximumAllowedSize")]
CGSize GetHostedViewMaximumAllowedSize ();

[iOS (11,0)]
[Export ("interfaceParametersDescription")]
string GetInterfaceParametersDescription ();
}

[Introduced (PlatformName.iOS, 10, 0)]
Expand Down

0 comments on commit 4bf1db1

Please sign in to comment.