Skip to content

Make-School-Labs/RoboProfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robo Profiles

Using the iOS FileSystem

We will be practicing how to read files from the iOS filesystem. In this repository is an iOS XCode project containing a file robo-profiles.json which contains profiles of robots in json format.

Tasks

  • Clone/Download this repository.

  • Load the file robo-profiles.json from the application bundle.

  • Convert the string returned from the Bundle path to a URL.

  • Use this method on the Data class to load the url and create data:

Data(contentsOf: url, options: .alwaysMapped)
  • Model the JSON loaded from the application bundle into Swift models (You can use Swift Codable or a Third party library for JSON Modeling).

  • If you are using swift's codable type, use the JSONDecoder to decode the data to a Swift model(Codable type).

  • Display the list of robo profiles(Name, Phrase, Personality, Image is optional) in a list (UITableView or UICollectionView).

About

Exercise on using the iOS file system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages