Parsing URL Parameters with Swift
Here is an extension you can use in your Swift (v4) projects that makes it easy to parse parameters from a url. Given a url like, "", you can extract the x and y parameters into a key, value data structure. Here is the s...
Written by Sean Behan on 09/23/2018
How to Chunk Large Files in Swift
How to Chunk Large Files in Swift (4.1) It takes a bit of work but this is the solution I found that finally worked, thanks to this Stack Overflow thread The example ...
Written by Sean Behan on 09/15/2018
How to Get GPS Location Information from a Photo or Movie with Swift and UIImagePickerController
This code assumes you're using the UIImagePickerController. If not you will need to get an image url another way. But, If you are using UIImagePickerControllerDelegate then it will supply the asset's url in the `info` dictionary . From the asset's url...
Written by Sean Behan on 06/11/2018
How to Dynamically Call a Method from a String in Swift
You have to subclass NSObject class Car : NSObject { func drive(){ print("Driving..") } } let car : Car = Car() car.perform(NSSelectorFromString("drive"))
Written by Sean Behan on 06/09/2018
How to Check if Your iOS or MacOS App is Connected to the Internet
Is your app connected to the internet? You can use this standalone class to check! There are no dependencies so you can copy/paste it into your project without needing to install another framework. With this class it's as simple as running `Reachabili...
Written by Sean Behan on 06/08/2018
How to Flush or Erase Cache of Your XCode iOS or MacOS Cocoa App
If you're working with an XCode application, either iOS or MacOS, and want to do a completely clean build and delete the cache, it's simple. Execute this command from the command line.. defaults delete Where "your.apps.bundl...
Written by Sean Behan on 06/08/2018