CCUserDefault and Windows Phone 8.1 (WP8.1) RRS feed

  • Question

  • User16951 posted

    Hi! I tried running my game which is using CCUserDefault class to store user settings on WP8.1 project. App crashes with following stack trace:

    System.NotSupportedException: Specified method is not supported. at Microsoft.Xna.Framework.Storage.ShowSelectorAsynchronousShowNoPlayer.BeginInvoke(Int32 sizeInBytes, Int32 directoryCount, AsyncCallback callback, Object object) at Microsoft.Xna.Framework.Storage.StorageDevice.BeginShowSelector(Int32 sizeInBytes, Int32 directoryCount, AsyncCallback callback, Object state) at CocosSharp.CCUserDefault.CheckStorageDevice() at CocosSharp.CCUserDefault..ctor() at CocosSharp.CCUserDefault.get_

    Please advise.

    Wednesday, July 8, 2015 7:18 AM

All replies

  • User68494 posted


    Opened an issue for this. Confirmed that there is a problem with CCUserDefault.

    Thanks for letting us know.

    Wednesday, July 8, 2015 3:50 PM
  • User16951 posted

    Kenneth, is there a way to workaround or fix that?

    Wednesday, July 8, 2015 3:56 PM
  • User68494 posted

    Unfortunately none right now. It will have to be fixed and submitted to MonoGame.

    You will be able to use it once it is fixed but will need to build from repo to get it before a new NuGet package will be available. No ETA for that right now to be honest.

    Wednesday, July 8, 2015 4:49 PM
  • User16951 posted

    Thank you for the honesty. I will use IoC and for WP81 use something with similar interface but not CCUserDefaults. Would you be kind as to look into orientation problem in WP8.1? My app runs only in landscape

    Wednesday, July 8, 2015 8:14 PM
  • User68494 posted

    I think I have the fix but needs to be tested a little more as ran into a little problem on WindowsDX platform so need to account for that platform now. Will submit the fix to MonoGame probably today but it will be in our MonoGame xamarin branch before then.

    You can try the Xamarin.Plugins Settings. Then you will not have to use different programs for your settings.

    Will take a look at the rotation on WP81 when I get this submitted.

    Thursday, July 9, 2015 4:02 AM
  • User16951 posted

    @kjpou1 thank you, so far I was just able to use #ifdef and use ApplicationData.RoamingSettings instead of CCUserDefault for WP81. No rush on that :) because I worked that around. Regarding rotation, I submitted pull request to cocossharp already with fix, so if you include that into next nuget version, then cool.

    Thursday, July 9, 2015 4:07 AM
  • User68494 posted

    No problem. Here is the link to the NuGet for the Settings instead of the github if change your mind. No #ifdef in your code.

    Thursday, July 9, 2015 4:38 AM
  • User16951 posted

    Good, I will see and use it as soon as I sort out another PCL-WP81 issue

    Thursday, July 9, 2015 5:37 AM