2

How can I access main app Info.plist values from a testing target?

I know that i can access other plists with something like:

Bundle(for: BaseTest.self).path(forResource: "CustomData", ofType: "plist")

after including the CustomData.plist in the testing target.

However Info.plist is different, since you don't even check that it belongs to the main app and the testing target has its own plist.

t0a0
  • 668
  • 1
  • 9
  • 18
  • What is the use case of this? If you need something in both places then maybe you have to create new plist which will be shared and you will not to use the standard one. – m1sh0 Sep 12 '18 at 10:31
  • I need to write UI Tests for the target without changing any existing code/resources in the main app. For now the solution is to just simply copy-paste the main info.plist values into the info.plist of a test target... – t0a0 Sep 12 '18 at 10:39

0 Answers0