Skip to content

Commit

Permalink
Add canImport check for UIKit
Browse files Browse the repository at this point in the history
  • Loading branch information
rwbutler committed Mar 23, 2023
1 parent afea94a commit 1bd5a7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions FeatureFlags/Classes/UI/Feature Flags/Shared/UIControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import Foundation
import ObjectiveC
#if canImport(UIKit)
import UIKit

public extension NSObject {
func associatedObject<T>(key: UnsafeRawPointer, makeDefault: () -> T) -> T {
Expand Down Expand Up @@ -43,3 +45,4 @@ public extension UIControl {
}
}
}
#endif
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ let package = Package(
products: [
.library(
name: "FeatureFlags",
targets: ["FeatureFlags"])
targets: ["FeatureFlags"]
)
],
targets: [
.target(
Expand Down

0 comments on commit 1bd5a7b

Please sign in to comment.