iphone-privateapi

Creating an image out of the ios surface and saving it

纵饮孤独 提交于 2019-11-27 03:50:09
问题 I am trying to acquire the surface associated with the main screen of the ios device, create an image out of it and save it. This is in relevance to this question - Taking Screenshots from iOS app - emulating Display recorder (query on the internals). The code is as follows: IOMobileFramebufferConnection connect; kern_return_t result; io_service_t framebufferService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleH1CLCD")); if(!framebufferService)

Is there a away to detect the event when iOS device goes to sleep mode (when the screen gets blackened)?

徘徊边缘 提交于 2019-11-27 03:40:50
I wanted to detect two events : Device gets locked/unlocked. Device goes to sleep and the screen blackens. First one I have been able to achieve here: Is there a way to check if the iOS device is locked/unlocked? Now I want to detect the second event, is there any way to do it ? Nate You basically already have the solution, which I'm guessing you found from one of my recent answers :) Use the com.apple.springboard.hasBlankedScreen event. There are multiple events that occur when the screen blanks, but this one should suffice: CFNotificationCenterAddObserver

Taking Screenshots in the background (iOS) - Improving Performance

蓝咒 提交于 2019-11-27 03:00:27
问题 This question is an extension to: Taking Screenshots from iOS app - emulating Display recorder (query on the internals) There are 2 ways I came across to take screenshots from the background - 1. Creating an image out of the ios surface and saving it - it captures at a very fast rate (approximately 0.2-0.3 sec/ 12-15 screenshots), however there are some problems that are encountered, discussed here: Releasing an IOSurface 2. The following code does the same job using the createScreenIOSurface

Changing iPhone's date and time

让人想犯罪 __ 提交于 2019-11-27 02:58:07
问题 I'm toying with iOS SDK, and I'm trying to change the device's date and time programmatically. I read that it's not possible with the standard SDK, which makes sense, but I'm wondering if it's possible to do so with the private APIs, as I'm just doing an app as a study, and do not intend to publish it on the App Store 回答1: 1) Add to your app entitlements com.apple.timed key with bool value set to YES 2) Disable automatic time setting (and timezone if you want) Link to private CoreTime

How to access iOS private APIs in Swift?

眉间皱痕 提交于 2019-11-27 02:14:03
问题 How can I call non-public iOS functions and acces non public properies from Swift? Specifically, I would like to use one non-public class in QuartzCore framework. One solution that came to my mind is to create "bridging" Objective-C project that would wrap this non-public APIs into public ones and than call this Objective-C functions from Swift. However, my solution is pure Swift now and I would prefer to keep it that way. Is there any more staitforward way? (for example adding something to

Lock iOS app in single app mode programmatically

微笑、不失礼 提交于 2019-11-27 00:45:45
问题 Note : I don't want to submit this app to app store. What i want to achieve : I want simple app with one view having two button Lock and Unlock. Lock - This button will lock device. Only this app's screen will show nothing else will be accessible even after restart same screen will show up. Home button, gestures will get disabled similar to single app mode. Unlock - This will unlock device and switch to normal behaviour of device. iOS : I want this for iOS 4.3 and above. I have checked

Turn off display in iPhone OS (iOS)

三世轮回 提交于 2019-11-26 22:01:14
is there a way to programmatically turn off the display in iOS? Not just turning brightness down, but off like the way the Phone App does. I am happy to use private API, since this is for personal use. Thanks! You can turn off the display by enabling the proximity monitoring. It will automatically turn off the screen, like in the Phone app, by placing the phone near your ears or by placing a finger over the IR sensor at the top of the phone. [UIDevice currentDevice].proximityMonitoringEnabled = YES; Elias Limneos You can do this, (obviously, using Private APIs of course) : on iOS5: #include

iOS Private API Documentation [closed]

别等时光非礼了梦想. 提交于 2019-11-26 21:15:13
Is there a web site or project documenting private APIs for the iPhone SDK? nst here are searchable archives from iPhone OS 2.2.1 to iOS 9.2 https://github.com/nst/iOS-Runtime-Headers Most likely. Just use the command line application class-dump to view the private headers. Note that your app will be rejected from the App Store for linking to private frameworks if you link at compile. It is easy enough to see that you are linking the private frameworks by running otool on your binary if linked at compile. These are the compilable headers generated by class-dump-z , a iOS class dumper: http:/

Get SMS broadcast with text body without Jailbreak BUT private frameworks in IOS

断了今生、忘了曾经 提交于 2019-11-26 21:04:59
问题 I would like to know if it is possible to get an SMS broadcast when a text comes in. I also want to retrieve the whole body and sender info. I want to know if this is possible through Private Frameworks only without jailbreaking. I'm not going to sell the app, it's just for my personal phone but I'm trying to avoid the jailbreak cat and mouse. 回答1: Here is how I do it. No jailbreak required, only private APIs. Private APIs declarations CoreTelephony framework: extern CFStringRef const

GSSendEvent - Inject Touch Event iOS

久未见 提交于 2019-11-26 20:44:39
问题 I want to inject touch event in iPhone. I get the coordinates of touch event via network socket. GSSendEvent seems to be good choice. However, it needs GSEventRecord as one of the inputs. Does anyone know how to prepare GSEventRecord? I prepared it based on some examples but the app crashes after GSSendEvent call. Appreciate any help. -(void) handleMouseEventAtPoint:(CGPoint) point { static mach_port_t port_; // structure of touch GSEvent struct GSTouchEvent { GSEventRecord record; GSHandInfo