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

Posted

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.

Posted
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>

 

Posted
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

Posted

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.

Archived

This topic is now archived and is closed to further replies.

  • Our picks

    • Darkest Hero! v0.0.95 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Darkest Hero! By MINIDRAGON LTD
      Bundle ID: com.minidragon.randomdungeon
      App Store Link: https://apps.apple.com/us/app/darkest-hero/id6746927122?uo=4

      🤩 Hack Features

      - Unlimited Gems / Earn
      - Unlimited Red Crystal / Earn
      - Unlimited Gold / Earn
      - Unlimited Keys / Earn
      • 20 replies
    • Darkest Hero! v0.0.95 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Darkest Hero! By MINIDRAGON LTD
      Bundle ID: com.minidragon.randomdungeon
      App Store Link: https://apps.apple.com/us/app/darkest-hero/id6746927122?uo=4

      🤩 Hack Features

      - Unlimited Gems / Earn
      - Unlimited Red Crystal / Earn
      - Unlimited Gold / Earn
      - Unlimited Keys / Earn
      • 22 replies
    • Paradise Paws: Merge Animals v1.0.29 [ +12 Cheats ] Currency Max
      Modded/Hacked App: Animal Sanctuary By Wildlife Studios, Inc
      Bundle ID: com.wildlifestudios.merge.animal.sanctuary
      App Store Link: https://apps.apple.com/us/app/animal-sanctuary/id6741805691?uo=4
       

      🤩 Hack Features

      - Gems

      - Coins

      - Heart

      - Spin

      - LvL

      - Exp

      - Fog Auto Remove [ Linked With LvL ]

      - Premum Lands Unlocked [ Just Tap ]

      - Store Free [ IAP Not ]

      Note:- Game Close After Currency Hack Don't Worry
      • 46 replies
    • Paradise Paws: Merge Animals v1.0.29 [ +12 Jailed ] Currency Max
      Modded/Hacked App: Animal Sanctuary By Wildlife Studios, Inc
      Bundle ID: com.wildlifestudios.merge.animal.sanctuary
      App Store Link: https://apps.apple.com/us/app/animal-sanctuary/id6741805691?uo=4


      🤩 Hack Features

      - Gems

      - Coins

      - Heart

      - Spin

      - LvL

      - Exp

      - Fog Auto Remove [ Linked With LvL ]

      - Premum Lands Unlocked [ Just Tap ]

      - Store Free [ IAP Not ]

      Note:- Game Close After Currency Hack Don't Worry
      • 66 replies
    • Fairyland - Merge & Match v2.1.0 [ +4 Cheats ] Auto Win
      Modded/Hacked App: Fairyland - Merge & Match By 程程 姚
      Bundle ID: com.mergematch.fairyland
      App Store Link: https://apps.apple.com/us/app/fairyland-merge-match/id6740663230?uo=4
       

      🤩 Hack Features

      - Auto Win
      - Gems
      - Coins
      - Moves 99
      • 18 replies
    • Fairyland - Merge & Match v2.1.0 [ +4 Jailed ] Auto Win
      Modded/Hacked App: Fairyland - Merge & Match By 程程 姚
      Bundle ID: com.mergematch.fairyland
      App Store Link: https://apps.apple.com/us/app/fairyland-merge-match/id6740663230?uo=4


      🤩 Hack Features

      - Auto Win
      - Gems
      - Coins
      - Moves 99
      • 22 replies
    • Z Blast! v1.1.1 [ +6 Cheats ] Currency Max
      Modded/Hacked App: Z Blast! By UNIVERSAL MOBILE GAMES TECHNOLOGY CO., LIMITED
      Bundle ID: com.universal.mobile.fallen.city.game.ios
      App Store Link: https://apps.apple.com/ca/app/z-blast/id6752974187?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - DMG
      - Skill CD
      - Weapon CD
      - Skill Range
      - Weapon Range 
      • 9 replies
    • Z Blast! v1.1.1 [ +6 Jailed ] Currency Max
      Modded/Hacked App: Z Blast! By UNIVERSAL MOBILE GAMES TECHNOLOGY CO., LIMITED
      Bundle ID: com.universal.mobile.fallen.city.game.ios
      App Store Link: https://apps.apple.com/ca/app/z-blast/id6752974187?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - DMG
      - Skill CD
      - Weapon CD
      - Skill Range
      - Weapon Range
      • 6 replies
    • COTA Tower Defense - TD Game v1.0.7 [ +3 Cheats ] Currency Max
      Modded/Hacked App: COTA Tower Defense - TD Game By DAWNBRIGHT OYUN YAZILIM TEKNOLOJI ANONIM SIRKETI
      Bundle ID: games.dawnbright.cotatowerdefence
      App Store Link: https://apps.apple.com/ph/app/cota-tower-defense-td-game/id6752990977?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Star
      - Unlimited Base HP
      • 5 replies
    • COTA Tower Defense - TD Game v1.0.7 [ +3 Jailed ] Currency Max
      Modded/Hacked App: COTA Tower Defense - TD Game By DAWNBRIGHT OYUN YAZILIM TEKNOLOJI ANONIM SIRKETI
      Bundle ID: games.dawnbright.cotatowerdefence
      App Store Link: https://apps.apple.com/ph/app/cota-tower-defense-td-game/id6752990977?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Star
      - Unlimited Base HP
      • 6 replies
    • Weapon Master Idle: Action RPG v1.7.23 [ +17 Cheats ] Unlimited Gold
      Modded/Hacked App: Weapon Master Idle: Action RPG By Supercrack Inc.
      Bundle ID: io.supercrack.weaponmaster
      App Store Link: https://apps.apple.com/us/app/weapon-master-idle-action-rpg/id6737999086?uo=4
       
      🤩 Hack Features

      - Unlimited Gold / Drop Enemy
      - Unlimited EXP / Drop Enemy / Easy To Get Gems Faster Level UP Hero
      - Unlimited DMG
      - Unlimited HP
      - HP Reg Faster
      - Unlimited Critical Hit
      - Unlimited Super Critical Hit
      - Unlimited Ability Power
      - Unlimited  Armor
      - Unlimited Accuracy
      - Unlimited Evasion
      - Unlimited Magic Resistance
      - Hero Speed
      - Enemy Freeze
      - ATK Range
      - ATK Speed / Pet
      - ATK Speed / Hero
      • 8 replies
    • Weapon Master Idle: Action RPG v1.7.23 [ +17 Jailed ] Unlimited Gold
      Modded/Hacked App: Weapon Master Idle: Action RPG By Supercrack Inc.
      Bundle ID: io.supercrack.weaponmaster
      App Store Link: https://apps.apple.com/us/app/weapon-master-idle-action-rpg/id6737999086?uo=4

      🤩 Hack Features

      - Unlimited Gold / Drop Enemy
      - Unlimited EXP / Drop Enemy / Easy To Get Gems Faster Level UP Hero
      - Unlimited DMG
      - Unlimited HP
      - HP Reg Faster
      - Unlimited Critical Hit
      - Unlimited Super Critical Hit
      - Unlimited Ability Power
      - Unlimited  Armor
      - Unlimited Accuracy
      - Unlimited Evasion
      - Unlimited Magic Resistance
      - Hero Speed
      - Enemy Freeze
      - ATK Range
      - ATK Speed / Pet
      - ATK Speed / Hero
      • 6 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