- After downloading or cloning, please navigate to Resources folder. There should be a red file called SecretKeys
- At that position, create new file called
SecretKeys.swift
- In that file, add this code below
- Then replace the ids with your own API keys from FourSquare
struct SecretKeys {
static let clientID = "You client ID"
static let clientSecret =. "You client secret"
}
- try out foursquareAPI on Postman
- setup venue json object
- implement fetching data
- implement icon image caching
- make a draft of view constraints
- create storyboard
- populate results
- add a navigation bar please!!
- fetch next results
- add something to launchscreen
- add a loading alert when app is fetching current location
- make app icon
- clean up
- All done ๐๐
Reading Foursquare API
Testing with Postman's Foursquare collection
![]() |
![]() |
![]() |
- json object = swift dictionary
[String:Any]
- Array of json object = swift array of dictionary
[[String:Any]
- Venue is a json object, we need 2 type of things from venue
-
- properties from location object
-
- properties in icon, which is inside categories of type
[[String:Any]]
we only want to get the one with primary value = true
- properties in icon, which is inside categories of type
-
Drafts
![]() |
![]() |
Other main resources
![]() |
![]() |