CCUserDefault and Windows Phone 8.1 (WP8.1)

AlexSAlexS ✭✭✭USUniversity ✭✭✭

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.

Posts

  • kjpou1kjpou1 Xamurai LUMember, Xamarin Team Xamurai

    @AlexS

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

    Thanks for letting us know.

  • AlexSAlexS ✭✭✭ USUniversity ✭✭✭

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

  • kjpou1kjpou1 Xamurai LUMember, Xamarin Team Xamurai

    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.

  • AlexSAlexS ✭✭✭ USUniversity ✭✭✭

    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

  • kjpou1kjpou1 Xamurai LUMember, Xamarin Team Xamurai

    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.

  • AlexSAlexS ✭✭✭ USUniversity ✭✭✭

    @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.

  • kjpou1kjpou1 Xamurai LUMember, Xamarin Team Xamurai

    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.

  • AlexSAlexS ✭✭✭ USUniversity ✭✭✭

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

Sign In or Register to comment.