Preferences Continually Resetting

I'm having an issue where the preferences of my tweak are continually resetting. To explain further, lets say I have two preferences cells, one is a toggle and one is a color picker.

  1. I toggle the switch ON

  2. I touch the color picker which brings me to a pane to select a color.

  3. I select a color and am returned to the tweak preferences.

  4. All good so far.

  5. Click on another tweaks' preferences and then click back to my tweak preferences.

  6. The toggle is now off.

If necessary I can make a video. I have all the code on github but its a private project that I wasn't looking to open up until its released(which would be soon once this is fixed).

Relevant information: This problem is occurring on 8.4 (I would imagine iOS8 in general too). My tweak needs to operate in a sandboxed environment and thus I use Karens method specified in here to write to my plist:

http://iphonedevwiki.net/index.php/PreferenceBundles#Loading_Preferences_into_unsandboxed_processes_.28using_CFPreferences.29

Has anyone ran into this problem before?

Thanks.

Edit: Solution -> use libcolorpickers' PFColorAlert and in the call back write the value to your preferences plist. Looking at (void)alertUILabelText (https://bitbucket.org/rob311/pflibcolorpickerexample/src/e64b46b23f9ea6bb50c74aecbfecc2b23538aa19/pflibcolorpickerexampleprefs/PFLibColorPickerExamplePrefsListController.mm?at=master) should further explain the concept if not clear.

Posted Aug 5, 2015, 2:13 AM UTC · edited

111
Loading comments…