![]() ![]() At this point, your bundled Realm file will be accessible to your app.Go to your app target’s build phases tab in Xcode and add the Realm file to the “Copy Bundle Resources” build phase.Drag the new compacted copy of your Realm file to your final app’s Xcode Project Navigator.This will reduce the Realm’s file size, making your final app lighter to download for your users. In the code where you’re generating this Realm file, you should finish by making a compacted copy of the file (see Realm().writeCopyToPath(_:encryptionKey:)).Since Realm files are cross-platform, you can use a macOS app (see our JSONImport example) or your iOS app running in the simulator. You should use the same data model as your final, shipping app to create a Realm and populate it with the data you wish to bundle with your app. It’s common to seed an app with initial data, making it available to your users immediately on first launch. realm file as they contain useful information for debugging purposes. When reporting Realm issues, please be sure to include these auxiliary files along with your main. realm database files, and won’t cause any erroneous behavior if their parent database file is deleted or replaced. realm.note - A named pipe for notifications. realm.management - Directory of interprocess lock files. realm.lock - A lock file for resource locks. realm files, Realm also generates and maintains additional files and directories for its own internal operations. Define your models like regular Swift classes class Dog : Object Auxiliary Realm filesĪlongside the standard. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |