Hello World ! Is UIKit available on macOS project ? I use Firebase package in my project and I encounter this error :
SwiftUIPreviewHelpers No such module 'UIKit'
This is in the file FirebaseInAppMessaging
import UIKit
import FirebaseInAppMessaging
@available(iOS 13.0, tvOS 13.0, *)
@available(iOSApplicationExtension, unavailable)
@available(tvOSApplicationExtension, unavailable)
public enum InAppMessagingPreviewHelpers {
public static func cardMessage(campaignName: String = "Card message campaign",
title: String = "Title for modal message",
body: String? = "Body for modal message",
textColor: UIColor = UIColor.label,
backgroundColor: UIColor = UIColor.black,
portraitImage: UIImage = UIImage(systemName: "rectangle")!,
landscapeImage: UIImage? = UIImage(systemName: "square"),
primaryButtonText: String = "Click me!",
primaryButtonTextColor: UIColor = UIColor.systemBlue,
primaryButtonBackgroundColor: UIColor = UIColor.systemGray,
primaryActionURL: URL? = nil,
secondaryButtonText: String? = "Dismiss",
secondaryButtonTextColor: UIColor? = UIColor.secondaryLabel,
secondaryButtonBackgroundColor: UIColor? = UIColor.systemYellow,
secondaryActionURL: URL? = nil,
appData: [String: String]? = nil) ->
ETC
Any solutions ?
If you want to use UIKit on Mac you need to use Mac Catalyst. https://developer.apple.com/mac-catalyst/