1

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?

1 Answer 1

6

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much for your detailed answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.