From f4878d4effc0f99b7224f21c21e1f05cd0857f17 Mon Sep 17 00:00:00 2001 From: Balazs Szamody Date: Thu, 13 Jun 2019 16:56:52 +1000 Subject: [PATCH] Resolve issues if iOS and doesn't have AppKit --- .gitignore | 5 +++++ Pod/Classes/GestureFactory.swift | 3 ++- Pod/Classes/OSX/NSClickGestureRecognizer+RxGesture.swift | 3 ++- Pod/Classes/OSX/NSGestureRecognizer+Rx.swift | 3 ++- .../OSX/NSMagnificationGestureRecognizer+RxGesture.swift | 3 ++- Pod/Classes/OSX/NSPanGestureRecognizer+RxGesture.swift | 3 ++- Pod/Classes/OSX/NSPressGestureRecognizer+RxGesture.swift | 3 ++- Pod/Classes/OSX/NSRotationGestureRecognizer+RxGesture.swift | 3 ++- 8 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 02ee969..2fd2fea 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,10 @@ build/ DerivedData +## SPM Generated +*.xcodeproj +*.resolved + ## Various settings *.pbxuser !default.pbxuser @@ -44,6 +48,7 @@ playground.xcworkspace # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # # Pods/ +!Example/*.xcodeproj # Carthage # diff --git a/Pod/Classes/GestureFactory.swift b/Pod/Classes/GestureFactory.swift index ac9daa8..b84a74d 100644 --- a/Pod/Classes/GestureFactory.swift +++ b/Pod/Classes/GestureFactory.swift @@ -17,7 +17,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - +#if canImport(ObjectiveC) import RxSwift import RxCocoa import ObjectiveC @@ -57,3 +57,4 @@ extension Factory where Gesture == GestureRecognizer { } private var gestureRecognizerStrongDelegateKey: UInt8 = 0 +#endif diff --git a/Pod/Classes/OSX/NSClickGestureRecognizer+RxGesture.swift b/Pod/Classes/OSX/NSClickGestureRecognizer+RxGesture.swift index c8508c1..3d8a199 100644 --- a/Pod/Classes/OSX/NSClickGestureRecognizer+RxGesture.swift +++ b/Pod/Classes/OSX/NSClickGestureRecognizer+RxGesture.swift @@ -17,7 +17,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - +#if canImport(AppKit) import AppKit import RxSwift import RxCocoa @@ -88,3 +88,4 @@ extension Reactive where Base: View { } } +#endif diff --git a/Pod/Classes/OSX/NSGestureRecognizer+Rx.swift b/Pod/Classes/OSX/NSGestureRecognizer+Rx.swift index ded4585..30c6e40 100644 --- a/Pod/Classes/OSX/NSGestureRecognizer+Rx.swift +++ b/Pod/Classes/OSX/NSGestureRecognizer+Rx.swift @@ -17,7 +17,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - +#if canImport(AppKit) import AppKit import RxSwift import RxCocoa @@ -73,3 +73,4 @@ extension Reactive where Base: NSGestureRecognizer { } } +#endif diff --git a/Pod/Classes/OSX/NSMagnificationGestureRecognizer+RxGesture.swift b/Pod/Classes/OSX/NSMagnificationGestureRecognizer+RxGesture.swift index 051481f..1443481 100644 --- a/Pod/Classes/OSX/NSMagnificationGestureRecognizer+RxGesture.swift +++ b/Pod/Classes/OSX/NSMagnificationGestureRecognizer+RxGesture.swift @@ -17,7 +17,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - +#if canImport(AppKit) import AppKit import RxSwift import RxCocoa @@ -68,3 +68,4 @@ extension ObservableType where E: NSMagnificationGestureRecognizer { } } } +#endif diff --git a/Pod/Classes/OSX/NSPanGestureRecognizer+RxGesture.swift b/Pod/Classes/OSX/NSPanGestureRecognizer+RxGesture.swift index 3dd28d4..4836c28 100644 --- a/Pod/Classes/OSX/NSPanGestureRecognizer+RxGesture.swift +++ b/Pod/Classes/OSX/NSPanGestureRecognizer+RxGesture.swift @@ -17,7 +17,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - +#if canImport(AppKit) import AppKit import RxSwift import RxCocoa @@ -65,3 +65,4 @@ extension ObservableType where E: NSPanGestureRecognizer { } } } +#endif diff --git a/Pod/Classes/OSX/NSPressGestureRecognizer+RxGesture.swift b/Pod/Classes/OSX/NSPressGestureRecognizer+RxGesture.swift index e21786a..f71d216 100644 --- a/Pod/Classes/OSX/NSPressGestureRecognizer+RxGesture.swift +++ b/Pod/Classes/OSX/NSPressGestureRecognizer+RxGesture.swift @@ -17,7 +17,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - +#if canImport(AppKit) import AppKit import RxSwift import RxCocoa @@ -47,3 +47,4 @@ extension Reactive where Base: View { return gesture(make(configuration: configuration)) } } +#endif diff --git a/Pod/Classes/OSX/NSRotationGestureRecognizer+RxGesture.swift b/Pod/Classes/OSX/NSRotationGestureRecognizer+RxGesture.swift index e4c3b28..f4cdb51 100644 --- a/Pod/Classes/OSX/NSRotationGestureRecognizer+RxGesture.swift +++ b/Pod/Classes/OSX/NSRotationGestureRecognizer+RxGesture.swift @@ -17,7 +17,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - +#if canImport(AppKit) import AppKit import RxSwift import RxCocoa @@ -59,3 +59,4 @@ extension ObservableType where E: NSRotationGestureRecognizer { } } } +#endif