I spent 8 hours debugging this problem in iOS! 🔥

Опубликовано: 14 Октябрь 2024
на канале: Swift and Tips
700
38

Hello guys, Welcome to another video!

This video was totally out of my schedule, however, I decided to make it because there aren't so many examples about this issue working with UIDocumentPickerViewController and URLs. Here are my two cents to avoid you wasting hours of debugging. If this video saved your life, don't forget to like it and subscribe ;)!

If you want to know more about UIViewControllerRepresentable, check this one:    • Using UIKit components in SwiftUI (UI...  

Content:
0:00 - Intro
0:53 - Document is not displayed in a real device
3:08 - The root of the issue
3:12 - Reading the URL securely (more or less 😅)
7:30 - Using secure access well
8:17 - Using File Coordinator
12:40 - Outro

------

Source code showed in the video: https://github.com/pitt500/swift-and-...

------
Resources:
UIDocumentPickerViewController: https://developer.apple.com/documenta...
Providing access to directories: https://developer.apple.com/documenta...

------
Other videos in the channel:
What's new in SwiftUI 3.0:    • Async/Await in Swift | Comparison vs ...  
Async/Await in action:    • Async/Await in Swift | Comparison vs ...  
State management in SwiftUI:    • State Management in SwiftUI  
UIKit in SwiftUI:    • UIKit in SwiftUI  
Generics:    • Generics  
The power of Combine:    • The power of Combine  
Never type in Swift & SwiftUI:    • Never Type in SwiftUI: Exploring its ...  

-----
Don't forget to subscribe to the channel, like it, and follow me on social media:

Twitter:
  / swiftandtips  

Finally, ask me for a video you would like to see next 😄!

Credits:
Music by Wataboi from https://pixabay.com/
Video edited with LumaFusion