Core Data - detect if the database store was already created or not

Mario

I'm using Core Data and I need to detect if the database store was already created or not.

I tried using metadataForPersistentStoreOfType:URL:error: and check if its returning a valid metadata, but apparently this method returns nil if no metadata exists but also an error.
So I can't really tell if its because the store wasn't created yet, or if an error accord

Problem is, I already has a version on the app store, so I can't for example set a flag (like "store_created") on user default in the current version...

So I need a way to detect when user installing this current version, if the store was already created (meaning he already installed the previous version), or not

Hal Mueller

[[NSFileManager defaultManager] fileExistsAtPath:stringThatHoldsPathToMyPersistentStore]

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Redux Store does not update state with created data on firebase real-time database

分類Dev

Accessing the external already created database.But the Code isnt working

分類Dev

Store tree data structure in database

分類Dev

Docker Compose - How to store database data?

分類Dev

Custom Migration options for iCloud Core Data store

分類Dev

How to store swift enum in core data?

分類Dev

How to store textfield into core data with swiftui

分類Dev

Which database to store big metric data on Raspberry Pi?

分類Dev

Store Dynamic Menu data into a json from MySQL Database using PHP

分類Dev

Querying sqlite database and store the selected data into 2d array

分類Dev

How to store Excel sheet data in SQL Server database

分類Dev

How to temporarily store summary data with C# .net core

分類Dev

How to detect that trigger was created with ExecuteNonQuery

分類Dev

If I edit an object in a list created with ToList in EF 6 will SaveChanges persist edits to data store

分類Dev

Getting data from one database and process and store it to another database using trident topology

分類Dev

How to detect if Chromecast is already connected on Android Sender?

分類Dev

Linux core file not created

分類Dev

Get Image(Binary Data) from database with .Net Core and Angular 8

分類Dev

How to manage users in ASP.NET core with AD / LDAP? Do I store the users in a database?

分類Dev

Unable to insert data from dynamically created add remove fields in database using php

分類Dev

Store a big String in database?

分類Dev

Store git repo in database

分類Dev

sqlalchemy store media in the database

分類Dev

Store IP into mysql database

分類Dev

Recommended way of copying/managing data in my database on startup in .net core/ ef core?

分類Dev

Detect and monitor changes to MySQL database

分類Dev

how to store data from excel sheet into mysql database using jdbc connection

分類Dev

How to store Google classroom Assignment and assessments data in our SQL database using Google classroom API

分類Dev

Django - Mysql Database is not created in Docker

Related 関連記事

  1. 1

    Redux Store does not update state with created data on firebase real-time database

  2. 2

    Accessing the external already created database.But the Code isnt working

  3. 3

    Store tree data structure in database

  4. 4

    Docker Compose - How to store database data?

  5. 5

    Custom Migration options for iCloud Core Data store

  6. 6

    How to store swift enum in core data?

  7. 7

    How to store textfield into core data with swiftui

  8. 8

    Which database to store big metric data on Raspberry Pi?

  9. 9

    Store Dynamic Menu data into a json from MySQL Database using PHP

  10. 10

    Querying sqlite database and store the selected data into 2d array

  11. 11

    How to store Excel sheet data in SQL Server database

  12. 12

    How to temporarily store summary data with C# .net core

  13. 13

    How to detect that trigger was created with ExecuteNonQuery

  14. 14

    If I edit an object in a list created with ToList in EF 6 will SaveChanges persist edits to data store

  15. 15

    Getting data from one database and process and store it to another database using trident topology

  16. 16

    How to detect if Chromecast is already connected on Android Sender?

  17. 17

    Linux core file not created

  18. 18

    Get Image(Binary Data) from database with .Net Core and Angular 8

  19. 19

    How to manage users in ASP.NET core with AD / LDAP? Do I store the users in a database?

  20. 20

    Unable to insert data from dynamically created add remove fields in database using php

  21. 21

    Store a big String in database?

  22. 22

    Store git repo in database

  23. 23

    sqlalchemy store media in the database

  24. 24

    Store IP into mysql database

  25. 25

    Recommended way of copying/managing data in my database on startup in .net core/ ef core?

  26. 26

    Detect and monitor changes to MySQL database

  27. 27

    how to store data from excel sheet into mysql database using jdbc connection

  28. 28

    How to store Google classroom Assignment and assessments data in our SQL database using Google classroom API

  29. 29

    Django - Mysql Database is not created in Docker

ホットタグ

アーカイブ