How to get the name of the running application in iOS
I’d try [[NSBundle mainBundle] objectForInfoDictionaryKey:@”CFBundleDisplayName”]; although presumably you know your own app’s name and can just use it…
I’d try [[NSBundle mainBundle] objectForInfoDictionaryKey:@”CFBundleDisplayName”]; although presumably you know your own app’s name and can just use it…
AS @Nix Wang’s ANSWER THIS IS NOT WORK IN IOS 10 WARNING: This method will not work for devices running iOS 5.1 and greater – See Hlung’s comment below. It’s possible that the path component has a different name than the actual section, but it’s also possible that you can’t currently access that section straight … Read more
Objective-C [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; Swift UIApplication.shared.isIdleTimerDisabled = true