From c1b140e34170a52915ff2826940800f994ecd93a Mon Sep 17 00:00:00 2001 From: Bjarne Mogstad Date: Thu, 24 Sep 2015 16:59:51 +0200 Subject: [PATCH 1/2] Add dynamic framework for iOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added new schema “SocketRocket-iOS”, a dynamic framework with deployment target for iOS. Allows SocketRocket to be installed with Carthage (tested with Carthage v0.9.1) --- .travis.yml | 1 + SocketRocket-iOS/SocketRocket-iOS-Info.plist | 26 +++ SocketRocket-iOS/SocketRocket.h | 18 +++ SocketRocket.xcodeproj/project.pbxproj | 151 ++++++++++++++++++ .../xcschemes/SocketRocket-iOS.xcscheme | 80 ++++++++++ 5 files changed, 276 insertions(+) create mode 100644 SocketRocket-iOS/SocketRocket-iOS-Info.plist create mode 100644 SocketRocket-iOS/SocketRocket.h create mode 100644 SocketRocket.xcodeproj/xcshareddata/xcschemes/SocketRocket-iOS.xcscheme diff --git a/.travis.yml b/.travis.yml index 3c66fb04f..c99eca396 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,6 @@ before_script: - bundle install script: - xcodebuild -project SocketRocket.xcodeproj -scheme "SocketRocket" -sdk iphonesimulator -configuration Debug -PBXBuildsContinueAfterErrors=0 ACTIVE_ARCH_ONLY=0 build test + - xcodebuild -project SocketRocket.xcodeproj -scheme "SocketRocket-iOS" -sdk iphonesimulator -configuration Debug -PBXBuildsContinueAfterErrors=0 ACTIVE_ARCH_ONLY=0 build - xcodebuild -project SocketRocket.xcodeproj -scheme "SocketRocketOSX" -sdk macosx10.10 -configuration Debug -destination "platform=OS X" -PBXBuildsContinueAfterErrors=0 build - pod lib lint --verbose --fail-fast diff --git a/SocketRocket-iOS/SocketRocket-iOS-Info.plist b/SocketRocket-iOS/SocketRocket-iOS-Info.plist new file mode 100644 index 000000000..d3de8eefb --- /dev/null +++ b/SocketRocket-iOS/SocketRocket-iOS-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/SocketRocket-iOS/SocketRocket.h b/SocketRocket-iOS/SocketRocket.h new file mode 100644 index 000000000..709df2bb7 --- /dev/null +++ b/SocketRocket-iOS/SocketRocket.h @@ -0,0 +1,18 @@ +// +// Copyright 2012 - 2015 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 +#import diff --git a/SocketRocket.xcodeproj/project.pbxproj b/SocketRocket.xcodeproj/project.pbxproj index e4409f6de..a545d8346 100644 --- a/SocketRocket.xcodeproj/project.pbxproj +++ b/SocketRocket.xcodeproj/project.pbxproj @@ -7,6 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + 2D42277F1BB4365C000C1A6C /* SRWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = F6A12CCF145119B700C1D980 /* SRWebSocket.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D4227801BB43693000C1A6C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6B208301450F597009315AF /* Foundation.framework */; }; + 2D4227831BB436B1000C1A6C /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6A12CD3145122FC00C1D980 /* Security.framework */; }; + 2D4227841BB436CF000C1A6C /* SocketRocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D4227641BB4358C000C1A6C /* SocketRocket.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2D4227851BB43734000C1A6C /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = F6A12CD0145119B700C1D980 /* SRWebSocket.m */; }; + 2D8650261BB43B9B00534598 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F6C41C95145F7C4700641356 /* libicucore.dylib */; }; F6016C8814620EC70037BB3D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6A12CD3145122FC00C1D980 /* Security.framework */; }; F6016C8914620ECC0037BB3D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6A12CD3145122FC00C1D980 /* Security.framework */; }; F6016C8A1462143C0037BB3D /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6A12CD51451231B00C1D980 /* CFNetwork.framework */; }; @@ -53,6 +59,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 2D4227621BB4358C000C1A6C /* SocketRocket.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SocketRocket.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D4227641BB4358C000C1A6C /* SocketRocket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SocketRocket.h; sourceTree = ""; }; + 2D4227661BB4358C000C1A6C /* SocketRocket-iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SocketRocket-iOS-Info.plist"; sourceTree = ""; }; F60CC29F14D4EA0500A005E4 /* SRTWebSocketOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRTWebSocketOperation.h; sourceTree = ""; }; F60CC2A014D4EA0500A005E4 /* SRTWebSocketOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SRTWebSocketOperation.m; sourceTree = ""; }; F61A0DC71625F44D00365EBD /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "en.lproj/Default-568h@2x.png"; sourceTree = ""; }; @@ -96,6 +105,16 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 2D42275E1BB4358C000C1A6C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D8650261BB43B9B00534598 /* libicucore.dylib in Frameworks */, + 2D4227831BB436B1000C1A6C /* Security.framework in Frameworks */, + 2D4227801BB43693000C1A6C /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; F62417E014D52F3C003CE997 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -145,6 +164,15 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 2D4227631BB4358C000C1A6C /* SocketRocket-iOS */ = { + isa = PBXGroup; + children = ( + 2D4227641BB4358C000C1A6C /* SocketRocket.h */, + 2D4227661BB4358C000C1A6C /* SocketRocket-iOS-Info.plist */, + ); + path = "SocketRocket-iOS"; + sourceTree = ""; + }; F62417EA14D52F3C003CE997 /* TestChat */ = { isa = PBXGroup; children = ( @@ -207,6 +235,7 @@ F6BDA807145900D200FE3253 /* SRWebSocketTests */, F62417EA14D52F3C003CE997 /* TestChat */, F668C887153E91210044DBAC /* SocketRocketOSX */, + 2D4227631BB4358C000C1A6C /* SocketRocket-iOS */, F6B2082F1450F597009315AF /* Frameworks */, F6B2082E1450F597009315AF /* Products */, ); @@ -221,6 +250,7 @@ F6BDA802145900D200FE3253 /* SRWebSocketTests.xctest */, F62417E314D52F3C003CE997 /* TestChat.app */, F668C880153E91210044DBAC /* SocketRocket.framework */, + 2D4227621BB4358C000C1A6C /* SocketRocket.framework */, ); name = Products; sourceTree = ""; @@ -284,6 +314,15 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 2D42275F1BB4358C000C1A6C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D42277F1BB4365C000C1A6C /* SRWebSocket.h in Headers */, + 2D4227841BB436CF000C1A6C /* SocketRocket.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; F668C87D153E91210044DBAC /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -303,6 +342,24 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 2D4227611BB4358C000C1A6C /* SocketRocket-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D4227671BB4358C000C1A6C /* Build configuration list for PBXNativeTarget "SocketRocket-iOS" */; + buildPhases = ( + 2D42275D1BB4358C000C1A6C /* Sources */, + 2D42275E1BB4358C000C1A6C /* Frameworks */, + 2D42275F1BB4358C000C1A6C /* Headers */, + 2D4227601BB4358C000C1A6C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "SocketRocket-iOS"; + productName = "SocketRocket-iOS"; + productReference = 2D4227621BB4358C000C1A6C /* SocketRocket.framework */; + productType = "com.apple.product-type.framework"; + }; F62417E214D52F3C003CE997 /* TestChat */ = { isa = PBXNativeTarget; buildConfigurationList = F62417FC14D52F3C003CE997 /* Build configuration list for PBXNativeTarget "TestChat" */; @@ -396,6 +453,7 @@ targets = ( F6B2082C1450F597009315AF /* SocketRocket */, F668C87F153E91210044DBAC /* SocketRocketOSX */, + 2D4227611BB4358C000C1A6C /* SocketRocket-iOS */, F6BDA801145900D200FE3253 /* SRWebSocketTests */, F62417E214D52F3C003CE997 /* TestChat */, ); @@ -403,6 +461,13 @@ /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 2D4227601BB4358C000C1A6C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; F62417E114D52F3C003CE997 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -431,6 +496,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 2D42275D1BB4358C000C1A6C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D4227851BB43734000C1A6C /* SRWebSocket.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; F62417DF14D52F3C003CE997 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -506,6 +579,75 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 2D4227681BB4358C000C1A6C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = "SocketRocket-iOS/SocketRocket-iOS-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = com.squareup.SocketRocket; + PRODUCT_NAME = SocketRocket; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 2D4227691BB4358C000C1A6C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = "SocketRocket-iOS/SocketRocket-iOS-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = com.squareup.SocketRocket; + PRODUCT_NAME = SocketRocket; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; F62417FD14D52F3C003CE997 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -755,6 +897,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 2D4227671BB4358C000C1A6C /* Build configuration list for PBXNativeTarget "SocketRocket-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D4227681BB4358C000C1A6C /* Debug */, + 2D4227691BB4358C000C1A6C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; F62417FC14D52F3C003CE997 /* Build configuration list for PBXNativeTarget "TestChat" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/SocketRocket.xcodeproj/xcshareddata/xcschemes/SocketRocket-iOS.xcscheme b/SocketRocket.xcodeproj/xcshareddata/xcschemes/SocketRocket-iOS.xcscheme new file mode 100644 index 000000000..72f6c062b --- /dev/null +++ b/SocketRocket.xcodeproj/xcshareddata/xcschemes/SocketRocket-iOS.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From bd130dc902885acf722c16d3c48004900771b58f Mon Sep 17 00:00:00 2001 From: Bjarne Mogstad Date: Wed, 14 Oct 2015 14:17:43 +0200 Subject: [PATCH 2/2] fixup! Add dynamic framework for iOS --- SocketRocket.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SocketRocket.xcodeproj/project.pbxproj b/SocketRocket.xcodeproj/project.pbxproj index a545d8346..f3c98dea4 100644 --- a/SocketRocket.xcodeproj/project.pbxproj +++ b/SocketRocket.xcodeproj/project.pbxproj @@ -596,6 +596,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = "SocketRocket-iOS/SocketRocket-iOS-Info.plist"; @@ -631,6 +632,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = "SocketRocket-iOS/SocketRocket-iOS-Info.plist";