• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Patching implementation in +load. Was: …Mapping Model : Spurious Warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patching implementation in +load. Was: …Mapping Model : Spurious Warning


  • Subject: Patching implementation in +load. Was: …Mapping Model : Spurious Warning
  • From: Jerry Krinock <email@hidden>
  • Date: Tue, 7 Sep 2010 15:41:17 -0700

The workaround given in the note [1] works.

But it recommends that you patch NSMigrationManager "in a method that is guaranteed to be invoked before migration could be attempted—for example, if you have an application delegate, this could be in its init method"

Messy.  I added a +load method to the NSMigrationManger category that I added, and invoked the patch in there.  Seems to work fine.  Is +load [2] not the recommended place to invoke patches?

Jerry


[1] http://developer.apple.com/mac/library/releasenotes/Cocoa/MigrationCrashBuild106Run105/index.html

[2] +[NSObject load]

Invoked whenever a class or category is added to the Objective-C runtime; implement this method to perform class-specific behavior upon loading.

+ (void)load

Discussion
The load message is sent to classes and categories that are both dynamically loaded and statically linked, but only if the newly loaded class or category implements a method that can respond.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Patching implementation in +load. Was: …Mapping Model : Spurious Warning
      • From: Kyle Sluder <email@hidden>
References: 
 >Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment? (From: Jerry Krinock <email@hidden>)
 >Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment? (From: Quincey Morris <email@hidden>)
 >Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?
  • Next by Date: Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?
  • Previous by thread: Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?
  • Next by thread: Re: Patching implementation in +load. Was: …Mapping Model : Spurious Warning
  • Index(es):
    • Date
    • Thread