iphone-privateapi

How to delete an iOS app programatically using private framework for non-jailbroken device

两盒软妹~` 提交于 2019-12-05 10:35:36
问题 I am making an in-house (Enterprise) app. I want to delete other installed apps from the iOS device programmatically. I have successfully retrieved the installed apps' info (e.g. name, bundleId, version, icon etc.) using Apple's private framework methods. Please tell me how can I do that (i.e. delete an app). Thanks. 回答1: Here is a solution (No jailbreak No crash) but its not working every time. Sometime it failed to uninstall application and return NO . NSBundle *b = [NSBundle bundleWithPath

Get a screenshot while App is in background? (Private APIs allowed)

空扰寡人 提交于 2019-12-05 04:08:36
问题 I am developing a monitoring application for the iPad. It already uses private frameworks to send artificial events and simulate user input, while my App is on the background and another App on the foreground. Now my problem is, I need to get a screenshot of the iPad as an image programatically. I know the UIGetScreenImage method, and also rendering every view on the screen to get the image. However, UIGetScreenImage cannot be called from the background. (I get an error telling me that when I

iOS Private API for VPN

我的未来我决定 提交于 2019-12-05 02:07:41
问题 I'm looking for some private API to start a VPN connection configured in the Settings app. Anyone any suggestions where I can find them? The only thing I found is the ManagedConfiguration.framework. Is that the right place to start? it's kind a hard without any documentation :-/ P.S. I know private api can't be on the iTunes Store etc. This is only for private use. 回答1: iOS 8.0 now includes the Network Extension framework. It is not documented on developer.apple.com, but in the 'Capabilities'

How to communicate between applications in iOS?

别等时光非礼了梦想. 提交于 2019-12-04 21:46:13
Before we can use CFMessagePort , but now it's invalid for iOS7 and above, is there any replaced methods? I tried CFMessagePort when hooking the constructor of UIApplication in the jailbreak environment, but in most of the apps, it can't CFMessagePortCreateLocal successfully, it just return NULL.Am I wrong somewhere? static void setupUIApplicationMessagePort() { NSString *identifier = @"com.foo.foo.UIApplication"; CFMessagePortRef local = CFMessagePortCreateLocal(NULL, (__bridge CFStringRef)identifier, callBackForUIApplication, NULL, NULL); if (local) { NSLog(@"local OK: %@", local);

iOS device On/Off notification

点点圈 提交于 2019-12-04 21:39:54
I understand that this task requires Private API and the app is not designed for the AppStore. So, is it possible to know when the system(iOS) is switching to off state and when it wakes up? Maybe it sends some system notifications about that? I assume you're talking about notifications when device is turned on/off. I was having the same problem and notifications were my first choice. But I found much simpler and more robust solution. You see, usually notifications are sent just one time. For example, if you're building a daemon that will listen to those notifications then you need to be sure

ERROR: iPhone Private Frameworks “No such file or directory”

南笙酒味 提交于 2019-12-04 20:24:46
I have added Private Frameworks To my project. When I build in DEVICE | RELEASE everything works fine and I am able to ldid -S the application and it successfully launches on my device. However, when trying to BUILD AND GO in Simulator, I get the error "No such file or directory" as indicated below: (I also get the error twice which is strange too.) Line Location HomeProfileViewController.h:10: error: BluetoothManager/BluetoothManager.h: No such file or directory Below are the project and build settings that I currently have, maybe someone can find a mistake and let me know, that would be

iOS: Can't get BluetoothManager to work

不问归期 提交于 2019-12-04 19:16:06
Caveat: I know that private frameworks won't fly in the App Store. I'm trying to use the BluetoothManager framework to let me 1) check if Bluetooth is enabled on a device, and 2) if not on, turn it on. I can successfully load BluetoothManager per the instructions found here , but once I've done so, BluetoothManager just doesn't seem to do anything. Calling enabled always returns NO, even when Bluetooth is enabled. Calling setEnabled never changes its state. Absolutely every other BluetoothManager call I've tried always returns NO, nil, zero-element arrays, etc. In short, the BluetoothManager

How to hook methods of MPIncomingPhoneCallController?

怎甘沉沦 提交于 2019-12-04 18:37:40
I want to hook methods of class MPIncomingPhoneCallController in iOS 5 to do something when a call comes. I use Class _$MPIncomingPhoneCallController = objc_getClass("MPIncomingPhoneCallController"); MSHookMessage(_$MPIncomingPhoneCallController, @selector(updateLCDWithName:label:breakPoint:), (IMP) &Hook_LCD, "pre_"); to hook updateLCDWithName:label:breakPoint: , but it failed. How can I do this? Class you are trying to hook is located in IncomingCall.serviceBundle which gets loaded in SpringBoard only when there is incoming call. To determine when it's actually loaded you need to hook

UIScreen mainScreen in Xcode 8

坚强是说给别人听的谎言 提交于 2019-12-04 16:52:35
We have a problem with iOS SDK in Xcode 8. We use method [UIScreen mainScreen] in our project. This method is available from iOS 2.0. But when we built product in Xcode 8 and submited it for review, app was rejected. Surprise: in the new SDK ( Xcode 8 GM ) this method marked as “ available from iOS 10.0 ”. In other words - now iOS 9 identifies [UIScreen mainScreen] as “ non-public API ”. Perhaps this is Apple’s bug. Our question: 1) We want to continue using this method. 2) We want to support iOS 8 and iOS 9. 3) We want to use Xcode 8. Is that possible? Class properties are an Objective-C

A way to reboot iOS device or restart Springboard using private API?

自闭症网瘾萝莉.ら 提交于 2019-12-04 16:43:11
问题 I am looking for some private API or piece of code which will allow me to reboot iOS device or restart Springboard. I looked at SBReboot, but it looks like it's protected by some entitlement. Also, I tried reboot(int) and reboot2(int), but it looks like both of them work only for "root" user and will do nothing for a "mobile" user. I am looking for a solution which works on non jailbroken device. However, private API's are ok (an application won't go to AppStore) Update 1 In response to