FROM : Matthew Firlik
DATE : Wed Apr 04 11:03:00 2007
On Apr 2, 2007, at 8:34 AM, Richard Somers wrote:
> Create a core data document based application using the standard
> apple template.
> The debug application bundle contains a single mom file
> MyDocument.mom.
>
> The released application bundle contains two mom files,
> MyDocument.mom and MyDocument-79FD2C8B.mom. These two files are
> identical when compared with FileMerge.
>
> Why two mom files for the released bundle, why are they identical,
> and why the weird name?
This is a result of building "Universal".
The "Debug" configuration only compiles for the native architecture,
whereas the "Release" configuration for Xcode compiles all "source"
files for the application for each architecture (and then lipos them
together.) A development-time Core Data data model (.xcdatamodel) is
effectively considered a source file by Xcode, since it is processed
into a .mom file by using the data model compiler. The Xcode v2.x
toolchain is not able to determine which source files are architecture
agnostic -- and as a result, the data model is also compiled once for
each architecture.
The resulting files are the same (since the architecture doesn't
matter); however, the Xcode build system creates the second file
(with the extension) to ensure built files do not overwrite one
another. This is why you end up with two files, rather than just one.
Core Data isn't bothered by this particular circumstance: if you
attempt to load both models, the framework notices the collision in
entity names -- but compares the entities and properties and finds
them to be equal, so it just moves on (using one of the models.) As a
result, the second file should not affect your product (other than
taking up space.)
This issue has been filed, and will be addressed in an upcoming Xcode
tools release.
- matthew
= = = = =
Matthew Firlik
<email_removed>
DATE : Wed Apr 04 11:03:00 2007
On Apr 2, 2007, at 8:34 AM, Richard Somers wrote:
> Create a core data document based application using the standard
> apple template.
> The debug application bundle contains a single mom file
> MyDocument.mom.
>
> The released application bundle contains two mom files,
> MyDocument.mom and MyDocument-79FD2C8B.mom. These two files are
> identical when compared with FileMerge.
>
> Why two mom files for the released bundle, why are they identical,
> and why the weird name?
This is a result of building "Universal".
The "Debug" configuration only compiles for the native architecture,
whereas the "Release" configuration for Xcode compiles all "source"
files for the application for each architecture (and then lipos them
together.) A development-time Core Data data model (.xcdatamodel) is
effectively considered a source file by Xcode, since it is processed
into a .mom file by using the data model compiler. The Xcode v2.x
toolchain is not able to determine which source files are architecture
agnostic -- and as a result, the data model is also compiled once for
each architecture.
The resulting files are the same (since the architecture doesn't
matter); however, the Xcode build system creates the second file
(with the extension) to ensure built files do not overwrite one
another. This is why you end up with two files, rather than just one.
Core Data isn't bothered by this particular circumstance: if you
attempt to load both models, the framework notices the collision in
entity names -- but compares the entities and properties and finds
them to be equal, so it just moves on (using one of the models.) As a
result, the second file should not affect your product (other than
taking up space.)
This issue has been filed, and will be addressed in an upcoming Xcode
tools release.
- matthew
= = = = =
Matthew Firlik
<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Richard Somers | Apr 2, 17:34 | |
| Matthew Firlik | Apr 4, 11:03 |






Cocoa mail archive

