Skip to content

Fix for Xcode previews in universal apps #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions CombineCocoa.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "CombineCocoa"
s.version = "0.3.0"
s.version = "0.3.1"
s.summary = "CombineCocoa provided basic publisher bridges for UIControls in UIKit"
s.description = <<-DESC
Combine publisher bridges for Cocoa Controls (UIControl) in UIKit
Expand All @@ -11,10 +11,11 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/freak4pc/CombineCocoa.git", :tag => s.version.to_s }

s.requires_arc = true

s.ios.deployment_target = '10.0'

s.ios.deployment_target = '13.0'
s.osx.deployment_target = '10.15'

s.source_files = 'Sources/**/*.{swift,h,m}'
s.frameworks = ['Combine', 'Foundation']
s.frameworks = ['Combine', 'Foundation', 'UIKit']
s.swift_version = '5.0'
end
end
21 changes: 11 additions & 10 deletions CombineCocoa.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

/* Begin PBXFileReference section */
"CombineCocoa::CombineCocoa::Product" /* CombineCocoa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CombineCocoa.framework; sourceTree = BUILT_PRODUCTS_DIR; };
"CombineCocoa::Runtime::Product" /* Runtime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Runtime.framework; sourceTree = BUILT_PRODUCTS_DIR; };
"CombineCocoa::Runtime::Product" /* Runtime.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Runtime.framework; sourceTree = BUILT_PRODUCTS_DIR; };
OBJ_10 /* AnimatedAssignSubscriber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedAssignSubscriber.swift; sourceTree = "<group>"; };
OBJ_11 /* CombineControlEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CombineControlEvent.swift; sourceTree = "<group>"; };
OBJ_12 /* CombineControlProperty.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CombineControlProperty.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -182,7 +182,7 @@
name = Products;
sourceTree = BUILT_PRODUCTS_DIR;
};
OBJ_5 /* */ = {
OBJ_5 = {
isa = PBXGroup;
children = (
OBJ_6 /* Package.swift */,
Expand All @@ -201,7 +201,6 @@
OBJ_55 /* Gemfile.lock */,
OBJ_56 /* CombineCocoa.podspec */,
);
name = "";
sourceTree = "<group>";
};
OBJ_7 /* Sources */ = {
Expand Down Expand Up @@ -294,7 +293,7 @@
knownRegions = (
en,
);
mainGroup = OBJ_5 /* */;
mainGroup = OBJ_5;
productRefGroup = OBJ_43 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -381,7 +380,7 @@
"SWIFT_PACKAGE=1",
"DEBUG=1",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -DXcode";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -406,7 +405,7 @@
"$(inherited)",
"SWIFT_PACKAGE=1",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.15;
OTHER_SWIFT_FLAGS = "$(inherited) -DXcode";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
Expand All @@ -432,7 +431,7 @@
INFOPLIST_FILE = CombineCocoa.xcodeproj/CombineCocoa_Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.15;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited) -Xcc -fmodule-map-file=$(SRCROOT)/Sources/Runtime/include/module.modulemap";
Expand Down Expand Up @@ -464,7 +463,7 @@
INFOPLIST_FILE = CombineCocoa.xcodeproj/CombineCocoa_Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.15;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited) -Xcc -fmodule-map-file=$(SRCROOT)/Sources/Runtime/include/module.modulemap";
Expand All @@ -485,6 +484,7 @@
isa = XCBuildConfiguration;
buildSettings = {
LD = /usr/bin/true;
MACOSX_DEPLOYMENT_TARGET = 10.15;
OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -package-description-version 5.1.0";
SWIFT_VERSION = 5.0;
};
Expand All @@ -494,6 +494,7 @@
isa = XCBuildConfiguration;
buildSettings = {
LD = /usr/bin/true;
MACOSX_DEPLOYMENT_TARGET = 10.15;
OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -package-description-version 5.1.0";
SWIFT_VERSION = 5.0;
};
Expand All @@ -515,7 +516,7 @@
INFOPLIST_FILE = CombineCocoa.xcodeproj/Runtime_Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.15;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
Expand Down Expand Up @@ -546,7 +547,7 @@
INFOPLIST_FILE = CombineCocoa.xcodeproj/Runtime_Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.15;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
Expand Down
4 changes: 3 additions & 1 deletion Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1150;
LastUpgradeCheck = 1100;
LastUpgradeCheck = 1250;
ORGANIZATIONNAME = "Shai Mishali";
TargetAttributes = {
A24C43F822F592E700BC2E2B = {
Expand Down Expand Up @@ -401,6 +401,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -462,6 +463,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- CombineCocoa (0.3.0)
- CombineCocoa (0.3.1)

DEPENDENCIES:
- CombineCocoa (from `../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
CombineCocoa: f9d1b5b786156e25357a2cc394449b279b5afc09
CombineCocoa: 7d209e5d194faf8999bdd4262092c5b0306e5227

PODFILE CHECKSUM: 19898029b2f3640d6c998827b076660d4767a5fd

Expand Down
7 changes: 5 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// swift-tools-version:5.1
// swift-tools-version:5.3
import PackageDescription

let package = Package(
name: "CombineCocoa",
platforms: [.iOS(.v10)],
platforms: [
.iOS(.v13),
.macOS(.v10_15)
],
products: [
.library(name: "CombineCocoa", targets: ["CombineCocoa"]),
],
Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/CombineControlEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import Foundation
import UIKit.UIControl
Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/CombineControlProperty.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import Foundation
import UIKit.UIControl
Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/NSTextStorage+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import UIKit
import Combine

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UIButton+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UIControl+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UIDatePicker+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UIPageControl+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UIScrollView+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import UIKit
import Combine

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UISearchBar+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import UIKit
import Combine

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UISlider+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UIStepper+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UISwitch+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UITextField+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import Combine
import UIKit

Expand Down
2 changes: 1 addition & 1 deletion Sources/CombineCocoa/Controls/UITextView+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 Combine Community. All rights reserved.
//

#if canImport(Combine)
#if canImport(UIKit) && canImport(Combine)
import UIKit
import Combine

Expand Down