jailbreak

How to import a private framework in Xcode 8.3 without getting “Undefined symbols for architecture arm64”

青春壹個敷衍的年華 提交于 2019-11-29 16:29:07
问题 I am trying to use _CDBatterySaver to turn on low power mode simply using [[_CDBatterySaver batterySaver] setMode:1]; I know there isn't the same type of directory as previous Xcode so those methods don't work. I have also tried just importing the ".h" file but that doesn't work. It is part of the CoreDuet framework (downloaded from GitHub) Thanks 回答1: You will need a .tbd file to link against. Apple stopped shipping these for private frameworks starting with the iOS 9.3 SDK, but you can

How to list open ports in iOS?

点点圈 提交于 2019-11-29 15:50:13
问题 I am using a *jailbroken device and I want to write an application to list the open ports (e.g. TCP ports). I have two ideas: Use some native API to get list of opened ports execute shell command to get a list of opened ports and parse the result of this shell command. Which API or shell command should I use and how can I trigger it programmatically? 回答1: The way I would do this is to have your app invoke the UNIX lsof command programmatically. lsof lists open "files", which on a BSD system

How to get serial number of a device using IOKit in iOS8 as IOPlatformSerialNumber giving nil value

橙三吉。 提交于 2019-11-29 15:45:05
问题 I was wondered to know how to get serial number of a device using IOKit in iOS8? I used UIDevice+serialNumber and I am able to get serial number in iOS6 and7. In iOS8 value of platformSerialNumber is coming nil in the following line: CFTypeRef platformSerialNumber = IORegistryEntryCreateCFProperty(platformExpertDevice,CFSTR("IOPlatformSerialNumber"), kCFAllocatorDefault, 0); I am using : https://gist.github.com/0xced/566994 Note:My app will not go to app store, its for inhouse. So I am

Is an iPhone app's document directory /var/mobile/Documents or /var/mobile/Library/AppName?

て烟熏妆下的殇ゞ 提交于 2019-11-29 14:44:17
As far as I know (and read everywhere) an application's documents directory should be somewhere in /var/mobile/Library/ on the iPhone but if I'm logging the gotten directory it is /var/mobile/Documents . I get the directory as follows: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; is this a problem if I'm creating a file named Settings.xml in here or is something wrong with my app/etc.? Information: I've a jailbroken iPhone 4 with iOS 4.2.1 and my app gets installed via Cydia or SSH.

Simulate all physical buttons like the pressure on the home button on iOS 7 (Jailbreak)

ぃ、小莉子 提交于 2019-11-29 14:23:21
问题 I'm trying to simulate the "home button pressed" on iOS 7 but the previous method used on iOS 6 doesn't work. I speak of course of a jailbroken device. #include "GSEvent.h" - (void)simulateHomeButton { struct GSEventRecord record; memset(&record, 0, sizeof(record)); record.type = kGSEventMenuButtonDown; record.timestamp = GSCurrentEventTimestamp(); GSSendSystemEvent(&record); record.type = kGSEventMenuButtonUp; GSSendSystemEvent(&record); } *UPDATE What I really need is a generic method like

How to gain root privileges for iOS app?

懵懂的女人 提交于 2019-11-29 12:42:25
I'm currently building an app for jailbroken device, and I need root privileges for my app so that I can perform some tasks ask root. I found a related question : Gaining root permissions on iOS for NSFileManager (Jailbreak) . But I am really new to iOS, I don't understand and unable to complete task from step 4. Can anyone make it more detail please? What step 4 is telling you: Open the original executable file and delete its contents (the contents are now stored in the previously copied and renamed binary). is simply that you have moved the executable file for your app to a new filename, and

Where are the iOS frameworks binaries located in the filesystem?

主宰稳场 提交于 2019-11-29 12:26:11
问题 I'm kind of confused about frameworks on iOS. I think they are basically a directory containing a dynamic library, headers and resources. But in my device the frameworks directories in System/Library/Frameworks don't contain the dynamic library. How is this possible? Shouldn't it be present to be loaded in memory when the application requiring it is launched? 回答1: The binaries no longer exist on-device (and have not since iOS 3.1): Apple has merged them all into one large mmap() 'ed cache

Is there any ways to detect the roaming status on iOS 6?

天大地大妈咪最大 提交于 2019-11-29 11:54:33
问题 My application using below methods to detect roamming in iOS 4 and 5. NSString *carrierPListSymLinkPath = @"/var/mobile/Library/Preferences/com.apple.carrier.plist"; NSString *operatorPListSymLinkPath = @"/var/mobile/Library/Preferences/com.apple.operator.plist"; NSFileManager *fm = [NSFileManager defaultManager]; NSError *error = nil; NSString *carrierPListPath = [fm destinationOfSymbolicLinkAtPath:carrierPListSymLinkPath error:&error]; NSString *operatorPListPath = [fm

How add entitlement via ldid

拟墨画扇 提交于 2019-11-29 11:30:07
I have some problems. I want use in my app next function: int SBSLaunchApplicationWithIdentifier(CFStringRef displayIdentifier, Boolean suspended); I add SpringboardServices.framework in my project I add URL Schemes for my app Created the file entitlement.xml with <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.springboard.launchapplications</key> <true/> </dict> </plist> Paste entitlement.xml in `Developer/Xcode/DerivedData/MyApp-efjwoxgwdyixnfassijmwtptxvlj/Build

How can I enable and disable WiFi connectivity with a jailbroken iOS device?

三世轮回 提交于 2019-11-29 08:53:53
How can I programmatically enable and disable WiFi connectivity with a jailbroken iOS device? creker void SetWiFiMode(BOOL mode) { void* manager = WiFiManagerClientCreate(kCFAllocatorDefault, nil); if (mode) { WiFiManagerClientSetProperty(manager, CFSTR("AllowEnable"), kCFBooleanTrue); } else { WiFiManagerClientSetProperty(manager, CFSTR("AllowEnable"), kCFBooleanFalse); } CFRelease(manager); } To use this your application entitlements should have com.apple.wifi.manager-access key with boolean value set to true. All functions can be found in private MobileWiFi.framework There isn't a way using