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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.