You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FooBundle wraps a Core Data model Foo.xcdatamodel.
A) Given module name is not explicitly set in Foo.xcdatamodel
(Xcode view of Foo.xcdatamodel)
... representedClassName=".DBFoo" ...
(raw view of Foo.xcdatamodel/contents)
when i build unit tests, the module name in the generated .xctest/Foo.bundle/Foo.momd/Foo.mom file is incorrect FooTests__internal____test_bundle (plutil -p Foo.mom), therefore the Core Data model fails to load from unit tests.
B) If i explicitly set module name in Foo.xcdatamodel
... representedClassName="Foo.DBFoo" ...
when i build unit tests, the module name in the generated .xctest/Foo.bundle/Foo.momd/Foo.mom file is correct Foo, and the Core Data model successfully loads from unit tests.
I assume this is a bug, because Xcode is able to correctly handle either case, and also previously i used precompiled_apple_resource_bundle from rules_ios and it also worked in both cases.
Hi,
I have the following setup
FooBundle
wraps a Core Data modelFoo.xcdatamodel
.A) Given module name is not explicitly set in
Foo.xcdatamodel
(Xcode view of
Foo.xcdatamodel
)(raw view of
Foo.xcdatamodel/contents
)when i build unit tests, the module name in the generated
.xctest/Foo.bundle/Foo.momd/Foo.mom
file is incorrectFooTests__internal____test_bundle
(plutil -p Foo.mom
), therefore the Core Data model fails to load from unit tests.(Xcode view of
.xcdatamodel
reversed from.mom
using https://github.com/atomicbird/momdec)B) If i explicitly set module name in
Foo.xcdatamodel
when i build unit tests, the module name in the generated
.xctest/Foo.bundle/Foo.momd/Foo.mom
file is correctFoo
, and the Core Data model successfully loads from unit tests.I have created a minimal repro example: https://github.com/vakhidbetrakhmadov/rules_apple/tree/vakhid/core-data-repro/examples/repro
A) Run
bazelisk build //examples/repro:FooTests
and examine.mom
file in the generated.xctest
bundle.B) Run
git apply examples/repro/module_name.patch && bazelisk build //examples/repro:FooTests
and examine.mom
file in the generated.xctest
bundle.The text was updated successfully, but these errors were encountered: