|
CoreData in Objective-C in Xcode 11
The language used for creating NSManagedObject (not MOC) subclasses is set in the data model’s file inspector. It defaults to Swift. Core Data data models also support automatic code generation, which
The language used for creating NSManagedObject (not MOC) subclasses is set in the data model’s file inspector. It defaults to Swift. Core Data data models also support automatic code generation, which
|
By
Chris Hanson
· #1240
·
|
|
Using /dev/stdout in a sandboxed app
Sure, just use NSTask’s own standardInput, standardOutput, and standardError support with NSPipe. No need to tell the task to send its stdout to some intermediate file that your app then opens and rea
Sure, just use NSTask’s own standardInput, standardOutput, and standardError support with NSPipe. No need to tell the task to send its stdout to some intermediate file that your app then opens and rea
|
By
Chris Hanson
· #1001
·
|
|
Some advice requested on debugging a difficult problem. iOS.
The document you cite is about Key Value Coding, not about Objective-C properties. The latter are not implemented using the former. If a @property declaration specifies a getter or setter method, the
The document you cite is about Key Value Coding, not about Objective-C properties. The latter are not implemented using the former. If a @property declaration specifies a getter or setter method, the
|
By
Chris Hanson
· #898
·
|
|
Run-time test for 10.14 when using 10.13 SDK
There’s always the NSProcessInfo.operatingSystemVersion property. -- Chris
There’s always the NSProcessInfo.operatingSystemVersion property. -- Chris
|
By
Chris Hanson
· #849
·
|
|
NSAlert runModal black window
My first assumption with symptoms like this is that there’s something trying to do UI from a background thread. -- Chris
My first assumption with symptoms like this is that there’s something trying to do UI from a background thread. -- Chris
|
By
Chris Hanson
· #846
·
|
|
Refactoring existing Core Data entity classes?
That should be reasonable, I don’t recall whether you’ll need to create a mapping model or not to actually migrate the existing store. It does mean that all of the instances will wind up shoved into a
That should be reasonable, I don’t recall whether you’ll need to create a mapping model or not to actually migrate the existing store. It does mean that all of the instances will wind up shoved into a
|
By
Chris Hanson
· #763
·
|
|
Refactoring existing Core Data entity classes?
If you put the entities themselves in an inheritance relationship, Xcode will generate code reflecting that. I would only do this for “strongly” related entities though since entity inheritance implie
If you put the entities themselves in an inheritance relationship, Xcode will generate code reflecting that. I would only do this for “strongly” related entities though since entity inheritance implie
|
By
Chris Hanson
· #761
·
|
|
Refactoring existing Core Data entity classes?
In fact you don’t even need a new model version, you can just refactor the code. We made sure that Core Data’s concept of entity inheritance is independent of class hierarchy, so you don’t actually ne
In fact you don’t even need a new model version, you can just refactor the code. We made sure that Core Data’s concept of entity inheritance is independent of class hierarchy, so you don’t actually ne
|
By
Chris Hanson
· #759
·
|
|
update Localization
I don’t have any detailed list of what changed in Xcode 9.3 that I can share, sorry. Speaking generally, the only changes anyone should notice should be positive; much of the underlying infrastructure
I don’t have any detailed list of what changed in Xcode 9.3 that I can share, sorry. Speaking generally, the only changes anyone should notice should be positive; much of the underlying infrastructure
|
By
Chris Hanson
· #573
·
|
|
update Localization
The main idea for Cocoa localization is that your source artifacts are the “the truth” for your development region (by default English): You use the real strings in NSLocalizedString() macros and in y
The main idea for Cocoa localization is that your source artifacts are the “the truth” for your development region (by default English): You use the real strings in NSLocalizedString() macros and in y
|
By
Chris Hanson
· #569
·
|
|
sleep wake without runloop
Create your own thread and give it a run loop, then use IORegisterForSystemPower on that run loop. -- Chris
Create your own thread and give it a run loop, then use IORegisterForSystemPower on that run loop. -- Chris
|
By
Chris Hanson
· #445
·
|
|
using select() without blocking the runloop
Neither of these statements is correct: (1) File handles are per-process, not per-thread. It’s the developer’s responsibility not to try to manipulate the same file handle from multiple threads at the
Neither of these statements is correct: (1) File handles are per-process, not per-thread. It’s the developer’s responsibility not to try to manipulate the same file handle from multiple threads at the
|
By
Chris Hanson
· #444
·
|