realm/jazzy

Swift Package

rwarnecke opened this issue · 4 comments

Hello,

I build a new Swift-Package in Xcode 13. The Swift Package is only for iOS. If I run jazzy I get the following error:

Building for debugging...
[1/4] Compiling App_Kit Formatting.swift
{...}/AppleDataReview.swift:8:8: error: no such module 'UIKit'
import UIKit

I search for a solution, that jazzy can build the swift package only for iOS. The param sdk: iphoneos in .jazzy.yaml doesn't work.

Can anyone help me, that jazzy only build my swift package for iOS ?

You need to figure out how to build your module from the command line using xcodebuild / swift build and then pass those same arguments to jazzy -- see Usage in the readme.

Hello,

thank you for your answer. I have found a swift build command to build my swift package only for iOS. That is the command I used:

swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios15.5-simulator"

That works, but is there a way to not use the target. I think I must change every time the target, if a new iOS version is released. I there a other solution ?

You'd do better to ask on an SPM/xcodebuild forum. I don't really follow this; I did think developers were advised to use xcodebuild for this -- related article I found might get you on the right track.

Thank you for your answer. I take a look at the specific forum.