Skip to content

Commit

Permalink
[增加]1. 增加iOS OpenURL 失效的处理
Browse files Browse the repository at this point in the history
  • Loading branch information
AlianBlank committed Jan 2, 2025
1 parent 3a80506 commit 4f6ffd8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Runtime/Helper/ApplicationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ public static void Quit()
}
#if UNITY_IOS
[System.Runtime.InteropServices.DllImport("__Internal")]
private static extern string open_url(string channelKey);

private static extern string open_url(string url);
#endif
/// <summary>
/// 打开URL
/// </summary>
/// <param name="url">url地址</param>
public static void OpenURL(string url)
{
#if UNITY_EDITOR
Expand All @@ -117,6 +120,8 @@ public static void OpenURL(string url)
#endif
#if UNITY_IOS
open_url(url);
#else
Application.OpenURL(url);
#endif
}
}
Expand Down

0 comments on commit 4f6ffd8

Please sign in to comment.