Packaging

A .deb is a control file plus a tree that is copied onto the filesystem. Everything installs under /Library/TweakInject.

The control file

control
Package: com.example.mytweak
Name: MyTweak
Version: 1.0.0
Architecture: darwin-arm64e
Description: What it does, in one line.
Maintainer: Your Name
Author: Your Name
Section: Tweaks
Depends: mobilesubstrate (>= 0.9.5000)
FieldNotes
PackageReverse-DNS identifier. This is your identity everywhere, including in a licence check.
NameWhat people see.
VersionMust match what the listing publishes, or the app reports an update immediately after installing.
Architecturedarwin-arm64e for Apple silicon.
DependsResolved by the installer before your tweak is unpacked.

The payload tree

Layout
layout/
└── Library/
    └── TweakInject/
        ├── Tweaks/Bundles/MyTweak.bundle/
        └── Preferences/PreferenceBundles/MyTweakPrefs.bundle/

Dependencies worth declaring

  • com.doraorak.preferenceloaderx if your tweak ships a preference bundle and you want its settings to appear in System Settings.
  • mobilesubstrate if you hook functions, which is what provides MSHookFunction.

Version drift

The version inside the .deb and the version in the store listing have to agree. When they do not, the installed record reports the payload's version while the listing advertises another, and the app offers an update for something just installed.