Skip to content
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

rename plist file for AppContainer settings #45

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

p-x9
Copy link
Owner

@p-x9 p-x9 commented Aug 2, 2023

Renamed settings file from settings.plist to com.p-x9.AppContainer.settings.plist.

closes #38

Warning
Information on the currently active container will be lost.
This change will not cause any loss of information for containers other than the currently active container.

If you want to carry over information created in previous versions, you will need to rename the file as follows.

let fileManager = FileManager.default

let home = NSHomeDirectory()
// If you are using it for App Group, change as follows
// let home = fileManager.containerURL(forSecurityApplicationGroupIdentifier: "YOUR APP GROUP IDENTIFIER")!.absoluteString

let libraryPath = home + "/Library"

let oldPath = libraryPath + "/settings.plist"
let newPath = libraryPath + "/com.p-x9.AppContainer.settings.plist"

guard fileManager.fileExists(atPath: oldPath) else { return }
try? fileManager.moveItem(atPath: oldPath, toPath: newPath)

@p-x9 p-x9 merged commit fddeb73 into main Aug 3, 2023
@p-x9 p-x9 deleted the feature/rename-setting-file branch August 3, 2023 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename appContainer Settings Plist
1 participant