Ad
Creating Hidden/private Directories FileManager Swift
My app needs to have a hidden/private(if possible) folder for storing audio files that the app generates itself. This audio files are used to build Database where only the App can populate and delete if needed.
The only activity that the user is able to do is exporting some of this file in a folder called "exported" into either the share folder or the iCloud.
The question is, how do I create this hidden/private folder where a User has no permissions?
Ad
Answer
lazy var documentsUrl:URL = { return fileManager.urls(for: .documentDirectory, in: .userDomainMask).first! }()
lazy var appInternalMusic:URL = { documentsUrl.appendingPathComponent(".InternalFolder") }()
try! fileManager.createDirectory(at: appInternalMusic, withIntermediateDirectories: true, attributes: nil)
Ad
source: stackoverflow.com
Related Questions
- → Function Undefined in Axios promise
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Click to navigate on mobile devices
- → Playing Video - Server is not correctly configured - 12939
- → How to allow api access to android or ios app only(laravel)?
- → Axios array map callback
- → Access the Camera and CameraRoll on Android using React Native?
- → Update React [Native] View on Day Change
- → Shopify iOS SDK - issue converting BuyProductVariant to BuyProduct
- → BigCommerce and shopify API
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → React Native - Differences between Android and IOS
- → What is the difference between React Native and React?
Ad