Reputation: 145
I have no knowledge of iOS. I need to know if it is possible to create an application without any views. The app should run a background service triggered by the app installation (or boot), and the service will run permanently.
If you click the app icon, nothing should happen.
Thank you
Upvotes: 1
Views: 1243
Reputation: 31339
This is not possible. There is no such concept as a service type application or functionality in iOS.
The reason is, the UIApplication class provides a centralized point of control and coordination for apps running in iOS, which is a part of UIKit.
Also, there are restrictions to run the background service in iOS.See the below pic and this link to know more about background modes for apps.
Possible Method:
This is possible by writing exit(0);
inside the didFinishLaunchingWithOptions
after the iOS supporting background service is initiated. However, the App-Store will reject your app.
Upvotes: 2