From 85ff8b831b5fa644b9b3078ffd8e39dfa85c995c Mon Sep 17 00:00:00 2001 From: Ricardo Pereira Date: Thu, 17 Mar 2016 17:11:21 +0000 Subject: [PATCH 1/3] Remove hard coded module name when importing a header file --- Source/ARTAuthOptions.h | 2 +- Source/Ably.h | 80 ++++++++++++++++----------------- Spec/AblySpec-Bridging-Header.h | 2 +- Spec/NSObject+TestSuite.h | 2 +- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Source/ARTAuthOptions.h b/Source/ARTAuthOptions.h index eb1ccbdad..025aaa29b 100644 --- a/Source/ARTAuthOptions.h +++ b/Source/ARTAuthOptions.h @@ -7,7 +7,7 @@ // #import -#import +#import "ARTTypes.h" @class ARTTokenDetails; diff --git a/Source/Ably.h b/Source/Ably.h index 0b9ddef63..21113da84 100644 --- a/Source/Ably.h +++ b/Source/Ably.h @@ -14,45 +14,45 @@ FOUNDATION_EXPORT double ablyVersionNumber; //! Project version string for ably-ios. FOUNDATION_EXPORT const unsigned char ablyVersionString[]; -#import -#import +#import "ARTLog.h" +#import "ARTTypes.h" -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import "ARTAuth.h" +#import "ARTConnection.h" +#import "ARTConnectionDetails.h" +#import "ARTHttp.h" +#import "ARTBaseMessage.h" +#import "ARTRestChannels.h" +#import "ARTChannelOptions.h" +#import "ARTTokenDetails.h" +#import "ARTTokenRequest.h" +#import "ARTTokenParams.h" +#import "ARTAuthOptions.h" +#import "ARTClientOptions.h" +#import "ARTCrypto.h" +#import "ARTDefault.h" +#import "ARTEventEmitter.h" +#import "ARTFallback.h" +#import "ARTMessage.h" +#import "ARTDataEncoder.h" +#import "ARTPresence.h" +#import "ARTPresenceMap.h" +#import "ARTPresenceMessage.h" +#import "ARTProtocolMessage.h" +#import "ARTQueuedMessage.h" +#import "ARTRest.h" +#import "ARTRestChannel.h" +#import "ARTRestPresence.h" +#import "ARTRealtime.h" +#import "ARTRealtimeChannel.h" +#import "ARTRealtimePresence.h" +#import "ARTRealtimeTransport.h" +#import "ARTStats.h" +#import "ARTWebSocketTransport.h" +#import "ARTEncoder.h" +#import "ARTJsonEncoder.h" +#import "ARTPaginatedResult.h" -#import -#import -#import +#import "ARTNSDictionary+ARTDictionaryUtil.h" +#import "ARTNSDate+ARTUtil.h" +#import "ARTNSArray+ARTFunctional.h" diff --git a/Spec/AblySpec-Bridging-Header.h b/Spec/AblySpec-Bridging-Header.h index bad15804a..c7d307179 100644 --- a/Spec/AblySpec-Bridging-Header.h +++ b/Spec/AblySpec-Bridging-Header.h @@ -2,7 +2,7 @@ // Use this file to import your target's public headers that you would like to expose to Swift. // -#include +#include "Ably.h" #include #include "NSObject+TestSuite.h" #include "ARTTestUtil.h" \ No newline at end of file diff --git a/Spec/NSObject+TestSuite.h b/Spec/NSObject+TestSuite.h index 542b89c67..2fc6d3fc8 100644 --- a/Spec/NSObject+TestSuite.h +++ b/Spec/NSObject+TestSuite.h @@ -7,7 +7,7 @@ // #import -#import +#import "CompatibilityMacros.h" /// `NSObject` extensions. Aspects lib allows you to add code to existing methods but it has some limitations with Swift because the NSInvocation is unavailable: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSInvocation_Class/ @interface NSObject (TestSuite) From a9b219fd2ded738bd7ac63bf5fe7b4c555d6522d Mon Sep 17 00:00:00 2001 From: Ricardo Pereira Date: Thu, 17 Mar 2016 17:16:07 +0000 Subject: [PATCH 2/3] Install instructions: AblyRealtime pod --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b7731776..0abb3deee 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ You can install Ably for iOS through CocoaPods, Carthage or manually. Add this line to your application's Podfile: - pod 'Ably', :git => 'https://github.com/ably/ably-ios.git', :branch => '0.8.0-beta.1' + pod 'AblyRealtime', '~> 0.8' And then install the dependency: From 796f538cc25c386ff442d8e6635d0e129902b55a Mon Sep 17 00:00:00 2001 From: Ricardo Pereira Date: Fri, 18 Mar 2016 13:46:23 +0000 Subject: [PATCH 3/3] Renamed the module Ably to AblyRealtime --- Ably.xcodeproj/project.pbxproj | 16 ++++++++-------- AblyRealtime.podspec | 4 ++-- Source/{Ably.h => AblyRealtime.h} | 0 .../{Ably.modulemap => AblyRealtime.modulemap} | 4 ++-- Spec/AblySpec-Bridging-Header.h | 2 +- Spec/RealtimeClientChannel.swift | 2 -- Spec/RestClient.swift | 2 -- Spec/TestUtilities.swift | 2 +- Tests/ARTReadmeExamples.m | 2 +- 9 files changed, 15 insertions(+), 19 deletions(-) rename Source/{Ably.h => AblyRealtime.h} (100%) rename Source/{Ably.modulemap => AblyRealtime.modulemap} (93%) diff --git a/Ably.xcodeproj/project.pbxproj b/Ably.xcodeproj/project.pbxproj index 3f639af99..08a47f2da 100644 --- a/Ably.xcodeproj/project.pbxproj +++ b/Ably.xcodeproj/project.pbxproj @@ -51,7 +51,7 @@ 856AAC991B6E312F00B07119 /* RestClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 856AAC981B6E312F00B07119 /* RestClient.swift */; }; 856AAC9B1B6E326E00B07119 /* ably-common in Resources */ = {isa = PBXBuildFile; fileRef = 856AAC9A1B6E326E00B07119 /* ably-common */; }; 85B2C2191B6FE8DE00EA5254 /* CompatibilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 85B2C2181B6FE8DE00EA5254 /* CompatibilityMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 85F0A60B1B6D039F00EFF45A /* Ably.h in Headers */ = {isa = PBXBuildFile; fileRef = 85F0A60A1B6D039F00EFF45A /* Ably.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 85F0A60B1B6D039F00EFF45A /* AblyRealtime.h in Headers */ = {isa = PBXBuildFile; fileRef = 85F0A60A1B6D039F00EFF45A /* AblyRealtime.h */; settings = {ATTRIBUTES = (Public, ); }; }; 960D07931A45F1D800ED8C8C /* ARTCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 960D07911A45F1D800ED8C8C /* ARTCrypto.h */; settings = {ATTRIBUTES = (Public, ); }; }; 960D07941A45F1D800ED8C8C /* ARTCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D07921A45F1D800ED8C8C /* ARTCrypto.m */; }; 960D07971A46FFC300ED8C8C /* ARTRest+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 960D07951A46FFC300ED8C8C /* ARTRest+Private.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -261,8 +261,8 @@ 856AAC981B6E312F00B07119 /* RestClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RestClient.swift; sourceTree = ""; }; 856AAC9A1B6E326E00B07119 /* ably-common */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "ably-common"; sourceTree = SOURCE_ROOT; }; 85B2C2181B6FE8DE00EA5254 /* CompatibilityMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompatibilityMacros.h; sourceTree = ""; }; - 85F0A60A1B6D039F00EFF45A /* Ably.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Ably.h; sourceTree = ""; }; - 85F0A60C1B6D03B700EFF45A /* Ably.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = Ably.modulemap; sourceTree = ""; }; + 85F0A60A1B6D039F00EFF45A /* AblyRealtime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AblyRealtime.h; sourceTree = ""; }; + 85F0A60C1B6D03B700EFF45A /* AblyRealtime.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = AblyRealtime.modulemap; sourceTree = ""; }; 960D07911A45F1D800ED8C8C /* ARTCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARTCrypto.h; sourceTree = ""; }; 960D07921A45F1D800ED8C8C /* ARTCrypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARTCrypto.m; sourceTree = ""; }; 960D07951A46FFC300ED8C8C /* ARTRest+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ARTRest+Private.h"; sourceTree = ""; }; @@ -505,7 +505,7 @@ 96BF61331A35B2AB004CF2B3 /* Source */ = { isa = PBXGroup; children = ( - 85F0A60A1B6D039F00EFF45A /* Ably.h */, + 85F0A60A1B6D039F00EFF45A /* AblyRealtime.h */, 85B2C2181B6FE8DE00EA5254 /* CompatibilityMacros.h */, 1CD8DC9D1B1C7315007EAF36 /* ARTDefault.h */, D7DC8AF01C6A9FFC005AF165 /* ARTDefault+Private.h */, @@ -523,7 +523,7 @@ 96BF61341A35B2AB004CF2B3 /* Supporting Files */ = { isa = PBXGroup; children = ( - 85F0A60C1B6D03B700EFF45A /* Ably.modulemap */, + 85F0A60C1B6D03B700EFF45A /* AblyRealtime.modulemap */, 1C118A5B1AE63D89006AD19E /* Info.plist */, ); name = "Supporting Files"; @@ -734,7 +734,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 85F0A60B1B6D039F00EFF45A /* Ably.h in Headers */, + 85F0A60B1B6D039F00EFF45A /* AblyRealtime.h in Headers */, 96BF61531A35B39C004CF2B3 /* ARTRest.h in Headers */, 96A507BD1A3791490077CDF8 /* ARTRealtime.h in Headers */, EB5E058D1C77027600A48B39 /* ARTCrypto+Private.h in Headers */, @@ -1318,7 +1318,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = mh_dylib; - MODULEMAP_FILE = Source/Ably.modulemap; + MODULEMAP_FILE = Source/AblyRealtime.modulemap; PRODUCT_BUNDLE_IDENTIFIER = "io.ably.$(PRODUCT_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)"; SEPARATE_STRIP = YES; @@ -1339,7 +1339,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = mh_dylib; - MODULEMAP_FILE = Source/Ably.modulemap; + MODULEMAP_FILE = Source/AblyRealtime.modulemap; PRODUCT_BUNDLE_IDENTIFIER = "io.ably.$(PRODUCT_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)"; SEPARATE_STRIP = YES; diff --git a/AblyRealtime.podspec b/AblyRealtime.podspec index bef67adb3..b753c5f14 100644 --- a/AblyRealtime.podspec +++ b/AblyRealtime.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "AblyRealtime" - s.version = "0.8.0-beta.2" + s.version = "0.8.0-beta.3" s.summary = "iOS client for Ably" s.description = <<-DESC iOS client library for ably.io, the realtime messaging service, written in Objective-C and ready for Swift 2.0. @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.platform = :ios, '8.0' s.requires_arc = true s.source_files = 'Source/*.{h,m}' - s.module_map = 'Source/Ably.modulemap' + s.module_map = 'Source/AblyRealtime.modulemap' s.pod_target_xcconfig = { 'HEADER_SEARCH_PATHS' => '$CONFIGURATION_BUILD_DIR/SwiftWebSocket.framework/Headers' } s.dependency 'SwiftWebSocket', '~> 2.5' end diff --git a/Source/Ably.h b/Source/AblyRealtime.h similarity index 100% rename from Source/Ably.h rename to Source/AblyRealtime.h diff --git a/Source/Ably.modulemap b/Source/AblyRealtime.modulemap similarity index 93% rename from Source/Ably.modulemap rename to Source/AblyRealtime.modulemap index 3a8d22f9e..580cbcf1e 100644 --- a/Source/Ably.modulemap +++ b/Source/AblyRealtime.modulemap @@ -1,5 +1,5 @@ -framework module Ably { - umbrella header "Ably.h" +framework module AblyRealtime { + umbrella header "AblyRealtime.h" export * module * { export * } diff --git a/Spec/AblySpec-Bridging-Header.h b/Spec/AblySpec-Bridging-Header.h index c7d307179..8d7e646d5 100644 --- a/Spec/AblySpec-Bridging-Header.h +++ b/Spec/AblySpec-Bridging-Header.h @@ -2,7 +2,7 @@ // Use this file to import your target's public headers that you would like to expose to Swift. // -#include "Ably.h" +#include "AblyRealtime.h" #include #include "NSObject+TestSuite.h" #include "ARTTestUtil.h" \ No newline at end of file diff --git a/Spec/RealtimeClientChannel.swift b/Spec/RealtimeClientChannel.swift index 7afaf87af..719cdbffc 100644 --- a/Spec/RealtimeClientChannel.swift +++ b/Spec/RealtimeClientChannel.swift @@ -10,8 +10,6 @@ import Quick import Nimble import Aspects -import Ably.Private - class RealtimeClientChannel: QuickSpec { override func spec() { describe("Channel") { diff --git a/Spec/RestClient.swift b/Spec/RestClient.swift index 99329310b..fafbb25dd 100644 --- a/Spec/RestClient.swift +++ b/Spec/RestClient.swift @@ -9,8 +9,6 @@ import Nimble import Quick -import Ably.Private - class RestClient: QuickSpec { override func spec() { diff --git a/Spec/TestUtilities.swift b/Spec/TestUtilities.swift index a7561148f..d5c1fb8ee 100644 --- a/Spec/TestUtilities.swift +++ b/Spec/TestUtilities.swift @@ -13,7 +13,7 @@ import Nimble import SwiftyJSON import SwiftWebSocket -import Ably.Private +import AblyRealtime.Private enum CryptoTest: String { case aes128 = "crypto-data-128" diff --git a/Tests/ARTReadmeExamples.m b/Tests/ARTReadmeExamples.m index 602f35e34..ebe9ba13b 100644 --- a/Tests/ARTReadmeExamples.m +++ b/Tests/ARTReadmeExamples.m @@ -9,7 +9,7 @@ #import #import #import "ARTTestUtil.h" -#import "ably.h" +#import "AblyRealtime.h" @interface ARTReadmeExamples : XCTestCase @end