0

I am creating an app that needs to have data to be shown as soon as someone opens the app. It should be offline and not pulled from any online database. I want to add the data in Xcode, like an offline database.

Now my question is, how do I save data manually in Xcode for users without needing an online backend?

  • Possible duplicate of https://stackoverflow.com/questions/6537492/deploy-ipad-application-with-its-database – Martin R Dec 01 '17 at 08:09
  • 1
    Possible duplicate of [Deploy IPad application with its database](https://stackoverflow.com/questions/6537492/deploy-ipad-application-with-its-database) – Nicolas Miari Dec 01 '17 at 08:37

1 Answers1

0

If you want something like User's data history, you can use UserDefaults class. See here for more details. https://developer.apple.com/documentation/foundation/userdefaults

See here for an example: https://www.hackingwithswift.com/example-code/system/how-to-save-user-settings-using-userdefaults

Zaki Zakaria
  • 127
  • 1
  • 17
  • Thanks. But I don't want to store any data of the user. The data is meant to be added in Xcode to be available to the user. –  Dec 01 '17 at 08:09