Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is UIApplication not working in my Mac App

Tags:

People also ask

What is UIApplication in iOS?

A set of methods to manage shared behaviors for your app. Manage multiple instances of your app's UI simultaneously, and direct resources to the appropriate instance of your UI.

What is @UIApplicationMain?

UIApplicationMain creates an application object that's responsible for managing the life cycle of the app and an app delegate object. It defines the AppDelegate class, the blueprint for the app delegate object.


i am using openURL for my iphone apps, works perfectly, but now i want to use it on mac, normally, i use this code

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://google.com"]];

and it works perfectly in Xcode for iPhone app, but when doing a mac app, it gets me this error:

"UIApplication" undeclared (first use in this function)

So help anyone?