Skip to content
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

Add tvOS target #141

Merged
merged 1 commit into from
Sep 3, 2019
Merged
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
3 changes: 3 additions & 0 deletions Sources/client/Channel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ struct Binding {
/// .receive("error") { payload in print("Failed ot join", payload) }
/// .receive("timeout") { payload in print("Networking issue...", payload) }
///

import Foundation

public class Channel {

/// The topic of the Channel. e.g. "rooms:friends"
Expand Down
3 changes: 3 additions & 0 deletions Sources/client/TimeoutTimer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
/// reconnectTimer.scheduleTimeout() // fires after 5000ms
/// reconnectTimer.reset()
/// reconnectTimer.scheduleTimeout() // fires after 1000ms

import Foundation

class TimeoutTimer {

/// Callback to be informed when the underlying Timer fires
Expand Down
1 change: 1 addition & 0 deletions Sources/client/Utilities/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation

/// A collection of default values and behaviors used accross the Client
public class Defaults {
Expand Down
153 changes: 147 additions & 6 deletions SwiftPhoenixClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
0B8517E31DAC11C80093A015 /* Socket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B8517E21DAC11C80093A015 /* Socket.swift */; };
0B8517E51DAC12F40093A015 /* Channel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B8517E41DAC12F40093A015 /* Channel.swift */; };
0BFAE4F51DA84F59000B3CD3 /* SwiftPhoenixClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BFAE4E71DA84F59000B3CD3 /* SwiftPhoenixClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
12046066202E9AAD00036A92 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12046065202E9AAD00036A92 /* Starscream.framework */; };
120B42C722233A0D00FE483D /* Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120B42C622233A0D00FE483D /* Defaults.swift */; };
120B42C9222341CF00FE483D /* TestHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120B42C8222341CF00FE483D /* TestHelpers.swift */; };
120B42CB2223481600FE483D /* MockableClass.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120B42CA2223481500FE483D /* MockableClass.generated.swift */; };
Expand All @@ -29,6 +28,17 @@
63CD642E1DB11E8400C406A6 /* Presence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CD642D1DB11E8400C406A6 /* Presence.swift */; };
63CD64321DB1272400C406A6 /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CD64311DB1272400C406A6 /* Message.swift */; };
B48458A82164E3D300466E32 /* PresenceSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = B48458A62164E28500466E32 /* PresenceSpec.swift */; };
E330971E22B9E6A300BCF98A /* SwiftPhoenixClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BFAE4E71DA84F59000B3CD3 /* SwiftPhoenixClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
E38FACD222B9EA4500D80A7D /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E38FACD022B9EA4500D80A7D /* Starscream.framework */; };
E38FACD422B9EA4A00D80A7D /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E38FACD122B9EA4500D80A7D /* Starscream.framework */; };
E38FACD522B9EAE500D80A7D /* Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120B42C622233A0D00FE483D /* Defaults.swift */; };
E38FACD622B9EAEF00D80A7D /* Delegated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BCCB442210CED9001A55E1 /* Delegated.swift */; };
E38FACD722B9EAF500D80A7D /* Channel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B8517E41DAC12F40093A015 /* Channel.swift */; };
E38FACD822B9EAF500D80A7D /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CD64311DB1272400C406A6 /* Message.swift */; };
E38FACD922B9EAF500D80A7D /* Presence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63CD642D1DB11E8400C406A6 /* Presence.swift */; };
E38FACDA22B9EAF500D80A7D /* Push.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1220C3F8202FA808001664A2 /* Push.swift */; };
E38FACDB22B9EAF500D80A7D /* Socket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B8517E21DAC11C80093A015 /* Socket.swift */; };
E38FACDC22B9EAF500D80A7D /* TimeoutTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124A083621F1575B003D1400 /* TimeoutTimer.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -49,8 +59,6 @@
0BFAE4E81DA84F59000B3CD3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0BFAE4ED1DA84F59000B3CD3 /* SwiftPhoenixClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftPhoenixClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
0BFAE4F41DA84F59000B3CD3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0BFAE5081DA853B5000B3CD3 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = "Vendor/Starscream/build/Debug-iphoneos/Starscream.framework"; sourceTree = "<group>"; };
12046065202E9AAD00036A92 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/iOS/Starscream.framework; sourceTree = "<group>"; };
120B42C622233A0D00FE483D /* Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Defaults.swift; sourceTree = "<group>"; };
120B42C8222341CF00FE483D /* TestHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestHelpers.swift; sourceTree = "<group>"; };
120B42CA2223481500FE483D /* MockableClass.generated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockableClass.generated.swift; sourceTree = "<group>"; };
Expand All @@ -68,14 +76,19 @@
63CD642D1DB11E8400C406A6 /* Presence.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = Presence.swift; sourceTree = "<group>"; tabWidth = 2; };
63CD64311DB1272400C406A6 /* Message.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Message.swift; sourceTree = "<group>"; };
B48458A62164E28500466E32 /* PresenceSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PresenceSpec.swift; sourceTree = "<group>"; };
E330972322B9E6A300BCF98A /* SwiftPhoenixClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftPhoenixClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E38FACD022B9EA4500D80A7D /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/iOS/Starscream.framework; sourceTree = "<group>"; };
E38FACD122B9EA4500D80A7D /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/tvOS/Starscream.framework; sourceTree = "<group>"; };
E38FACF622B9EE4400D80A7D /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/tvOS/Nimble.framework; sourceTree = "<group>"; };
E38FACF722B9EE4400D80A7D /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quick.framework; path = Carthage/Build/tvOS/Quick.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
0BFAE4E01DA84F59000B3CD3 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
12046066202E9AAD00036A92 /* Starscream.framework in Frameworks */,
E38FACD222B9EA4500D80A7D /* Starscream.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -89,6 +102,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
E330971B22B9E6A300BCF98A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E38FACD422B9EA4A00D80A7D /* Starscream.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -107,6 +128,7 @@
children = (
0BFAE4E41DA84F59000B3CD3 /* SwiftPhoenixClient.framework */,
0BFAE4ED1DA84F59000B3CD3 /* SwiftPhoenixClientTests.xctest */,
E330972322B9E6A300BCF98A /* SwiftPhoenixClient.framework */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -134,10 +156,12 @@
0BFAE5071DA853B5000B3CD3 /* Frameworks */ = {
isa = PBXGroup;
children = (
E38FACF622B9EE4400D80A7D /* Nimble.framework */,
E38FACF722B9EE4400D80A7D /* Quick.framework */,
E38FACD122B9EA4500D80A7D /* Starscream.framework */,
E38FACD022B9EA4500D80A7D /* Starscream.framework */,
12252F55202EA467000BA6A2 /* Nimble.framework */,
12252F54202EA467000BA6A2 /* Quick.framework */,
12046065202E9AAD00036A92 /* Starscream.framework */,
0BFAE5081DA853B5000B3CD3 /* Starscream.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -216,6 +240,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
E330971D22B9E6A300BCF98A /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
E330971E22B9E6A300BCF98A /* SwiftPhoenixClient.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -255,6 +287,24 @@
productReference = 0BFAE4ED1DA84F59000B3CD3 /* SwiftPhoenixClientTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
E330971122B9E6A300BCF98A /* SwiftPhoenixClient-tvOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = E330972022B9E6A300BCF98A /* Build configuration list for PBXNativeTarget "SwiftPhoenixClient-tvOS" */;
buildPhases = (
E330971222B9E6A300BCF98A /* Sources */,
E330971B22B9E6A300BCF98A /* Frameworks */,
E330971D22B9E6A300BCF98A /* Headers */,
E330971F22B9E6A300BCF98A /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "SwiftPhoenixClient-tvOS";
productName = SwiftPhoenixClient;
productReference = E330972322B9E6A300BCF98A /* SwiftPhoenixClient.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand Down Expand Up @@ -291,6 +341,7 @@
targets = (
0BFAE4E31DA84F59000B3CD3 /* SwiftPhoenixClient */,
0BFAE4EC1DA84F59000B3CD3 /* SwiftPhoenixClientTests */,
E330971122B9E6A300BCF98A /* SwiftPhoenixClient-tvOS */,
);
};
/* End PBXProject section */
Expand All @@ -310,6 +361,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
E330971F22B9E6A300BCF98A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -344,6 +402,21 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
E330971222B9E6A300BCF98A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E38FACD522B9EAE500D80A7D /* Defaults.swift in Sources */,
E38FACDB22B9EAF500D80A7D /* Socket.swift in Sources */,
E38FACDA22B9EAF500D80A7D /* Push.swift in Sources */,
E38FACD822B9EAF500D80A7D /* Message.swift in Sources */,
E38FACD922B9EAF500D80A7D /* Presence.swift in Sources */,
E38FACDC22B9EAF500D80A7D /* TimeoutTimer.swift in Sources */,
E38FACD722B9EAF500D80A7D /* Channel.swift in Sources */,
E38FACD622B9EAEF00D80A7D /* Delegated.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
Expand Down Expand Up @@ -488,6 +561,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
"$(PROJECT_DIR)/Carthage/Build/tvOS",
);
INFOPLIST_FILE = "Sources/client/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -514,6 +588,7 @@
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
"$(PROJECT_DIR)/Carthage/Build/tvOS",
);
INFOPLIST_FILE = "Sources/client/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -559,6 +634,63 @@
};
name = Release;
};
E330972122B9E6A300BCF98A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/tvOS",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = "Sources/client/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = org.phoenixframework.SwiftPhoenixClient;
PRODUCT_MODULE_NAME = SwiftPhoenixClient;
PRODUCT_NAME = SwiftPhoenixClient;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.2;
};
name = Debug;
};
E330972222B9E6A300BCF98A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/tvOS",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = "Sources/client/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = org.phoenixframework.SwiftPhoenixClient;
PRODUCT_MODULE_NAME = SwiftPhoenixClient;
PRODUCT_NAME = SwiftPhoenixClient;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.2;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -589,6 +721,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E330972022B9E6A300BCF98A /* Build configuration list for PBXNativeTarget "SwiftPhoenixClient-tvOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E330972122B9E6A300BCF98A /* Debug */,
E330972222B9E6A300BCF98A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0BFAE4DB1DA84F59000B3CD3 /* Project object */;
Expand Down
Loading