0

I just got core data migration working via NSMigrationManager. According to Apple doc:

migrationProgress Returns a number from 0 to 1 that indicates the proportion of completeness of the migration.

- (float)migrationProgress

Return Value A number from 0 to 1 that indicates the proportion of completeness of the migration. If a migration is not taking place, returns 1.

Special Considerations You can observe this value using key-value observing.

I used KVO getting notified the % of migration progress, but I am wondering if "migrationProgress" really is a getter? If it is, why didn't Apple document it as a "readonly" property, to make it clear for developer to use?

Bryan Chen
  • 45,816
  • 18
  • 112
  • 143
J-Q
  • 374
  • 5
  • 15
  • Yes. See: http://stackoverflow.com/questions/7430180/how-to-show-migration-progress-of-nsmigrationmanager-in-a-uilabel – Droppy Jul 29 '14 at 09:21
  • 1
    This enhancement request should interest you: http://www.openradar.me/radar?id=5830444276776960 . And that method is a readonly accessor, it's just not declared as a property. If you put in a bug on it now, it will probably get fixed as they change things for Swift. – quellish Jul 29 '14 at 23:24
  • Wow...you get a pair of quick hands, @quellish !!! – J-Q Jul 29 '14 at 23:47
  • If you duplicate that radar, it's more likely to get addressed soon ;) Using NSProgress for this would have a lot of advantages. – quellish Jul 30 '14 at 00:54
  • How did you use it with NSMigrationManager? Subclassing NSMigrationManager, then compose a NSProgress property inside the sub-NSMigrationManager ? – J-Q Jul 30 '14 at 01:57

0 Answers0