TGViewer
Мобильная разработка #1 Мобильная разработка #1 @developer_mobila · 3.81K subscribers
Post #1251 654
File importing and exporting in SwiftUI

struct ImportingExampleView: View {
@State private var importing = false

var body: some View {
Button("Import") {
importing = true
}
.fileImporter(
isPresented: $importing,
allowedContentTypes: [.plainText]
) { result in
switch result {
case .success(let file):
print(file.absoluteString)
case .failure(let error):
print(error.localizedDescription)
}
}
}
}

https://swiftwithmajid.com/2023/05/10/file-importing-and-exporting-in-swiftui/

#ios

👉 @developer_mobila
Swift with Majid File importing and exporting in SwiftUI A few weeks ago, we talked about photo and video picking in SwiftUI. Today we will continue the topic and learn how to import and export files in SwiftUI views. Fortunately, it is straightforward to do with the help of new fileImporter and fileExporter view…
  • 👍 1
More from @developer_mobila
  1. Sep 14, 2026Как разрабатывать приложения для iPhone на iPad Звучит как противоречие: iPad стал вполне…
  2. Aug 24, 2026🧪 Как заставить XCUITest работать с интерфейсом глубиной более 100 уровней Инженеры Циана…
  3. Jul 25, 2026🚀 Подборка полезных IT каналов в Max Системное администрирование, DevOps 📌 https://max.r…
  4. Jul 8, 2026🕵️‍♂️ «Я спрятал ключ в константу»: Как Джуны дарят доступы хакерам Вы интегрировали крут…
  5. Jun 25, 2026👾 Androguard: Швейцарский нож для реверс-инжиниринга Android Если вы занимаетесь пентесто…
  6. Jun 22, 2026Живой космос на Metal: как я переписывал фон мобильной игры и поднимал FPS с 20 до 120 В м…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →