我已经在我的Cocoa(MacOs)应用程序中创建了用于身份验证的自定义URL方案,在Safari 12.0之前的版本中,一切都很好,但是,更新后我的身份验证被破坏了。
class Program
{
public static void Main(string[] args)
{
try
{
int a = 2;
int b = 10 / a;
if (a == 1)
a = a / a - a;
if (a == 2)
{
int[] c = { 1 };
c[8] = 9;
}
}
catch (IndexOutOfRangeException e)
{
//Do something when something in try block throws error
Console.WriteLine("B");
}
finally
{
//This code will ALWAYS execute
//Even when there is no error, A will be written to console
Console.WriteLine("A");
}
Console.ReadLine();
}
}
Safari不会调用 [NSAppleEventManager sharedAppleEventManager]
setEventHandler:target
andSelector:@selector(handleAppleEvent:withReplyEvent:)
forEventClass:kInternetEventClass
andEventID:kAEGetURL]
方法。
Chrome可以正常运行。
我的问题很简单:有人遇到过同样的问题吗?如果是,您如何解决呢?