Are the dependencies shared between Application Target and Test Target sharing same reference?
Let's consider a scenario
I have an application Demo App it has a framework dependency let's take as NameChangerSDK.
This SDK is used to change the text on label.
func onBtnTap() {
NameChangerSDK.change(name: "Hello")
}
I added this dependency in pod file for both of my app and test target.
Initially the UI shows "Hi"
I'm writing UITesting where I have a test case to tap the Button which will call the function onBtnTap(). Now my UI reflect the changes as the text "Hello".
I have to revert the changes I made as set back the text to "Hi". So instead of tapping another button to revert the changes, I planned to call the method NameChangerSDK.change(name: "Hello") directly from teardown() function. Here it's not changing back to the desired text, when I reopen the app it's still "Hello".
Now my question is - from this scenario what I could see is both app target and test target doesn't share the SDK. The changes made through test target by direct call won't change the reference in the app target's SDK. Correct me if I'm wrong.