Reputation: 284
I want to save the time when an application was launched and save it to the database at the moment it detects the launched event. I want to save in the database everytime an application is launched.
I tried to do this in android using the service, is this possible in iOS?
I found a list of public notifications in https://gist.github.com/hpique/7554209 and its not there.
I hope someone could help me. Thank you.
Upvotes: 2
Views: 79
Reputation: 25692
Best Option:
You wanted to save the time only on application launch. So you can make use of didFinishLaunchingWithOptions method.
You can't have this kind of facility in background on iOS. Like android you can't run the service. Everything is sandboxed.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// App Launched, save the time here
// Put your Code here
return YES;
}
Upvotes: 2