0

I mocking a class in my test target. This class object is created by another class only one time by passing class name. Now if I pass my mock class name instead of actual to initialize it, it fails. Since mock class reference is not added in host app target, mock file is not getting initialized by passing name.

Can we write a build script to add file reference to host app target at compile time from test target and remove its reference from host app once done?

Or instead of script should I add file reference permanently in my host app target and exclude this mocked class file for app store release using Excluded Source file name build settings?

Thanks

Community
  • 1
  • 1
srus2017
  • 394
  • 2
  • 14

0 Answers0