I had created an app that request the full disk access but I don’t now how can I get my app to show up in the Fuol Disk Access list. Excuse me for my bad English.
Post
Replies
Boosts
Views
Activity
let applicationSupport = NSURL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true)[0])
let launcherdir = applicationSupport.appendingPathComponent("MyApp")
do {
try FileManager.default.createDirectory(atPath: launcherdir!.path, withIntermediateDirectories: true, attributes: nil)
} catch {
print(error)
}
Is there an API that allows to my app to read the info/modify the info of an iDevice connected to the Mac?
I want that a JavaScript Check if the website was opened from safari or from a webclip.
how can I?
How can I get the list of the connected iPod to the Mac?
I'm using Swift 5.5 and Xcode 13.4.1
i want to add to my app an init view like GarageBand. how can I?
can I create a json array without key? An example:
{
[
{
"id":1,
"name":"Otto Matic",
"icon":"",
"developer":"Pangea Software"
},
{
"id":2,
"name":"Minecraft",
"icon":"",
"developer":"Mojang"
}
]
}
How can I create a new window in SwiftUI?
I'm using:
Swift 5.6.1
Xcode 13.4.1
macOS 12.4
Can I use apple virtualization in swiftUI? the tutorials use the Storyboard so I don't now if is possible.
how can i get the directory from which the executable is started?
cd Hello
mycommand
i want to get the directory where the user is when the user start the command.
I'm creating an app to clean all the trash on the mac, my app cleans user and system cache but how can I get the app's cache directories?
i want to remove all the files in /Library/Caches, /System/Library/Caches.
How can i get the right permissions to do that in my app?
I'm using Swift 5
How can I erase an usb device in swift?
What is the error in this code?
@main
struct CollectionManagerApp: App {
init() {
do {
var bo: ObjCBool = true
let library = try FileManager().url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: false).appending(path: "CollectionManager")
let database = library.appendingPathComponent("DataBase.plist")
if !FileManager().fileExists(atPath: library.absoluteString) {
try FileManager().createDirectory(at: library, withIntermediateDirectories: false)
}
if !FileManager().fileExists(atPath: database.absoluteString) {
FileManager().createFile(atPath: database.absoluteString, contents: nil)
print("OK")
}
} catch {
print("Init Error: \(error)\nEND")
}
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
The error:
Init Error: Error Domain=NSCocoaErrorDomain Code=516 "The file “CollectionManager” couldn’t be saved in the folder “Application Support” because a file with the same name already exists." UserInfo={NSFilePath=/Users/gattino09/Library/Application Support/CollectionManager, NSUnderlyingError=0x600003ba0150 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}
END
I need to search some informations about some apps on App Store but by searching online I can find any information about APIs to do that. Do they exist?