iphone-privateapi

iOS 11 : Cellular Signal strength

狂风中的少年 提交于 2019-12-04 16:27:57
I was fetching Cellular Signal Strength(iOS < 11) as mentioned below, but in iOS 11 , signalStrength is always 0 let statusBarView = UIApplication.shared.value(forKey: "statusBar") as? UIView if let foregroundView = statusBarView?.value(forKey: "foregroundView") as? UIView { let subiews = foregroundView.subviews var dataNetworkItemView:UIView? for subview in subiews { if subview.isKind(of: NSClassFromString("UIStatusBarSignalStrengthItemView")!) == true { dataNetworkItemView = subview break } } var signalStrength = 0 var signalStrengthBars = 0 if let view = dataNetworkItemView { signalStrength

Intensity of custom iPhone vibration

只谈情不闲聊 提交于 2019-12-04 13:27:30
问题 This is a question related to Are there APIs for custom vibrations in iOS?. I am able to create custom vibration patterns, but have no control over the intensity. This is copied over from Kevin Cao's answer that enables custom vibration patterns: NSMutableDictionary* dict = [NSMutableDictionary dictionary]; NSMutableArray* arr = [NSMutableArray array ]; [arr addObject:[NSNumber numberWithBool:YES]]; //vibrate for 2000ms [arr addObject:[NSNumber numberWithInt:2000]]; [arr addObject:[NSNumber

How to use bzip2 format in iOS? Apple tell me bzBuffToBuffDecompress is private APIs

泄露秘密 提交于 2019-12-04 12:34:24
问题 Today I submit my iOS App to app store, but soon I got a mail from apple, it said that, cannot be posted to the App Store because it is using private or undocumented APIs: Private Symbol References BZ2_bzBuffToBuffDecompress As you know, as outlined in the iPhone Developer Program License Agreement section 3.3.1, the use of non-public APIs is not permitted. Before your application can be reviewed by the App Review Team, please resolve this issue and upload a new binary to iTunes Connect. What

BluetoothManager not working on iOS 7

丶灬走出姿态 提交于 2019-12-04 10:52:36
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 Programmatically turn on bluetooth in the iphone sdk? Turns out that this framework hasn't been protected in iOS

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

元气小坏坏 提交于 2019-12-04 09:46:51
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. Nate The way Apple intends for you to do this is to use XCode's Validation feature. When you're submitting an app, you build for achiving (or Archive from the XCode menu).

Releasing an IOSurface

一曲冷凌霜 提交于 2019-12-04 03:11:29
问题 This question is an extension to: Link-1: Creating an image out of the ios surface and saving it Link-2: Taking Screenshots from iOS app - emulating Display recorder (query on the internals) (Refer Link-1) I have the code for taking screenshots in the background working. But as stated, it requires a sleep of 2 sec to work uninterruptedly, otherwise the OS suspends the app. I figured out the reason could be that I am not explicitly releasing the IOSurface I create. Reason - Using the link http

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

十年热恋 提交于 2019-12-04 03:06:10
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, iPhone Detect Volume Keys press. and How to get audio volume level, and volume changed notifications on iOS?

Get device signal strength

本秂侑毒 提交于 2019-12-03 21:13:04
I am trying to get the signal strength in dBm for the carrier, wifi, 3g, and 4g. I am currently using this code to get the carrier's and wifi from the status bar and I would like to know if there is another way or a better way? Also how could I get it for 3g and 4g? UIApplication *app = [UIApplication sharedApplication]; NSArray *subviews = [[[app valueForKey:@"statusBar"] valueForKey:@"foregroundView"] subviews]; NSString *dataNetworkItemView = nil; NSString *wifiNetworkItemView = nil; for (id subview in subviews) { if([subview isKindOfClass:[NSClassFromString(@

iOS Private API for VPN

放肆的年华 提交于 2019-12-03 17:12:01
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. iOS 8.0 now includes the Network Extension framework. It is not documented on developer.apple.com, but in the 'Capabilities' pane, you just flip on 'Personal VPN' and it is added to the project for you... then you can browse its

iOS switch off vibrate on silent programmatically [Private API]

空扰寡人 提交于 2019-12-03 14:30:33
I would like to keep my iPhone from vibrate when it's on Silent Mode even when it is ON in settings. I want to do it programmatically from an App. This is for me, so I can use a private API. Is there an api which manage Sounds in Settings? Do you know any solution? Thank you, Flo I think the following code can do the trick. You need to trigger it from somewhere though (haven't understand if you want it to be fired with the button or from within an app). NSString *sbPath = @"/var/mobile/Library/Preferences/com.apple.springboard.plist"; NSMutableDictionary *sbDict = [[NSMutableDictionary alloc]