Jump to content

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


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.

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>

 

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

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

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

    • Earn to Die Rogue v1.9.151 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Earn to Die Rogue By Not Doppler Pty Limited
      Bundle ID: com.notdoppler.earntodierogue
      iTunes Store Link: https://apps.apple.com/us/app/earn-to-die-rogue/id1564024870?uo=4


      Hack Features:
      - Unlimited Cash
      - Unlimited Gold
      - Unlimited Skill Tree Tokens


      Jailbreak required hack(s): [Mod Menu Hack] Earn to Die Rogue v1.00.96 +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/
      • 217 replies
    • Earn to Die Rogue v1.9.151 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Earn to Die Rogue By Not Doppler Pty Limited
      Bundle ID: com.notdoppler.earntodierogue
      iTunes Store Link: https://apps.apple.com/us/app/earn-to-die-rogue/id1564024870?uo=4


      Hack Features:
      - Unlimited Cash
      - Unlimited Gold
      - Unlimited Skill Tree Tokens


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Earn to Die Rogue v1.00.96 +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/
      • 134 replies
    • Slime Legion v2.10.0 +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Slime Legion By Perfeggs
      Bundle ID: com.hero.may.cry.adventure.game
      iTunes Store Link: https://apps.apple.com/us/app/slime-legion/id1664686966
       

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - Custom Moves


      Jailbreak required hack(s): https://iosgods.com/topic/173174-slime-legion-v162-3-cheats-damage-defence/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 141 replies
    • Slime Legion v2.10.0 +3 Cheats [ Damage & Defence ]
      Modded/Hacked App: Slime Legion By Perfeggs
      Bundle ID: com.hero.may.cry.adventure.game
      iTunes Store Link: https://apps.apple.com/us/app/slime-legion/id1664686966
       

      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - Custom Moves


      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/
      • 133 replies
    • Hot in Hollywood v1.10 +1++ Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Hot in Hollywood By SodeePI Labs, LLC
      Bundle ID: com.sodeepilabs.glamsquad
      iTunes Store Link: https://apps.apple.com/gb/app/hot-in-hollywood/id1604253094?uo=4


      Hack Features:
      - Unlimited Currencies


      Jailbreak required hack(s): [Mod Menu Hack] Hot in Hollywood v0.90 +1++ 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/
      • 70 replies
    • Hot in Hollywood v1.10 +1++ Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Hot in Hollywood By SodeePI Labs, LLC
      Bundle ID: com.sodeepilabs.glamsquad
      iTunes Store Link: https://apps.apple.com/gb/app/hot-in-hollywood/id1604253094?uo=4


      Hack Features:
      - Unlimited Currencies


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Hot in Hollywood v0.90 +1++ 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/
      • 24 replies
    • Idle Breaker v1.3.1 +5++ Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Idle Breaker By Estoty LLC
      Bundle ID: com.idlesurvivor.game
      iTunes Store Link: https://apps.apple.com/us/app/idle-breaker/id6448195469?uo=4


      Hack Features:
      - Unlimited Everything -> Earn some.
      - Damage Multiplier
      - Health Multiplier
      - Tool Damage Multiplier
      - Move Speed Multiplier


      Jailbreak required hack(s): [Mod Menu Hack] Idle Breaker v1.0.31 +5++ Cheats [ Unlimited Everything ] - 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/
      • 55 replies
    • Idle Breaker v1.3.1 +5++ Cheats [ Unlimited Everything ]
      Modded/Hacked App: Idle Breaker By Estoty LLC
      Bundle ID: com.idlesurvivor.game
      iTunes Store Link: https://apps.apple.com/us/app/idle-breaker/id6448195469?uo=4


      Hack Features:
      - Unlimited Everything -> Earn some.
      - Damage Multiplier
      - Health Mulitplier
      - Tool Damage Multiplier
      - Speed Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Idle Breaker v1.0.31 +4++ Jailed Cheats [ Unlimited Everything ] - 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/
      • 61 replies
    • The Goldbergs: Back to the 80s v3.4.2619 +1++ Cheats [ Unlimited Currencies ]
      Modded/Hacked App: The Goldbergs: Back to the 80s By Eastside Games
      Bundle ID: com.eastsidegames.thegoldbergs
      iTunes Store Link: https://apps.apple.com/us/app/the-goldbergs-back-to-the-80s/id1479487519
       

      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] The Goldbergs: Back to the 80s ( All Versions ) +1++ 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/
      • 11 replies
    • The Goldbergs: Back to the 80s v3.4.2619 +1++ Cheats [ Unlimited Currencies ]
      Modded/Hacked App: The Goldbergs: Back to the 80s By Eastside Games
      Bundle ID: com.eastsidegames.thegoldbergs
      iTunes Store Link: https://apps.apple.com/us/app/the-goldbergs-back-to-the-80s/id1479487519
       

      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] The Goldbergs: Back to the 80s v2.6.2316 +1++ 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/
      • 4 replies
    • House Flipper Home Design v1.490 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: House Flipper Home Design By PLAYWAY SPOLKA AKCYJNA
      Bundle ID: com.imaginalis.HouseFlipperMobile
      iTunes Store Link: https://apps.apple.com/us/app/house-flipper-home-design/id1517373437
       

      Hack Features:
      - Unlimited Cash -> Exchange Flipcoins for Cash to earn an unlimited amount.
      - Unlimited Flipcoins -> Exchange Flipcoins for Cash to earn an unlimited amount.


      Jailbreak required hack(s): https://iosgods.com/topic/169137-exclusive-house-flipper-home-design-all-versions-2-cheats-unlimited-currencies/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 118 replies
    • House Flipper Home Design v1.490 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: House Flipper Home Design By PLAYWAY SPOLKA AKCYJNA
      Bundle ID: com.imaginalis.HouseFlipperMobile
      iTunes Store Link: https://apps.apple.com/us/app/house-flipper-home-design/id1517373437
       

      Hack Features:
      - Unlimited Cash -> Exchange Flipcoins for Cash to earn an unlimited amount.
      - Unlimited Flipcoins -> Exchange Flipcoins for Cash to earn an unlimited amount. 


      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/
      • 121 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