Updating extensions for iOS 14: Difference between revisions

From iPhone Development Wiki
(Added information about libundirect)
Line 27: Line 27:
Starting from Xcode 12 and iOS 14.0, Apple introduced objc_direct feature to shrink the compiled binary size and in hope to improve performance. As a result, Objective-C methods are not visible to any runtime browsers, any class-dump utilities and any disassemblers, raising a challenge for Objective-C direct methods hooking. Safari application is one of those that Apple transitioned to using objc_direct, making Safari tweaks more difficult to be created.
Starting from Xcode 12 and iOS 14.0, Apple introduced objc_direct feature to shrink the compiled binary size and in hope to improve performance. As a result, Objective-C methods are not visible to any runtime browsers, any class-dump utilities and any disassemblers, raising a challenge for Objective-C direct methods hooking. Safari application is one of those that Apple transitioned to using objc_direct, making Safari tweaks more difficult to be created.


[https://github.com/opa334/libundirect libundirect] by opa334dev thus is developed to act as a patchfinder (to find an address to the direct method that you want to hook) and as a rebinder (to add back the Objective-C signature to the direct method, providing backward compatibility). You can consult its README for how to use it.
[https://github.com/opa334/libundirect libundirect] by opa334dev thus is developed to act as a patchfinder (to find an address to the direct method that you want to hook) and as a rebinder (to add back the Objective-C signature to the direct method, providing backward compatibility). Visit [[libundirect]] for how to use it.

Revision as of 10:54, 8 May 2021

Let's collect knowledge like we did with iOS 13, iOS 12, iOS 11, iOS 10, iOS 9, iOS 8 and 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!

If you want to see what's been recently updated on this page, you can use the wiki's history feature to compare the revisions (to look at the diff) since the last time you visited this page.

IMMessage instantMessageWithText

All functions in the IMMessage class that start with "instantMessageWithText" now take an extra parameter, "threadIdentifier". For a message that's not replying to a specific thread, you can just pass in nil for this parameter.

Toolchain

Xcode 10-11 and 12 are necessary to support iOS 14 and 13- for arm64e by single package

arm64e ABI version is changed in iOS 14.

We must compile both arm64e ABI version slice to support iOS 14 and 13- using Xcode 10-11 and 12.

This topic for theos is under development thoes/issue#563

If you don't want to have multiple arm64e slices or go to greater length at the moment, use Xcode 11 or lower to compile your tweaks, or use Xcode's Toolchain from Xcode 11 and lower, as done in Choicy here.

Hooking unexported Objective-C functions (objc_direct)

Starting from Xcode 12 and iOS 14.0, Apple introduced objc_direct feature to shrink the compiled binary size and in hope to improve performance. As a result, Objective-C methods are not visible to any runtime browsers, any class-dump utilities and any disassemblers, raising a challenge for Objective-C direct methods hooking. Safari application is one of those that Apple transitioned to using objc_direct, making Safari tweaks more difficult to be created.

libundirect by opa334dev thus is developed to act as a patchfinder (to find an address to the direct method that you want to hook) and as a rebinder (to add back the Objective-C signature to the direct method, providing backward compatibility). Visit libundirect for how to use it.