Install Facebook libraries using cocoapods. You can do this using carthage or manually, but so far I’ve found cocoapods to be the most ubiquitous and easy way. If you haven’t used Cocoapods before, my previous post on using Parse has some additional information.
Go to your new facebook app’s dashboard on https://developers.facebook.com and use “Quick Start” button under Facebook Login section to set your bundle identifier and to get the required code for your project’s Info.plist file. You can ignore/skip all the steps except 3 and 5. Make sure you get both sections for your Info.plist file in step 5.
Add AppDelegate.swift methods that enable Facebook to leave and return to your app when your users try to sign in with Facebook.
So now that you set up a free Parse server on Heroku using my previous guide you might be wondering how to start using it in your iOS project. Checking the main Parse documentation shows a bunch of Objective-C, which isn’t helpful if you’re using Swift 3.
Here are the steps I gathered from perusing the web and some testing:
Install Parse libraries (SDK/Framework).
I prefer cocoapods to maintain to a single standard and since so many other frameworks use it.
Create ‘Podfile‘ file in the xcode project folder with the following contents:
Run ‘pod install‘ in terminal in the same directory as the Podfile.
Connect your Swift 3 app to Parse server.
Import Parse framework by adding ‘import Parse‘ at the top of ‘AppDelegate.swift‘ file.
In ‘AppDelegate.swift‘ under function ‘application(… didFinishLaunchingWithOptions …)‘ add the following code:
Type in a unique app name. You will need this in a bit.
For config variables, change APP_ID and MASTER_KEY to your own unique values. For SERVER_URL change “yourappname” to whatever you picked for your App Name.
Click the big Deploy button. A helpful build process will be displayed and your parse server should be ready to go in about 1 minute.
At this point you can start using your Parse Server with its standard SDKs and REST interface.
If you had any issues with the automated deployment, you can also use the manual process in the Heroku devcenter source link above. The only thing you will need to do is make sure you set the Master_Key and App_ID by going to your Config Variables under your Heroku app’s Settings tab, and adding “MASTER_KEY” and “APP_ID” variables.
While trying out the Google Maps SDK on iOS and Google Maps Directions API I noticed that Google’s Getting Started code hasn’t been updated for Swift 3. Here are the changes required to get the code to work.
Run the app. You should see a map with a single marker centered over Sydney, Australia. If you click on the marker, you should see the text “Hello World” above it. If you see the marker, but the map is not visible, confirm that you have provided your API key.
Google Maps Directions API
I decided to use Alamofire iOS library to make HTTP requests to the Google Maps Directions API as it makes it much easier than the built-in Swift methods.
A couple of weeks ago I went to Colorado with the goal of climbing Mount Elbert. At 14,440 feet high it is the tallest mountain in Colorado.
Unfortunately I only made it to about 13,650 feet =). A combination of lack of time and mild altitude sickness (on my part) prevented my brother and I from reaching the summit. However I did get some great photos and fully intend on reaching the summit on my next attempt, whenever that is.
Video correction: 2nd tallest mountain outside of Hawaii/Alaska =).