Google Toolbox For Mac with Core Data on iPhone results in error

Posted by JaanusSiim on Stack Overflow See other posts from Stack Overflow or by JaanusSiim
Published on 2010-03-15T13:48:22Z Indexed on 2010/03/15 13:49 UTC
Read the original article Hit count: 329

I have set up my project for using Google Toolbox for Mac as described on official wiki. And everything is working as expected.

For core data usage I have created a 'database' class that uses for final application SQLite storage (this is done based on Xcode template code).

For unit tests I have created separate init method for 'database' to use in memory storage (storage url is [NSURL URLWithString:@"memory://store"] and type NSInMemoryStoreType).

Without adding my model file (*.xcdatamodel) to unit tests target, test fail in expected place with message:

executeFetchRequest:error: A fetch request must have an entity.

If I add model file to the test target, then test is executed as expected (core data part looks OK), but after tests execution I get:

RunIPhoneUnitTest.sh: line 123:  9487 Segmentation fault      "$TARGET_BUILD_DIR/$EXECUTABLE_PATH" -RegisterForSystemEvents
Command /bin/sh failed with exit code 139

This problem does not looks directly related to core data, but only happens if model file is added to target.

Any pointers on resolving this issue would be appreciated!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about core-data