Merge pull request #1457 from xamarin/auth-universal-links-callback-ios
Add ContinueUserActivity impl for Universal App Links
This commit is contained in:
Коммит
c5420055c2
|
@ -30,6 +30,14 @@ namespace Samples.iOS
|
|||
return base.OpenUrl(app, url, options);
|
||||
}
|
||||
|
||||
public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler)
|
||||
{
|
||||
if (Xamarin.Essentials.Platform.ContinueUserActivity(application, userActivity, completionHandler))
|
||||
return true;
|
||||
|
||||
return base.ContinueUserActivity(application, userActivity, completionHandler);
|
||||
}
|
||||
|
||||
public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
|
||||
=> Xamarin.Essentials.Platform.PerformActionForShortcutItem(application, shortcutItem, completionHandler);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@ namespace Xamarin.Essentials
|
|||
#if __IOS__ || __TVOS__
|
||||
public static bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
|
||||
=> WebAuthenticator.OpenUrl(new Uri(url.AbsoluteString));
|
||||
|
||||
public static bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler)
|
||||
=> WebAuthenticator.OpenUrl(new Uri(userActivity?.WebPageUrl?.AbsoluteString));
|
||||
#endif
|
||||
|
||||
#if __IOS__
|
||||
|
|
|
@ -785,6 +785,7 @@
|
|||
<Member Id="M:Xamarin.Essentials.PlacemarkExtensions.OpenMapsAsync(Xamarin.Essentials.Placemark,Xamarin.Essentials.MapLaunchOptions)" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.Platform" Id="T:Xamarin.Essentials.Platform">
|
||||
<Member Id="M:Xamarin.Essentials.Platform.ContinueUserActivity(UIKit.UIApplication,Foundation.NSUserActivity,UIKit.UIApplicationRestorationHandler)" />
|
||||
<Member Id="M:Xamarin.Essentials.Platform.GetCurrentUIViewController" />
|
||||
<Member Id="M:Xamarin.Essentials.Platform.OpenUrl(UIKit.UIApplication,Foundation.NSUrl,Foundation.NSDictionary)" />
|
||||
<Member Id="M:Xamarin.Essentials.Platform.PerformActionForShortcutItem(UIKit.UIApplication,UIKit.UIApplicationShortcutItem,UIKit.UIOperationHandler)" />
|
||||
|
|
|
@ -748,6 +748,7 @@
|
|||
<Member Id="M:Xamarin.Essentials.PlacemarkExtensions.OpenMapsAsync(Xamarin.Essentials.Placemark,Xamarin.Essentials.MapLaunchOptions)" />
|
||||
</Type>
|
||||
<Type Name="Xamarin.Essentials.Platform" Id="T:Xamarin.Essentials.Platform">
|
||||
<Member Id="M:Xamarin.Essentials.Platform.ContinueUserActivity(UIKit.UIApplication,Foundation.NSUserActivity,UIKit.UIApplicationRestorationHandler)" />
|
||||
<Member Id="M:Xamarin.Essentials.Platform.GetCurrentUIViewController" />
|
||||
<Member Id="M:Xamarin.Essentials.Platform.OpenUrl(UIKit.UIApplication,Foundation.NSUrl,Foundation.NSDictionary)" />
|
||||
</Type>
|
||||
|
|
|
@ -56,6 +56,32 @@
|
|||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="ContinueUserActivity">
|
||||
<MemberSignature Language="C#" Value="public static bool ContinueUserActivity (UIKit.UIApplication application, Foundation.NSUserActivity userActivity, UIKit.UIApplicationRestorationHandler completionHandler);" />
|
||||
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool ContinueUserActivity(class UIKit.UIApplication application, class Foundation.NSUserActivity userActivity, class UIKit.UIApplicationRestorationHandler completionHandler) cil managed" />
|
||||
<MemberSignature Language="DocId" Value="M:Xamarin.Essentials.Platform.ContinueUserActivity(UIKit.UIApplication,Foundation.NSUserActivity,UIKit.UIApplicationRestorationHandler)" />
|
||||
<MemberType>Method</MemberType>
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>Xamarin.Essentials</AssemblyName>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
</AssemblyInfo>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Boolean</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="application" Type="UIKit.UIApplication" Index="0" FrameworkAlternate="xamarin-essentials-ios;xamarin-essentials-tvos" />
|
||||
<Parameter Name="userActivity" Type="Foundation.NSUserActivity" Index="1" FrameworkAlternate="xamarin-essentials-ios;xamarin-essentials-tvos" />
|
||||
<Parameter Name="completionHandler" Type="UIKit.UIApplicationRestorationHandler" Index="2" FrameworkAlternate="xamarin-essentials-ios;xamarin-essentials-tvos" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<param name="application">The application.</param>
|
||||
<param name="userActivity">The user activity instance.</param>
|
||||
<param name="completionHandler">The completion handler.</param>
|
||||
<summary>Callback forwarded from the equivalent iOS AppDelegate method.</summary>
|
||||
<returns>True if the callback was handled.</returns>
|
||||
<remarks></remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="CurrentActivity">
|
||||
<MemberSignature Language="C#" Value="public static Android.App.Activity CurrentActivity { get; }" />
|
||||
<MemberSignature Language="ILAsm" Value=".property class Android.App.Activity CurrentActivity" />
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
<AttributeName>System.Runtime.Versioning.TargetFramework("Xamarin.Mac,Version=v2.0", FrameworkDisplayName="Xamarin.Mac")</AttributeName>
|
||||
</Attribute>
|
||||
<Attribute>
|
||||
<AttributeName>System.Reflection.AssemblyInformationalVersion("1.0.0+a0b12b46c8f7c223eea5c943deaec9724fe5098e")</AttributeName>
|
||||
<AttributeName>System.Reflection.AssemblyInformationalVersion("1.0.0")</AttributeName>
|
||||
</Attribute>
|
||||
</Attributes>
|
||||
</Assembly>
|
||||
|
|
Загрузка…
Ссылка в новой задаче