diff --git a/Example/ChannelDemo/ChannelDemo.xcodeproj/project.pbxproj b/Example/ChannelDemo/ChannelDemo.xcodeproj/project.pbxproj index 4dc7c39..942830c 100644 --- a/Example/ChannelDemo/ChannelDemo.xcodeproj/project.pbxproj +++ b/Example/ChannelDemo/ChannelDemo.xcodeproj/project.pbxproj @@ -8,6 +8,8 @@ /* Begin PBXBuildFile section */ 1CA202C385D53C0106993074 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C10C6B517F156A7FEEBBCDD4 /* libPods.a */; }; + 285A656BF2E1213C3B7D40F7 /* libPods-ChannelDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FA6C2F617F1CC930A14647 /* libPods-ChannelDemo.a */; }; + C0127C321C7B305300D305EA /* PhxSocketTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C0127C311C7B305300D305EA /* PhxSocketTests.m */; }; C8A2C2DF1B83D2E3007CF006 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C8A2C2DD1B83D2E3007CF006 /* Interface.storyboard */; }; C8A2C2E11B83D2E3007CF006 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C8A2C2E01B83D2E3007CF006 /* Assets.xcassets */; }; C8A2C2E81B83D2E3007CF006 /* WatchChannel Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = C8A2C2E71B83D2E3007CF006 /* WatchChannel Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -22,7 +24,6 @@ C8FD276A1B824CBB0030D3A1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C8FD27681B824CBB0030D3A1 /* Main.storyboard */; }; C8FD276C1B824CBB0030D3A1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C8FD276B1B824CBB0030D3A1 /* Images.xcassets */; }; C8FD276F1B824CBB0030D3A1 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = C8FD276D1B824CBB0030D3A1 /* LaunchScreen.xib */; }; - C8FD277B1B824CBB0030D3A1 /* ChannelDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C8FD277A1B824CBB0030D3A1 /* ChannelDemoTests.m */; }; C8FD27861B824F2D0030D3A1 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C8FD27851B824F2D0030D3A1 /* RootViewController.m */; }; /* End PBXBuildFile section */ @@ -76,6 +77,10 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 2E381E80AE016A9BEFD73936 /* Pods-ChannelDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChannelDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo.debug.xcconfig"; sourceTree = ""; }; + 4EA520D21236A441376C9496 /* Pods-ChannelDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChannelDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo.release.xcconfig"; sourceTree = ""; }; + 53FA6C2F617F1CC930A14647 /* libPods-ChannelDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ChannelDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + C0127C311C7B305300D305EA /* PhxSocketTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhxSocketTests.m; sourceTree = ""; }; C10C6B517F156A7FEEBBCDD4 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; C8A2C2DB1B83D2E3007CF006 /* WatchChannel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WatchChannel.app; sourceTree = BUILT_PRODUCTS_DIR; }; C8A2C2DE1B83D2E3007CF006 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; @@ -103,7 +108,6 @@ C8FD276E1B824CBB0030D3A1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; C8FD27741B824CBB0030D3A1 /* ChannelDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ChannelDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; C8FD27791B824CBB0030D3A1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C8FD277A1B824CBB0030D3A1 /* ChannelDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChannelDemoTests.m; sourceTree = ""; }; C8FD27841B824F2D0030D3A1 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; C8FD27851B824F2D0030D3A1 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; CB0937933B6AFAAAF9AE0C73 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; @@ -123,6 +127,7 @@ buildActionMask = 2147483647; files = ( 1CA202C385D53C0106993074 /* libPods.a in Frameworks */, + 285A656BF2E1213C3B7D40F7 /* libPods-ChannelDemo.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -141,6 +146,8 @@ children = ( E859913CBF06D5994D3F6F9F /* Pods.debug.xcconfig */, CB0937933B6AFAAAF9AE0C73 /* Pods.release.xcconfig */, + 2E381E80AE016A9BEFD73936 /* Pods-ChannelDemo.debug.xcconfig */, + 4EA520D21236A441376C9496 /* Pods-ChannelDemo.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -149,6 +156,7 @@ isa = PBXGroup; children = ( C10C6B517F156A7FEEBBCDD4 /* libPods.a */, + 53FA6C2F617F1CC930A14647 /* libPods-ChannelDemo.a */, ); name = Frameworks; sourceTree = ""; @@ -240,8 +248,8 @@ C8FD27771B824CBB0030D3A1 /* ChannelDemoTests */ = { isa = PBXGroup; children = ( - C8FD277A1B824CBB0030D3A1 /* ChannelDemoTests.m */, C8FD27781B824CBB0030D3A1 /* Supporting Files */, + C0127C311C7B305300D305EA /* PhxSocketTests.m */, ); path = ChannelDemoTests; sourceTree = ""; @@ -301,6 +309,7 @@ C8FD27561B824CBB0030D3A1 /* Resources */, 74047D023A8B11609688717A /* Copy Pods Resources */, C8A2C3041B83D2E3007CF006 /* Embed Watch Content */, + 25E1943152DE11671E8C6136 /* Embed Pods Frameworks */, ); buildRules = ( ); @@ -418,6 +427,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 25E1943152DE11671E8C6136 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 39425A3292C4C6D3DAD77294 /* Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -445,7 +469,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -476,7 +500,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C8FD277B1B824CBB0030D3A1 /* ChannelDemoTests.m in Sources */, + C0127C321C7B305300D305EA /* PhxSocketTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -672,7 +696,7 @@ }; C8FD277F1B824CBB0030D3A1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E859913CBF06D5994D3F6F9F /* Pods.debug.xcconfig */; + baseConfigurationReference = 2E381E80AE016A9BEFD73936 /* Pods-ChannelDemo.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = ChannelDemo/Info.plist; @@ -683,7 +707,7 @@ }; C8FD27801B824CBB0030D3A1 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CB0937933B6AFAAAF9AE0C73 /* Pods.release.xcconfig */; + baseConfigurationReference = 4EA520D21236A441376C9496 /* Pods-ChannelDemo.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = ChannelDemo/Info.plist; @@ -694,6 +718,7 @@ }; C8FD27821B824CBB0030D3A1 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 2E381E80AE016A9BEFD73936 /* Pods-ChannelDemo.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = ( @@ -736,6 +761,7 @@ C8A2C3001B83D2E3007CF006 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; C8A2C3031B83D2E3007CF006 /* Build configuration list for PBXNativeTarget "WatchChannel" */ = { isa = XCConfigurationList; @@ -744,6 +770,7 @@ C8A2C2FE1B83D2E3007CF006 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; C8FD27531B824CBB0030D3A1 /* Build configuration list for PBXProject "ChannelDemo" */ = { isa = XCConfigurationList; diff --git a/Example/ChannelDemo/ChannelDemo.xcworkspace/xcshareddata/ChannelDemo.xcscmblueprint b/Example/ChannelDemo/ChannelDemo.xcworkspace/xcshareddata/ChannelDemo.xcscmblueprint new file mode 100644 index 0000000..182a66f --- /dev/null +++ b/Example/ChannelDemo/ChannelDemo.xcworkspace/xcshareddata/ChannelDemo.xcscmblueprint @@ -0,0 +1,30 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "CADD452DA44BF6FB92BE421609755AA0B0272379", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "CADD452DA44BF6FB92BE421609755AA0B0272379" : 0, + "199C7AE3B07D8A440AD065D13101EE9D7E799F10" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "934898A3-4DCF-4E03-B853-DB9C7D3B77AE", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "CADD452DA44BF6FB92BE421609755AA0B0272379" : "ObjCPhoenixClient\/", + "199C7AE3B07D8A440AD065D13101EE9D7E799F10" : "" + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "ChannelDemo", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Example\/ChannelDemo\/ChannelDemo.xcworkspace", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/source.xing.com\/ios\/XNGMessenger.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "199C7AE3B07D8A440AD065D13101EE9D7E799F10" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/xing\/ObjCPhoenixClient.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "CADD452DA44BF6FB92BE421609755AA0B0272379" + } + ] +} \ No newline at end of file diff --git a/Example/ChannelDemo/ChannelDemoTests/ChannelDemoTests.m b/Example/ChannelDemo/ChannelDemoTests/ChannelDemoTests.m deleted file mode 100644 index 6ead97f..0000000 --- a/Example/ChannelDemo/ChannelDemoTests/ChannelDemoTests.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// ChannelDemoTests.m -// ChannelDemoTests -// -// Created by Justin Schneck on 8/17/15. -// Copyright (c) 2015 PhoenixFramework. All rights reserved. -// - -#import -#import - -@interface ChannelDemoTests : XCTestCase - -@end - -@implementation ChannelDemoTests - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testExample { - // This is an example of a functional test case. - XCTAssert(YES, @"Pass"); -} - -- (void)testPerformanceExample { - // This is an example of a performance test case. - [self measureBlock:^{ - // Put the code you want to measure the time of here. - }]; -} - -@end diff --git a/Example/ChannelDemo/ChannelDemoTests/PhxSocketTests.m b/Example/ChannelDemo/ChannelDemoTests/PhxSocketTests.m new file mode 100644 index 0000000..92471d8 --- /dev/null +++ b/Example/ChannelDemo/ChannelDemoTests/PhxSocketTests.m @@ -0,0 +1,31 @@ +// +// PhxSocketTests.m +// ChannelDemo +// +// Created by Jose Alcalá-Correa on 22/02/16. +// Copyright © 2016 PhoenixFramework. All rights reserved. +// + +#import +#import + +@interface PhxSocketTests : XCTestCase + +@end + +@implementation PhxSocketTests + +- (void)testIncreasingReference { + PhxSocket *socket = [[PhxSocket alloc] initWithURL:[NSURL URLWithString:@"http://test.com/socket"]]; + + NSString *ref = [socket makeRef]; + XCTAssertEqualObjects(ref, @"1"); + + ref = [socket makeRef]; + XCTAssertEqualObjects(ref, @"2"); + + ref = [socket makeRef]; + XCTAssertEqualObjects(ref, @"3"); +} + +@end diff --git a/Example/ChannelDemo/Podfile b/Example/ChannelDemo/Podfile index 2a0fe52..b4fe79f 100644 --- a/Example/ChannelDemo/Podfile +++ b/Example/ChannelDemo/Podfile @@ -1,4 +1,14 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' + +workspace '../../PhoenixClient' +xcodeproj 'ChannelDemo.xcodeproj' + +target "ChannelDemo" do pod 'PhoenixClient', :path => '../../' +end + +target "ChannelDemoTests" do + +end diff --git a/Example/ChannelDemo/Podfile.lock b/Example/ChannelDemo/Podfile.lock index e9248a3..7d9105f 100644 --- a/Example/ChannelDemo/Podfile.lock +++ b/Example/ChannelDemo/Podfile.lock @@ -1,7 +1,7 @@ PODS: - - PhoenixClient (0.1.0): - - SocketRocket (= 0.3.1-beta2) - - SocketRocket (0.3.1-beta2) + - PhoenixClient (1.1.0): + - SocketRocket (= 0.4.2) + - SocketRocket (0.4.2) DEPENDENCIES: - PhoenixClient (from `../../`) @@ -11,7 +11,7 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - PhoenixClient: a769f4a0103e87720f5b652185dd9a15079e9c28 - SocketRocket: 7284ab9370a06c99aba92b2fe3a32aedd0f9a6fa + PhoenixClient: bb4b343dc16df49ad168c7833a06b0953f991df3 + SocketRocket: ffe08119b00ef982f6c37052a4705a057c8494ad -COCOAPODS: 0.38.2 +COCOAPODS: 0.39.0 diff --git a/Example/ChannelDemo/Pods/Headers/Private/PhoenixClient/NSString+URLEncoding.h b/Example/ChannelDemo/Pods/Headers/Private/PhoenixClient/NSString+URLEncoding.h new file mode 120000 index 0000000..ed75289 --- /dev/null +++ b/Example/ChannelDemo/Pods/Headers/Private/PhoenixClient/NSString+URLEncoding.h @@ -0,0 +1 @@ +../../../../../../Pod/Classes/NSString+URLEncoding.h \ No newline at end of file diff --git a/Example/ChannelDemo/Pods/Headers/Private/SocketRocket/NSData+SRB64Additions.h b/Example/ChannelDemo/Pods/Headers/Private/SocketRocket/NSData+SRB64Additions.h deleted file mode 120000 index e33307a..0000000 --- a/Example/ChannelDemo/Pods/Headers/Private/SocketRocket/NSData+SRB64Additions.h +++ /dev/null @@ -1 +0,0 @@ -../../../SocketRocket/SocketRocket/NSData+SRB64Additions.h \ No newline at end of file diff --git a/Example/ChannelDemo/Pods/Headers/Private/SocketRocket/base64.h b/Example/ChannelDemo/Pods/Headers/Private/SocketRocket/base64.h deleted file mode 120000 index df09eae..0000000 --- a/Example/ChannelDemo/Pods/Headers/Private/SocketRocket/base64.h +++ /dev/null @@ -1 +0,0 @@ -../../../SocketRocket/SocketRocket/base64.h \ No newline at end of file diff --git a/Example/ChannelDemo/Pods/Headers/Public/PhoenixClient/NSString+URLEncoding.h b/Example/ChannelDemo/Pods/Headers/Public/PhoenixClient/NSString+URLEncoding.h new file mode 120000 index 0000000..ed75289 --- /dev/null +++ b/Example/ChannelDemo/Pods/Headers/Public/PhoenixClient/NSString+URLEncoding.h @@ -0,0 +1 @@ +../../../../../../Pod/Classes/NSString+URLEncoding.h \ No newline at end of file diff --git a/Example/ChannelDemo/Pods/Headers/Public/SocketRocket/NSData+SRB64Additions.h b/Example/ChannelDemo/Pods/Headers/Public/SocketRocket/NSData+SRB64Additions.h deleted file mode 120000 index e33307a..0000000 --- a/Example/ChannelDemo/Pods/Headers/Public/SocketRocket/NSData+SRB64Additions.h +++ /dev/null @@ -1 +0,0 @@ -../../../SocketRocket/SocketRocket/NSData+SRB64Additions.h \ No newline at end of file diff --git a/Example/ChannelDemo/Pods/Headers/Public/SocketRocket/base64.h b/Example/ChannelDemo/Pods/Headers/Public/SocketRocket/base64.h deleted file mode 120000 index df09eae..0000000 --- a/Example/ChannelDemo/Pods/Headers/Public/SocketRocket/base64.h +++ /dev/null @@ -1 +0,0 @@ -../../../SocketRocket/SocketRocket/base64.h \ No newline at end of file diff --git a/Example/ChannelDemo/Pods/Local Podspecs/PhoenixClient.podspec.json b/Example/ChannelDemo/Pods/Local Podspecs/PhoenixClient.podspec.json index a595f15..0dc843d 100644 --- a/Example/ChannelDemo/Pods/Local Podspecs/PhoenixClient.podspec.json +++ b/Example/ChannelDemo/Pods/Local Podspecs/PhoenixClient.podspec.json @@ -1,6 +1,6 @@ { "name": "PhoenixClient", - "version": "0.1.0", + "version": "1.1.0", "summary": "Phoenix Framework Channel Client", "description": "Phoenix Client allows ObjC based application to connect to Phoenix Framework channels over websocket.\nMore Information\nhttps://github.com/phoenixframework/phoenix", "homepage": "http://github.com/livehelpnow/ObjCPhoenixClient", @@ -10,17 +10,17 @@ }, "source": { "git": "https://github.com/livehelpnow/ObjCPhoenixClient.git", - "tag": "v0.1.0" + "tag": "v1.1.0" }, "platforms": { - "osx": "10.7", + "osx": "10.8", "ios": "7.0" }, "requires_arc": true, "source_files": "Pod/Classes/**/*", "dependencies": { "SocketRocket": [ - "0.3.1-beta2" + "0.4.2" ] } } diff --git a/Example/ChannelDemo/Pods/Manifest.lock b/Example/ChannelDemo/Pods/Manifest.lock index e9248a3..7d9105f 100644 --- a/Example/ChannelDemo/Pods/Manifest.lock +++ b/Example/ChannelDemo/Pods/Manifest.lock @@ -1,7 +1,7 @@ PODS: - - PhoenixClient (0.1.0): - - SocketRocket (= 0.3.1-beta2) - - SocketRocket (0.3.1-beta2) + - PhoenixClient (1.1.0): + - SocketRocket (= 0.4.2) + - SocketRocket (0.4.2) DEPENDENCIES: - PhoenixClient (from `../../`) @@ -11,7 +11,7 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - PhoenixClient: a769f4a0103e87720f5b652185dd9a15079e9c28 - SocketRocket: 7284ab9370a06c99aba92b2fe3a32aedd0f9a6fa + PhoenixClient: bb4b343dc16df49ad168c7833a06b0953f991df3 + SocketRocket: ffe08119b00ef982f6c37052a4705a057c8494ad -COCOAPODS: 0.38.2 +COCOAPODS: 0.39.0 diff --git a/Example/ChannelDemo/Pods/Pods.xcodeproj/project.pbxproj b/Example/ChannelDemo/Pods/Pods.xcodeproj/project.pbxproj index f49472e..95dbff2 100644 --- a/Example/ChannelDemo/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/ChannelDemo/Pods/Pods.xcodeproj/project.pbxproj @@ -7,130 +7,121 @@ objects = { /* Begin PBXBuildFile section */ - 005B49132A7EA1061FE7CD982114A909 /* PhxPush_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = EDCFFF984457D0F49E96FFFA154CC4B9 /* PhxPush_Private.h */; }; - 0E9E40C6CC12607042CFD0D25E0C2110 /* SRWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 8159BDCEFBB2AB8342F4E7DC1959A958 /* SRWebSocket.h */; }; - 1123DEE8CC6774FAF2DFBA84E1038FFE /* PhxChannel_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1320FD524C9ECB504104A90D7DB5410D /* PhxChannel_Private.h */; }; - 19717D5807626CAA26A95A0C85563164 /* PhxTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 640E54A3B024B2D1F5780BDD50B6EF50 /* PhxTypes.h */; }; - 24CC6FC31520465C765ED6A099BEDD3C /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88B4377A4CF30453DDC4CBA90A04FC3C /* Security.framework */; }; - 26A2093F843BF1EA20CE3CE7D71D0797 /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = 95DBBB00E479E44DA607CB61500227F8 /* base64.c */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 2AC9C39FD28A69B425C62DDC231455D9 /* PhxChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = DB7D204D73164299E1FEE99E7624F7ED /* PhxChannel.h */; }; - 30D1654DD070B32ECCD546ED9F7EFC81 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78E595490F1D14AB11C4E2E1CB0C8C5A /* CFNetwork.framework */; }; - 3AC87E69FAF25D2A9592EA31DF94D9D0 /* PhxSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E508B45068EB607C2208576D6A36E70 /* PhxSocket.h */; }; - 3BAEF16C73F7CEBFD9C8D43EBFFA7AAA /* NSDictionary+QueryString.h in Headers */ = {isa = PBXBuildFile; fileRef = 9960D46713A2D8E254088CE449189C33 /* NSDictionary+QueryString.h */; }; - 3F627F4421F5B736D0BA7277E1D68E2A /* PhxPush.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A7992779B13101C2AD183A1A3B1995B /* PhxPush.m */; }; - 52A8DE31AED48921F91D13D9C46FD292 /* PhxSocket_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 67034ED8CF690019283B1F7C3FD63029 /* PhxSocket_Private.h */; }; - 7FE81830DAB6BF7E570D4EF9F7C4D936 /* PhoenixClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 88D9A4ED759E80C82CF91F0F25AC8918 /* PhoenixClient-dummy.m */; }; - 9FBA791BCE77F4662B9FE11E5C9FBD59 /* PhxChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = A530851F9F544F467867E61356682A6C /* PhxChannel.m */; }; - A051AFCD339D7D89A6756977684F2293 /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 79CF598C2010DF0045B1700355F916A6 /* SRWebSocket.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - A4794C55BA311794925FBD348BACAA90 /* PhxSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B47A8E4A6C82203AC7FF97B6105ED9 /* PhxSocket.m */; }; - A7666425FE4D5F0497578F2FFD8D8300 /* NSDictionary+QueryString.m in Sources */ = {isa = PBXBuildFile; fileRef = 25763C10F41A2FC360F935F868311197 /* NSDictionary+QueryString.m */; }; - B303D83F533947AE2F04291A4C9CAB2C /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 015962464959F741A646C17CA0F27B9D /* base64.h */; }; - B63B1EB34A148A3AB3DD2546B942A440 /* PhoenixClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F11D57F853E7BFCFBD9B755694EB1AB7 /* PhoenixClient.h */; }; - BA43C1CA42B23A1CD4A39DC5D03619BC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C443A13E5FA7C35E86A5123EB4B0974 /* Foundation.framework */; }; - BC049F417E32291D6F80EEE2C8B87602 /* PhxPush.h in Headers */ = {isa = PBXBuildFile; fileRef = 38E1003B217BB15B9505216EDBBF7E0E /* PhxPush.h */; }; - C85FBFAE1B82C32C0032F01C /* NSString+URLEncoding.h in Headers */ = {isa = PBXBuildFile; fileRef = C85FBFAC1B82C32C0032F01C /* NSString+URLEncoding.h */; }; - C85FBFAF1B82C32C0032F01C /* NSString+URLEncoding.m in Sources */ = {isa = PBXBuildFile; fileRef = C85FBFAD1B82C32C0032F01C /* NSString+URLEncoding.m */; }; - CFB60667279A435F43A4A4663CDD7481 /* NSData+SRB64Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A6EA420125E3718111C5283EE0F789C /* NSData+SRB64Additions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - D89E1202364770A3211F85365841AA7B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C443A13E5FA7C35E86A5123EB4B0974 /* Foundation.framework */; }; - DBB05DE71C629BB0026F2305C5DB4027 /* SocketRocket-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ABFF66641641BE892727459958BE32D /* SocketRocket-dummy.m */; }; - E2D155EF4F1A2DF3FD392BF1F2D84906 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 64A8C77047CED4970D02C60B0261B13D /* Pods-dummy.m */; }; - F0EEED9887A50CBBD51ACFFD0F6A3991 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C443A13E5FA7C35E86A5123EB4B0974 /* Foundation.framework */; }; - F42AF2D506AB15439D666CDF7ED0B60B /* NSData+SRB64Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = E665FF1B617282E4ED31DA6529057213 /* NSData+SRB64Additions.h */; }; + 173199AFE7CE0A5C0B7F7968F0B6389B /* PhxPush.h in Headers */ = {isa = PBXBuildFile; fileRef = 9744AA97EDD7B4EE0093DC464313B1EF /* PhxPush.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1800C21878390ACCA4D3F5E9C3FDE11F /* NSDictionary+QueryString.m in Sources */ = {isa = PBXBuildFile; fileRef = E229897C2157A188CF43F2984EC6F601 /* NSDictionary+QueryString.m */; }; + 28B02931E6B6ED5343A4CB9535C461AB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBC51718377FC85475D865A171A8B5CC /* Foundation.framework */; }; + 30B8144E09E718CAA6928D8DAFFB760C /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED316EE84B1D3AAE415457D92E62A3A0 /* CFNetwork.framework */; }; + 33939F72896E65FE3E38F1365A39D429 /* PhoenixClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A358E06BFB9E1BABA2B65BD32A41C377 /* PhoenixClient-dummy.m */; }; + 4144FEABA82B00A34416BC865E0BD9F5 /* SocketRocket-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BF0AC0CC7CB37BB54080C34AC722AC /* SocketRocket-dummy.m */; }; + 45069B9D5ABA201347A484D6C4895EDF /* PhxChannel_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A0CBD7B62C881A8687A6E62CCC75BD1D /* PhxChannel_Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 47494D076C83BB60C1C593A2AAA21662 /* PhoenixClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BD2E397A9C16379EE60D05A4DD11D31E /* PhoenixClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 477F2CCB1000EDD6011F59D57AD5D2C5 /* NSDictionary+QueryString.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D52E6F94FD02E0971333A31757EC2AA /* NSDictionary+QueryString.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4C78485AEAC9080FDBACE8CCBCBF53B9 /* PhxPush_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4EFED36533717A5351EFD6541FE61772 /* PhxPush_Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6606EA5913062B010D20316DB3483C5F /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DA7F151ADE6CD1C0AB1BB2A3D839051 /* SRWebSocket.m */; }; + 66EC2B0372074FCDFA98E4979A6136BD /* PhxPush.m in Sources */ = {isa = PBXBuildFile; fileRef = E0357449DA3C2A9C0B3DC91639BA4416 /* PhxPush.m */; }; + 714E81779C42DC86B78867FFF97B50DE /* PhxSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C97068D26810EB2938C2EA9DE217A45 /* PhxSocket.m */; }; + 76AE66F4EB19C282DC26286ED7E34832 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBC51718377FC85475D865A171A8B5CC /* Foundation.framework */; }; + 7747CA6BFCC7EE5E2ABD5156FD8D3419 /* PhxSocket_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 187D804E234B07D30AFBEDB25F3A047F /* PhxSocket_Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8F044CE4FB23FF25589FA771CB133991 /* Pods-ChannelDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 86EFFFDCB21CB37C4BD303575B12EE2D /* Pods-ChannelDemo-dummy.m */; }; + 912B8342864F19758AFB81702F15318A /* PhxChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = 0279A550A258560D275F358AA23199C7 /* PhxChannel.m */; }; + 94E0A9323CD619B35D21070AEB54910B /* NSString+URLEncoding.m in Sources */ = {isa = PBXBuildFile; fileRef = FDCF040A332CCADF7DB3C922803F1055 /* NSString+URLEncoding.m */; }; + 9C4D2FE6255A128BEBEE2DD6E61012B1 /* SRWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A21A83EE3A668EC1D845E6882E6B55D /* SRWebSocket.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B6DC669CB632DE988063EAEB3D87717A /* PhxSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = FA05AAB7AD880252D84958DA96A1DD3A /* PhxSocket.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C33FAD28084111A17A13B986B6E37003 /* NSString+URLEncoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 96609297DA617CD3D017BCC848194553 /* NSString+URLEncoding.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D214960E611BB460A3425B4F8C902A29 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBC51718377FC85475D865A171A8B5CC /* Foundation.framework */; }; + E4EBE6E8094EFCA0CBCE8FD1B15C64AF /* PhxTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2710BB6AAE88ED9DF2CB5B7E4DA0A5 /* PhxTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EC88D47F9C4756EAF965ADA4722CA0C3 /* PhxChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = A12CB0C47740295861F63B2778ED4B7D /* PhxChannel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F8952B50FDA416C18267FB25F66840A3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E967D042C48D5885583D70105EF16526 /* Security.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 441D415B83524646129AEB8F9067E020 /* PBXContainerItemProxy */ = { + 7C4D5E0B869161BFAFF0C05134F2C8DE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 6AF382003FC0D8D85E5A5E4C338A52B8; + remoteGlobalIDString = 9358571773D5DAA48FB6CD212703765E; remoteInfo = SocketRocket; }; - 8ABDF02F6F3DAC8DB4D7C19AC4D1C678 /* PBXContainerItemProxy */ = { + A314345CACE17310E23CB6720E947201 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = D9590A4BEAE4052F089D580A493C40B0; + remoteGlobalIDString = 8AC46136079BD537C1379D15B6B2B02A; remoteInfo = PhoenixClient; }; - F9C3FBE1B633CC19B487339ED7EE5324 /* PBXContainerItemProxy */ = { + B76093B7B64629BE6FA168AC34B4A797 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 6AF382003FC0D8D85E5A5E4C338A52B8; + remoteGlobalIDString = 9358571773D5DAA48FB6CD212703765E; remoteInfo = SocketRocket; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 015962464959F741A646C17CA0F27B9D /* base64.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = base64.h; path = SocketRocket/base64.h; sourceTree = ""; }; - 05E951383CA7E23EBA9BE4B728A143EA /* libPhoenixClient.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPhoenixClient.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 0719E3A5CB57C85BADFE0755B55C12C1 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; - 1320FD524C9ECB504104A90D7DB5410D /* PhxChannel_Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxChannel_Private.h; sourceTree = ""; }; - 1542520D00885299B083C801FA03DB97 /* PhoenixClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PhoenixClient.xcconfig; sourceTree = ""; }; - 15A529C27057E4A57D259CBC6E6CE49C /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; - 25763C10F41A2FC360F935F868311197 /* NSDictionary+QueryString.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+QueryString.m"; sourceTree = ""; }; - 274EE3197D57A80F09E01BD1B255CFC4 /* PhoenixClient-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "PhoenixClient-Private.xcconfig"; sourceTree = ""; }; - 2809FCFD207848E6D3F0AB81724B0C35 /* libSocketRocket.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSocketRocket.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 2A37B891178FDF15DDBD1353EF25A3B8 /* SocketRocket-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SocketRocket-prefix.pch"; sourceTree = ""; }; - 2A6EA420125E3718111C5283EE0F789C /* NSData+SRB64Additions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+SRB64Additions.m"; path = "SocketRocket/NSData+SRB64Additions.m"; sourceTree = ""; }; - 38E1003B217BB15B9505216EDBBF7E0E /* PhxPush.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxPush.h; sourceTree = ""; }; - 3E508B45068EB607C2208576D6A36E70 /* PhxSocket.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxSocket.h; sourceTree = ""; }; - 4A7992779B13101C2AD183A1A3B1995B /* PhxPush.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PhxPush.m; sourceTree = ""; }; - 56B47A8E4A6C82203AC7FF97B6105ED9 /* PhxSocket.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PhxSocket.m; sourceTree = ""; }; - 640E54A3B024B2D1F5780BDD50B6EF50 /* PhxTypes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxTypes.h; sourceTree = ""; }; - 641AE05DD55E5E6AC1590CD7B4A18F97 /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; - 64A8C77047CED4970D02C60B0261B13D /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; - 67034ED8CF690019283B1F7C3FD63029 /* PhxSocket_Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxSocket_Private.h; sourceTree = ""; }; - 6ABFF66641641BE892727459958BE32D /* SocketRocket-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SocketRocket-dummy.m"; sourceTree = ""; }; - 6C443A13E5FA7C35E86A5123EB4B0974 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 78E595490F1D14AB11C4E2E1CB0C8C5A /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - 79CF598C2010DF0045B1700355F916A6 /* SRWebSocket.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SRWebSocket.m; path = SocketRocket/SRWebSocket.m; sourceTree = ""; }; - 8159BDCEFBB2AB8342F4E7DC1959A958 /* SRWebSocket.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SRWebSocket.h; path = SocketRocket/SRWebSocket.h; sourceTree = ""; }; - 88B4377A4CF30453DDC4CBA90A04FC3C /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; - 88D9A4ED759E80C82CF91F0F25AC8918 /* PhoenixClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PhoenixClient-dummy.m"; sourceTree = ""; }; - 8AD64C9CD955BC90AC618A94EFDF1A12 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 95DBBB00E479E44DA607CB61500227F8 /* base64.c */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.c; name = base64.c; path = SocketRocket/base64.c; sourceTree = ""; }; - 9960D46713A2D8E254088CE449189C33 /* NSDictionary+QueryString.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+QueryString.h"; sourceTree = ""; }; - A530851F9F544F467867E61356682A6C /* PhxChannel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PhxChannel.m; sourceTree = ""; }; + 0279A550A258560D275F358AA23199C7 /* PhxChannel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PhxChannel.m; sourceTree = ""; }; + 08936F7F9C64672EA603111C6D4A0D6D /* SocketRocket-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SocketRocket-prefix.pch"; sourceTree = ""; }; + 187D804E234B07D30AFBEDB25F3A047F /* PhxSocket_Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxSocket_Private.h; sourceTree = ""; }; + 1D52E6F94FD02E0971333A31757EC2AA /* NSDictionary+QueryString.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+QueryString.h"; sourceTree = ""; }; + 2E2710BB6AAE88ED9DF2CB5B7E4DA0A5 /* PhxTypes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxTypes.h; sourceTree = ""; }; + 3228A650991C8833FCB32F94E6327AC6 /* SocketRocket.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SocketRocket.xcconfig; sourceTree = ""; }; + 3BF77F84FC38137D60A6EB45B33AB297 /* Pods-ChannelDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ChannelDemo.debug.xcconfig"; sourceTree = ""; }; + 4A21A83EE3A668EC1D845E6882E6B55D /* SRWebSocket.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SRWebSocket.h; path = SocketRocket/SRWebSocket.h; sourceTree = ""; }; + 4BC1CF3CC7B80C2DEC3386FE56B745C5 /* Pods-ChannelDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ChannelDemo.release.xcconfig"; sourceTree = ""; }; + 4DA7F151ADE6CD1C0AB1BB2A3D839051 /* SRWebSocket.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SRWebSocket.m; path = SocketRocket/SRWebSocket.m; sourceTree = ""; }; + 4EFED36533717A5351EFD6541FE61772 /* PhxPush_Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxPush_Private.h; sourceTree = ""; }; + 66BF0AC0CC7CB37BB54080C34AC722AC /* SocketRocket-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SocketRocket-dummy.m"; sourceTree = ""; }; + 6F037E81243201D2C6A66F3BDC479DF5 /* Pods-ChannelDemo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ChannelDemo-acknowledgements.plist"; sourceTree = ""; }; + 6F2C6E28A1BFDBC26CF524D691BF2AEC /* Pods-ChannelDemo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ChannelDemo-resources.sh"; sourceTree = ""; }; + 773354889AB85B2EF932F9908D4DBEBC /* libSocketRocket.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSocketRocket.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 82D0DC666E5322EFF1E0DFC1B02438B2 /* libPhoenixClient.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPhoenixClient.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 86EFFFDCB21CB37C4BD303575B12EE2D /* Pods-ChannelDemo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ChannelDemo-dummy.m"; sourceTree = ""; }; + 8C5E2697899F527CFD65E90F6972F4F9 /* Pods-ChannelDemo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ChannelDemo-acknowledgements.markdown"; sourceTree = ""; }; + 8C97068D26810EB2938C2EA9DE217A45 /* PhxSocket.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PhxSocket.m; sourceTree = ""; }; + 96609297DA617CD3D017BCC848194553 /* NSString+URLEncoding.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSString+URLEncoding.h"; sourceTree = ""; }; + 9744AA97EDD7B4EE0093DC464313B1EF /* PhxPush.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxPush.h; sourceTree = ""; }; + 9EB4204405A7EEB1C440424546E30F38 /* PhoenixClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PhoenixClient.xcconfig; sourceTree = ""; }; + A0CBD7B62C881A8687A6E62CCC75BD1D /* PhxChannel_Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxChannel_Private.h; sourceTree = ""; }; + A12CB0C47740295861F63B2778ED4B7D /* PhxChannel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxChannel.h; sourceTree = ""; }; + A358E06BFB9E1BABA2B65BD32A41C377 /* PhoenixClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PhoenixClient-dummy.m"; sourceTree = ""; }; BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - BF59BC15D23E1E1912C8F334E7236813 /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; - C85FBFAC1B82C32C0032F01C /* NSString+URLEncoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+URLEncoding.h"; sourceTree = ""; }; - C85FBFAD1B82C32C0032F01C /* NSString+URLEncoding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+URLEncoding.m"; sourceTree = ""; }; - CD5AFDC33D8DC77CC1D8CCF03580D645 /* SocketRocket.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SocketRocket.xcconfig; sourceTree = ""; }; - CDC53EF2ACCB8769B8D798B077B709FA /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; - D7F208DB93186345BCD8F30138A803E3 /* PhoenixClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PhoenixClient-prefix.pch"; sourceTree = ""; }; - DB7D204D73164299E1FEE99E7624F7ED /* PhxChannel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxChannel.h; sourceTree = ""; }; - E665FF1B617282E4ED31DA6529057213 /* NSData+SRB64Additions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+SRB64Additions.h"; path = "SocketRocket/NSData+SRB64Additions.h"; sourceTree = ""; }; - EDCFFF984457D0F49E96FFFA154CC4B9 /* PhxPush_Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxPush_Private.h; sourceTree = ""; }; - F11D57F853E7BFCFBD9B755694EB1AB7 /* PhoenixClient.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhoenixClient.h; sourceTree = ""; }; - FD696AA8742C7414B0E1E7F7B9BB5670 /* SocketRocket-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "SocketRocket-Private.xcconfig"; sourceTree = ""; }; + BD2E397A9C16379EE60D05A4DD11D31E /* PhoenixClient.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhoenixClient.h; sourceTree = ""; }; + C7FD39DDC0A7271177137ABA4F47562E /* libPods-ChannelDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ChannelDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + CBC51718377FC85475D865A171A8B5CC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + D7066DB86DC3DA9F88A8DD2A3DD72E28 /* PhoenixClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PhoenixClient-prefix.pch"; sourceTree = ""; }; + E0357449DA3C2A9C0B3DC91639BA4416 /* PhxPush.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PhxPush.m; sourceTree = ""; }; + E229897C2157A188CF43F2984EC6F601 /* NSDictionary+QueryString.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+QueryString.m"; sourceTree = ""; }; + E967D042C48D5885583D70105EF16526 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; + EB8631C6E384672FE26CB42CB5EC7499 /* Pods-ChannelDemo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ChannelDemo-frameworks.sh"; sourceTree = ""; }; + ED316EE84B1D3AAE415457D92E62A3A0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; + FA05AAB7AD880252D84958DA96A1DD3A /* PhxSocket.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PhxSocket.h; sourceTree = ""; }; + FDCF040A332CCADF7DB3C922803F1055 /* NSString+URLEncoding.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSString+URLEncoding.m"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 375CD91664DE6FCA367E9E87154DE300 /* Frameworks */ = { + 1B13160CEAB10F10A3BF9F1F128FFEF8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 30D1654DD070B32ECCD546ED9F7EFC81 /* CFNetwork.framework in Frameworks */, - D89E1202364770A3211F85365841AA7B /* Foundation.framework in Frameworks */, - 24CC6FC31520465C765ED6A099BEDD3C /* Security.framework in Frameworks */, + 28B02931E6B6ED5343A4CB9535C461AB /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - B53407081DFC704DFC091C268CAA4C51 /* Frameworks */ = { + 5B57428E5E3A871E901D5EA6AEF2AB65 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F0EEED9887A50CBBD51ACFFD0F6A3991 /* Foundation.framework in Frameworks */, + 30B8144E09E718CAA6928D8DAFFB760C /* CFNetwork.framework in Frameworks */, + 76AE66F4EB19C282DC26286ED7E34832 /* Foundation.framework in Frameworks */, + F8952B50FDA416C18267FB25F66840A3 /* Security.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - EB0520A3C3BF911ACA7CB21DCA8E0E9C /* Frameworks */ = { + 73ADF7A2D3B0AAF46F6500978EF3C73C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - BA43C1CA42B23A1CD4A39DC5D03619BC /* Foundation.framework in Frameworks */, + D214960E611BB460A3425B4F8C902A29 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -140,243 +131,236 @@ 0C533C7408F33A2FE7110C63FC6374C7 /* Development Pods */ = { isa = PBXGroup; children = ( - FAAB1434ABCA1424D15C17BC0DECE654 /* PhoenixClient */, + 77E8D43B098762E86BCB2652BB458491 /* PhoenixClient */, ); name = "Development Pods"; sourceTree = ""; }; - 0F6823BF923060B97536F56C6025E532 /* Classes */ = { + 122DA2E5084A4393C29BE363C764795C /* Frameworks */ = { isa = PBXGroup; children = ( - 9960D46713A2D8E254088CE449189C33 /* NSDictionary+QueryString.h */, - 25763C10F41A2FC360F935F868311197 /* NSDictionary+QueryString.m */, - F11D57F853E7BFCFBD9B755694EB1AB7 /* PhoenixClient.h */, - DB7D204D73164299E1FEE99E7624F7ED /* PhxChannel.h */, - A530851F9F544F467867E61356682A6C /* PhxChannel.m */, - 1320FD524C9ECB504104A90D7DB5410D /* PhxChannel_Private.h */, - 38E1003B217BB15B9505216EDBBF7E0E /* PhxPush.h */, - 4A7992779B13101C2AD183A1A3B1995B /* PhxPush.m */, - EDCFFF984457D0F49E96FFFA154CC4B9 /* PhxPush_Private.h */, - 3E508B45068EB607C2208576D6A36E70 /* PhxSocket.h */, - 56B47A8E4A6C82203AC7FF97B6105ED9 /* PhxSocket.m */, - 67034ED8CF690019283B1F7C3FD63029 /* PhxSocket_Private.h */, - 640E54A3B024B2D1F5780BDD50B6EF50 /* PhxTypes.h */, - C85FBFAC1B82C32C0032F01C /* NSString+URLEncoding.h */, - C85FBFAD1B82C32C0032F01C /* NSString+URLEncoding.m */, + B728418FA3338AB680410C5B26CF547F /* iOS */, ); - path = Classes; + name = Frameworks; sourceTree = ""; }; - 122DA2E5084A4393C29BE363C764795C /* Frameworks */ = { + 69E0C6F1991A5A442E1A2B003EEDC2E6 /* Support Files */ = { isa = PBXGroup; children = ( - ECD260DD19B725A7615428234008C004 /* iOS */, + 3228A650991C8833FCB32F94E6327AC6 /* SocketRocket.xcconfig */, + 66BF0AC0CC7CB37BB54080C34AC722AC /* SocketRocket-dummy.m */, + 08936F7F9C64672EA603111C6D4A0D6D /* SocketRocket-prefix.pch */, ); - name = Frameworks; + name = "Support Files"; + path = "../Target Support Files/SocketRocket"; sourceTree = ""; }; - 5A29DB5BE5D9CE87962750BF482BBE0F /* Pod */ = { + 6C236C3759E1FC1E0CED5F83DDFCBEDA /* Targets Support Files */ = { isa = PBXGroup; children = ( - 0F6823BF923060B97536F56C6025E532 /* Classes */, + CFD734A1EEFE61A357498189C19C0D6E /* Pods-ChannelDemo */, ); - path = Pod; + name = "Targets Support Files"; sourceTree = ""; }; - 7AF8BF8A2AF5047CD1B6CD4169AD843F /* Support Files */ = { + 6C6C691FB0CCF13E240B8F7C51EFAE83 /* Products */ = { isa = PBXGroup; children = ( - CD5AFDC33D8DC77CC1D8CCF03580D645 /* SocketRocket.xcconfig */, - FD696AA8742C7414B0E1E7F7B9BB5670 /* SocketRocket-Private.xcconfig */, - 6ABFF66641641BE892727459958BE32D /* SocketRocket-dummy.m */, - 2A37B891178FDF15DDBD1353EF25A3B8 /* SocketRocket-prefix.pch */, + 82D0DC666E5322EFF1E0DFC1B02438B2 /* libPhoenixClient.a */, + C7FD39DDC0A7271177137ABA4F47562E /* libPods-ChannelDemo.a */, + 773354889AB85B2EF932F9908D4DBEBC /* libSocketRocket.a */, ); - name = "Support Files"; - path = "../Target Support Files/SocketRocket"; + name = Products; sourceTree = ""; }; - 7DB346D0F39D3F0E887471402A8071AB = { + 6EB8FF7D7B590AFEE588DA34C3F5D773 /* Pod */ = { isa = PBXGroup; children = ( - BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, - 0C533C7408F33A2FE7110C63FC6374C7 /* Development Pods */, - 122DA2E5084A4393C29BE363C764795C /* Frameworks */, - 9A2FA377D3C9677E360BD97E1E4F543E /* Pods */, - CCA510CFBEA2D207524CDA0D73C3B561 /* Products */, - D2411A5FE7F7A004607BED49990C37F4 /* Targets Support Files */, + BCB24E631C15AE2CDF659EA536C533ED /* Classes */, ); + path = Pod; sourceTree = ""; }; - 952EEBFAF8F7E620423C9F156F25A506 /* Pods */ = { + 71048E10AAA0327E4AF9789294976F5A /* Support Files */ = { isa = PBXGroup; children = ( - 15A529C27057E4A57D259CBC6E6CE49C /* Pods-acknowledgements.markdown */, - BF59BC15D23E1E1912C8F334E7236813 /* Pods-acknowledgements.plist */, - 64A8C77047CED4970D02C60B0261B13D /* Pods-dummy.m */, - 641AE05DD55E5E6AC1590CD7B4A18F97 /* Pods-resources.sh */, - CDC53EF2ACCB8769B8D798B077B709FA /* Pods.debug.xcconfig */, - 0719E3A5CB57C85BADFE0755B55C12C1 /* Pods.release.xcconfig */, + 9EB4204405A7EEB1C440424546E30F38 /* PhoenixClient.xcconfig */, + A358E06BFB9E1BABA2B65BD32A41C377 /* PhoenixClient-dummy.m */, + D7066DB86DC3DA9F88A8DD2A3DD72E28 /* PhoenixClient-prefix.pch */, ); - name = Pods; - path = "Target Support Files/Pods"; + name = "Support Files"; + path = "Example/ChannelDemo/Pods/Target Support Files/PhoenixClient"; sourceTree = ""; }; - 9A2FA377D3C9677E360BD97E1E4F543E /* Pods */ = { + 77E8D43B098762E86BCB2652BB458491 /* PhoenixClient */ = { isa = PBXGroup; children = ( - AA55B0D89EF5CD47EC7403EFFC315D35 /* SocketRocket */, + 6EB8FF7D7B590AFEE588DA34C3F5D773 /* Pod */, + 71048E10AAA0327E4AF9789294976F5A /* Support Files */, ); - name = Pods; + name = PhoenixClient; + path = ../../..; sourceTree = ""; }; - AA55B0D89EF5CD47EC7403EFFC315D35 /* SocketRocket */ = { + 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( - E665FF1B617282E4ED31DA6529057213 /* NSData+SRB64Additions.h */, - 2A6EA420125E3718111C5283EE0F789C /* NSData+SRB64Additions.m */, - 8159BDCEFBB2AB8342F4E7DC1959A958 /* SRWebSocket.h */, - 79CF598C2010DF0045B1700355F916A6 /* SRWebSocket.m */, - 95DBBB00E479E44DA607CB61500227F8 /* base64.c */, - 015962464959F741A646C17CA0F27B9D /* base64.h */, - 7AF8BF8A2AF5047CD1B6CD4169AD843F /* Support Files */, + BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, + 0C533C7408F33A2FE7110C63FC6374C7 /* Development Pods */, + 122DA2E5084A4393C29BE363C764795C /* Frameworks */, + 87C8C1E82D94C2581AD762E08C3FCA56 /* Pods */, + 6C6C691FB0CCF13E240B8F7C51EFAE83 /* Products */, + 6C236C3759E1FC1E0CED5F83DDFCBEDA /* Targets Support Files */, ); - path = SocketRocket; sourceTree = ""; }; - B139A6B3ECA3A9CDF91A2E5FCA240DD8 /* Support Files */ = { + 87C8C1E82D94C2581AD762E08C3FCA56 /* Pods */ = { isa = PBXGroup; children = ( - 1542520D00885299B083C801FA03DB97 /* PhoenixClient.xcconfig */, - 274EE3197D57A80F09E01BD1B255CFC4 /* PhoenixClient-Private.xcconfig */, - 88D9A4ED759E80C82CF91F0F25AC8918 /* PhoenixClient-dummy.m */, - D7F208DB93186345BCD8F30138A803E3 /* PhoenixClient-prefix.pch */, + 9D2421F2698AF4A47A78BD7E89AA4102 /* SocketRocket */, ); - name = "Support Files"; - path = "Example/ChannelDemo/Pods/Target Support Files/PhoenixClient"; + name = Pods; sourceTree = ""; }; - CCA510CFBEA2D207524CDA0D73C3B561 /* Products */ = { + 9D2421F2698AF4A47A78BD7E89AA4102 /* SocketRocket */ = { isa = PBXGroup; children = ( - 05E951383CA7E23EBA9BE4B728A143EA /* libPhoenixClient.a */, - 8AD64C9CD955BC90AC618A94EFDF1A12 /* libPods.a */, - 2809FCFD207848E6D3F0AB81724B0C35 /* libSocketRocket.a */, + 4A21A83EE3A668EC1D845E6882E6B55D /* SRWebSocket.h */, + 4DA7F151ADE6CD1C0AB1BB2A3D839051 /* SRWebSocket.m */, + 69E0C6F1991A5A442E1A2B003EEDC2E6 /* Support Files */, ); - name = Products; + path = SocketRocket; sourceTree = ""; }; - D2411A5FE7F7A004607BED49990C37F4 /* Targets Support Files */ = { + B728418FA3338AB680410C5B26CF547F /* iOS */ = { isa = PBXGroup; children = ( - 952EEBFAF8F7E620423C9F156F25A506 /* Pods */, + ED316EE84B1D3AAE415457D92E62A3A0 /* CFNetwork.framework */, + CBC51718377FC85475D865A171A8B5CC /* Foundation.framework */, + E967D042C48D5885583D70105EF16526 /* Security.framework */, ); - name = "Targets Support Files"; + name = iOS; sourceTree = ""; }; - ECD260DD19B725A7615428234008C004 /* iOS */ = { + BCB24E631C15AE2CDF659EA536C533ED /* Classes */ = { isa = PBXGroup; children = ( - 78E595490F1D14AB11C4E2E1CB0C8C5A /* CFNetwork.framework */, - 6C443A13E5FA7C35E86A5123EB4B0974 /* Foundation.framework */, - 88B4377A4CF30453DDC4CBA90A04FC3C /* Security.framework */, + 1D52E6F94FD02E0971333A31757EC2AA /* NSDictionary+QueryString.h */, + E229897C2157A188CF43F2984EC6F601 /* NSDictionary+QueryString.m */, + 96609297DA617CD3D017BCC848194553 /* NSString+URLEncoding.h */, + FDCF040A332CCADF7DB3C922803F1055 /* NSString+URLEncoding.m */, + BD2E397A9C16379EE60D05A4DD11D31E /* PhoenixClient.h */, + A12CB0C47740295861F63B2778ED4B7D /* PhxChannel.h */, + 0279A550A258560D275F358AA23199C7 /* PhxChannel.m */, + A0CBD7B62C881A8687A6E62CCC75BD1D /* PhxChannel_Private.h */, + 9744AA97EDD7B4EE0093DC464313B1EF /* PhxPush.h */, + E0357449DA3C2A9C0B3DC91639BA4416 /* PhxPush.m */, + 4EFED36533717A5351EFD6541FE61772 /* PhxPush_Private.h */, + FA05AAB7AD880252D84958DA96A1DD3A /* PhxSocket.h */, + 8C97068D26810EB2938C2EA9DE217A45 /* PhxSocket.m */, + 187D804E234B07D30AFBEDB25F3A047F /* PhxSocket_Private.h */, + 2E2710BB6AAE88ED9DF2CB5B7E4DA0A5 /* PhxTypes.h */, ); - name = iOS; + path = Classes; sourceTree = ""; }; - FAAB1434ABCA1424D15C17BC0DECE654 /* PhoenixClient */ = { + CFD734A1EEFE61A357498189C19C0D6E /* Pods-ChannelDemo */ = { isa = PBXGroup; children = ( - 5A29DB5BE5D9CE87962750BF482BBE0F /* Pod */, - B139A6B3ECA3A9CDF91A2E5FCA240DD8 /* Support Files */, - ); - name = PhoenixClient; - path = ../../..; + 8C5E2697899F527CFD65E90F6972F4F9 /* Pods-ChannelDemo-acknowledgements.markdown */, + 6F037E81243201D2C6A66F3BDC479DF5 /* Pods-ChannelDemo-acknowledgements.plist */, + 86EFFFDCB21CB37C4BD303575B12EE2D /* Pods-ChannelDemo-dummy.m */, + EB8631C6E384672FE26CB42CB5EC7499 /* Pods-ChannelDemo-frameworks.sh */, + 6F2C6E28A1BFDBC26CF524D691BF2AEC /* Pods-ChannelDemo-resources.sh */, + 3BF77F84FC38137D60A6EB45B33AB297 /* Pods-ChannelDemo.debug.xcconfig */, + 4BC1CF3CC7B80C2DEC3386FE56B745C5 /* Pods-ChannelDemo.release.xcconfig */, + ); + name = "Pods-ChannelDemo"; + path = "Target Support Files/Pods-ChannelDemo"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 99F60F7CD96C31C32B714E374DCD3855 /* Headers */ = { + AB075725C1D2490AD97C25B0C7577510 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F42AF2D506AB15439D666CDF7ED0B60B /* NSData+SRB64Additions.h in Headers */, - 0E9E40C6CC12607042CFD0D25E0C2110 /* SRWebSocket.h in Headers */, - B303D83F533947AE2F04291A4C9CAB2C /* base64.h in Headers */, + 477F2CCB1000EDD6011F59D57AD5D2C5 /* NSDictionary+QueryString.h in Headers */, + C33FAD28084111A17A13B986B6E37003 /* NSString+URLEncoding.h in Headers */, + 47494D076C83BB60C1C593A2AAA21662 /* PhoenixClient.h in Headers */, + EC88D47F9C4756EAF965ADA4722CA0C3 /* PhxChannel.h in Headers */, + 45069B9D5ABA201347A484D6C4895EDF /* PhxChannel_Private.h in Headers */, + 173199AFE7CE0A5C0B7F7968F0B6389B /* PhxPush.h in Headers */, + 4C78485AEAC9080FDBACE8CCBCBF53B9 /* PhxPush_Private.h in Headers */, + B6DC669CB632DE988063EAEB3D87717A /* PhxSocket.h in Headers */, + 7747CA6BFCC7EE5E2ABD5156FD8D3419 /* PhxSocket_Private.h in Headers */, + E4EBE6E8094EFCA0CBCE8FD1B15C64AF /* PhxTypes.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - CAFACFEE071C6CBD9F132C61CE53704B /* Headers */ = { + ED7D74F1E70D8A2839781EFB394679DB /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 3BAEF16C73F7CEBFD9C8D43EBFFA7AAA /* NSDictionary+QueryString.h in Headers */, - B63B1EB34A148A3AB3DD2546B942A440 /* PhoenixClient.h in Headers */, - 2AC9C39FD28A69B425C62DDC231455D9 /* PhxChannel.h in Headers */, - 1123DEE8CC6774FAF2DFBA84E1038FFE /* PhxChannel_Private.h in Headers */, - BC049F417E32291D6F80EEE2C8B87602 /* PhxPush.h in Headers */, - C85FBFAE1B82C32C0032F01C /* NSString+URLEncoding.h in Headers */, - 005B49132A7EA1061FE7CD982114A909 /* PhxPush_Private.h in Headers */, - 3AC87E69FAF25D2A9592EA31DF94D9D0 /* PhxSocket.h in Headers */, - 52A8DE31AED48921F91D13D9C46FD292 /* PhxSocket_Private.h in Headers */, - 19717D5807626CAA26A95A0C85563164 /* PhxTypes.h in Headers */, + 9C4D2FE6255A128BEBEE2DD6E61012B1 /* SRWebSocket.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 581F18A7248698A5149DB357527EB3C4 /* Pods */ = { + 8AC46136079BD537C1379D15B6B2B02A /* PhoenixClient */ = { isa = PBXNativeTarget; - buildConfigurationList = 47DCFBFFD6C06086E77832393FD50D10 /* Build configuration list for PBXNativeTarget "Pods" */; + buildConfigurationList = 2CF027BED3B2B89D716999766F86DFDF /* Build configuration list for PBXNativeTarget "PhoenixClient" */; buildPhases = ( - 1385E78FEC3D6229FC988401FE2834D6 /* Sources */, - EB0520A3C3BF911ACA7CB21DCA8E0E9C /* Frameworks */, + 4BC5CED3D2E534749A9A972AED1C651C /* Sources */, + 1B13160CEAB10F10A3BF9F1F128FFEF8 /* Frameworks */, + AB075725C1D2490AD97C25B0C7577510 /* Headers */, ); buildRules = ( ); dependencies = ( - D842A1E0F6521E5831A5857404A04FE6 /* PBXTargetDependency */, - 104409277C7B039FC61BC642E0C19152 /* PBXTargetDependency */, + 22BB31644FEE0195C23F6E26E753FB53 /* PBXTargetDependency */, ); - name = Pods; - productName = Pods; - productReference = 8AD64C9CD955BC90AC618A94EFDF1A12 /* libPods.a */; + name = PhoenixClient; + productName = PhoenixClient; + productReference = 82D0DC666E5322EFF1E0DFC1B02438B2 /* libPhoenixClient.a */; productType = "com.apple.product-type.library.static"; }; - 6AF382003FC0D8D85E5A5E4C338A52B8 /* SocketRocket */ = { + 9347B6FCB596E88483BD71C9E6C7C920 /* Pods-ChannelDemo */ = { isa = PBXNativeTarget; - buildConfigurationList = 6317093F2508F0F115269BA29A553C83 /* Build configuration list for PBXNativeTarget "SocketRocket" */; + buildConfigurationList = 6609279BB71544B72FE4BF83EC417626 /* Build configuration list for PBXNativeTarget "Pods-ChannelDemo" */; buildPhases = ( - C0A9C04A9C307E41E958C8BBF4B0C394 /* Sources */, - 375CD91664DE6FCA367E9E87154DE300 /* Frameworks */, - 99F60F7CD96C31C32B714E374DCD3855 /* Headers */, + 6527C20F61CDAB6219BA6766EBD22D48 /* Sources */, + 73ADF7A2D3B0AAF46F6500978EF3C73C /* Frameworks */, ); buildRules = ( ); dependencies = ( + C626DDAAB1B12737C218AB71CD49944B /* PBXTargetDependency */, + DB19A20E846AA6E104C6234F501D5CCE /* PBXTargetDependency */, ); - name = SocketRocket; - productName = SocketRocket; - productReference = 2809FCFD207848E6D3F0AB81724B0C35 /* libSocketRocket.a */; + name = "Pods-ChannelDemo"; + productName = "Pods-ChannelDemo"; + productReference = C7FD39DDC0A7271177137ABA4F47562E /* libPods-ChannelDemo.a */; productType = "com.apple.product-type.library.static"; }; - D9590A4BEAE4052F089D580A493C40B0 /* PhoenixClient */ = { + 9358571773D5DAA48FB6CD212703765E /* SocketRocket */ = { isa = PBXNativeTarget; - buildConfigurationList = 6D0C5B5B5C5372BF6AEDECAD30BCBEC1 /* Build configuration list for PBXNativeTarget "PhoenixClient" */; + buildConfigurationList = F77D06A873ECFCA7DE87DC92DB9B6E0C /* Build configuration list for PBXNativeTarget "SocketRocket" */; buildPhases = ( - FC6E4289007207DB8722AC83FF1C50A7 /* Sources */, - B53407081DFC704DFC091C268CAA4C51 /* Frameworks */, - CAFACFEE071C6CBD9F132C61CE53704B /* Headers */, + 6547DACEF462D62FC3478FA96DB54D1B /* Sources */, + 5B57428E5E3A871E901D5EA6AEF2AB65 /* Frameworks */, + ED7D74F1E70D8A2839781EFB394679DB /* Headers */, ); buildRules = ( ); dependencies = ( - 5D24E83188DE843D9CB7BC32A11532A1 /* PBXTargetDependency */, ); - name = PhoenixClient; - productName = PhoenixClient; - productReference = 05E951383CA7E23EBA9BE4B728A143EA /* libPhoenixClient.a */; + name = SocketRocket; + productName = SocketRocket; + productReference = 773354889AB85B2EF932F9908D4DBEBC /* libSocketRocket.a */; productType = "com.apple.product-type.library.static"; }; /* End PBXNativeTarget section */ @@ -396,112 +380,97 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = CCA510CFBEA2D207524CDA0D73C3B561 /* Products */; + productRefGroup = 6C6C691FB0CCF13E240B8F7C51EFAE83 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - D9590A4BEAE4052F089D580A493C40B0 /* PhoenixClient */, - 581F18A7248698A5149DB357527EB3C4 /* Pods */, - 6AF382003FC0D8D85E5A5E4C338A52B8 /* SocketRocket */, + 8AC46136079BD537C1379D15B6B2B02A /* PhoenixClient */, + 9347B6FCB596E88483BD71C9E6C7C920 /* Pods-ChannelDemo */, + 9358571773D5DAA48FB6CD212703765E /* SocketRocket */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 1385E78FEC3D6229FC988401FE2834D6 /* Sources */ = { + 4BC5CED3D2E534749A9A972AED1C651C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E2D155EF4F1A2DF3FD392BF1F2D84906 /* Pods-dummy.m in Sources */, + 1800C21878390ACCA4D3F5E9C3FDE11F /* NSDictionary+QueryString.m in Sources */, + 94E0A9323CD619B35D21070AEB54910B /* NSString+URLEncoding.m in Sources */, + 33939F72896E65FE3E38F1365A39D429 /* PhoenixClient-dummy.m in Sources */, + 912B8342864F19758AFB81702F15318A /* PhxChannel.m in Sources */, + 66EC2B0372074FCDFA98E4979A6136BD /* PhxPush.m in Sources */, + 714E81779C42DC86B78867FFF97B50DE /* PhxSocket.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - C0A9C04A9C307E41E958C8BBF4B0C394 /* Sources */ = { + 6527C20F61CDAB6219BA6766EBD22D48 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - CFB60667279A435F43A4A4663CDD7481 /* NSData+SRB64Additions.m in Sources */, - A051AFCD339D7D89A6756977684F2293 /* SRWebSocket.m in Sources */, - DBB05DE71C629BB0026F2305C5DB4027 /* SocketRocket-dummy.m in Sources */, - 26A2093F843BF1EA20CE3CE7D71D0797 /* base64.c in Sources */, + 8F044CE4FB23FF25589FA771CB133991 /* Pods-ChannelDemo-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - FC6E4289007207DB8722AC83FF1C50A7 /* Sources */ = { + 6547DACEF462D62FC3478FA96DB54D1B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C85FBFAF1B82C32C0032F01C /* NSString+URLEncoding.m in Sources */, - A7666425FE4D5F0497578F2FFD8D8300 /* NSDictionary+QueryString.m in Sources */, - 7FE81830DAB6BF7E570D4EF9F7C4D936 /* PhoenixClient-dummy.m in Sources */, - 9FBA791BCE77F4662B9FE11E5C9FBD59 /* PhxChannel.m in Sources */, - 3F627F4421F5B736D0BA7277E1D68E2A /* PhxPush.m in Sources */, - A4794C55BA311794925FBD348BACAA90 /* PhxSocket.m in Sources */, + 4144FEABA82B00A34416BC865E0BD9F5 /* SocketRocket-dummy.m in Sources */, + 6606EA5913062B010D20316DB3483C5F /* SRWebSocket.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 104409277C7B039FC61BC642E0C19152 /* PBXTargetDependency */ = { + 22BB31644FEE0195C23F6E26E753FB53 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SocketRocket; - target = 6AF382003FC0D8D85E5A5E4C338A52B8 /* SocketRocket */; - targetProxy = 441D415B83524646129AEB8F9067E020 /* PBXContainerItemProxy */; + target = 9358571773D5DAA48FB6CD212703765E /* SocketRocket */; + targetProxy = 7C4D5E0B869161BFAFF0C05134F2C8DE /* PBXContainerItemProxy */; }; - 5D24E83188DE843D9CB7BC32A11532A1 /* PBXTargetDependency */ = { + C626DDAAB1B12737C218AB71CD49944B /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = SocketRocket; - target = 6AF382003FC0D8D85E5A5E4C338A52B8 /* SocketRocket */; - targetProxy = F9C3FBE1B633CC19B487339ED7EE5324 /* PBXContainerItemProxy */; + name = PhoenixClient; + target = 8AC46136079BD537C1379D15B6B2B02A /* PhoenixClient */; + targetProxy = A314345CACE17310E23CB6720E947201 /* PBXContainerItemProxy */; }; - D842A1E0F6521E5831A5857404A04FE6 /* PBXTargetDependency */ = { + DB19A20E846AA6E104C6234F501D5CCE /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = PhoenixClient; - target = D9590A4BEAE4052F089D580A493C40B0 /* PhoenixClient */; - targetProxy = 8ABDF02F6F3DAC8DB4D7C19AC4D1C678 /* PBXContainerItemProxy */; + name = SocketRocket; + target = 9358571773D5DAA48FB6CD212703765E /* SocketRocket */; + targetProxy = B76093B7B64629BE6FA168AC34B4A797 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 244FA01E054670C23B13A0AF1063FDAB /* Release */ = { + 0B1BC8DCEEA971F1C660D8D9F7A815C0 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FD696AA8742C7414B0E1E7F7B9BB5670 /* SocketRocket-Private.xcconfig */; + baseConfigurationReference = 3228A650991C8833FCB32F94E6327AC6 /* SocketRocket.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/SocketRocket/SocketRocket-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 349282BAD9BEA79F99AB99D722B6CCC7 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0719E3A5CB57C85BADFE0755B55C12C1 /* Pods.release.xcconfig */; - buildSettings = { - ENABLE_STRICT_OBJC_MSGSEND = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; + PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; - name = Release; + name = Debug; }; - 3ABFEC3FAB5DCFD874CC841BE7F3CF3A /* Debug */ = { + 4F9FEE4D19C9F96EC58CBAD546269E61 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CDC53EF2ACCB8769B8D798B077B709FA /* Pods.debug.xcconfig */; + baseConfigurationReference = 3BF77F84FC38137D60A6EB45B33AB297 /* Pods-ChannelDemo.debug.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; @@ -512,9 +481,9 @@ }; name = Debug; }; - 47A8EF6067AA0C6CC99C319269252688 /* Release */ = { + 8B5E3E040CC50E2E614F68EA43A7AA8D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 274EE3197D57A80F09E01BD1B255CFC4 /* PhoenixClient-Private.xcconfig */; + baseConfigurationReference = 9EB4204405A7EEB1C440424546E30F38 /* PhoenixClient.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/PhoenixClient/PhoenixClient-prefix.pch"; @@ -522,28 +491,14 @@ MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Release; }; - 511349B928C797D2B4C0260B07DEB600 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FD696AA8742C7414B0E1E7F7B9BB5670 /* SocketRocket-Private.xcconfig */; - buildSettings = { - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/SocketRocket/SocketRocket-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - }; - name = Debug; - }; A70CDAD61F90AC503C7D04CC22DA2923 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -583,9 +538,26 @@ }; name = Debug; }; - BDA4F9AB5FEA101D596D688117B0B09D /* Debug */ = { + A90E149EC2CBC4311F21CA299E827883 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 274EE3197D57A80F09E01BD1B255CFC4 /* PhoenixClient-Private.xcconfig */; + baseConfigurationReference = 4BC1CF3CC7B80C2DEC3386FE56B745C5 /* Pods-ChannelDemo.release.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MACH_O_TYPE = staticlib; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; + B3744302C62D8406D89C2D037122058A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9EB4204405A7EEB1C440424546E30F38 /* PhoenixClient.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/PhoenixClient/PhoenixClient-prefix.pch"; @@ -593,12 +565,32 @@ MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Debug; }; + F27D4A2E56D8BEEF6944499344D3F5DE /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3228A650991C8833FCB32F94E6327AC6 /* SocketRocket.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/SocketRocket/SocketRocket-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; FB45FFD90572718D82AB9092B750F0CA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -636,38 +628,38 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 2CF027BED3B2B89D716999766F86DFDF /* Build configuration list for PBXNativeTarget "PhoenixClient" */ = { isa = XCConfigurationList; buildConfigurations = ( - A70CDAD61F90AC503C7D04CC22DA2923 /* Debug */, - FB45FFD90572718D82AB9092B750F0CA /* Release */, + B3744302C62D8406D89C2D037122058A /* Debug */, + 8B5E3E040CC50E2E614F68EA43A7AA8D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 47DCFBFFD6C06086E77832393FD50D10 /* Build configuration list for PBXNativeTarget "Pods" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3ABFEC3FAB5DCFD874CC841BE7F3CF3A /* Debug */, - 349282BAD9BEA79F99AB99D722B6CCC7 /* Release */, + A70CDAD61F90AC503C7D04CC22DA2923 /* Debug */, + FB45FFD90572718D82AB9092B750F0CA /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 6317093F2508F0F115269BA29A553C83 /* Build configuration list for PBXNativeTarget "SocketRocket" */ = { + 6609279BB71544B72FE4BF83EC417626 /* Build configuration list for PBXNativeTarget "Pods-ChannelDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( - 511349B928C797D2B4C0260B07DEB600 /* Debug */, - 244FA01E054670C23B13A0AF1063FDAB /* Release */, + 4F9FEE4D19C9F96EC58CBAD546269E61 /* Debug */, + A90E149EC2CBC4311F21CA299E827883 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 6D0C5B5B5C5372BF6AEDECAD30BCBEC1 /* Build configuration list for PBXNativeTarget "PhoenixClient" */ = { + F77D06A873ECFCA7DE87DC92DB9B6E0C /* Build configuration list for PBXNativeTarget "SocketRocket" */ = { isa = XCConfigurationList; buildConfigurations = ( - BDA4F9AB5FEA101D596D688117B0B09D /* Debug */, - 47A8EF6067AA0C6CC99C319269252688 /* Release */, + 0B1BC8DCEEA971F1C660D8D9F7A815C0 /* Debug */, + F27D4A2E56D8BEEF6944499344D3F5DE /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/ChannelDemo/Pods/Pods.xcodeproj/xcshareddata/xcschemes/PhoenixClient.xcscheme b/Example/ChannelDemo/Pods/Pods.xcodeproj/xcshareddata/xcschemes/PhoenixClient.xcscheme index 563983b..2c3becb 100644 --- a/Example/ChannelDemo/Pods/Pods.xcodeproj/xcshareddata/xcschemes/PhoenixClient.xcscheme +++ b/Example/ChannelDemo/Pods/Pods.xcodeproj/xcshareddata/xcschemes/PhoenixClient.xcscheme @@ -7,17 +7,17 @@ buildImplicitDependencies = "YES"> + buildForArchiving = "YES"> + BuildableIdentifier = 'primary' + BlueprintIdentifier = 'C18DB22548D7C78AEA98F994' + BlueprintName = 'PhoenixClient' + ReferencedContainer = 'container:Pods.xcodeproj' + BuildableName = 'libPhoenixClient.a'> @@ -29,28 +29,26 @@ buildConfiguration = "Debug"> - - + shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/Example/ChannelDemo/Pods/SocketRocket/README.rst b/Example/ChannelDemo/Pods/SocketRocket/README.rst index 25f3026..da16023 100644 --- a/Example/ChannelDemo/Pods/SocketRocket/README.rst +++ b/Example/ChannelDemo/Pods/SocketRocket/README.rst @@ -8,7 +8,7 @@ You can compare to what `modern browsers look like here `_. SocketRocket currently conforms to all ~300 of `Autobahn -`_'s fuzzing tests (aside from +`_'s fuzzing tests (aside from two UTF-8 ones where it is merely *non-strict*. tests 6.4.2 and 6.4.4) Features/Design @@ -56,7 +56,7 @@ There's a few options. Choose one, or just figure it out Depending on how you configure your project you may need to ``#import`` either -```` or ``"SRSocketRocket.h"`` +```` or ``"SRWebSocket.h"`` Framework Dependencies `````````````````````` @@ -73,7 +73,7 @@ SocketRocket now has (64-bit only) OS X support. ``SocketRocket.framework`` inside Xcode project is for OS X only. It should be identical in function aside from the unicode validation. ICU isn't shipped with OS X which is what the original implementation used for unicode validation. The workaround is much -more rhudimentary and less robust. +more rudimentary and less robust. 1. Add SocketRocket.xcodeproj as either a subproject of your app or in your workspace. 2. Add ``SocketRocket.framework`` to the link libraries @@ -222,9 +222,7 @@ WebSocket Server Implementation Recommendations SocketRocket has been used with the following libraries: - `Tornado `_ -- Go's `weekly build `_ (the official release has an - outdated protocol, so you may have to use weekly until `Go 1 - `_ is released) +- Go's `WebSocket package `_ or Gorilla's `version `_ - `Autobahn `_ (using its fuzzing client) @@ -239,7 +237,7 @@ It could use some more control over things such as pings, etc., but I am sure it will come in time. Autobahn is a great test suite. The Python server code is good, and conforms -well (obviously). Hovever, for me, twisted would be a deal-breaker for writing +well (obviously). However for me, twisted would be a deal-breaker for writing something new. I find it a bit too complex and heavy for a simple service. If you are already using twisted though, Autobahn is probably for you. diff --git a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.h b/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.h deleted file mode 100644 index 7d61063..0000000 --- a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2012 Square Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - - -@interface NSData (SRB64Additions) - -- (NSString *)SR_stringByBase64Encoding; - -@end diff --git a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.m b/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.m deleted file mode 100644 index 5874a18..0000000 --- a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/NSData+SRB64Additions.m +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2012 Square Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "NSData+SRB64Additions.h" -#import "base64.h" - - -@implementation NSData (SRB64Additions) - -- (NSString *)SR_stringByBase64Encoding; -{ - size_t buffer_size = (([self length] * 3 + 2) / 2); - - char *buffer = (char *)malloc(buffer_size); - - int len = b64_ntop([self bytes], [self length], buffer, buffer_size); - - if (len == -1) { - free(buffer); - return nil; - } else{ - return [[NSString alloc] initWithBytesNoCopy:buffer length:len encoding:NSUTF8StringEncoding freeWhenDone:YES]; - } -} - -@end diff --git a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/SRWebSocket.h b/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/SRWebSocket.h index 2d40bb1..5f8bca1 100644 --- a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/SRWebSocket.h +++ b/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/SRWebSocket.h @@ -17,16 +17,30 @@ #import #import -typedef enum { +typedef NS_ENUM(NSInteger, SRReadyState) { SR_CONNECTING = 0, SR_OPEN = 1, SR_CLOSING = 2, SR_CLOSED = 3, -} SRReadyState; +}; + +typedef enum SRStatusCode : NSInteger { + SRStatusCodeNormal = 1000, + SRStatusCodeGoingAway = 1001, + SRStatusCodeProtocolError = 1002, + SRStatusCodeUnhandledType = 1003, + // 1004 reserved. + SRStatusNoStatusReceived = 1005, + // 1004-1006 reserved. + SRStatusCodeInvalidUTF8 = 1007, + SRStatusCodePolicyViolated = 1008, + SRStatusCodeMessageTooBig = 1009, +} SRStatusCode; @class SRWebSocket; extern NSString *const SRWebSocketErrorDomain; +extern NSString *const SRHTTPResponseErrorKey; #pragma mark - SRWebSocketDelegate @@ -36,20 +50,28 @@ extern NSString *const SRWebSocketErrorDomain; @interface SRWebSocket : NSObject -@property (nonatomic, assign) id delegate; +@property (nonatomic, weak) id delegate; @property (nonatomic, readonly) SRReadyState readyState; @property (nonatomic, readonly, retain) NSURL *url; + +@property (nonatomic, readonly) CFHTTPMessageRef receivedHTTPHeaders; + +// Optional array of cookies (NSHTTPCookie objects) to apply to the connections +@property (nonatomic, readwrite) NSArray * requestCookies; + // This returns the negotiated protocol. // It will be nil until after the handshake completes. @property (nonatomic, readonly, copy) NSString *protocol; // Protocols should be an array of strings that turn into Sec-WebSocket-Protocol. +- (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols allowsUntrustedSSLCertificates:(BOOL)allowsUntrustedSSLCertificates; - (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols; - (id)initWithURLRequest:(NSURLRequest *)request; // Some helper constructors. +- (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols allowsUntrustedSSLCertificates:(BOOL)allowsUntrustedSSLCertificates; - (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols; - (id)initWithURL:(NSURL *)url; @@ -71,6 +93,9 @@ extern NSString *const SRWebSocketErrorDomain; // Send a UTF8 String or Data. - (void)send:(id)data; +// Send Data (can be nil) in a ping message. +- (void)sendPing:(NSData *)data; + @end #pragma mark - SRWebSocketDelegate @@ -86,6 +111,7 @@ extern NSString *const SRWebSocketErrorDomain; - (void)webSocketDidOpen:(SRWebSocket *)webSocket; - (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error; - (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean; +- (void)webSocket:(SRWebSocket *)webSocket didReceivePong:(NSData *)pongPayload; @end diff --git a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/SRWebSocket.m b/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/SRWebSocket.m index 3c94137..a0d41fc 100644 --- a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/SRWebSocket.m +++ b/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/SRWebSocket.m @@ -34,9 +34,6 @@ #import #import -#import "base64.h" -#import "NSData+SRB64Additions.h" - #if OS_OBJECT_USE_OBJC_RETAIN_RELEASE #define sr_dispatch_retain(x) #define sr_dispatch_release(x) @@ -48,7 +45,7 @@ #endif #if !__has_feature(objc_arc) -#error SocketRocket muust be compiled with ARC enabled +#error SocketRocket must be compiled with ARC enabled #endif @@ -62,19 +59,6 @@ // B-F reserved. } SROpCode; -typedef enum { - SRStatusCodeNormal = 1000, - SRStatusCodeGoingAway = 1001, - SRStatusCodeProtocolError = 1002, - SRStatusCodeUnhandledType = 1003, - // 1004 reserved. - SRStatusNoStatusReceived = 1005, - // 1004-1006 reserved. - SRStatusCodeInvalidUTF8 = 1007, - SRStatusCodePolicyViolated = 1008, - SRStatusCodeMessageTooBig = 1009, -} SRStatusCode; - typedef struct { BOOL fin; // BOOL rsv1; @@ -88,7 +72,6 @@ static NSString *const SRWebSocketAppendToSecKeyString = @"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; static inline int32_t validate_dispatch_data_partial_string(NSData *data); -static inline dispatch_queue_t log_queue(); static inline void SRFastLog(NSString *format, ...); @interface NSData (SRWebSocket) @@ -123,20 +106,21 @@ @interface _SRRunLoopThread : NSThread static NSString *newSHA1String(const char *bytes, size_t length) { uint8_t md[CC_SHA1_DIGEST_LENGTH]; + + assert(length >= 0); + assert(length <= UINT32_MAX); + CC_SHA1(bytes, (CC_LONG)length, md); - CC_SHA1(bytes, length, md); - - size_t buffer_size = ((sizeof(md) * 3 + 2) / 2); - - char *buffer = (char *)malloc(buffer_size); + NSData *data = [NSData dataWithBytes:md length:CC_SHA1_DIGEST_LENGTH]; - int len = b64_ntop(md, CC_SHA1_DIGEST_LENGTH, buffer, buffer_size); - if (len == -1) { - free(buffer); - return nil; - } else{ - return [[NSString alloc] initWithBytesNoCopy:buffer length:len encoding:NSASCIIStringEncoding freeWhenDone:YES]; + if ([data respondsToSelector:@selector(base64EncodedStringWithOptions:)]) { + return [data base64EncodedStringWithOptions:0]; } + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + return [data base64Encoding]; +#pragma clang diagnostic pop } @implementation NSData (SRWebSocket) @@ -159,6 +143,7 @@ - (NSString *)stringBySHA1ThenBase64Encoding; @end NSString *const SRWebSocketErrorDomain = @"SRWebSocketErrorDomain"; +NSString *const SRHTTPResponseErrorKey = @"HTTPResponseStatusCode"; // Returns number of bytes consumed. Returning 0 means you didn't match. // Sends bytes to callback handler; @@ -193,38 +178,17 @@ - (void)returnConsumer:(SRIOConsumer *)consumer; @interface SRWebSocket () -- (void)_writeData:(NSData *)data; -- (void)_closeWithProtocolError:(NSString *)message; -- (void)_failWithError:(NSError *)error; - -- (void)_disconnect; - -- (void)_readFrameNew; -- (void)_readFrameContinue; - -- (void)_pumpScanner; - -- (void)_pumpWriting; - -- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback; -- (void)_addConsumerWithDataLength:(size_t)dataLength callback:(data_callback)callback readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes; -- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback dataLength:(size_t)dataLength; -- (void)_readUntilBytes:(const void *)bytes length:(size_t)length callback:(data_callback)dataHandler; -- (void)_readUntilHeaderCompleteWithCallback:(data_callback)dataHandler; - -- (void)_sendFrameWithOpcode:(SROpCode)opcode data:(id)data; - -- (BOOL)_checkHandshake:(CFHTTPMessageRef)httpMessage; -- (void)_SR_commonInit; - -- (void)_initializeStreams; -- (void)_connect; - @property (nonatomic) SRReadyState readyState; @property (nonatomic) NSOperationQueue *delegateOperationQueue; @property (nonatomic) dispatch_queue_t delegateDispatchQueue; +// Specifies whether SSL trust chain should NOT be evaluated. +// By default this flag is set to NO, meaning only secure SSL connections are allowed. +// For DEBUG builds this flag is ignored, and SSL connections are allowed regardless +// of the certificate trust configuration +@property (nonatomic, readwrite) BOOL allowsUntrustedSSLCertificates; + @end @@ -255,6 +219,7 @@ @implementation SRWebSocket { NSString *_closeReason; NSString *_secKey; + NSString *_basicAuthorizationString; BOOL _pinnedCertFound; @@ -269,8 +234,6 @@ @implementation SRWebSocket { BOOL _secure; NSURLRequest *_urlRequest; - CFHTTPMessageRef _receivedHTTPHeaders; - BOOL _sentClose; BOOL _didFail; int _closeCode; @@ -298,13 +261,14 @@ + (void)initialize; CRLFCRLF = [[NSData alloc] initWithBytes:"\r\n\r\n" length:4]; } -- (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols; +- (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols allowsUntrustedSSLCertificates:(BOOL)allowsUntrustedSSLCertificates; { self = [super init]; if (self) { assert(request.URL); _url = request.URL; _urlRequest = request; + _allowsUntrustedSSLCertificates = allowsUntrustedSSLCertificates; _requestedProtocols = [protocols copy]; @@ -314,6 +278,11 @@ - (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols; return self; } +- (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols; +{ + return [self initWithURLRequest:request protocols:protocols allowsUntrustedSSLCertificates:NO]; +} + - (id)initWithURLRequest:(NSURLRequest *)request; { return [self initWithURLRequest:request protocols:nil]; @@ -330,9 +299,14 @@ - (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols; return [self initWithURLRequest:request protocols:protocols]; } +- (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols allowsUntrustedSSLCertificates:(BOOL)allowsUntrustedSSLCertificates; +{ + NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; + return [self initWithURLRequest:request protocols:protocols allowsUntrustedSSLCertificates:allowsUntrustedSSLCertificates]; +} + - (void)_SR_commonInit; { - NSString *scheme = _url.scheme.lowercaseString; assert([scheme isEqualToString:@"ws"] || [scheme isEqualToString:@"http"] || [scheme isEqualToString:@"wss"] || [scheme isEqualToString:@"https"]); @@ -381,8 +355,10 @@ - (void)dealloc [_inputStream close]; [_outputStream close]; - sr_dispatch_release(_workQueue); - _workQueue = NULL; + if (_workQueue) { + sr_dispatch_release(_workQueue); + _workQueue = NULL; + } if (_receivedHTTPHeaders) { CFRelease(_receivedHTTPHeaders); @@ -414,7 +390,7 @@ - (void)open; _selfRetain = self; - [self _connect]; + [self openConnection]; } // Calls block on delegate queue @@ -461,9 +437,8 @@ - (void)_HTTPHeadersDidFinish; if (responseCode >= 400) { SRFastLog(@"Request failed with response code %d", responseCode); - [self _failWithError:[NSError errorWithDomain:@"org.lolrus.SocketRocket" code:2132 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"received bad response code from server %d", responseCode] forKey:NSLocalizedDescriptionKey]]]; + [self _failWithError:[NSError errorWithDomain:SRWebSocketErrorDomain code:2132 userInfo:@{NSLocalizedDescriptionKey:[NSString stringWithFormat:@"received bad response code from server %ld", (long)responseCode], SRHTTPResponseErrorKey:@(responseCode)}]]; return; - } if(![self _checkHandshake:_receivedHTTPHeaders]) { @@ -514,7 +489,7 @@ - (void)_readHTTPHeader; }]; } -- (void)didConnect +- (void)didConnect; { SRFastLog(@"Connected"); CFHTTPMessageRef request = CFHTTPMessageCreateRequest(NULL, CFSTR("GET"), (__bridge CFURLRef)_url, kCFHTTPVersion1_1); @@ -524,13 +499,47 @@ - (void)didConnect NSMutableData *keyBytes = [[NSMutableData alloc] initWithLength:16]; SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes); - _secKey = [keyBytes SR_stringByBase64Encoding]; - assert([_secKey length] == 24); + if ([keyBytes respondsToSelector:@selector(base64EncodedStringWithOptions:)]) { + _secKey = [keyBytes base64EncodedStringWithOptions:0]; + } else { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + _secKey = [keyBytes base64Encoding]; +#pragma clang diagnostic pop + } + + assert([_secKey length] == 24); + + // Apply cookies if any have been provided + NSDictionary * cookies = [NSHTTPCookie requestHeaderFieldsWithCookies:[self requestCookies]]; + for (NSString * cookieKey in cookies) { + NSString * cookieValue = [cookies objectForKey:cookieKey]; + if ([cookieKey length] && [cookieValue length]) { + CFHTTPMessageSetHeaderFieldValue(request, (__bridge CFStringRef)cookieKey, (__bridge CFStringRef)cookieValue); + } + } + + // set header for http basic auth + if (_url.user.length && _url.password.length) { + NSData *userAndPassword = [[NSString stringWithFormat:@"%@:%@", _url.user, _url.password] dataUsingEncoding:NSUTF8StringEncoding]; + NSString *userAndPasswordBase64Encoded; + if ([keyBytes respondsToSelector:@selector(base64EncodedStringWithOptions:)]) { + userAndPasswordBase64Encoded = [userAndPassword base64EncodedStringWithOptions:0]; + } else { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + userAndPasswordBase64Encoded = [userAndPassword base64Encoding]; +#pragma clang diagnostic pop + } + _basicAuthorizationString = [NSString stringWithFormat:@"Basic %@", userAndPasswordBase64Encoded]; + CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Authorization"), (__bridge CFStringRef)_basicAuthorizationString); + } + CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Upgrade"), CFSTR("websocket")); CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Connection"), CFSTR("Upgrade")); CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Key"), (__bridge CFStringRef)_secKey); - CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Version"), (__bridge CFStringRef)[NSString stringWithFormat:@"%d", _webSocketVersion]); + CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Version"), (__bridge CFStringRef)[NSString stringWithFormat:@"%ld", (long)_webSocketVersion]); CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Origin"), (__bridge CFStringRef)_url.SR_origin); @@ -552,7 +561,8 @@ - (void)didConnect - (void)_initializeStreams; { - NSInteger port = _url.port.integerValue; + assert(_url.port.unsignedIntValue <= UINT32_MAX); + uint32_t port = _url.port.unsignedIntValue; if (port == 0) { if (!_secure) { port = 80; @@ -570,7 +580,12 @@ - (void)_initializeStreams; _outputStream = CFBridgingRelease(writeStream); _inputStream = CFBridgingRelease(readStream); - + _inputStream.delegate = self; + _outputStream.delegate = self; +} + +- (void)_updateSecureStreamOptions; +{ if (_secure) { NSMutableDictionary *SSLOptions = [[NSMutableDictionary alloc] init]; @@ -578,24 +593,27 @@ - (void)_initializeStreams; // If we're using pinned certs, don't validate the certificate chain if ([_urlRequest SR_SSLPinnedCertificates].count) { - [SSLOptions setValue:[NSNumber numberWithBool:NO] forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain]; + [SSLOptions setValue:@NO forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain]; } #if DEBUG - [SSLOptions setValue:[NSNumber numberWithBool:NO] forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain]; - NSLog(@"SocketRocket: In debug mode. Allowing connection to any root cert"); + self.allowsUntrustedSSLCertificates = YES; #endif + + if (self.allowsUntrustedSSLCertificates) { + [SSLOptions setValue:@NO forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain]; + SRFastLog(@"Allowing connection to any root cert"); + } [_outputStream setProperty:SSLOptions forKey:(__bridge id)kCFStreamPropertySSLSettings]; } - - _inputStream.delegate = self; - _outputStream.delegate = self; } -- (void)_connect; +- (void)openConnection; { + [self _updateSecureStreamOptions]; + if (!_scheduledRunloops.count) { [self scheduleInRunLoop:[NSRunLoop SR_networkRunLoop] forMode:NSDefaultRunLoopMode]; } @@ -623,7 +641,7 @@ - (void)unscheduleFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode; - (void)close; { - [self closeWithCode:-1 reason:nil]; + [self closeWithCode:SRStatusCodeNormal reason:nil]; } - (void)closeWithCode:(NSInteger)code reason:(NSString *)reason; @@ -641,7 +659,7 @@ - (void)closeWithCode:(NSInteger)code reason:(NSString *)reason; SRFastLog(@"Closing with code %d reason %@", code, reason); if (wasConnecting) { - [self _disconnect]; + [self closeConnection]; return; } @@ -657,6 +675,7 @@ - (void)closeWithCode:(NSInteger)code reason:(NSString *)reason; NSUInteger usedLength = 0; BOOL success = [reason getBytes:(char *)mutablePayload.mutableBytes + sizeof(uint16_t) maxLength:payload.length - sizeof(uint16_t) usedLength:&usedLength encoding:NSUTF8StringEncoding options:NSStringEncodingConversionExternalRepresentation range:NSMakeRange(0, reason.length) remainingRange:&remainingRange]; + #pragma unused (success) assert(success); assert(remainingRange.length == 0); @@ -677,7 +696,7 @@ - (void)_closeWithProtocolError:(NSString *)message; [self _performDelegateBlock:^{ [self closeWithCode:SRStatusCodeProtocolError reason:message]; dispatch_async(_workQueue, ^{ - [self _disconnect]; + [self closeConnection]; }); }]; } @@ -698,7 +717,7 @@ - (void)_failWithError:(NSError *)error; SRFastLog(@"Failing with error %@", error.localizedDescription); - [self _disconnect]; + [self closeConnection]; } }); } @@ -713,6 +732,7 @@ - (void)_writeData:(NSData *)data; [_outputBuffer appendData:data]; [self _pumpWriting]; } + - (void)send:(id)data; { NSAssert(self.readyState != SR_CONNECTING, @"Invalid State: Cannot call send: until connection is open"); @@ -731,6 +751,16 @@ - (void)send:(id)data; }); } +- (void)sendPing:(NSData *)data; +{ + NSAssert(self.readyState == SR_OPEN, @"Invalid State: Cannot call send: until connection is open"); + // TODO: maybe not copy this for performance + data = [data copy] ?: [NSData data]; // It's okay for a ping to be empty + dispatch_async(_workQueue, ^{ + [self _sendFrameWithOpcode:SROpCodePing data:data]; + }); +} + - (void)handlePing:(NSData *)pingData; { // Need to pingpong this off _callbackQueue first to make sure messages happen in order @@ -741,9 +771,14 @@ - (void)handlePing:(NSData *)pingData; }]; } -- (void)handlePong; +- (void)handlePong:(NSData *)pongData; { - // NOOP + SRFastLog(@"Received pong"); + [self _performDelegateBlock:^{ + if ([self.delegate respondsToSelector:@selector(webSocket:didReceivePong:)]) { + [self.delegate webSocket:self didReceivePong:pongData]; + } + }]; } - (void)_handleMessage:(id)message @@ -824,11 +859,11 @@ - (void)handleCloseWithData:(NSData *)data; [self closeWithCode:1000 reason:nil]; } dispatch_async(_workQueue, ^{ - [self _disconnect]; + [self closeConnection]; }); } -- (void)_disconnect; +- (void)closeConnection; { [self assertOnWorkQueue]; SRFastLog(@"Trying to disconnect"); @@ -855,7 +890,7 @@ - (void)_handleFrameWithData:(NSData *)frameData opCode:(NSInteger)opcode; if (str == nil && frameData) { [self closeWithCode:SRStatusCodeInvalidUTF8 reason:@"Text frames must be valid UTF-8"]; dispatch_async(_workQueue, ^{ - [self _disconnect]; + [self closeConnection]; }); return; @@ -873,10 +908,10 @@ - (void)_handleFrameWithData:(NSData *)frameData opCode:(NSInteger)opcode; [self handlePing:frameData]; break; case SROpCodePong: - [self handlePong]; + [self handlePong:frameData]; break; default: - [self _closeWithProtocolError:[NSString stringWithFormat:@"Unknown opcode %d", opcode]]; + [self _closeWithProtocolError:[NSString stringWithFormat:@"Unknown opcode %ld", (long)opcode]]; // TODO: Handle invalid opcode break; } @@ -920,7 +955,8 @@ - (void)_handleFrameHeader:(frame_header)frame_header curData:(NSData *)curData; } } } else { - [self _addConsumerWithDataLength:frame_header.payload_length callback:^(SRWebSocket *self, NSData *newData) { + assert(frame_header.payload_length <= SIZE_T_MAX); + [self _addConsumerWithDataLength:(size_t)frame_header.payload_length callback:^(SRWebSocket *self, NSData *newData) { if (isControlFrame) { [self _handleFrameWithData:newData opCode:frame_header.opcode]; } else { @@ -1021,6 +1057,7 @@ - (void)_readFrameContinue; } else { [self _addConsumerWithDataLength:extra_bytes_needed callback:^(SRWebSocket *self, NSData *data) { size_t mapped_size = data.length; + #pragma unused (mapped_size) const void *mapped_buffer = data.bytes; size_t offset = 0; @@ -1037,7 +1074,6 @@ - (void)_readFrameContinue; assert(header.payload_length < 126 && header.payload_length >= 0); } - if (header.masked) { assert(mapped_size >= sizeof(_currentReadMaskOffset) + offset); memcpy(self->_currentReadMaskKey, ((uint8_t *)mapped_buffer) + offset, sizeof(self->_currentReadMaskKey)); @@ -1071,7 +1107,7 @@ - (void)_pumpWriting; if (dataLength - _outputBufferOffset > 0 && _outputStream.hasSpaceAvailable) { NSInteger bytesWritten = [_outputStream write:_outputBuffer.bytes + _outputBufferOffset maxLength:dataLength - _outputBufferOffset]; if (bytesWritten == -1) { - [self _failWithError:[NSError errorWithDomain:@"org.lolrus.SocketRocket" code:2145 userInfo:[NSDictionary dictionaryWithObject:@"Error writing to stream" forKey:NSLocalizedDescriptionKey]]]; + [self _failWithError:[NSError errorWithDomain:SRWebSocketErrorDomain code:2145 userInfo:[NSDictionary dictionaryWithObject:@"Error writing to stream" forKey:NSLocalizedDescriptionKey]]]; return; } @@ -1245,7 +1281,7 @@ - (BOOL)_innerPumpScanner { if (valid_utf8_size == -1) { [self closeWithCode:SRStatusCodeInvalidUTF8 reason:@"Text frames must be valid UTF-8"]; dispatch_async(_workQueue, ^{ - [self _disconnect]; + [self closeConnection]; }); return didWork; } else { @@ -1298,7 +1334,11 @@ - (void)_sendFrameWithOpcode:(SROpCode)opcode data:(id)data; { [self assertOnWorkQueue]; - NSAssert(data == nil || [data isKindOfClass:[NSData class]] || [data isKindOfClass:[NSString class]], @"Function expects nil, NSString or NSData"); + if (nil == data) { + return; + } + + NSAssert([data isKindOfClass:[NSData class]] || [data isKindOfClass:[NSString class]], @"NSString or NSData"); size_t payloadLength = [data isKindOfClass:[NSString class]] ? [(NSString *)data lengthOfBytesUsingEncoding:NSUTF8StringEncoding] : [data length]; @@ -1330,7 +1370,7 @@ - (void)_sendFrameWithOpcode:(SROpCode)opcode data:(id)data; } else if ([data isKindOfClass:[NSString class]]) { unmasked_payload = (const uint8_t *)[data UTF8String]; } else { - assert(NO); + return; } if (payloadLength < 126) { @@ -1395,7 +1435,7 @@ - (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode; if (!_pinnedCertFound) { dispatch_async(_workQueue, ^{ - [self _failWithError:[NSError errorWithDomain:@"org.lolrus.SocketRocket" code:23556 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Invalid server cert"] forKey:NSLocalizedDescriptionKey]]]; + [self _failWithError:[NSError errorWithDomain:SRWebSocketErrorDomain code:23556 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Invalid server cert"] forKey:NSLocalizedDescriptionKey]]]; }); return; } @@ -1435,20 +1475,22 @@ - (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode; if (aStream.streamError) { [self _failWithError:aStream.streamError]; } else { - if (self.readyState != SR_CLOSED) { - self.readyState = SR_CLOSED; - _selfRetain = nil; - } + dispatch_async(_workQueue, ^{ + if (self.readyState != SR_CLOSED) { + self.readyState = SR_CLOSED; + _selfRetain = nil; + } - if (!_sentClose && !_failed) { - _sentClose = YES; - // If we get closed in this state it's probably not clean because we should be sending this when we send messages - [self _performDelegateBlock:^{ - if ([self.delegate respondsToSelector:@selector(webSocket:didCloseWithCode:reason:wasClean:)]) { - [self.delegate webSocket:self didCloseWithCode:0 reason:@"Stream end encountered" wasClean:NO]; - } - }]; - } + if (!_sentClose && !_failed) { + _sentClose = YES; + // If we get closed in this state it's probably not clean because we should be sending this when we send messages + [self _performDelegateBlock:^{ + if ([self.delegate respondsToSelector:@selector(webSocket:didCloseWithCode:reason:wasClean:)]) { + [self.delegate webSocket:self didCloseWithCode:SRStatusCodeGoingAway reason:@"Stream end encountered" wasClean:NO]; + } + }]; + } + }); } break; @@ -1460,7 +1502,7 @@ - (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode; uint8_t buffer[bufferSize]; while (_inputStream.hasBytesAvailable) { - int bytes_read = [_inputStream read:buffer maxLength:bufferSize]; + NSInteger bytes_read = [_inputStream read:buffer maxLength:bufferSize]; if (bytes_read > 0) { [_readBuffer appendBytes:buffer length:bytes_read]; @@ -1594,25 +1636,19 @@ - (NSString *)SR_origin; scheme = @"http"; } - if (self.port) { - return [NSString stringWithFormat:@"%@://%@:%@/", scheme, self.host, self.port]; + BOOL portIsDefault = !self.port || + ([scheme isEqualToString:@"http"] && self.port.integerValue == 80) || + ([scheme isEqualToString:@"https"] && self.port.integerValue == 443); + + if (!portIsDefault) { + return [NSString stringWithFormat:@"%@://%@:%@", scheme, self.host, self.port]; } else { - return [NSString stringWithFormat:@"%@://%@/", scheme, self.host]; + return [NSString stringWithFormat:@"%@://%@", scheme, self.host]; } } @end -static inline dispatch_queue_t log_queue() { - static dispatch_queue_t queue = 0; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - queue = dispatch_queue_create("fast log queue", DISPATCH_QUEUE_SERIAL); - }); - - return queue; -} - //#define SR_ENABLE_LOG static inline void SRFastLog(NSString *format, ...) { @@ -1632,9 +1668,14 @@ static inline void SRFastLog(NSString *format, ...) { #ifdef HAS_ICU static inline int32_t validate_dispatch_data_partial_string(NSData *data) { + if ([data length] > INT32_MAX) { + // INT32_MAX is the limit so long as this Framework is using 32 bit ints everywhere. + return -1; + } + + int32_t size = (int32_t)[data length]; + const void * contents = [data bytes]; - long size = [data length]; - const uint8_t *str = (const uint8_t *)contents; UChar32 codepoint = 1; @@ -1682,7 +1723,7 @@ static inline int32_t validate_dispatch_data_partial_string(NSData *data) { for (int i = 0; i < maxCodepointSize; i++) { NSString *str = [[NSString alloc] initWithBytesNoCopy:(char *)data.bytes length:data.length - i encoding:NSUTF8StringEncoding freeWhenDone:NO]; if (str) { - return data.length - i; + return (int32_t)data.length - i; } } @@ -1738,8 +1779,22 @@ - (void)main; _runLoop = [NSRunLoop currentRunLoop]; dispatch_group_leave(_waitGroup); - NSTimer *timer = [[NSTimer alloc] initWithFireDate:[NSDate distantFuture] interval:0.0 target:nil selector:nil userInfo:nil repeats:NO]; - [_runLoop addTimer:timer forMode:NSDefaultRunLoopMode]; + // Add an empty run loop source to prevent runloop from spinning. + CFRunLoopSourceContext sourceCtx = { + .version = 0, + .info = NULL, + .retain = NULL, + .release = NULL, + .copyDescription = NULL, + .equal = NULL, + .hash = NULL, + .schedule = NULL, + .cancel = NULL, + .perform = NULL + }; + CFRunLoopSourceRef source = CFRunLoopSourceCreate(NULL, 0, &sourceCtx); + CFRunLoopAddSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode); + CFRelease(source); while ([_runLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]) { diff --git a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/base64.c b/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/base64.c deleted file mode 100644 index 1d76d16..0000000 --- a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/base64.c +++ /dev/null @@ -1,314 +0,0 @@ -/* $OpenBSD: base64.c,v 1.5 2006/10/21 09:55:03 otto Exp $ */ - -/* - * Copyright (c) 1996 by Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - * Portions Copyright (c) 1995 by International Business Machines, Inc. - * - * International Business Machines, Inc. (hereinafter called IBM) grants - * permission under its copyrights to use, copy, modify, and distribute this - * Software with or without fee, provided that the above copyright notice and - * all paragraphs of this notice appear in all copies, and that the name of IBM - * not be used in connection with the marketing of any product incorporating - * the Software or modifications thereof, without specific, written prior - * permission. - * - * To the extent it has a right to do so, IBM grants an immunity from suit - * under its patents, if any, for the use, sale or manufacture of products to - * the extent that such products are used for performing Domain Name System - * dynamic updates in TCP/IP networks by means of the Software. No immunity is - * granted for any product per se or for any other function of any product. - * - * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, - * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN - * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - */ - -/* OPENBSD ORIGINAL: lib/libc/net/base64.c */ - - -#if (!defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)) || (!defined(HAVE_B64_PTON) && !defined(HAVE___B64_PTON)) - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "base64.h" - -static const char Base64[] = -"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char Pad64 = '='; - -/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt) - The following encoding technique is taken from RFC 1521 by Borenstein - and Freed. It is reproduced here in a slightly edited form for - convenience. - - A 65-character subset of US-ASCII is used, enabling 6 bits to be - represented per printable character. (The extra 65th character, "=", - is used to signify a special processing function.) - - The encoding process represents 24-bit groups of input bits as output - strings of 4 encoded characters. Proceeding from left to right, a - 24-bit input group is formed by concatenating 3 8-bit input groups. - These 24 bits are then treated as 4 concatenated 6-bit groups, each - of which is translated into a single digit in the base64 alphabet. - - Each 6-bit group is used as an index into an array of 64 printable - characters. The character referenced by the index is placed in the - output string. - - Table 1: The Base64 Alphabet - - Value Encoding Value Encoding Value Encoding Value Encoding - 0 A 17 R 34 i 51 z - 1 B 18 S 35 j 52 0 - 2 C 19 T 36 k 53 1 - 3 D 20 U 37 l 54 2 - 4 E 21 V 38 m 55 3 - 5 F 22 W 39 n 56 4 - 6 G 23 X 40 o 57 5 - 7 H 24 Y 41 p 58 6 - 8 I 25 Z 42 q 59 7 - 9 J 26 a 43 r 60 8 - 10 K 27 b 44 s 61 9 - 11 L 28 c 45 t 62 + - 12 M 29 d 46 u 63 / - 13 N 30 e 47 v - 14 O 31 f 48 w (pad) = - 15 P 32 g 49 x - 16 Q 33 h 50 y - - Special processing is performed if fewer than 24 bits are available - at the end of the data being encoded. A full encoding quantum is - always completed at the end of a quantity. When fewer than 24 input - bits are available in an input group, zero bits are added (on the - right) to form an integral number of 6-bit groups. Padding at the - end of the data is performed using the '=' character. - - Since all base64 input is an integral number of octets, only the - ------------------------------------------------- - following cases can arise: - - (1) the final quantum of encoding input is an integral - multiple of 24 bits; here, the final unit of encoded - output will be an integral multiple of 4 characters - with no "=" padding, - (2) the final quantum of encoding input is exactly 8 bits; - here, the final unit of encoded output will be two - characters followed by two "=" padding characters, or - (3) the final quantum of encoding input is exactly 16 bits; - here, the final unit of encoded output will be three - characters followed by one "=" padding character. - */ - -#if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) -int -b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) -{ - size_t datalength = 0; - u_char input[3]; - u_char output[4]; - u_int i; - - while (2 < srclength) { - input[0] = *src++; - input[1] = *src++; - input[2] = *src++; - srclength -= 3; - - output[0] = input[0] >> 2; - output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); - output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); - output[3] = input[2] & 0x3f; - - if (datalength + 4 > targsize) - return (-1); - target[datalength++] = Base64[output[0]]; - target[datalength++] = Base64[output[1]]; - target[datalength++] = Base64[output[2]]; - target[datalength++] = Base64[output[3]]; - } - - /* Now we worry about padding. */ - if (0 != srclength) { - /* Get what's left. */ - input[0] = input[1] = input[2] = '\0'; - for (i = 0; i < srclength; i++) - input[i] = *src++; - - output[0] = input[0] >> 2; - output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); - output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); - - if (datalength + 4 > targsize) - return (-1); - target[datalength++] = Base64[output[0]]; - target[datalength++] = Base64[output[1]]; - if (srclength == 1) - target[datalength++] = Pad64; - else - target[datalength++] = Base64[output[2]]; - target[datalength++] = Pad64; - } - if (datalength >= targsize) - return (-1); - target[datalength] = '\0'; /* Returned value doesn't count \0. */ - return (datalength); -} -#endif /* !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) */ - -#if !defined(HAVE_B64_PTON) && !defined(HAVE___B64_PTON) - -/* skips all whitespace anywhere. - converts characters, four at a time, starting at (or after) - src from base - 64 numbers into three 8 bit bytes in the target area. - it returns the number of data bytes stored at the target, or -1 on error. - */ - -int -b64_pton(char const *src, u_char *target, size_t targsize) -{ - u_int tarindex, state; - int ch; - char *pos; - - state = 0; - tarindex = 0; - - while ((ch = *src++) != '\0') { - if (isspace(ch)) /* Skip whitespace anywhere. */ - continue; - - if (ch == Pad64) - break; - - pos = strchr(Base64, ch); - if (pos == 0) /* A non-base64 character. */ - return (-1); - - switch (state) { - case 0: - if (target) { - if (tarindex >= targsize) - return (-1); - target[tarindex] = (pos - Base64) << 2; - } - state = 1; - break; - case 1: - if (target) { - if (tarindex + 1 >= targsize) - return (-1); - target[tarindex] |= (pos - Base64) >> 4; - target[tarindex+1] = ((pos - Base64) & 0x0f) - << 4 ; - } - tarindex++; - state = 2; - break; - case 2: - if (target) { - if (tarindex + 1 >= targsize) - return (-1); - target[tarindex] |= (pos - Base64) >> 2; - target[tarindex+1] = ((pos - Base64) & 0x03) - << 6; - } - tarindex++; - state = 3; - break; - case 3: - if (target) { - if (tarindex >= targsize) - return (-1); - target[tarindex] |= (pos - Base64); - } - tarindex++; - state = 0; - break; - } - } - - /* - * We are done decoding Base-64 chars. Let's see if we ended - * on a byte boundary, and/or with erroneous trailing characters. - */ - - if (ch == Pad64) { /* We got a pad char. */ - ch = *src++; /* Skip it, get next. */ - switch (state) { - case 0: /* Invalid = in first position */ - case 1: /* Invalid = in second position */ - return (-1); - - case 2: /* Valid, means one byte of info */ - /* Skip any number of spaces. */ - for (; ch != '\0'; ch = *src++) - if (!isspace(ch)) - break; - /* Make sure there is another trailing = sign. */ - if (ch != Pad64) - return (-1); - ch = *src++; /* Skip the = */ - /* Fall through to "single trailing =" case. */ - /* FALLTHROUGH */ - - case 3: /* Valid, means two bytes of info */ - /* - * We know this char is an =. Is there anything but - * whitespace after it? - */ - for (; ch != '\0'; ch = *src++) - if (!isspace(ch)) - return (-1); - - /* - * Now make sure for cases 2 and 3 that the "extra" - * bits that slopped past the last full byte were - * zeros. If we don't check them, they become a - * subliminal channel. - */ - if (target && target[tarindex] != 0) - return (-1); - } - } else { - /* - * We ended by seeing the end of the string. Make sure we - * have no partial bytes lying around. - */ - if (state != 0) - return (-1); - } - - return (tarindex); -} - -#endif /* !defined(HAVE_B64_PTON) && !defined(HAVE___B64_PTON) */ -#endif diff --git a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/base64.h b/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/base64.h deleted file mode 100644 index c345e2e..0000000 --- a/Example/ChannelDemo/Pods/SocketRocket/SocketRocket/base64.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2012 Square Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - - -#ifndef SocketRocket_base64_h -#define SocketRocket_base64_h - -#include - -extern int -b64_ntop(u_char const *src, - size_t srclength, - char *target, - size_t targsize); - -extern int -b64_pton(char const *src, - u_char *target, - size_t targsize); - - -#endif diff --git a/Example/ChannelDemo/Pods/Target Support Files/PhoenixClient/PhoenixClient-Private.xcconfig b/Example/ChannelDemo/Pods/Target Support Files/PhoenixClient/PhoenixClient-Private.xcconfig deleted file mode 100644 index e7f455f..0000000 --- a/Example/ChannelDemo/Pods/Target Support Files/PhoenixClient/PhoenixClient-Private.xcconfig +++ /dev/null @@ -1,5 +0,0 @@ -#include "PhoenixClient.xcconfig" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PhoenixClient" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PhoenixClient" "${PODS_ROOT}/Headers/Public/SocketRocket" -PODS_ROOT = ${SRCROOT} -SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/ChannelDemo/Pods/Target Support Files/PhoenixClient/PhoenixClient.xcconfig b/Example/ChannelDemo/Pods/Target Support Files/PhoenixClient/PhoenixClient.xcconfig index e69de29..b387cfe 100644 --- a/Example/ChannelDemo/Pods/Target Support Files/PhoenixClient/PhoenixClient.xcconfig +++ b/Example/ChannelDemo/Pods/Target Support Files/PhoenixClient/PhoenixClient.xcconfig @@ -0,0 +1,4 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PhoenixClient" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PhoenixClient" "${PODS_ROOT}/Headers/Public/SocketRocket" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-acknowledgements.markdown similarity index 100% rename from Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown rename to Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-acknowledgements.markdown diff --git a/Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-acknowledgements.plist similarity index 100% rename from Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-acknowledgements.plist rename to Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-acknowledgements.plist diff --git a/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-dummy.m b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-dummy.m new file mode 100644 index 0000000..2913465 --- /dev/null +++ b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_ChannelDemo : NSObject +@end +@implementation PodsDummy_Pods_ChannelDemo +@end diff --git a/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-frameworks.sh b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-frameworks.sh new file mode 100755 index 0000000..6f76344 --- /dev/null +++ b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-frameworks.sh @@ -0,0 +1,84 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + diff --git a/Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-resources.sh b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-resources.sh similarity index 98% rename from Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-resources.sh rename to Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-resources.sh index ea685a2..16774fb 100755 --- a/Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-resources.sh +++ b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo-resources.sh @@ -60,7 +60,7 @@ install_resource() mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]]; then +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" fi diff --git a/Example/ChannelDemo/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo.debug.xcconfig similarity index 100% rename from Example/ChannelDemo/Pods/Target Support Files/Pods/Pods.debug.xcconfig rename to Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo.debug.xcconfig diff --git a/Example/ChannelDemo/Pods/Target Support Files/Pods/Pods.release.xcconfig b/Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo.release.xcconfig similarity index 100% rename from Example/ChannelDemo/Pods/Target Support Files/Pods/Pods.release.xcconfig rename to Example/ChannelDemo/Pods/Target Support Files/Pods-ChannelDemo/Pods-ChannelDemo.release.xcconfig diff --git a/Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-dummy.m b/Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-dummy.m deleted file mode 100644 index ade64bd..0000000 --- a/Example/ChannelDemo/Pods/Target Support Files/Pods/Pods-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods : NSObject -@end -@implementation PodsDummy_Pods -@end diff --git a/Example/ChannelDemo/Pods/Target Support Files/SocketRocket/SocketRocket-Private.xcconfig b/Example/ChannelDemo/Pods/Target Support Files/SocketRocket/SocketRocket-Private.xcconfig deleted file mode 100644 index 53680e3..0000000 --- a/Example/ChannelDemo/Pods/Target Support Files/SocketRocket/SocketRocket-Private.xcconfig +++ /dev/null @@ -1,6 +0,0 @@ -#include "SocketRocket.xcconfig" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SocketRocket" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PhoenixClient" "${PODS_ROOT}/Headers/Public/SocketRocket" -OTHER_LDFLAGS = ${SOCKETROCKET_OTHER_LDFLAGS} -PODS_ROOT = ${SRCROOT} -SKIP_INSTALL = YES \ No newline at end of file diff --git a/Example/ChannelDemo/Pods/Target Support Files/SocketRocket/SocketRocket.xcconfig b/Example/ChannelDemo/Pods/Target Support Files/SocketRocket/SocketRocket.xcconfig index 8def67c..d4f7c17 100644 --- a/Example/ChannelDemo/Pods/Target Support Files/SocketRocket/SocketRocket.xcconfig +++ b/Example/ChannelDemo/Pods/Target Support Files/SocketRocket/SocketRocket.xcconfig @@ -1 +1,5 @@ -SOCKETROCKET_OTHER_LDFLAGS = -l"icucore" -framework "CFNetwork" -framework "Security" \ No newline at end of file +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SocketRocket" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PhoenixClient" "${PODS_ROOT}/Headers/Public/SocketRocket" +OTHER_LDFLAGS = -l"icucore" -framework "CFNetwork" -framework "Security" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/PhoenixClient.xcworkspace/contents.xcworkspacedata b/PhoenixClient.xcworkspace/contents.xcworkspacedata index 94b2795..96bd734 100644 --- a/PhoenixClient.xcworkspace/contents.xcworkspacedata +++ b/PhoenixClient.xcworkspace/contents.xcworkspacedata @@ -1,4 +1,10 @@ + + + + diff --git a/Pod/Classes/NSDictionary+QueryString.h b/Pod/Classes/NSDictionary+QueryString.h index 59c7a68..92c928c 100644 --- a/Pod/Classes/NSDictionary+QueryString.h +++ b/Pod/Classes/NSDictionary+QueryString.h @@ -8,7 +8,11 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface NSDictionary (QueryString) + (NSDictionary *)dictionaryWithQueryString:(NSString *)queryString; - (NSString *)queryStringValue; @end + +NS_ASSUME_NONNULL_END diff --git a/Pod/Classes/NSDictionary+QueryString.m b/Pod/Classes/NSDictionary+QueryString.m index 28fe181..3a3dc20 100644 --- a/Pod/Classes/NSDictionary+QueryString.m +++ b/Pod/Classes/NSDictionary+QueryString.m @@ -11,8 +11,7 @@ @implementation NSDictionary (QueryString) -+ (NSDictionary *)dictionaryWithQueryString:(NSString *)queryString -{ ++ (NSDictionary *)dictionaryWithQueryString:(NSString *)queryString { NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; NSArray *pairs = [queryString componentsSeparatedByString:@"&"]; @@ -26,11 +25,13 @@ + (NSDictionary *)dictionaryWithQueryString:(NSString *)queryString NSString *decodedKey = [key URLDecodedString]; NSString *decodedValue = [value URLDecodedString]; - if (![key isEqualToString:decodedKey]) + if (![key isEqualToString:decodedKey]) { key = decodedKey; + } - if (![value isEqualToString:decodedValue]) + if (![value isEqualToString:decodedValue]) { value = decodedValue; + } [dictionary setObject:value forKey:key]; } @@ -39,8 +40,7 @@ + (NSDictionary *)dictionaryWithQueryString:(NSString *)queryString return [NSDictionary dictionaryWithDictionary:dictionary]; } -- (NSString *)queryStringValue -{ +- (NSString *)queryStringValue { NSMutableArray *pairs = [NSMutableArray array]; for (NSString *key in [self keyEnumerator]) { diff --git a/Pod/Classes/NSString+URLEncoding.h b/Pod/Classes/NSString+URLEncoding.h index 96d4a7f..18435ab 100644 --- a/Pod/Classes/NSString+URLEncoding.h +++ b/Pod/Classes/NSString+URLEncoding.h @@ -8,7 +8,11 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface NSString (URLEncoding) - (NSString *)URLEncodedString; - (NSString *)URLDecodedString; @end + +NS_ASSUME_NONNULL_END diff --git a/Pod/Classes/PhxChannel.h b/Pod/Classes/PhxChannel.h index fcf8dce..a0d6d91 100644 --- a/Pod/Classes/PhxChannel.h +++ b/Pod/Classes/PhxChannel.h @@ -9,6 +9,7 @@ #import #import "PhxTypes.h" +NS_ASSUME_NONNULL_BEGIN @class PhxSocket; @class PhxChannel; @@ -26,12 +27,12 @@ @property (nonatomic, weak) id delegate; @property (nonatomic, weak) PhxSocket* socket; @property (nonatomic, readonly) ChannelState state; -@property (nonatomic, retain) NSString* topic; -@property (nonatomic, retain) NSDictionary *params; +@property (nonatomic, strong) NSString* topic; +@property (nonatomic, strong) NSDictionary *params; -- (id)initWithSocket:(PhxSocket*)socket - topic:(NSString*)topic - params:(NSDictionary*)params; +- (instancetype)initWithSocket:(PhxSocket*)socket + topic:(NSString*)topic + params:(nullable NSDictionary*)params; - (PhxPush*)join; - (void)leave; @@ -44,4 +45,6 @@ - (PhxPush*)pushEvent:(NSString*)event payload:(NSDictionary*)payload; -@end \ No newline at end of file +@end + +NS_ASSUME_NONNULL_END diff --git a/Pod/Classes/PhxChannel.m b/Pod/Classes/PhxChannel.m index 3a23158..43ad689 100644 --- a/Pod/Classes/PhxChannel.m +++ b/Pod/Classes/PhxChannel.m @@ -12,20 +12,24 @@ #import "PhxSocket.h" #import "PhxSocket_Private.h" +NS_ASSUME_NONNULL_BEGIN + @interface PhxChannel () -@property (nonatomic, readwrite) ChannelState state; +@property (nonatomic) ChannelState state; -@property (nonatomic, retain) NSMutableArray *bindings; +@property (nonatomic, strong) NSMutableArray *bindings; -@property (readwrite) BOOL joinedOnce; -@property (nonatomic, retain) PhxPush *joinPush; +@property (atomic) BOOL joinedOnce; +@property (nonatomic, strong) PhxPush *joinPush; @end @implementation PhxChannel -- (id)initWithSocket:(PhxSocket *)socket topic:(NSString *)topic params:(NSDictionary *)params { +- (instancetype)initWithSocket:(PhxSocket *)socket + topic:(NSString *)topic + params:(nullable NSDictionary *)params { self = [super init]; if (self) { self.state = ChannelClosed; @@ -131,7 +135,7 @@ - (NSString*)replyEventName:(NSString*)ref { return [NSString stringWithFormat:@"chan_reply_%@", ref]; } -- (void)triggerEvent:(NSString*)event message:(id)message ref:(id)ref { +- (void)triggerEvent:(NSString*)event message:(id)message ref:(nullable id)ref { NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(NSDictionary *binding, NSDictionary *bindings) { return [[binding valueForKey:@"event"] isEqualToString:event]; }]; @@ -147,4 +151,8 @@ - (PhxPush*)pushEvent:(NSString*)event payload:(NSDictionary*)payload { [pushEvent send]; return pushEvent; } + @end + +NS_ASSUME_NONNULL_END + diff --git a/Pod/Classes/PhxChannel_Private.h b/Pod/Classes/PhxChannel_Private.h index 80cd8ee..6ed6b3a 100644 --- a/Pod/Classes/PhxChannel_Private.h +++ b/Pod/Classes/PhxChannel_Private.h @@ -8,13 +8,17 @@ #import +NS_ASSUME_NONNULL_BEGIN + @class PhxChannel; @interface PhxChannel () - (void)rejoin; -- (void)triggerEvent:(NSString*)event message:(id)message ref:(id)ref; +- (void)triggerEvent:(NSString*)event message:(id)message ref:(nullable id)ref; - (BOOL)isMemberOfTopic:(NSString*)topic; - (NSString*)replyEventName:(NSString*)ref; -@end \ No newline at end of file +@end + +NS_ASSUME_NONNULL_END diff --git a/Pod/Classes/PhxPush.h b/Pod/Classes/PhxPush.h index e528f05..22cb7aa 100644 --- a/Pod/Classes/PhxPush.h +++ b/Pod/Classes/PhxPush.h @@ -9,17 +9,21 @@ #import #import "PhxTypes.h" +NS_ASSUME_NONNULL_BEGIN + @class PhxChannel; @interface PhxPush : NSObject -- (id)initWithChannel:(PhxChannel*)channel - event:(NSString*)event - payload:(NSDictionary*)payload; +- (instancetype)initWithChannel:(PhxChannel*)channel + event:(NSString*)event + payload:(NSDictionary*)payload; - (void)send; -- (PhxPush*)onReceive:(NSString*)status callback:(OnMessage)callback; -- (PhxPush*)after:(int)ms callback:(After)callback; +- (PhxPush *)onReceive:(NSString *)status callback:(OnMessage)callback; +- (PhxPush *)after:(NSTimeInterval)timeInterval callback:(After)callback; @end + +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/Pod/Classes/PhxPush.m b/Pod/Classes/PhxPush.m index e35966b..267b91f 100644 --- a/Pod/Classes/PhxPush.m +++ b/Pod/Classes/PhxPush.m @@ -11,37 +11,35 @@ #import "PhxChannel_Private.h" #import "PhxSocket.h" +NS_ASSUME_NONNULL_BEGIN + @interface PhxPush () @property (nonatomic, weak) PhxChannel *channel; -@property (nonatomic, retain) NSString *event; -@property (nonatomic, retain) NSString *refEvent; -@property (nonatomic, retain) NSDictionary *payload; +@property (nonatomic, strong) NSString *event; +@property (nonatomic, strong) NSString *refEvent; +@property (nonatomic, strong) NSDictionary *payload; -@property (nonatomic, copy) After afterHook; -@property (readwrite) int afterInterval; -@property (nonatomic, retain) NSTimer *afterTimer; +@property (nullable, nonatomic, copy) After afterHook; +@property (nonatomic) NSTimeInterval afterInterval; +@property (nullable, nonatomic, strong) NSTimer *afterTimer; -@property (nonatomic, retain) NSMutableArray *recHooks; -@property (nonatomic, retain) id receivedResp; -@property (readwrite) BOOL sent; +@property (nonatomic, strong) NSMutableArray *recHooks; +@property (nullable, nonatomic, strong) id receivedResp; +@property (atomic) BOOL sent; @end @implementation PhxPush -- (id)initWithChannel:(PhxChannel*)channel - event:(NSString*)event - payload:(NSDictionary*)payload { +- (instancetype)initWithChannel:(PhxChannel*)channel + event:(NSString*)event + payload:(NSDictionary*)payload { self = [super init]; if (self) { self.channel = channel; self.event = event; - if (payload) { - self.payload = payload; - } else { - self.payload = @{}; - } + self.payload = payload; self.receivedResp = nil; self.afterHook = nil; self.recHooks = [NSMutableArray new]; @@ -51,7 +49,7 @@ - (id)initWithChannel:(PhxChannel*)channel } - (void)send { - const NSString *ref = [self.channel.socket makeRef]; + NSString *ref = [self.channel.socket makeRef]; self.refEvent = [self.channel replyEventName:ref]; self.receivedResp = nil; self.sent = NO; @@ -76,12 +74,16 @@ - (PhxPush*)onReceive:(NSString *)status callback:(OnMessage)callback { return self; } -- (PhxPush*)after:(int)ms callback:(After)callback { +- (PhxPush*)after:(NSTimeInterval)timeInterval callback:(After)callback { if (self.afterHook) { // ERROR } - self.afterTimer = [NSTimer scheduledTimerWithTimeInterval:ms target:self selector:@selector(afterTimerFire:) userInfo:nil repeats:NO]; - self.afterInterval = ms; + self.afterTimer = [NSTimer scheduledTimerWithTimeInterval:timeInterval + target:self + selector:@selector(afterTimerFire:) + userInfo:nil + repeats:NO]; + self.afterInterval = timeInterval; self.afterHook = callback; return self; } @@ -129,3 +131,5 @@ - (void)matchReceive:(NSDictionary*)payload { } @end + +NS_ASSUME_NONNULL_END diff --git a/Pod/Classes/PhxPush_Private.h b/Pod/Classes/PhxPush_Private.h index 492ed0d..28f58de 100644 --- a/Pod/Classes/PhxPush_Private.h +++ b/Pod/Classes/PhxPush_Private.h @@ -8,9 +8,12 @@ #import +NS_ASSUME_NONNULL_BEGIN @interface PhxPush() -@property (nonatomic, retain) NSDictionary *payload; +@property (nonatomic, strong) NSDictionary *payload; -@end \ No newline at end of file +@end + +NS_ASSUME_NONNULL_END diff --git a/Pod/Classes/PhxSocket.h b/Pod/Classes/PhxSocket.h index c44eeca..48e819d 100644 --- a/Pod/Classes/PhxSocket.h +++ b/Pod/Classes/PhxSocket.h @@ -9,6 +9,8 @@ #import #import "PhxTypes.h" +NS_ASSUME_NONNULL_BEGIN + @protocol PhxSocketDelegate - (void)phxSocketDidOpen; @@ -22,13 +24,13 @@ @interface PhxSocket : NSObject @property (nonatomic, weak) id delegate; -@property (nonatomic, readwrite) BOOL reconnectOnError; +@property (nonatomic) BOOL reconnectOnError; -- (id)initWithURL:(NSURL*)url; -- (id)initWithURL:(NSURL*)url heartbeatInterval:(int)interval; +- (instancetype)initWithURL:(NSURL*)url; +- (instancetype)initWithURL:(NSURL*)url heartbeatInterval:(NSTimeInterval)interval; - (void)connect; -- (void)connectWithParams:(NSDictionary*)params; +- (void)connectWithParams:(nullable NSDictionary*)params; - (void)disconnect; - (void)reconnect; @@ -47,3 +49,5 @@ - (void)push:(NSDictionary*)data; @end + +NS_ASSUME_NONNULL_END diff --git a/Pod/Classes/PhxSocket.m b/Pod/Classes/PhxSocket.m index 2578a44..0c24a64 100644 --- a/Pod/Classes/PhxSocket.m +++ b/Pod/Classes/PhxSocket.m @@ -13,39 +13,41 @@ #import "PhxChannel_Private.h" #import "NSDictionary+QueryString.h" -static NSTimeInterval reconnectInterval = 5; +NS_ASSUME_NONNULL_BEGIN + +static NSTimeInterval kReconnectInterval = 5; @interface PhxSocket () -@property (nonatomic, retain) SRWebSocket *socket; -@property (nonatomic, retain) NSURL *URL; -@property (nonatomic, assign) int heartbeatInterval; +@property (nullable, nonatomic) SRWebSocket *socket; +@property (nonatomic, strong) NSURL *URL; +@property (nonatomic) NSTimeInterval heartbeatInterval; -@property (nonatomic, retain) NSMutableArray *channels; +@property (nonatomic, strong) NSMutableArray *channels; @property (nonatomic, strong) NSOperationQueue *queue; -@property (nonatomic, retain) NSTimer *sendBufferTimer; -@property (nonatomic, retain) NSTimer *reconnectTimer; -@property (nonatomic, retain) NSTimer *heartbeatTimer; +@property (nonatomic, strong) NSTimer *sendBufferTimer; +@property (nullable, nonatomic, strong) NSTimer *reconnectTimer; +@property (nullable, nonatomic, strong) NSTimer *heartbeatTimer; -@property (nonatomic, retain) NSMutableArray *openCallbacks; -@property (nonatomic, retain) NSMutableArray *closeCallbacks; -@property (nonatomic, retain) NSMutableArray *errorCallbacks; -@property (nonatomic, retain) NSMutableArray *messageCallbacks; +@property (nonatomic, strong) NSMutableArray *openCallbacks; +@property (nonatomic, strong) NSMutableArray *closeCallbacks; +@property (nonatomic, strong) NSMutableArray *errorCallbacks; +@property (nonatomic, strong) NSMutableArray *messageCallbacks; -@property (nonatomic, retain) NSDictionary *params; +@property (nullable, nonatomic) NSDictionary *params; -@property (readwrite) int ref; +@property (atomic) NSUInteger ref; @end @implementation PhxSocket -- (id)initWithURL:(NSURL*)url { +- (instancetype)initWithURL:(NSURL*)url { return [self initWithURL:url heartbeatInterval:0]; } -- (id)initWithURL:(NSURL*)url heartbeatInterval:(int)interval { +- (instancetype)initWithURL:(NSURL*)url heartbeatInterval:(NSTimeInterval)interval { self = [super init]; if (self) { self.URL = url; @@ -70,7 +72,7 @@ - (void)connect { [self connectWithParams:nil]; } -- (void)connectWithParams:(NSDictionary*)params { +- (void)connectWithParams:(nullable NSDictionary*)params { NSURL *url; self.params = params; if (self.params != nil) { @@ -211,7 +213,11 @@ - (void)onConnClose:(id)event { if (self.reconnectOnError) { [self discardReconnectTimer]; - self.reconnectTimer = [NSTimer scheduledTimerWithTimeInterval:reconnectInterval target:self selector:@selector(reconnect) userInfo:nil repeats:YES]; + self.reconnectTimer = [NSTimer scheduledTimerWithTimeInterval:kReconnectInterval + target:self + selector:@selector(reconnect) + userInfo:nil + repeats:YES]; } [self discardHeartbeatTimer]; @@ -277,12 +283,10 @@ - (void)sendHeartbeat { } - (NSString*)makeRef { - // TODO: Catch integer overflow - int newRef = self.ref + 1; - return [NSString stringWithFormat:@"%i", newRef]; + self.ref += 1; + return [NSString stringWithFormat:@"%zd", self.ref]; } - #pragma mark - SRWebSocket Delegate - (void)webSocketDidOpen:(SRWebSocket *)webSocket { @@ -302,3 +306,5 @@ - (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reas } @end + +NS_ASSUME_NONNULL_END diff --git a/Pod/Classes/PhxSocket_Private.h b/Pod/Classes/PhxSocket_Private.h index e60be2e..c1f8744 100644 --- a/Pod/Classes/PhxSocket_Private.h +++ b/Pod/Classes/PhxSocket_Private.h @@ -8,7 +8,7 @@ #import - +NS_ASSUME_NONNULL_BEGIN @class PhxSocket; @class PhxChannel; @@ -18,4 +18,6 @@ - (void)addChannel:(PhxChannel*)channel; - (void)removeChannel:(PhxChannel*)channel; -@end \ No newline at end of file +@end + +NS_ASSUME_NONNULL_END