mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-16 12:30:29 +00:00
specific file types
This commit is contained in:
parent
8160c3b701
commit
919b023377
2 changed files with 10 additions and 2 deletions
|
|
@ -6,6 +6,7 @@
|
|||
//
|
||||
|
||||
import SwiftUI
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
struct HomeView: View {
|
||||
@AppStorage("username") private var username = "User"
|
||||
|
|
@ -104,7 +105,10 @@ struct HomeView: View {
|
|||
refreshBackground()
|
||||
checkPairingFileExists()
|
||||
}
|
||||
.fileImporter(isPresented: $isShowingPairingFilePicker, allowedContentTypes: [.data, .item]) { result in
|
||||
.fileImporter(
|
||||
isPresented: $isShowingPairingFilePicker,
|
||||
allowedContentTypes: [UTType(filenameExtension: "plist")!, UTType(filenameExtension: "mobiledevicepairing")!]
|
||||
) { result in
|
||||
switch result {
|
||||
case .success(let url):
|
||||
guard url.startAccessingSecurityScopedResource() else {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
//
|
||||
|
||||
import SwiftUI
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
struct SettingsView: View {
|
||||
@AppStorage("username") private var username = "User"
|
||||
|
|
@ -111,7 +112,10 @@ struct SettingsView: View {
|
|||
.font(.bodyFont)
|
||||
.accentColor(.accentColor)
|
||||
}
|
||||
.fileImporter(isPresented: $isShowingPairingFilePicker, allowedContentTypes: [.item]) {result in
|
||||
.fileImporter(
|
||||
isPresented: $isShowingPairingFilePicker,
|
||||
allowedContentTypes: [UTType(filenameExtension: "plist")!, UTType(filenameExtension: "mobiledevicepairing")!]
|
||||
) {result in
|
||||
switch result {
|
||||
|
||||
case .success(let url):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue