No Respring Theme Switch - AnemoneTeam/Anemone GitHub Wiki
No-Respring Theme Switch
Note: Currently running apps may need to be closed and reopened for theme changes to take effect within them.
Anemone will soon support switching themes without a respring. Anemone extensions and 3rd party tweaks may request Anemone to notify them when the theme is changing so they may reload images or other settings from the themes as needed.
Currently supported assets for no-respring theme switch:
- Home Screen Icons
- Icon Masks
- Docks
- Folder Icons
- Folder Backgrounds
- Preference Icons
- In-App Resources, blurs, colors and tints.
Switching themes from your tweak without a respring
- Call
/usr/bin/recache --no-respring
to clear Optitheme caches - In SpringBoard, call [[ANEMSettingsManager sharedManager] forceReloadNow];
Event Handler
Objective C protocol
Create a subclass of NSObject that implements the following protocol.
@protocol AnemoneEventHandler
-(void)reloadTheme;
@end
Registering your protocol
To register your protocol, simply call addEventHandler: on ANEMSettingsManager (header available in https://github.com/AnemoneTeam/Anemone/wiki/Extensibility).
Note: ANEMSettingsManager must exist for this call to work. It is recommended to dlopen
AnemoneCore.dylib before you call addEventHandler: to make sure Anemone is present.