diff --git a/.github/workflows/carthage.yaml b/.github/workflows/carthage.yaml new file mode 100644 index 000000000..c1cefb089 --- /dev/null +++ b/.github/workflows/carthage.yaml @@ -0,0 +1,40 @@ +name: Carthage Installation + +on: + pull_request: + push: + branches: + - main + +jobs: + check: + runs-on: macos-latest + + env: + LC_CTYPE: en_US.UTF-8 + LANG: en_US.UTF-8 + ABLY_ENV: sandbox + + steps: + - name: Check out SDK repo + uses: actions/checkout@v2 + + - name: Select Specific Xcode Version (14.2) + run: | + sudo xcode-select -s /Applications/Xcode_14.2.app + echo "Selected Xcode version:" + xcodebuild -version + + - name: Log environment information + run: ./Scripts/log-environment-information.sh + + - name: Reset Simulators + run: xcrun simctl erase all + + - name: Carthage - Installation Test + working-directory: ./Examples/AblyCarthage + run: | + echo 'Installing Carthage dependencies...' + carthage update --use-xcframeworks --platform iOS --no-use-binaries + echo 'Building AblyCarthage example...' + xcodebuild build -scheme "AblyCarthage" -destination "platform=iOS Simulator,name=iPhone 14" -configuration "Debug" diff --git a/Examples/AblyCarthage/AblyCarthage.xcodeproj/project.pbxproj b/Examples/AblyCarthage/AblyCarthage.xcodeproj/project.pbxproj new file mode 100644 index 000000000..a69cf4f0f --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage.xcodeproj/project.pbxproj @@ -0,0 +1,386 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 8482102E26A37E78001ED86C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8482102D26A37E78001ED86C /* AppDelegate.swift */; }; + 8482103026A37E78001ED86C /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8482102F26A37E78001ED86C /* SceneDelegate.swift */; }; + 8482103226A37E78001ED86C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8482103126A37E78001ED86C /* ViewController.swift */; }; + 8482103526A37E78001ED86C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8482103326A37E78001ED86C /* Main.storyboard */; }; + 8482103726A37E79001ED86C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8482103626A37E79001ED86C /* Assets.xcassets */; }; + 8482103A26A37E79001ED86C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8482103826A37E79001ED86C /* LaunchScreen.storyboard */; }; + 84BB82A52AEAEDFD00A62AFB /* AblyDeltaCodec.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BB82A22AEAEDFD00A62AFB /* AblyDeltaCodec.xcframework */; }; + 84BB82A62AEAEDFD00A62AFB /* AblyDeltaCodec.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 84BB82A22AEAEDFD00A62AFB /* AblyDeltaCodec.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 84BB82A72AEAEDFD00A62AFB /* msgpack.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BB82A32AEAEDFD00A62AFB /* msgpack.xcframework */; }; + 84BB82A82AEAEDFD00A62AFB /* msgpack.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 84BB82A32AEAEDFD00A62AFB /* msgpack.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 84BB82A92AEAEDFD00A62AFB /* Ably.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BB82A42AEAEDFD00A62AFB /* Ably.xcframework */; }; + 84BB82AA2AEAEDFD00A62AFB /* Ably.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 84BB82A42AEAEDFD00A62AFB /* Ably.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 84BB82AB2AEAEDFD00A62AFB /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 84BB82A82AEAEDFD00A62AFB /* msgpack.xcframework in Embed Frameworks */, + 84BB82A62AEAEDFD00A62AFB /* AblyDeltaCodec.xcframework in Embed Frameworks */, + 84BB82AA2AEAEDFD00A62AFB /* Ably.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 8482102A26A37E78001ED86C /* AblyCarthage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AblyCarthage.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8482102D26A37E78001ED86C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 8482102F26A37E78001ED86C /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 8482103126A37E78001ED86C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 8482103426A37E78001ED86C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 8482103626A37E79001ED86C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 8482103926A37E79001ED86C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 8482103B26A37E79001ED86C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 84BB82A22AEAEDFD00A62AFB /* AblyDeltaCodec.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = AblyDeltaCodec.xcframework; path = Carthage/Build/AblyDeltaCodec.xcframework; sourceTree = ""; }; + 84BB82A32AEAEDFD00A62AFB /* msgpack.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = msgpack.xcframework; path = Carthage/Build/msgpack.xcframework; sourceTree = ""; }; + 84BB82A42AEAEDFD00A62AFB /* Ably.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Ably.xcframework; path = Carthage/Build/Ably.xcframework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8482102726A37E78001ED86C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84BB82A72AEAEDFD00A62AFB /* msgpack.xcframework in Frameworks */, + 84BB82A52AEAEDFD00A62AFB /* AblyDeltaCodec.xcframework in Frameworks */, + 84BB82A92AEAEDFD00A62AFB /* Ably.xcframework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 8482102126A37E78001ED86C = { + isa = PBXGroup; + children = ( + 8482102C26A37E78001ED86C /* AblyCarthage */, + 8482102B26A37E78001ED86C /* Products */, + 84D0DA35270351D90031DE17 /* Frameworks */, + ); + sourceTree = ""; + }; + 8482102B26A37E78001ED86C /* Products */ = { + isa = PBXGroup; + children = ( + 8482102A26A37E78001ED86C /* AblyCarthage.app */, + ); + name = Products; + sourceTree = ""; + }; + 8482102C26A37E78001ED86C /* AblyCarthage */ = { + isa = PBXGroup; + children = ( + 8482102D26A37E78001ED86C /* AppDelegate.swift */, + 8482102F26A37E78001ED86C /* SceneDelegate.swift */, + 8482103126A37E78001ED86C /* ViewController.swift */, + 8482103326A37E78001ED86C /* Main.storyboard */, + 8482103626A37E79001ED86C /* Assets.xcassets */, + 8482103826A37E79001ED86C /* LaunchScreen.storyboard */, + 8482103B26A37E79001ED86C /* Info.plist */, + ); + path = AblyCarthage; + sourceTree = ""; + }; + 84D0DA35270351D90031DE17 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 84BB82A42AEAEDFD00A62AFB /* Ably.xcframework */, + 84BB82A22AEAEDFD00A62AFB /* AblyDeltaCodec.xcframework */, + 84BB82A32AEAEDFD00A62AFB /* msgpack.xcframework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8482102926A37E78001ED86C /* AblyCarthage */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8482105426A37E79001ED86C /* Build configuration list for PBXNativeTarget "AblyCarthage" */; + buildPhases = ( + 8482102626A37E78001ED86C /* Sources */, + 8482102726A37E78001ED86C /* Frameworks */, + 8482102826A37E78001ED86C /* Resources */, + 84BB82AB2AEAEDFD00A62AFB /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AblyCarthage; + productName = AblyCarthage; + productReference = 8482102A26A37E78001ED86C /* AblyCarthage.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 8482102226A37E78001ED86C /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + 8482102926A37E78001ED86C = { + CreatedOnToolsVersion = 12.5; + }; + }; + }; + buildConfigurationList = 8482102526A37E78001ED86C /* Build configuration list for PBXProject "AblyCarthage" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 8482102126A37E78001ED86C; + productRefGroup = 8482102B26A37E78001ED86C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8482102926A37E78001ED86C /* AblyCarthage */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8482102826A37E78001ED86C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8482103A26A37E79001ED86C /* LaunchScreen.storyboard in Resources */, + 8482103726A37E79001ED86C /* Assets.xcassets in Resources */, + 8482103526A37E78001ED86C /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8482102626A37E78001ED86C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8482103226A37E78001ED86C /* ViewController.swift in Sources */, + 8482102E26A37E78001ED86C /* AppDelegate.swift in Sources */, + 8482103026A37E78001ED86C /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 8482103326A37E78001ED86C /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8482103426A37E78001ED86C /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 8482103826A37E79001ED86C /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 8482103926A37E79001ED86C /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 8482105226A37E79001ED86C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 8482105326A37E79001ED86C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 8482105526A37E79001ED86C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = AblyCarthage/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.ably.AblyCarthage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 8482105626A37E79001ED86C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = AblyCarthage/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.ably.AblyCarthage; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8482102526A37E78001ED86C /* Build configuration list for PBXProject "AblyCarthage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8482105226A37E79001ED86C /* Debug */, + 8482105326A37E79001ED86C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8482105426A37E79001ED86C /* Build configuration list for PBXNativeTarget "AblyCarthage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8482105526A37E79001ED86C /* Debug */, + 8482105626A37E79001ED86C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 8482102226A37E78001ED86C /* Project object */; +} diff --git a/Examples/AblyCarthage/AblyCarthage/AppDelegate.swift b/Examples/AblyCarthage/AblyCarthage/AppDelegate.swift new file mode 100644 index 000000000..f7f60fd74 --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage/AppDelegate.swift @@ -0,0 +1,29 @@ +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/Examples/AblyCarthage/AblyCarthage/Assets.xcassets/AccentColor.colorset/Contents.json b/Examples/AblyCarthage/AblyCarthage/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..eb8789700 --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/AblyCarthage/AblyCarthage/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/AblyCarthage/AblyCarthage/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..9221b9bb1 --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/AblyCarthage/AblyCarthage/Assets.xcassets/Contents.json b/Examples/AblyCarthage/AblyCarthage/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/AblyCarthage/AblyCarthage/Base.lproj/LaunchScreen.storyboard b/Examples/AblyCarthage/AblyCarthage/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/AblyCarthage/AblyCarthage/Base.lproj/Main.storyboard b/Examples/AblyCarthage/AblyCarthage/Base.lproj/Main.storyboard new file mode 100644 index 000000000..88d075ce5 --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage/Base.lproj/Main.storyboard @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/AblyCarthage/AblyCarthage/Info.plist b/Examples/AblyCarthage/AblyCarthage/Info.plist new file mode 100644 index 000000000..5b531f7b2 --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Examples/AblyCarthage/AblyCarthage/SceneDelegate.swift b/Examples/AblyCarthage/AblyCarthage/SceneDelegate.swift new file mode 100644 index 000000000..d47e9706e --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage/SceneDelegate.swift @@ -0,0 +1,45 @@ +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/Examples/AblyCarthage/AblyCarthage/ViewController.swift b/Examples/AblyCarthage/AblyCarthage/ViewController.swift new file mode 100644 index 000000000..730ef70b5 --- /dev/null +++ b/Examples/AblyCarthage/AblyCarthage/ViewController.swift @@ -0,0 +1,10 @@ +import UIKit +import Ably + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } +} diff --git a/Examples/AblyCarthage/Cartfile b/Examples/AblyCarthage/Cartfile new file mode 100644 index 000000000..84d27026a --- /dev/null +++ b/Examples/AblyCarthage/Cartfile @@ -0,0 +1,2 @@ +git "../../../ably-cocoa" "HEAD" + diff --git a/Source/PrivateHeaders/Ably/ARTAttachRetryState.h b/Source/PrivateHeaders/Ably/ARTAttachRetryState.h index c5ac9957a..cb85b7744 100644 --- a/Source/PrivateHeaders/Ably/ARTAttachRetryState.h +++ b/Source/PrivateHeaders/Ably/ARTAttachRetryState.h @@ -1,5 +1,5 @@ @import Foundation; -#import "ARTTypes.h" +#import @class ARTRetryAttempt; @class ARTInternalLog; diff --git a/Source/PrivateHeaders/Ably/ARTAuth+Private.h b/Source/PrivateHeaders/Ably/ARTAuth+Private.h index bca866332..7c9215c58 100644 --- a/Source/PrivateHeaders/Ably/ARTAuth+Private.h +++ b/Source/PrivateHeaders/Ably/ARTAuth+Private.h @@ -1,6 +1,6 @@ #import #import -#import "ARTQueuedDealloc.h" +#import @class ARTRestInternal; @class ARTInternalLog; diff --git a/Source/PrivateHeaders/Ably/ARTBackoffRetryDelayCalculator.h b/Source/PrivateHeaders/Ably/ARTBackoffRetryDelayCalculator.h index 8b84406bc..4e2e3a6de 100644 --- a/Source/PrivateHeaders/Ably/ARTBackoffRetryDelayCalculator.h +++ b/Source/PrivateHeaders/Ably/ARTBackoffRetryDelayCalculator.h @@ -1,5 +1,5 @@ @import Foundation; -#import "ARTRetryDelayCalculator.h" +#import @protocol ARTJitterCoefficientGenerator; diff --git a/Source/PrivateHeaders/Ably/ARTChannelStateChangeMetadata.h b/Source/PrivateHeaders/Ably/ARTChannelStateChangeMetadata.h index 76d457701..49358d5e2 100644 --- a/Source/PrivateHeaders/Ably/ARTChannelStateChangeMetadata.h +++ b/Source/PrivateHeaders/Ably/ARTChannelStateChangeMetadata.h @@ -1,5 +1,5 @@ @import Foundation; -#import "ARTTypes.h" +#import @class ARTErrorInfo; @class ARTRetryAttempt; diff --git a/Source/PrivateHeaders/Ably/ARTConnectRetryState.h b/Source/PrivateHeaders/Ably/ARTConnectRetryState.h index e18a0827a..c03239af8 100644 --- a/Source/PrivateHeaders/Ably/ARTConnectRetryState.h +++ b/Source/PrivateHeaders/Ably/ARTConnectRetryState.h @@ -1,5 +1,5 @@ @import Foundation; -#import "ARTTypes.h" +#import @class ARTRetryAttempt; @class ARTInternalLog; diff --git a/Source/PrivateHeaders/Ably/ARTConnection+Private.h b/Source/PrivateHeaders/Ably/ARTConnection+Private.h index 7911463dd..4ab920efa 100644 --- a/Source/PrivateHeaders/Ably/ARTConnection+Private.h +++ b/Source/PrivateHeaders/Ably/ARTConnection+Private.h @@ -1,7 +1,7 @@ #import #import #import -#import "ARTQueuedDealloc.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/Source/PrivateHeaders/Ably/ARTHttp+Private.h b/Source/PrivateHeaders/Ably/ARTHttp+Private.h index e325594da..44e22c35e 100644 --- a/Source/PrivateHeaders/Ably/ARTHttp+Private.h +++ b/Source/PrivateHeaders/Ably/ARTHttp+Private.h @@ -1,4 +1,4 @@ -#import "ARTHttp.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/Source/PrivateHeaders/Ably/ARTInternalLogCore+Testing.h b/Source/PrivateHeaders/Ably/ARTInternalLogCore+Testing.h index 7318e3870..aee954063 100644 --- a/Source/PrivateHeaders/Ably/ARTInternalLogCore+Testing.h +++ b/Source/PrivateHeaders/Ably/ARTInternalLogCore+Testing.h @@ -1,5 +1,5 @@ @import Foundation; -#import "ARTInternalLog.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/Source/PrivateHeaders/Ably/ARTLogAdapter+Testing.h b/Source/PrivateHeaders/Ably/ARTLogAdapter+Testing.h index a9246a0a2..55fd0af56 100644 --- a/Source/PrivateHeaders/Ably/ARTLogAdapter+Testing.h +++ b/Source/PrivateHeaders/Ably/ARTLogAdapter+Testing.h @@ -1,5 +1,5 @@ @import Foundation; -#import "ARTLogAdapter.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/Source/PrivateHeaders/Ably/ARTLogAdapter.h b/Source/PrivateHeaders/Ably/ARTLogAdapter.h index bd5081902..15b37de9e 100644 --- a/Source/PrivateHeaders/Ably/ARTLogAdapter.h +++ b/Source/PrivateHeaders/Ably/ARTLogAdapter.h @@ -1,6 +1,6 @@ @import Foundation; -#import "ARTVersion2Log.h" +#import @class ARTLog; diff --git a/Source/PrivateHeaders/Ably/ARTPaginatedResult+Subclass.h b/Source/PrivateHeaders/Ably/ARTPaginatedResult+Subclass.h index 97bb30206..1cedb9432 100644 --- a/Source/PrivateHeaders/Ably/ARTPaginatedResult+Subclass.h +++ b/Source/PrivateHeaders/Ably/ARTPaginatedResult+Subclass.h @@ -1,5 +1,5 @@ @import Foundation; -#import "ARTPaginatedResult.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/Source/PrivateHeaders/Ably/ARTPresenceMap.h b/Source/PrivateHeaders/Ably/ARTPresenceMap.h index 55cb292a9..a2bb0afbe 100644 --- a/Source/PrivateHeaders/Ably/ARTPresenceMap.h +++ b/Source/PrivateHeaders/Ably/ARTPresenceMap.h @@ -1,5 +1,5 @@ #import -#import "ARTTypes.h" +#import @class ARTPresenceMap; @class ARTPresenceMessage; diff --git a/Source/PrivateHeaders/Ably/ARTPush+Private.h b/Source/PrivateHeaders/Ably/ARTPush+Private.h index 1a641b4f1..10ef409aa 100644 --- a/Source/PrivateHeaders/Ably/ARTPush+Private.h +++ b/Source/PrivateHeaders/Ably/ARTPush+Private.h @@ -1,6 +1,6 @@ #import #import -#import "ARTQueuedDealloc.h" +#import @class ARTPushActivationStateMachine; @class ARTRestInternal; diff --git a/Source/PrivateHeaders/Ably/ARTPushAdmin+Private.h b/Source/PrivateHeaders/Ably/ARTPushAdmin+Private.h index afbea9da2..4ee52db63 100644 --- a/Source/PrivateHeaders/Ably/ARTPushAdmin+Private.h +++ b/Source/PrivateHeaders/Ably/ARTPushAdmin+Private.h @@ -1,7 +1,7 @@ #import #import #import -#import "ARTQueuedDealloc.h" +#import @class ARTRestInternal; diff --git a/Source/PrivateHeaders/Ably/ARTPushChannel+Private.h b/Source/PrivateHeaders/Ably/ARTPushChannel+Private.h index ae96b8018..48df667c2 100644 --- a/Source/PrivateHeaders/Ably/ARTPushChannel+Private.h +++ b/Source/PrivateHeaders/Ably/ARTPushChannel+Private.h @@ -1,5 +1,5 @@ #import -#import "ARTQueuedDealloc.h" +#import @class ARTRestInternal; @class ARTInternalLog; diff --git a/Source/PrivateHeaders/Ably/ARTPushChannelSubscriptions+Private.h b/Source/PrivateHeaders/Ably/ARTPushChannelSubscriptions+Private.h index 61c318990..87294beff 100644 --- a/Source/PrivateHeaders/Ably/ARTPushChannelSubscriptions+Private.h +++ b/Source/PrivateHeaders/Ably/ARTPushChannelSubscriptions+Private.h @@ -1,5 +1,5 @@ #import -#import "ARTQueuedDealloc.h" +#import @class ARTRestInternal; @class ARTInternalLog; diff --git a/Source/PrivateHeaders/Ably/ARTPushDeviceRegistrations+Private.h b/Source/PrivateHeaders/Ably/ARTPushDeviceRegistrations+Private.h index da8eb7533..a50d270e3 100644 --- a/Source/PrivateHeaders/Ably/ARTPushDeviceRegistrations+Private.h +++ b/Source/PrivateHeaders/Ably/ARTPushDeviceRegistrations+Private.h @@ -1,5 +1,5 @@ #import -#import "ARTQueuedDealloc.h" +#import @class ARTRestInternal; @class ARTInternalLog; diff --git a/Source/PrivateHeaders/Ably/ARTRealtimeChannels+Private.h b/Source/PrivateHeaders/Ably/ARTRealtimeChannels+Private.h index 86a5a7ac1..42bad6eff 100644 --- a/Source/PrivateHeaders/Ably/ARTRealtimeChannels+Private.h +++ b/Source/PrivateHeaders/Ably/ARTRealtimeChannels+Private.h @@ -5,7 +5,7 @@ #import #import -#import "ARTQueuedDealloc.h" +#import @class ARTRealtimeChannelInternal; diff --git a/Source/PrivateHeaders/Ably/ARTRest+Private.h b/Source/PrivateHeaders/Ably/ARTRest+Private.h index 8a6f0721c..1ffbff5ab 100644 --- a/Source/PrivateHeaders/Ably/ARTRest+Private.h +++ b/Source/PrivateHeaders/Ably/ARTRest+Private.h @@ -1,7 +1,7 @@ #import #import -#import "ARTRestChannels+Private.h" -#import "ARTPush+Private.h" +#import +#import @protocol ARTEncoder; @protocol ARTHTTPExecutor; diff --git a/Source/PrivateHeaders/Ably/ARTRestChannel+Private.h b/Source/PrivateHeaders/Ably/ARTRestChannel+Private.h index 40b7e190a..b312ed594 100644 --- a/Source/PrivateHeaders/Ably/ARTRestChannel+Private.h +++ b/Source/PrivateHeaders/Ably/ARTRestChannel+Private.h @@ -6,7 +6,7 @@ #import #import #import -#import "ARTQueuedDealloc.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/Source/PrivateHeaders/Ably/ARTRestChannels+Private.h b/Source/PrivateHeaders/Ably/ARTRestChannels+Private.h index b16e4e45d..6a90ad1a9 100644 --- a/Source/PrivateHeaders/Ably/ARTRestChannels+Private.h +++ b/Source/PrivateHeaders/Ably/ARTRestChannels+Private.h @@ -1,6 +1,6 @@ #import -#import "ARTQueuedDealloc.h" -#import "ARTRestChannel+Private.h" +#import +#import @class ARTRestChannel; @class ARTRestInternal; diff --git a/Source/PrivateHeaders/Ably/ARTRestPresence+Private.h b/Source/PrivateHeaders/Ably/ARTRestPresence+Private.h index 712c04948..fc6ebd1c8 100644 --- a/Source/PrivateHeaders/Ably/ARTRestPresence+Private.h +++ b/Source/PrivateHeaders/Ably/ARTRestPresence+Private.h @@ -1,5 +1,5 @@ #import -#import "ARTQueuedDealloc.h" +#import NS_ASSUME_NONNULL_BEGIN diff --git a/Source/PrivateHeaders/Ably/ARTTypes+Private.h b/Source/PrivateHeaders/Ably/ARTTypes+Private.h index 838202305..ba0cd2561 100644 --- a/Source/PrivateHeaders/Ably/ARTTypes+Private.h +++ b/Source/PrivateHeaders/Ably/ARTTypes+Private.h @@ -1,5 +1,5 @@ @import Foundation; -#import "ARTTypes.h" +#import @class ARTRetryAttempt; @class ARTInternalLog;