xchammer icon indicating copy to clipboard operation
xchammer copied to clipboard

Test targets don't have access to main app's xcasset catalog

Open SterlingWaves opened this issue 6 years ago • 1 comments

I am trying to access the main app's xcasset catalog from my Snapshot Test target, by setting the main app as the dependency target of my test target, but it didn't work, i.e. the xcasset catalog would not show up in my test target's resources list.

SterlingWaves avatar Feb 05 '19 01:02 SterlingWaves

Hey @SterlingWaves - thanks for the report. If you're looking to setup an iOS test which "depends on the application" ( e.g. the test bundle is loaded into the application ) then you may want to set the TEST_HOST to the app in question.

For more of "unit" style snapshotting, perhaps you want to load various libraries and assets of the application in question: no dependency on the app process.

I took a look at this, and it seems like .xcasset may not be populated from a dependent library to a test bundle target under XCHammer.

jerrymarino avatar Feb 05 '19 18:02 jerrymarino