Skip to content

Commit

Permalink
update to latest rxswift (#25)
Browse files Browse the repository at this point in the history
* update to latest rxswift

* update travis osx-image

* update simulators in run tests script

* update to swift 5, xcode 12.4
use xcframeworks instead of framework for RxSwift dependency

* update readme file and  run_tests.sh

* fix tests

* update travis osx image to xcode12.4

* extend travis timeout

* extend travis timeout
  • Loading branch information
flowsprenger authored Apr 3, 2021
1 parent d0e777e commit 1fa414c
Show file tree
Hide file tree
Showing 23 changed files with 345 additions and 270 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ language: objective-c

os:
- osx
language: generic
dist: trusty
osx_image: xcode8.3
osx_image: xcode12.4

script:
- xcodebuild -version;
xcodebuild -showsdks;
./run_tests.sh;
travis_wait 60 ./run_tests.sh;
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" ~> 4.2.0
github "ReactiveX/RxSwift" "6.1.0"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" "4.2.0"
github "ReactiveX/RxSwift" "6.1.0"
66 changes: 49 additions & 17 deletions LifxDomain/LifxDomain.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
102D621F26148D4E0072B226 /* RxSwift.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 102D621E26148D4E0072B226 /* RxSwift.xcframework */; };
102D622026148D4E0072B226 /* RxSwift.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 102D621E26148D4E0072B226 /* RxSwift.xcframework */; };
107C08871E23989500552E9F /* LifxDomain.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 107C087D1E23989500552E9F /* LifxDomain.framework */; };
107C088C1E23989500552E9F /* DataInputStreamTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 107C088B1E23989500552E9F /* DataInputStreamTests.swift */; };
107C088E1E23989600552E9F /* LifxDomain.h in Headers */ = {isa = PBXBuildFile; fileRef = 107C08801E23989500552E9F /* LifxDomain.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand All @@ -27,13 +29,13 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
102D621E26148D4E0072B226 /* RxSwift.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = RxSwift.xcframework; path = ../Carthage/Build/RxSwift.xcframework; sourceTree = "<group>"; };
107C087D1E23989500552E9F /* LifxDomain.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LifxDomain.framework; sourceTree = BUILT_PRODUCTS_DIR; };
107C08801E23989500552E9F /* LifxDomain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LifxDomain.h; sourceTree = "<group>"; };
107C08811E23989500552E9F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
107C08861E23989500552E9F /* LifxDomainTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LifxDomainTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
107C088B1E23989500552E9F /* DataInputStreamTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataInputStreamTests.swift; sourceTree = "<group>"; };
107C088D1E23989600552E9F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
107C08A11E23993900552E9F /* RxLifx.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxLifx.framework; path = "../../../Library/Developer/Xcode/DerivedData/RxLifx-dhhbjuuutiyklddmrqllkyqirybj/Build/Products/Debug-iphonesimulator/RxLifx.framework"; sourceTree = "<group>"; };
107C08A31E23994C00552E9F /* DomainModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DomainModel.swift; sourceTree = "<group>"; };
107C08A51E23996100552E9F /* DataStreams.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataStreams.swift; sourceTree = "<group>"; };
107C08A71E23997000552E9F /* Message.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Message.swift; sourceTree = "<group>"; };
Expand All @@ -45,6 +47,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
102D621F26148D4E0072B226 /* RxSwift.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -53,6 +56,7 @@
buildActionMask = 2147483647;
files = (
107C08871E23989500552E9F /* LifxDomain.framework in Frameworks */,
102D622026148D4E0072B226 /* RxSwift.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -103,7 +107,7 @@
107C08A01E23993900552E9F /* Frameworks */ = {
isa = PBXGroup;
children = (
107C08A11E23993900552E9F /* RxLifx.framework */,
102D621E26148D4E0072B226 /* RxSwift.xcframework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -165,12 +169,12 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0810;
LastUpgradeCheck = 1010;
LastUpgradeCheck = 1240;
ORGANIZATIONNAME = "Florian Sprenger";
TargetAttributes = {
107C087C1E23989500552E9F = {
CreatedOnToolsVersion = 8.1;
LastSwiftMigration = 0920;
LastSwiftMigration = 1240;
ProvisioningStyle = Automatic;
};
107C08851E23989500552E9F = {
Expand All @@ -182,10 +186,11 @@
};
buildConfigurationList = 107C08771E23989500552E9F /* Build configuration list for PBXProject "LifxDomain" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 107C08731E23989500552E9F;
productRefGroup = 107C087E1E23989500552E9F /* Products */;
Expand Down Expand Up @@ -250,6 +255,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand All @@ -270,6 +276,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 All @@ -296,7 +303,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand All @@ -312,6 +319,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand All @@ -332,6 +340,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 All @@ -352,10 +361,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -369,18 +379,23 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = LifxDomain/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = wo.lf.LifxDomain;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -390,26 +405,37 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = LifxDomain/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = wo.lf.LifxDomain;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
107C08951E23989600552E9F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = LifxDomainTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = wo.lf.LifxDomainTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
Expand All @@ -420,8 +446,14 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = LifxDomainTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = wo.lf.LifxDomainTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
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 = "1010"
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "107C087C1E23989500552E9F"
BuildableName = "LifxDomain.framework"
BlueprintName = "LifxDomain"
ReferencedContainer = "container:LifxDomain.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "107C087C1E23989500552E9F"
BuildableName = "LifxDomain.framework"
BlueprintName = "LifxDomain"
ReferencedContainer = "container:LifxDomain.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:LifxDomain.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
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 = "1010"
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -39,8 +39,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -61,8 +59,6 @@
ReferencedContainer = "container:LifxDomain.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
18 changes: 9 additions & 9 deletions LifxDomain/LifxDomain/DomainModelExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ import Foundation
import CoreGraphics

public extension Header {
public static let LIFX_DEFAULT_PORT: UInt16 = 56700
public static let LIFX_PROTOCOL: UInt16 = 1024
public static let RESPONSE_REQUIRED: UInt8 = 0x1;
public static let ACK_REQUIRED: UInt8 = 0x2;
static let LIFX_DEFAULT_PORT: UInt16 = 56700
static let LIFX_PROTOCOL: UInt16 = 1024
static let RESPONSE_REQUIRED: UInt8 = 0x1;
static let ACK_REQUIRED: UInt8 = 0x2;

public var id: String {
var id: String {
get {
return self.target.toLightId()
}
}

public func setBroadcast() {
func setBroadcast() {
self.target = 0
self.protocolOriginTagged = Header.LIFX_PROTOCOL | UInt16(1 << 13) | UInt16(1 << 12)
}

public func setTarget(target: UInt64) {
func setTarget(target: UInt64) {
self.target = target
self.protocolOriginTagged = Header.LIFX_PROTOCOL | UInt16(1 << 12)
}

public var responseRequired: Bool {
var responseRequired: Bool {
get {
return (flags & Header.RESPONSE_REQUIRED) != 0
}
Expand All @@ -55,7 +55,7 @@ public extension Header {
}
}

public var ackRequired: Bool {
var ackRequired: Bool {
get {
return (flags & Header.ACK_REQUIRED) != 0
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Very simple sample app using LifxDomain, RxLifx and RxLifxApi

Checkout this repo and bootstrap dependencies using Carthage

`carthage bootstrap`
`carthage bootstrap --no-use-binaries --use-xcframeworks`

Then build and deploy the project RxLifExample.

Expand Down
Loading

0 comments on commit 1fa414c

Please sign in to comment.