Skip to content

Commit

Permalink
[ADD] macOS support added.
Browse files Browse the repository at this point in the history
  • Loading branch information
EnesKaraosman committed May 5, 2021
1 parent ff7a8b2 commit 21421df
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 47 deletions.
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import PackageDescription
let package = Package(
name: "SwiftUIEKtensions",
platforms: [
.iOS(.v13)
.iOS(.v13),
.macOS(.v11)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftUIEKtensions/DeviceOrientation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Enes Karaosman on 6.08.2020.
//

#if canImport(UIKit)
import class UIKit.UIDevice
import SwiftUI

Expand Down Expand Up @@ -48,3 +49,4 @@ final public class DeviceOrientationInfo: ObservableObject {
}

}
#endif
46 changes: 0 additions & 46 deletions Sources/SwiftUIEKtensions/Style/ColoredToggleStyle.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import SwiftUI

#if canImport(UIKit)

/**
Recommended Usage, put `DeviceOrientationBasedView` inside let say in a page's body

Expand Down Expand Up @@ -48,3 +50,4 @@ public struct DeviceOrientationBasedView<Content: View>: View {
}

}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import SwiftUI
}
*/

#if canImport(UIKit)
public struct ImagePickerView: UIViewControllerRepresentable {

private let sourceType: UIImagePickerController.SourceType
Expand Down Expand Up @@ -86,3 +87,4 @@ public struct ImagePickerView: UIViewControllerRepresentable {
}

}
#endif
2 changes: 2 additions & 0 deletions Sources/SwiftUIEKtensions/Views/Representables/MailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import SwiftUI
#if canImport(UIKit)
import MessageUI

/**
Expand Down Expand Up @@ -100,3 +101,4 @@ public struct MailView: UIViewControllerRepresentable {

}
}
#endif

0 comments on commit 21421df

Please sign in to comment.