In the new Swift Playground App format, we can share code between an iPad's Playground and Mac's Xcode. But some key behaviors are inconsistent.
For example, using Xcode/iPad Playground to new a Test "Swift Playground App" and adding the following code.
We'll see "1" on Xcode while "2" on iPad Playground App
Test.swiftpm
struct ContentView: View {
var body: some View {
#if SWIFT_PACKAGE
Text("1") // Using Xcode to open
#else
Text("2") // Using iPad Playground App to open
#endif
}
}
I think for a Swift Playground App, they should both to be "1"