2
On iOS6:

void (*BKSDisplayServicesSetScreenBlanked)(BOOL blanked) = (void (*)(BOOL blanked))dlsym(RTLD_DEFAULT, "BKSDisplayServicesSetScreenBlanked");

and then use:

BKSDisplayServicesSetScreenBlanked(1); // 1 to dim, 0 to undim

And I dont care if my app would be rejected by the appstore

zzzzz
  • 1,209
  • 2
  • 18
  • 45
  • 1
    what version of iOS is the device running? – AppleDelegate Feb 14 '13 at 11:01
  • i think it has something to do with the permissions – zzzzz Feb 14 '13 at 11:02
  • 2
    I don't know your exat problem but see this post perhaps it helps you: http://stackoverflow.com/questions/3950194/turn-off-display-in-iphone-os-ios – Vishal Feb 14 '13 at 11:05
  • @Vishal I've seen this post vishal.But I dont know how to set the entitlements – zzzzz Feb 14 '13 at 11:09
  • 2
    Here's a post that talks specifically about setting entitlements in a jailbreak environment: http://stackoverflow.com/questions/11069330/ios-how-to-use-entitlement-plist-to-specify-property-of-my-app – ipmcc Feb 14 '13 at 12:39

0 Answers0