locked
Warning in Certification from selecting "documentsLibrary" capability

    Question

  • Finally completed writing my game/app, but am getting a warning from the Certification SDK:

    • The app has declared the documentsLibrary capability.

    I thought I HAD to declare this if I am saving a Save File for my game. Was I incorrect? Can I drop the declaration and still read/write my save files in the user's default document location?

    Saturday, December 22, 2012 7:33 PM

All replies

  • Hi EwanG,

    Based on my understanding, if your app or game only need to read or save file with user-demand (instead of programmtically access the files in some well-known folders without user awareness), then you can just use the file pickers without declaring the certain folder permissions (such as Music Library, Picture Library or Document Library capabilities).

    #Quickstart: Accessing files with file pickers(Windows Store apps using JavaScript and HTML) (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/hh465199.aspx


    #How to save files through file pickers (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/jj150595.aspx


    Those capabilities are mainly used for those app which will directy access/manipulate files in the certain folders without informing the users (user might not be awared or interacted during the file accessing).


    #App capability declarations (Windows Store apps) (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx


    Here is a blog article which also mentions some suggestion on dealing with security and permissions when building windows store apps:


    #Security best practices for building Windows Store apps
    http://blogs.msdn.com/b/windowsappdev/archive/2012/12/18/security-best-practices-for-building-windows-store-apps.aspx


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 24, 2012 5:54 AM
    Moderator
  • Given that it is "ok" for folks registering as companies to use the DocumentLibrary capability, I'm not sure I see the security advantage to forcing a SAVE file to be placed elsewhere. In fact I really would prefer "not" to use the File Picker as that can encourage folks to name the file in a way that might make finding it later hard (for me and the user). I was able to get past this using the "LocalFolder" option to save it in the same directory the app is saved in. The problem is that if I ever need to help a user debug something, we are both going to spend time trying to find the file.



    Might I suggest for future file example programs that y'all at least show the LocalFolder option?
    Monday, December 24, 2012 2:08 PM