2

is it possible to add Swift Package to both targets of a Multiplatform app? I'm using the steps below and the package can either be added to iOS or macOS but not both.

Steps:

Open Xcode 12 or newer and hit ⌘⇧N to create a new project. Navigate to the new “Multiplatform” section, select App, and press Next. Then save your project as usual.

Multiplatform App

Try to add a swift package to this app, you will need to select Target either iOS or macOS but not both. The Target selected will be the only one able to access the swift package.

Add Swift Package

Trying to add the swift package again to another target results in the error below.

The project already contains the swift package

byaruhaf
  • 4,128
  • 2
  • 32
  • 50

0 Answers0