Difference between revisions of "Updating extensions for iOS 8"

From iPhone Development Wiki
Jump to: navigation, search
(What has changed in iOS 8? (Classes, frameworks, etc.))
(Added my iPhone5S iOS8.1 Springboard dumped headers)
Line 65: Line 65:
 
== Random assorted other notes ==
 
== Random assorted other notes ==
  
* [http://developer.limneos.net/index.php?ios=8.0 iOS 8.0 Headers] and [https://github.com/coolstar/iOS-8.1-SpringBoard-Headers another set of SpringBoard headers] (made with two different [[Reverse_Engineering_Tools#class-dump.2C_class_dump_z.2C_classdump-dyld|class dumping tools]]).
+
* [http://developer.limneos.net/index.php?ios=8.0 iOS 8.0 Headers], [https://github.com/coolstar/iOS-8.1-SpringBoard-Headers another set of SpringBoard headers], [https://github.com/iMokhles/iPhone5S-iOS8.1-SBHeaders another set of SpringBoard headers Part-1] and [https://github.com/iMokhles/iPhone5S-iOS8.1-SBHeaders-2 another set of SpringBoard headers Part-2] (made with two different [[Reverse_Engineering_Tools#class-dump.2C_class_dump_z.2C_classdump-dyld|class dumping tools]]).
  
 
* In things like SBStarkBanner* classes, Stark is the codename for the blur-heavy UI since iOS 7
 
* In things like SBStarkBanner* classes, Stark is the codename for the blur-heavy UI since iOS 7

Revision as of 22:36, 26 October 2014

Let's collect knowledge like we did with Updating extensions for iOS 7 - paste in your notes and share what you've learned, and somebody else will organize it later. :) If you want to ask questions and share tips over chat with other developers, see How to use IRC for how to connect to #theos and #iphonedev.

Hey developer, you can add your knowledge here! Yes, you! Make an account and edit this page!

What has changed in iOS 8? (Classes, frameworks, etc.)

  • The term 'Display Identifier' has been removed from SpringBoard. Methods that used the term usually have a 'Bundle Identifier' equivalent; e.g. -[SBApplicationController applicationWithDisplayIdentifier:] and -[SBApplication displayIdentifier] are now -[SBApplicationController applicationWithBundleIdentifier] and -[SBApplication bundleIdentifier]. However, SBIconModel still seems to use displayIdentifier.
  • "Has anyone looked into granting entitlements in iOS 8? It would appear the popular method of hooking "_XPCConnectionHasEntitlement" no longer works." "I haven't had a whole lot of time to do testing or look for better methods but I found "_BSAuditTokenTaskHasEntitlement" which appears to have a similar function to "_XPCConnectionHasEntitlement", its part of the "assertiond" process which must be hooked in order to access it, so far it's worked. More specifically, part of the "BaseBoard" private framework within "assertiond"."
  • PLBatteryPropertiesEntry no longer seems to exist for getting current battery info such as: [PLBatteryPropertiesEntry batteryPropertiesEntry].currentCapacity. You can still use:
io_service_t powerSource = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPMPowerSource"));
CFNumberRef currentCapacityNum = (CFNumberRef)IORegistryEntryCreateCFProperty(powerSource, CFSTR(kIOPMPSCurrentCapacityKey), kCFAllocatorDefault, 0);
  • launchctl appears to be slightly broken. launchctl start and stop work perfectly, but launchctl load and unload break with the cryptic error message /System/Library/LaunchDaemons/com.apple.mobile.installd.plist: The specified service path was not in the service cache
  • MISValidateSignatureAndCopyInfo appears to perform additional code-signing checks during app installation.
  • installd cannot be reloaded via launchctl.
  • Mobile application containers are at /var/mobile/Containers/Application
  • Looks like certain apps dont have privileges for IORegistryEntryCreateCFProperty anymore (Safari, Mail)
  • xTM3x has been doing some research into preference saving (log, file atomicity takes long enough to see the auxiliary files). It seems that the PostNotification from the Preferences specifier plist is now posted before the plist is updated on disk — as opposed to after the plist was updated on disk which was the case on iOS < 8 (unless I'm doing something terribly wrong!). These facts could mean that writing to file with atomicity:YES (as is custom) is slower than on previous iOS versions. This could be a bug on Apple's code and not an issue with developer's code. Either a patch should be made or wait for Apple to notice and fix it. Consider setting up an NSTimer for a short period and update your values then.
  • PrivateFrameworks (and possibly others) in the iOS 8 SDK are missing the __TEXT section. Frameworks must be extracted from a device's dyld_shared_cache using a tool like JTool or IDA before they can be (statically) reverse engineered.
  • Many functions from SBMediaController have been removed, and it is now useless for accessing now playing information. The best alternative seems to be the MediaRemote framework.
  • You can no longer mount FAT-formatted storage devices via the CCK, only HFS.
  • "Has anyone figured out how to add subviews to UIAlertView in iOS 8 yet?" "I found a workaround so I can at least add to the content view (which is not the size of the full alert view though). Within a subclass of UIAlertView do [[[[self _alertController] contentViewController] view] addSubview:theSubview];. When not subclassing, [[[[alertView _alertController] contentViewController] view] addSubview:theSubview]; should work, although one has to figure out the right time to do that."
  • system() is now deprecated. Apple recommends using posix_spawn() instead.
  • If an app is using WKWebViews, processes named com.apple.WebContent and com.apple.WebNetworking are being spawned and they each create only one NSURLCache. If you want to know the bundleIdentifier of the app they were spawned for, just hook -[NSURLCache _initWithMemoryCapacity:diskCapacity:relativePath:] in those processes. relativePath will be that bundleIdentifier. It's not perfect but a quick and neat trick.

What is new in iOS 8, and how does it work?

  • The view Reachability invokes is in the new framework FrontBoard - you can hook it. It is a FBWindowContextHostView. To toggle it: [[%c(SBReachabilityManager) sharedInstance] _handleReachabilityActivated];
  • FrontBoard is a new thing
  • Apple seems to call the iOS side Octavia and the OS X side Nero

Which tools and other preexisting things are still working on iOS 8? Which ones don't work?

  • Activator, Flipswitch and AppList betas with support for iOS 8 are on rpetrich's repository (http://rpetri.ch/repo/)
  • The package syslogd to /var/log/syslog seems to not be working. An alternative - also as listed on TheiPhoneWiki. In other words: while the syslogd package doesn't work, installing socat and running socat - UNIX-CONNECT:/var/run/lockdown/syslog.sock still works on iOS 8. You can pipe it to a file if you want.
  • libstatusbar seems to not be compatible yet, UIImage kitImageNamed returns null. While waiting for an official fix, if you need a version for testing, you could compile from Tateu's patched source, but it's a horrible hack that is just a temporary solution (it doesn't appear to have identical behaviour if run on older iOS versions).
  • libsymbolicate doesn't work on 8. (VMUHeader is gone from Symbolication.framework)
  • "RocketBootstrap seems to work." - it works perfectly with my tweak [Simon Selg].
  • "What works for dumping classes on iOS 8? I've tried using classdumpdyld and classdumpz but none of them seem to work. I'm trying to dump them directly on an iPhone 6." "You could use class-dump for i386 and the iOS 8 simulator" "This class-dump works for me." "If you want to dump on your iPhone then just compile its source to ARM; IIRC its distributed binary is x86/64 only."

Random assorted other notes

  • In things like SBStarkBanner* classes, Stark is the codename for the blur-heavy UI since iOS 7