Skip to content

Commit

Permalink
🍛 Fix platform issue
Browse files Browse the repository at this point in the history
  • Loading branch information
benlmyers committed Jul 23, 2021
1 parent e92ee58 commit c9e1ea6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
45 changes: 24 additions & 21 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,28 @@
import PackageDescription

let package = Package(
name: "BetterBinding",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "BetterBinding",
targets: ["BetterBinding"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "BetterBinding",
dependencies: []),
.testTarget(
name: "BetterBindingTests",
dependencies: ["BetterBinding"]),
]
name: "BetterBinding",
platforms: [
.iOS(.v13)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "BetterBinding",
targets: ["BetterBinding"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "BetterBinding",
dependencies: []),
.testTarget(
name: "BetterBindingTests",
dependencies: ["BetterBinding"]),
]
)
3 changes: 3 additions & 0 deletions Sources/BetterBinding/BetterBinding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Ben Myers on 6/22/21.
//

#if os(iOS)
import SwiftUI

prefix operator %
Expand Down Expand Up @@ -43,3 +44,5 @@ public prefix func ! <T>(lhs: Binding<Optional<T>>) -> Binding<T> {
public prefix func % <T>(lhs: T) -> Binding<T> {
return .constant(lhs)
}

#endif

0 comments on commit c9e1ea6

Please sign in to comment.