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

    • CookieRun: Kingdom v7.0.001 Jailed Cheats +3
      Modded/Hacked App: CookieRun: Kingdom By Devsisters Corp.
      Bundle ID: com.devsisters.ck
      App Store Link: https://apps.apple.com/us/app/cookierun-kingdom/id1509450845?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Multiply Attack
      - Multiply Defense
      - No Skills Cooldown
       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/201150-cookierun-kingdom-v610001-jailed-cheats-3/
        • Informative
        • Agree
        • Like
      • 90 replies
    • War Inc: Rising v0.8.2 Jailed Cheats +3
      Modded/Hacked App: War Inc: Rising By SamShui Corporation
      Bundle ID: com.i89trillion.strategy.rising
      App Store Link: https://apps.apple.com/us/app/war-inc-rising/id6747767390?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - God Mode
      - One Hit Kill
      - Auto Win

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/202371-war-inc-rising-v080-jailed-cheats-3/
      • 14 replies
    • Angry Birds Dream Blast Cheats v1.99.1 +3
      Modded/Hacked App: Angry Birds Dream Blast By Rovio Entertainment Oyj
      Bundle ID: com.rovio.dream
      iTunes Store Link: https://apps.apple.com/us/app/angry-birds-dream-blast/id1432579280?uo=4


      Hack Features:
      - Infinite Moves
      - Infinite Lives
      - Infinite Boosters


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/149687-angry-birds-dream-blast-v1340-jailed-cheats-3/


      iOS Hack Download Link: https://iosgods.com/topic/149684-angry-birds-dream-blast-cheats-all-versions-3/
        • Agree
        • Winner
        • Like
      • 117 replies
    • Toy Blast Cheats (Auto Update) +6
      Modded/Hacked App: Toy Blast By Peak Games
      Bundle ID: net.peakgames.amy
      iTunes Store Link: https://itunes.apple.com/us/app/toy-blast/id890378044?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite Hearts
      - Infinite Coins
      - Infinite Boosters
      - Never Lose
      - High Score
      - Always 3 Stars


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/73056-arm64-toy-blast-v5431-jailed-cheats-3/


      Hack Download Link: https://iosgods.com/topic/73037-arm64-toy-blast-cheats-v5475-6/



      Credits:
      - @Laxus
      • 641 replies
    • PewDiePie's Tuber Simulator Cheats (Auto Update) +3
      Modded/Hacked App: PewDiePie's Tuber Simulator By Outerminds Inc.
      Bundle ID: com.outerminds.tubular
      iTunes Store Link: https://apps.apple.com/us/app/pewdiepies-tuber-simulator/id1093190533?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Infinite Subscriber
      - Infinite Views
      - Infinite Bux

      NOTE: Please complete tutorial first before enabling the hacks otherwise it won't work

      NOTe 2: Please make a youtube video to get some views first (without hack) then before enable infinite views

       

      Non-Jailbroken Hack: https://iosgods.com/topic/86411-pewdiepies-tuber-simulator-v2450-jailed-cheats-3/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/86366-pewdiepies-tuber-simulator-cheats-v2460-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,184 replies
    • FR Legends Cheats v0.4.2 +3
      Modded/Hacked App: FR LEGENDS By FENG LI
      Bundle ID: com.fengiiley.frlegends
      iTunes Store Link: https://itunes.apple.com/us/app/fr-legends/id1435740083?mt=8&uo=4&at=1010lce4


      Hack Features:
      - Custom Gold (Enter the value you want and enable the switch)
      - Custom Cash
      - Infinite Layer


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/79729-arm64-fr-legends-v027-jailed-cheats-3/


      Hack Download Link: https://iosgods.com/topic/79816-arm64-fr-legends-cheats-v029-3/
        • Agree
        • Haha
        • Winner
        • Like
      • 641 replies
    • Rick and Morty: Pocket Mortys v2.41.0 Jailed Cheats +1
      Modded/Hacked App: Rick and Morty: Pocket Mortys by Turner Broadcasting System, Inc.
      Bundle ID: com.turner.pocketmorties
      iTunes Store Link: https://itunes.apple.com/us/app/rick-and-morty-pocket-mortys/id992640880?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite Schmeckles
      - Infinite Coupons


      Hack Download Link: https://iosgods.com/topic/86695-arm64-rick-and-morty-pocket-mortys-v271-jailed-cheats-2/
        • Informative
        • Agree
        • Winner
        • Like
      • 453 replies
    • [ Push Hero: Idle RPG ] 푸시 히어로: 방치형 RPG 키우기 v0.40.12 Jailed Cheats +4
      Modded/Hacked App: 푸시 히어로: 방치형 RPG 키우기 By MalangGames Corp.
      Bundle ID: com.malang.store.finalidle
      App Store Link: https://apps.apple.com/kr/app/%ED%91%B8%EC%8B%9C-%ED%9E%88%EC%96%B4%EB%A1%9C-%EB%B0%A9%EC%B9%98%ED%98%95-rpg-%ED%82%A4%EC%9A%B0%EA%B8%B0/id6476646717?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - God Mode
      - Multiply Attack
      - Freeze Currencies
      - Premium
      - Support English

       

      Jailbroken Hack: https://iosgods.com/topic/204528-push-hero-idle-rpg-%ED%91%B8%EC%8B%9C-%ED%9E%88%EC%96%B4%EB%A1%9C-%EB%B0%A9%EC%B9%98%ED%98%95-rpg-%ED%82%A4%EC%9A%B0%EA%B8%B0-cheats-v04011-4/

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/204527-push-hero-idle-rpg-%ED%91%B8%EC%8B%9C-%ED%9E%88%EC%96%B4%EB%A1%9C-%EB%B0%A9%EC%B9%98%ED%98%95-rpg-%ED%82%A4%EC%9A%B0%EA%B8%B0-v04011-jailed-cheats-4/
      • 3 replies
    • Love Eden: Chapters of Romance v2.0.2 +10++ Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: Love Eden: Chapters of Romance By NODERNO LIMITED
      Bundle ID: com.noderno.loveeden
      App Store Link: https://apps.apple.com/us/app/love-eden-chapters-of-romance/id6471411677?uo=4

       


      🤩 Hack Features

      - Debug Menu -> Head over to your profile and then tap on Settings.
      • 7 replies
    • Grand War: Rome Strategy Games v1233 +5 Mods [ Damage & Defence ]
      Mod APK Game Name: Grand War: Rome Strategy Games By Joynow Studio
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.rome.caesar.war.strategy.conqueror.games

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - Unlimited Silver
      - Unlimited Gold
      - Unlimited Medals
      • 1 reply
    • Love Eden: Interactive Stories v2.0.2 +10++ Mods [ Debug Menu ]
      Mod APK Game Name: Love Eden: Interactive Stories By Noderno Limited
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.noderno.loveeden

       

      🤩 Hack Features

      - Debug Menu -> Head over to your profile and then tap on Settings. 
      • 1 reply
    • Grand War: Rome Strategy Games v2.4.1 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Grand War: Rome Strategy Games By HangZhouCaiLingTechnology.Co., Limited
      Bundle ID: com.rome.caesar.war.strategy.conqueror.games.2021
      iTunes Store Link: https://apps.apple.com/us/app/grand-war-rome-strategy-games/id1593989305?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - Unlimited Silver
      - Unlimited Gold
      - Unlimited Medals
        • Agree
        • Like
      • 45 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