iphone-privateapi

How do I bring application to foreground after a call?

怎甘沉沦 提交于 2019-12-02 01:00:18
问题 In my app, I am placing a phone call due to which my app goes in background and suspended. After disconnecting the call instead of my app coming in foreground, native phone app comes into foreground. Is there any way by which my app comes into foreground (instead of native phone app) after disconnecting the call. If there is no direct way, private api/methods also work as I am not going to submit this app on app store. Thanks in advance 回答1: I doubt there is a way to do that, purely because

How do I bring application to foreground after a call?

佐手、 提交于 2019-12-01 21:56:17
In my app, I am placing a phone call due to which my app goes in background and suspended. After disconnecting the call instead of my app coming in foreground, native phone app comes into foreground. Is there any way by which my app comes into foreground (instead of native phone app) after disconnecting the call. If there is no direct way, private api/methods also work as I am not going to submit this app on app store. Thanks in advance I doubt there is a way to do that, purely because an app in background is in a frozen state. What that means is that the app is not running but there is still

iOS 7 (non-jailbreak) Wi-Fi RSSI value

半腔热情 提交于 2019-12-01 21:23:47
问题 Is it possible to get Wi-Fi RSSI value on non-jailbroken iOS 7 device? I read about MobileWiFi.framework and Apple80211 functions and if I understand correct they don't work without jailbreak. I don't want to publish my app on AppStore, so PrivateAPI is allowed. 回答1: I can't find the original post from where this was taken but it worked for me on a jailed device running iOS 7.1 (doesn't work on iOS 8): #include <dlfcn.h> -(NSDictionary *)currentWiFiInfo { void *libHandle; void *airportHandle;

iOS 7 (non-jailbreak) Wi-Fi RSSI value

为君一笑 提交于 2019-12-01 18:35:49
Is it possible to get Wi-Fi RSSI value on non-jailbroken iOS 7 device? I read about MobileWiFi.framework and Apple80211 functions and if I understand correct they don't work without jailbreak. I don't want to publish my app on AppStore, so PrivateAPI is allowed. I can't find the original post from where this was taken but it worked for me on a jailed device running iOS 7.1 (doesn't work on iOS 8): #include <dlfcn.h> -(NSDictionary *)currentWiFiInfo { void *libHandle; void *airportHandle; int (*apple80211Open)(void *); int (*apple80211Bind)(void *, NSString *); int (*apple80211Close)(void *);

Representing NULL Function Pointers to C Functions in Swift

早过忘川 提交于 2019-12-01 16:01:23
Consider the private-yet-sort-of-documented Cocoa C functions _NSLogCStringFunction() and _NSSetLogCStringFunction() . _NSLogCStringFunction() returns a function pointer to the C function used by the Objective-C runtime behind-the-scenes for NSLog() , and _NSSetLogCStringFunction() allows developers to specify their own C function for logging. More information on both of these functions can be found in this Stack Overflow question and this WebObjects support article . In C, I can pass in a NULL function pointer to _NSSetLogCStringFunction() : extern void _NSSetLogCStringFunction(void(*)(const

Representing NULL Function Pointers to C Functions in Swift

耗尽温柔 提交于 2019-12-01 15:31:24
问题 Consider the private-yet-sort-of-documented Cocoa C functions _NSLogCStringFunction() and _NSSetLogCStringFunction() . _NSLogCStringFunction() returns a function pointer to the C function used by the Objective-C runtime behind-the-scenes for NSLog() , and _NSSetLogCStringFunction() allows developers to specify their own C function for logging. More information on both of these functions can be found in this Stack Overflow question and this WebObjects support article. In C, I can pass in a

IOS share data between apps

佐手、 提交于 2019-12-01 12:43:46
问题 Hi I want to share data/files between apps on the SAME IOS device. The scenario: one app pulls data (from a server / up to 1GB) to the device, and other apps should be able to access it . How can I achieve this? without a Jailbreak Possible solutions: Just small chunks: keychain, clipboard, custom URL (actually how small /limited are they) If i don´t go for the appstore but direct B2B what about private API and other things like this (as far as i am concerned the Apple regulations do NOT

IOHIDEventSystemClientScheduleWithRunLoop with EXC_BAD_ACCESS

泪湿孤枕 提交于 2019-12-01 11:47:50
问题 I'm trying to get touch events in my application. So I used the IOHIDFamily callback to get the events. My code is like this: void handle_event(void* target, void* refcon, IOHIDServiceRef service, IOHIDEventRef event) { printf("Received event of type %2d from service %p.\n", IOHIDEventGetType(event), service); } - (void)viewDidLoad { [super viewDidLoad]; void *ioHIDEventSystem = IOHIDEventSystemClientCreate(kCFAllocatorDefault); IOHIDEventSystemClientScheduleWithRunLoop(system,

Check if app has a notfication using private frameworks?

旧城冷巷雨未停 提交于 2019-12-01 10:41:18
I'm writing a mobilesubstrate tweak for jailbroken devices that displays an icon in the statusbar if a defined app has a notification using libstatusbar I'm having trouble locating where iOS keeps this notification info for each app. Could anyone point me in the right direction/framework? I don't intend on submitting this to Apple, again it's for jailbroken devices. Thanks SO. I believe there are two notifications which looks similar, but internally goes through different execution routes: local notification and remote push notifications. I don't have exact answer. Couple of ideas, direction,

object_setInstanceVariable with CGPoint

孤街醉人 提交于 2019-12-01 09:29:10
Does anyone know how to set struct variables using object_setInstanceVariable? It is work fine for reference types: object_setInstanceVariable(obj, "_variable", ref); But do not work for structs such as CGPoint. Tried following ways: 1. object_setInstanceVariable(obj, "_variable", point); 2. object_setInstanceVariable(obj, "_variable", &point); 3. object_setInstanceVariable(obj, "_variable", (void **)&point); I'm not sure I understand what I'm doing (especially for the last step)... Thanks You in advance!!! object_setInstanceVariable and object_getInstanceVariable are really supposed to be