Jump to content

who and when will create preference bundle file in /var/mobile/Library/Preferences/tweakid.plist


CookieFJ

4 posts in this topic

Recommended Posts

Thanks for the preference template.

Just noted that the initialization not correct as I expected.

value not same as in Root.plist. looks like random value.

in %ctor, tried to fetch the value from /var/mobile/Library/Preferences/tweakid.plist, but failed since I can't find the plist file in Filza.

After do some setting in tweak setting, the plist file was created. Then the values are synced up with setting.

Question: who and when will create preference bundle file?

Thanks.

Link to comment
Share on other sites

static void loadPrefs() {
	NSMutableDictionary *settings = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.youcompany.tweakprefs.plist"];

	isEnabled		= ( [settings objectForKey:@"isEnabled"] ? [[settings objectForKey:@"isEnabled"] boolValue] : isEnabled );
	isRecent		= ( [settings objectForKey:@"isRecent"] ? [[settings objectForKey:@"isRecent"] boolValue] : isRecent );
	nRecent 		= ( [settings objectForKey:@"nRecent"] ? [[settings objectForKey:@"nRecent"] intValue] : nRecent );
}

%ctor {
    loadPrefs();
    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)loadPrefs, CFSTR("com.youcompany.tweakprefs.prefschanged"), NULL, CFNotificationSuspensionBehaviorCoalesce);
}


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>items</key>
	<array>
		<dict>
			<key>cell</key>
			<string>PSGroupCell</string>
			<key>footerText</key>
			<string>turn on to make this tweak function</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.yourcompany.tweakprefs</string>
			<key>key</key>
			<string>isEnabled</string>
			<key>label</key>
			<string>Enable</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSGroupCell</string>
			<key>footerText</key>
			<string>Options</string>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<true/>
			<key>defaults</key>
			<string>com.youcompany.tweakprefs</string>
			<key>PostNotification</key>
			<string>com.youcompany.tweakprefs.prefschanged</string>
			<key>key</key>
			<string>isRecent</string>
			<key>label</key>
			<string>Show Recent</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSTextCell</string>
			<key>label</key>
			<string>Recent Number </string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSliderCell</string>
			<key>defaults</key>
			<string>com.youcompany.tweakprefs</string>
			<key>default</key>
			<integer>3</integer>
			<key>min</key>
			<integer>1</integer>
			<key>max</key>
			<integer>5</integer>
			<key>isSegmented</key>
			<true/>
			<key>segmentCount</key>
			<integer>4</integer>
			<key>showValue</key>
			<true/>
			<key>key</key>
			<string>nRecent</string>
		</dict>
	</array>
	<key>title</key>
	<string>Tweak Setting</string>
</dict>
</plist>

 

Link to comment
Share on other sites

4 hours ago, CookieFJ said:

static void loadPrefs() {
	NSMutableDictionary *settings = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.youcompany.tweakprefs.plist"];

	isEnabled		= ( [settings objectForKey:@"isEnabled"] ? [[settings objectForKey:@"isEnabled"] boolValue] : isEnabled );
	isRecent		= ( [settings objectForKey:@"isRecent"] ? [[settings objectForKey:@"isRecent"] boolValue] : isRecent );
	nRecent 		= ( [settings objectForKey:@"nRecent"] ? [[settings objectForKey:@"nRecent"] intValue] : nRecent );
}

%ctor {
    loadPrefs();
    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)loadPrefs, CFSTR("com.youcompany.tweakprefs.prefschanged"), NULL, CFNotificationSuspensionBehaviorCoalesce);
}


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>items</key>
	<array>
		<dict>
			<key>cell</key>
			<string>PSGroupCell</string>
			<key>footerText</key>
			<string>turn on to make this tweak function</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.yourcompany.tweakprefs</string>
			<key>key</key>
			<string>isEnabled</string>
			<key>label</key>
			<string>Enable</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSGroupCell</string>
			<key>footerText</key>
			<string>Options</string>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<true/>
			<key>defaults</key>
			<string>com.youcompany.tweakprefs</string>
			<key>PostNotification</key>
			<string>com.youcompany.tweakprefs.prefschanged</string>
			<key>key</key>
			<string>isRecent</string>
			<key>label</key>
			<string>Show Recent</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSTextCell</string>
			<key>label</key>
			<string>Recent Number </string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSliderCell</string>
			<key>defaults</key>
			<string>com.youcompany.tweakprefs</string>
			<key>default</key>
			<integer>3</integer>
			<key>min</key>
			<integer>1</integer>
			<key>max</key>
			<integer>5</integer>
			<key>isSegmented</key>
			<true/>
			<key>segmentCount</key>
			<integer>4</integer>
			<key>showValue</key>
			<true/>
			<key>key</key>
			<string>nRecent</string>
		</dict>
	</array>
	<key>title</key>
	<string>Tweak Setting</string>
</dict>
</plist>

 

/var/mobile/Library/Preferences/xxxxxxx.plist is create when the "setting > yourhack" made changes

Toggle switch or enter string.

the plist will auto generate when you change something inside Setting.

inside the plist you set.

com.youcompany.tweakprefs

this need to change to your key.

com.abcde.appname

so your plist should auto named:

com.abcde.appname.plist

  • Like 1
Link to comment
Share on other sites

Thank you for your answer. I got it.

May I have further questions:

Preference not initialize as Root.plist expected. For example, nRecent slider indicates 2 but not default 3. What will cause this?

 

Update: looks it is set to previous value before uninstalled. So, there should be somewhere to save tweak's preference besides /var/mobile/Library/Preferences/xxxxxxx.plist or Root.plist. I made sure these 2 files do not exist before I re-install my tweak.

Updated by CookieFJ
update
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Our picks

    • Gun Run: Auto Shooting Sniper v1.0.19 +5 Cheats
      Modded/Hacked App: Gun Run: Auto Shooting Sniper By Pitado Viet Nam JSC
      Bundle ID: com.zitga.gunrun.auto.shooting.sniper.action.game
      iTunes Store Link: https://apps.apple.com/us/app/gun-run-auto-shooting-sniper/id6474717017?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Never Die
      - Add Gold -> Settings -> Tap On Contact Support
      - Add Gems -> Settings -> Tap On Sound
      - Unlock All Heroes -> Settings -> Tap On Music
      - Unlock All Items -> Settings -> Tap On Vibrate


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 2 replies
    • Blushed - Romance Choices v1.1.7 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Blushed - Romance Choices By SONIDORICO APPS LIMITED
      Bundle ID: com.sonidorico.blushed
      iTunes Store Link: https://apps.apple.com/us/app/blushed-romance-choices/id6466787923?uo=4


      Hack Features:
      - Unlimited Hearts -> Earn some.
      - Unlimited Keys -> Earn some.


      Jailbreak required hack(s): [Mod Menu Hack] Blushed - Romance Choices v1.1.4 +2 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 9 replies
    • Blushed - Romance Choices v1.1.7 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Blushed - Romance Choices By SONIDORICO APPS LIMITED
      Bundle ID: com.sonidorico.blushed
      iTunes Store Link: https://apps.apple.com/us/app/blushed-romance-choices/id6466787923?uo=4


      Hack Features:
      - Unlimited Hearts -> Earn some.
      - Unlimited Keys -> Earn some.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Blushed - Romance Choices v1.1.4 +2 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 6 replies
    • Soul Light: Idle RPG War v59 +4 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Soul Light: Idle RPG War By ACTIONFIT Ltd.
      Bundle ID: com.idle.afk.soul.light.rpg
      iTunes Store Link: https://apps.apple.com/us/app/soul-light-idle-rpg-war/id6469476819?uo=4


      Hack Features:
      - God Mode
      - Unlimited Gold -> Will increase instead of decrease.
      - Unlimited Emerald -> Will increase instead of decrease.
      - Unlimited Dungeon Keys


      Jailbreak required hack(s): [Mod Menu Hack] Soul Light: Idle RPG War v1.6.2 +4 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 26 replies
    • Soul Light: Idle RPG War v59 +4 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Soul Light: Idle RPG War By ACTIONFIT Ltd.
      Bundle ID: com.idle.afk.soul.light.rpg
      iTunes Store Link: https://apps.apple.com/us/app/soul-light-idle-rpg-war/id6469476819?uo=4


      Hack Features:
      - God Mode
      - Unlimited Gold -> Will increase instead of decrease.
      - Unlimited Emerald -> Will increase instead of decrease.
      - Unlimited Dungeon Keys


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Soul Light: Idle RPG War v1.6.2 +4 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 30 replies
    • Little Piggy Defense v1.04.21 +1 Jailed Cheat [ God Mode ]
      Modded/Hacked App: Little Piggy Defense By Game Duo Co.,Ltd.
      Bundle ID: net.gameduo.tbd
      iTunes Store Link: https://apps.apple.com/us/app/little-piggy-defense/id6467606457?uo=4


      Hack Features:
      - God Mode


      Jailbreak required hack(s): [Mod Menu Hack] Little Piggy Defense v1.00.11 +3 Cheats [ Damage & Defence ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Like
      • 31 replies
    • Little Piggy Defense v1.04.21 +3 Cheats [ Damage & Defence ]
      Modded/Hacked App: Little Piggy Defense By Game Duo Co.,Ltd.
      Bundle ID: net.gameduo.tbd
      iTunes Store Link: https://apps.apple.com/us/app/little-piggy-defense/id6467606457?uo=4


      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - Tower Defence Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Little Piggy Defense v1.00.11 +1 Jailed Cheat [ God Mode ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 57 replies
    • Garden Affairs: Design & Match v2.5403 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Garden Affairs: Design & Match By JUDIAN TECHNOLOGY INTERNATIONAL PTE. LTD.
      Bundle ID: com.huayuan.xiaochu
      iTunes Store Link: https://apps.apple.com/us/app/garden-affairs-design-match/id1514355595?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Stars


      Jailbreak required hack(s): [Mod Menu Hack] Garden Affairs: Design & Match v2.4601 +2 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Like
      • 28 replies
    • Garden Affairs: Design & Match v2.5403 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Garden Affairs: Design & Match By JUDIAN TECHNOLOGY INTERNATIONAL PTE. LTD.
      Bundle ID: com.huayuan.xiaochu
      iTunes Store Link: https://apps.apple.com/us/app/garden-affairs-design-match/id1514355595?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Stars


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Garden Affairs: Design & Match v2.4601 +2 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 32 replies
    • Mystery Matters v2.0.0 +1 Jailed Cheat [ Unlimited Moves ]
      Modded/Hacked App: Mystery Matters By Playrix
      Bundle ID: com.playrix.mystery-matters
      iTunes Store Link: https://apps.apple.com/us/app/mystery-matters/id6450447751
       

      Hack Features:
      - Unlimited Moves -> Will not decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Mystery Matters v1.4.0 +1 Cheat [ Unlimited Moves ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Like
      • 23 replies
    • Mystery Matters v2.0.0 +1 Cheat [ Unlimited Moves ]
      Modded/Hacked App: Mystery Matters By Playrix
      Bundle ID: com.playrix.mystery-matters
      iTunes Store Link: https://apps.apple.com/us/app/mystery-matters/id6450447751
       

      Hack Features:
      - Unlimited Moves -> Will not decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Mystery Matters v1.4.0 +1 Jailed Cheat [ Unlimited Moves ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Winner
      • 23 replies
    • Save the Masters v1.1.4 +3 Jailed Cheats [ Unlimited Coins ]
      Modded/Hacked App: Save the Masters By Playgendary Limited
      Bundle ID: com.inape.savethemasters
      iTunes Store Link: https://apps.apple.com/us/app/save-the-masters/id1576849451
       

      Hack Features:
      - Unlimited Coins
      - Unlock All Costumes
      -- No Ads


      Jailbreak required hack(s): https://iosgods.com/topic/163576-save-the-masters-v112-4-cheats-unlimited-coins/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 3 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines