我想知道是否有Swift等效的以下Objective-C代码。
NSURL *appURL = [NSURL URLWithString: @"myapp://"];
if ([app canOpenURL: appURL] {
NSLog(@"The app is this URL Scheme is installed on the device");
}
sharedApplication
已被重命名为shared
,并且不再是一个函数。 - JCutting8