我正在使用openURL为我的iPhone应用程序,工作完美,但现在我想在Mac上使用它,通常,我使用此代码
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://google.com"]];
Run Code Online (Sandbox Code Playgroud)
它在Xcode for iPhone应用程序中完美运行,但在做一个mac应用程序时,它会让我犯这个错误:
"UIApplication" undeclared (first use in this function)
所以帮助任何人?