ManuelMB
ManuelMB

Reputation: 1375

How to create a Cocoa Touch Framework with Swift Package Manager?

I am using Swift Package Manager to create a Framework from console with the followings commands:

swift package init --type=library

swift package generate-xcodeproj

The output Framework created using this commands is a Cocoa Framework.

How could I create a Cocoa Touch Framework instead?

Upvotes: 1

Views: 1043

Answers (1)

Kostiantyn Koval
Kostiantyn Koval

Reputation: 8483

Cocoa Touch Framework - is an iOS framework, SwiftPM currently doesn't support iOS.

Here is a quote from Swift Package Manager Readme

Note that at this time the Package Manager has no support for iOS, watchOS, or tvOS platforms.

But it will be supported in the future. You can read more about it here - Swift Package Manager 3.0 Project Status

If you want to make iOS framework you can run swift package generate-xcodeproj and change the framework target to iOS. You can also pass custom .xcconfig file with a custom configurations swift package generate-xcodeproj --xcconfig-overrides Configs.xcconfig

Upvotes: 6

Related Questions