iphone-privateapi

Which method is called when device is about to be unlocked?

柔情痞子 提交于 2020-01-02 13:28:07
问题 I would like to know where the -(void)unlock (or whatever is called) used when we "slide to unlock" on the LockScreen is. Has anyone an idea ? 回答1: Try these iOS 4 - 5 SBAwayController -(void)_finishedUnlockAttemptWithStatus:(char) Argument will be non zero (I don't quite sure it will always be 1 when device is unlocked) when device is about to be unlocked. iOS 6 SBAwayController -(void)_finishUnlockWithSound:(char) unlockSource:(int) isAutoUnlock:(char) iOS 7 SBLockScreenViewController -

Get device signal strength

亡梦爱人 提交于 2020-01-01 07:07:10
问题 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

Programmatically send iMessage using private frameworks

▼魔方 西西 提交于 2019-12-31 16:54:04
问题 Does anyone know if it's possible to directly send an iMessage using a private framework? I tried using CTMessageCenter from CoreTelephony but it'll send an SMS even though my phone can send iMessages. 回答1: I haven't tested this, but look at the code posted here. If you look at httpResponseForMethod:URI: , you see where he/she sends a message (appears to be hardcode to support iOS 5 or iOS 4 ): CKSMSService *smsService = [CKSMSService sharedSMSService]; //id ct = CTTelephonyCenterGetDefault()

iPhone brightness private API not working properly

╄→гoц情女王★ 提交于 2019-12-31 01:53:08
问题 I am trying to set the brightness of the backlight, but it's acting very strangely. I am using the private API: [(id)[UIApplication sharedApplication] setBacklightLevel:1.0f]; However, when I call this, the screen dims, not becoming 100% bright like I thought it would. I have tested this with a variety of numbers, and here is what I got: 0.2: dark 0.3: light 0.4: dark 0.5: dark 0.6: light 0.7: dark 0.8: dark 0.9: dark 1.0: dark 1.1: dark 1.2: light 1.3: dark 1.4: dark 1.5: light Some of the

iOS How to use private API?

眉间皱痕 提交于 2019-12-30 04:49:12
问题 I don't want to submit this app to AppStore. I've tried for many times but met so many problems :( I use class-dump to get all the header files of UIKit.framework. In the UIApplication.h generated by class-dump, I saw the method I want to use----launchApplicationWithIdentifier. Then I put UIApplication.h in my project and import it. Compile, I got a lot of "Redefinition of enumerator...." error because in the UIKit.framework I use previous, there's another UIApplication.h. But this file doesn

get carrier name and signal strength return wrong value in iphone

妖精的绣舞 提交于 2019-12-29 07:18:21
问题 i curious why i get wrong value to get carrier name and signal strength. Here the code. CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init]; CTCarrier *car = [netinfo subscriberCellularProvider]; NSLog(@"Carrier Name: %@", car.carrierName); [netinfo release]; Why i get value "carrier" instead of carrier i use? this is code to get signal strength void *libHandle = dlopen("/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony", RTLD_LAZY); int (

Get list of all installed application in ios 8

荒凉一梦 提交于 2019-12-28 08:10:13
问题 How to get list of all installed Applications on iPhone device programmatically in iOS 8. If anyone knows the solution by using private APIs(but device non-jailbroken) then its well and good. I know that it is possible using iTunes Search API, but it gives only those applications that are installed from iTunes. I need all the applications on device, whether it is from iTunes or user-developed or system apps. 回答1: try this. it works,I've tested. #include <objc/runtime.h> Class

Handling private frameworks in Xcode ≥ 7.3

流过昼夜 提交于 2019-12-27 19:15:07
问题 With Xcode 7.3 / iOS 9.3 Apple removed all private frameworks from the iOS SDKs. For research purposes (not App Store!) I need to work with a private framework (namely BluetoothManager.framework , but this is also an issue for any other private frameworks). Because these frameworks are no longer delivered in the iOS SDKs, I get a build (linker) error if my project attempts to link to this framework explicitly. Any ideas for a long(er)-term solution? 回答1: You can solve this problem by linking

Modify Headers of SCDynamicStore.h in swift

﹥>﹥吖頭↗ 提交于 2019-12-24 12:05:13
问题 I am trying to detect Hotspot status in iOS. For that I need to use the SystemConfiguration APIs as follows let sc = SCDynamicStoreCreate(nil, "com.apple.wirelessmodemsettings.MISManager" as CFString, nil, nil) let info = SCDynamicStoreCopyValue(sc, "com.apple.MobileInternetSharing" as CFString) But SCDynamicStoreCreate and SCDynamicStoreCopyValue are not available for iOS. I need to modify SCDynamicStore.h file and make these functions available for iOS (They are currently marked available

Check bluetooth state in iOS

随声附和 提交于 2019-12-24 06:35:17
问题 I have an application (I am not going to submit this app to apple app store) using which I want to check whether bluetooth is turned on. If it is turned on then I have to display an alert. - (void)centralManagerDidUpdateState:(CBCentralManager *)central{ switch (central.state) { case CBCentralManagerStatePoweredOn:{ //alert view break; } } And in viewdidload I did like this CBCentralManager * manager = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; but this is not working in