Updating extensions for iOS 14: Difference between revisions

From iPhone Development Wiki
(not necessary to package both of arm64e slice to support iOS 14 and 13-.)
 
(13 intermediate revisions by 4 users not shown)
Line 7: Line 7:
[[Category:Updating extensions]]
[[Category:Updating extensions]]


= What has changed in iOS 14? (Classes, frameworks, etc.) =
== IMMessage instantMessageWithText ==


== SBHIconGridSizeClassSizes (Widget Layout size management ==
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.


<code>
== Toolchain ==
0x 02 00 02 00 04 00 02 00 04 00 04 00 04 00 06 00 


==
=== Xcode 11 is necessary to support iOS 14 and 13- for arm64e by single package ===


0x<a1>00<a2>00<b1>00<b2>00<c1>00<c2>00<d1>00<d2>00 
arm64e ABI version is changed in iOS 14 so new arm64e ABI version slice that compiled by Xcode 12 could not load in iOS 13-.


where
We must compile to old version of arm64e ABI slice to support iOS 14 and 13- using Xcode 11.


a - small (2x2 in this example)
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 [https://github.com/opa334/Choicy/blob/master/Makefile#L1 in Choicy here].
b - medium (2x4)
c - large (4x4)
d - extra large (4x6)


</code>
== 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.
 
[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.

Latest revision as of 15:38, 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 11 is necessary to support iOS 14 and 13- for arm64e by single package

arm64e ABI version is changed in iOS 14 so new arm64e ABI version slice that compiled by Xcode 12 could not load in iOS 13-.

We must compile to old version of arm64e ABI slice to support iOS 14 and 13- using Xcode 11.

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.