Adding packages in swift playgrounds 4

I'm learning swift and developing toy program on ipad
but when I add swiftnio, clangtarget is not supported error happen
cant' swfit ploygrounds add external packages yet?

Swift Playground 4 on iPad only supports Swift target which means it does not support C/C++/ObjC target.
But you can still use those targets if you open it(.swiftpm) on Mac with Xcode(It will give you a warning though)

1 Like

I am trying to add the Swift-Algorithms package and I get the same error message.

Swift-algorithms is indeed a pure Swift Package, but it has a dependence on swift-numerics. And swift-numerics has a C target - _NumericsShims. So you can't use it on iPad's Swift Playground 4 currently.

1 Like