NSExceptional / Swizzle

A tweak to create basic tweaks from any app.
Other
42 stars 9 forks source link

Swizzle

An extensible tweak to create simple tweaks for any app, from within any app.

System-wide tweak functionality is not yet implemetned.

For users

Trigger the FLEXing window. Click on the TWEAK button to present the Swizzle window. There are two tabs: local, and system. Local tweaks apply to the current app ONLY, and system tweaks apply to any app where the target class is found, including SpringBoard.

A "tweak" is comprised of one or more "hooks." Tap the + button to create a tweak. Swizzle will ask for a name. Tweaks can be toggled on or off. Select a tweak to give it some hooks. You can swipe to delete hooks.

Tap the + button to add some hooks. This will present a new screen with a list of open bundles. Once you select a bundle, you must select a class, then a method. Once you have a method selected, you can configure and save the hook.

Bundles are things like the app binary itself, UIKit, MapKit, etc. Bundles hold different classes. Selecting a bundle reveals all classes it holds. Selecting a class reveals all methods it implements and inherits. Selecting an inherited method will add an implementation in the selected class.

You can type to filter any of the lists mentioned above, using the format bundle.class.[-+]method, where bundle is a bundle name, class is a class name, and [-+]method is a method name, such as -count or +imageNamed:. You can filter the lists with wildcards. Some examples:

The \. escape is needed in some bundle names to prevent interpreting MapKit\.framework as bundle=MapKit, class=framework.

Developers:

Installing Swizzle as a tweak is straightforward if you already have the Xcode project building. Just do make package install like usual.

The Xcode project has a podfile that relies on MirrorKit. In the podfile, change pod 'MirrorKit', :path => '../../../MirrorKit' to pod 'MirrorKit', :git => 'https://github.com/NSExceptional/MirrorKit.git', :branch => '2.0', then run pod install from Terminal in the same directory as the podfile. The Xcode project builds an app that you can use to test Swizzle without being jailbroken or needing Theos to install.

DM me on Twitter or chat me on Reddit (chat, not DM) with any questions! @NSExceptional, /u/ThePantsThief.

TODO

LEGAL

Swizzle is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. This means you cannot use it commercially, but you are free to distribute and modify it and send me PRs and the like.

TLDR: https://tldrlegal.com/license/creative-commons-attribution-noncommercial-4.0-international-(cc-by-nc-4.0)