-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing implementation for NSFileManager containerURLForSecurityApplicationGroupIdentifier #2295
Comments
It is not a matter of a missing API, application group identifiers are a platform feature. The closest approximation of this for UWPs is the publisher shared cache folder. It has several caveats: See documentation Publisher Cache Folder
We should be able to implement the said API with these caveats. Also the app manifest needs to be updated. This may possibly be done automatically by vsimporter. https://blogs.windows.com/buildingapps/2016/05/24/sharing-your-local-app-data/ |
Also need samples - in the winobjc-samples repo that demo this. |
The reference platform has a concept of an application-group entitlement which allows apps made by the same publisher to share folders and semaphores. The shared folders can be accessed through -[NSFileManager containerURLForSecurityApplicationGroupIdentifier:] which will return an NSURL pointing to the shared folder with the given name if one exists. These folders are declared in an entitlements file separate from the main .pbxproj and info.plist where other settings are stored, and is pointed at by the value with key CODE_SIGN_ENTITLEMENTS in the PBXNativeTarget's Build Configurations. Here, the shared folders are implemented using Windows' Publisher Cache Folders, which also allow files to be shared in designated folders between apps of the same publisher, but with the caveat that users can clear the data at any time so it should not be used as the sole storage for key data. VSImporter has been modified to check if CODE_SIGN_ENTITLEMENTS exists, and if it does, read the file and look for com.apple.security.application-groups, which will contain an array of folder names which are to be shared. The reference platform specifies the format which folders must be named, but Publisher Cache Folders does not have such a restriction for names so any valid folder names will be taken and used. -[NSFileManager containerURLForSecurityApplicationGroupIdentifier:] is implemented by checking if a Publisher Cache Folder of the given name, and if it does returning an NSURL to it. Fixes #2295 Fixes #2307 * Add support for containerURLs through Publisher Cache Folders * Use absolute path instead * Leftover includes; comments
It's used by alakoring to load/save game data and currently causes a crash.
The text was updated successfully, but these errors were encountered: