iphone-privateapi

Errors while running the Code?

坚强是说给别人听的谎言 提交于 2019-12-06 07:31:23
I am trying to compile and use the following code in a background daemon on a jailbroken iphone. #import <AudioToolbox/AudioToolbox.h> #import <libkern/OSAtomic.h> //CoreTelephony.framework extern "C" CFStringRef const kCTCallStatusChangeNotification; extern "C" CFStringRef const kCTCallStatus; extern "C" id CTTelephonyCenterGetDefault(); extern "C" void CTTelephonyCenterAddObserver(id ct, void* observer, CFNotificationCallback callBack, CFStringRef name, void *object, CFNotificationSuspensionBehavior sb); extern "C" int CTGetCurrentCallCount(); enum { kCTCallStatusActive = 1,

Can you find individual app usage duration using SpringBoard services framework or other private framework?

℡╲_俬逩灬. 提交于 2019-12-06 07:23:59
I have a background service running on iOS5. I am trying to find the duration for which each foreground application runs. I came across this great post by Vikarti Anatra. how to determine which apps are background and which app is foreground on iOS by application id This shows how to get the current foreground process. However, what I would like to know is if there is a method which will give me the start time of various processes launched by Springboard so I can compute the duration. I am trying to create a log of apps launched by my users. This is not meant for app store certification and

BluetoothManager not working on iOS 7

限于喜欢 提交于 2019-12-06 06:47:07
问题 I'm trying to use BluetoothManager in an app on iOS 7 but it doesn't seem to be working. Calling setEnabled: and setPowered: on BluetoothManager doesn't have any effect, and I'm registering for notifications ( BluetoothAvailabilityChangedNotification ) but these are never sent. I've imported the framework and I'm using example code as given by these questions, but these are all pre-iOS 7, which may be the problem; iOS BluetoothManager Framwork iOS: Can't get BluetoothManager to work

Any non-private API alternative for this?

我与影子孤独终老i 提交于 2019-12-06 06:19:29
My app was recently rejected due to using a private API ( addTextField: method for UIAlertView , which is quite useful, might I add). Is there any non-private alternative to UIAlertView 's undocumented addTextFieldWithValue:label: ? Thanks SO much in advance! create the text field as a subview of the UIAlertView // Ask for Username and password. alertView = [[UIAlertView alloc] initWithTitle:_title message:@"\n \n \n" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil]; // Adds a username Field utextfield = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25

How to check if your iOS app code is using an api that is not allowed on the app store?

为君一笑 提交于 2019-12-06 05:57:52
问题 I know that there are some restricted api's or code that are not allowed to be in your app when you submit it to the app store. How do you know what they are? Is there a way to check your app before you submit it to ensure you have not used such api's? It is probably better to avoid this problem at the design stage, than trying to fix it later, so I was wondering if there is any tool in Xcode, or document to determine this. 回答1: The way Apple intends for you to do this is to use XCode's

Import ChatKit (i.e., Private Framework) OR using CKDBMessage somehow

二次信任 提交于 2019-12-06 05:20:41
First - I know private frameworks/APIs won't get me to the AppStore, this is for private use/research only. I can't get my project to compile with ChatKit.framework . Basically I need to somehow init a CKDBMessage object and get stuff from it. The first approach I tried is to be able to call this: CKDBMessage* msg = [[CKDBMessage alloc] initWithRecordID:lastID]; NSLog(@"GOT SMS: %@", msg.text); I couldn't get it to compile with any combination of these solutions: Simply add only CKDBMessage.h to my project Add all the headers of ChatKit.framework Add also ChatKit.framework file itself I have

Programmatically detect which iOS application is visible to user

笑着哭i 提交于 2019-12-06 05:17:59
I found this and the problem is that the answers on that question didn't pan out (I also tested them first) and also that it is over a year old. I've used the solution here to fetch the list of all running processes, but not of the struct kinfo_proc attributes seem to give any useful in detecting which app is currently visible to the user. Basically: I am trying to find out which app is currently visible (and open) to the user on iOS devices. It must work on stock devices (non-jailbroken) and no need to worry about the app store. Edit: I am looking at the private APIs now, but cannot seem to

Xcode 7.3 missing Private Frameworks

纵然是瞬间 提交于 2019-12-06 01:08:11
I recently upgraded my Xcode to version 7.3. When I compile my exisiting project I get this error message: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/PrivateFrameworks' As per this post , private frameworks have been removed with Xcode 7.3. Any suggestions as to potential solutions? According to the Xcode 7.3 release notes : The Apple private frameworks have been removed from the iOS, watchOS, and tvOS SDKs. If your application fails to link, make sure that you are not using any private

iOS Detect system volume level change. private API or not? AVSystemController_SystemVolumeDidChangeNotification

不想你离开。 提交于 2019-12-05 20:51:40
问题 Can listening to AVSystemController_SystemVolumeDidChangeNotification NSNotification be considered (during the App Store review process) as using private API? In my application I need to display and update the current volume level. Volume indicator should be updated after pressing hardware volume buttons and after volume change in MPVolumeView slider. I've searched solution how to get notification or event of hardware volume button press and had found a number of solutions. For example,

iOS event/notification for network activity up/down/off

纵饮孤独 提交于 2019-12-05 18:36:45
I want a event/callback for my iOS app when the network activity goes from none to up (and the other way around). Similar to how Android does with onDataActivity(). I'm not talking about Reachability but when data actually starts or stops transmitting. The app is not for App Store and not for jailbreak. I have got a similar functionality of detecting when the screen goes on/off working by using CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), //center NULL, // observer displayStatusChanged, // callback CFSTR("com.apple.iokit.hid.displayStatus"), // event name NULL,