3 ms·
Tangental question: How do you Swift-using, non-app developers find out how to do basic anything non-app related, such as reading files and making network conne
by runjake 4y ago
Tangental question: How do you Swift-using, non-app developers find out how to do basic anything non-app related, such as reading files and making network connections?
I Google for stuff and probably 3/4s of the result are out of date and won't work in any reasonably modern version of Swift. I find Apple's Developer documentation sub-par, to say the least. So, how do you navigate it all?
It's quite a shock coming from stuff like Go, C#, and Rust.
It'd be pretty cool if there were a good version of the Swift Cookbook Ala the classic Perl Cookbook.
- kstenerud 4y agoApple's documentation is pretty good in this regard. Network comms are generally done using URLSession: https://developer.apple.com/documentation/foundation/urlsession https://developer.apple.com/documentation/foundation/urlsess... Reading files is most often done using the String and Data types: - https://developer.apple.com/documentation/foundation/nsdata/1413892-init https://developer.apple.com/documentation/foundation/nsdata/... - https://developer.apple.com/documentation/swift/string/init(contentsof:encoding https://developer.apple.com/documentation/swift/string/init(...:) I've found Apple's documentation for Foundation to be quite exemplary.
- devmunchies 4y agoThat’s all part of the lower level foundation library, which is what this post is about. https://developer.apple.com/documentation/foundation/file_system https://developer.apple.com/documentation/foundation/file_sy...
- cvwright 4y agoMostly through sites like hackingwithswift.com Those are generally enough to get you to the point where you can make sense of Apple’s documentation.
- deleted 4y ago[deleted]