In my test project, I created 2 targets like so:
Step 1:
Step 2:
Step 3:
Afterwards, I created TestClass1.swift in "TestTarget1" and TestClass2.swift in "TestTarget2":
// TestClass1
public TestClass1 {
public static var randomNumber: Int {
return Int.random(in: 1...100)
}
}
And in TestClass2, I wish to access the random number generator in TestClass1 WITHOUT having to import target "TestTarget1", is this doable? e.g., by linking libraries, frameworks, etc.
You might wonder, "Why do you not want to import it?" It's very hard to explain, and I believe you don't really care, I just wonder if this is doable. Thank you!



