diff --git a/examples/example-ios/Cartfile b/examples/example-ios/Cartfile index ce434dc6..ec14f25d 100644 --- a/examples/example-ios/Cartfile +++ b/examples/example-ios/Cartfile @@ -1 +1 @@ -github "ReactiveX/RxSwift" "4.4.0" +github "ReactiveX/RxSwift" "5.1.1" diff --git a/examples/example-ios/Cartfile.resolved b/examples/example-ios/Cartfile.resolved new file mode 100644 index 00000000..ec14f25d --- /dev/null +++ b/examples/example-ios/Cartfile.resolved @@ -0,0 +1 @@ +github "ReactiveX/RxSwift" "5.1.1" diff --git a/examples/example-ios/README.md b/examples/example-ios/README.md new file mode 100644 index 00000000..68a1e15a --- /dev/null +++ b/examples/example-ios/README.md @@ -0,0 +1,6 @@ +# Example project demonstrating usage of iOS-communications SDK + +# Dependencies +* iOS-communications SDK +* [RxSwift](https://github.com/ReactiveX/RxSwift) + diff --git a/examples/example-ios/carthage.sh b/examples/example-ios/carthage.sh new file mode 100755 index 00000000..f4a8942e --- /dev/null +++ b/examples/example-ios/carthage.sh @@ -0,0 +1,20 @@ +# Copied from https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md +# carthage.sh +# Usage example: ./carthage.sh build --platform iOS + +set -euo pipefail + +xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) +trap 'rm -f "$xcconfig"' INT TERM HUP EXIT + +# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise +# the build will fail on lipo due to duplicate architectures. + +CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3) +echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig + +echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig +echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig + +export XCODE_XCCONFIG_FILE="$xcconfig" +carthage "$@" diff --git a/examples/example-ios/polarBleSdkTestApp.xcodeproj/project.pbxproj b/examples/example-ios/polarBleSdkTestApp.xcodeproj/project.pbxproj index c084d73e..f1c7eef4 100644 --- a/examples/example-ios/polarBleSdkTestApp.xcodeproj/project.pbxproj +++ b/examples/example-ios/polarBleSdkTestApp.xcodeproj/project.pbxproj @@ -7,16 +7,16 @@ objects = { /* Begin PBXBuildFile section */ - 6C2409032212EB63001C1A84 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C2409002212EB63001C1A84 /* RxSwift.framework */; }; - 6C2409042212EB63001C1A84 /* PolarBleSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C2409012212EB63001C1A84 /* PolarBleSdk.framework */; }; - 6C2409052212EB69001C1A84 /* PolarBleSdk.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6C2409012212EB63001C1A84 /* PolarBleSdk.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 6C2409072212EB69001C1A84 /* RxSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6C2409002212EB63001C1A84 /* RxSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6C56423C2203199400F9BDA9 /* ApiWrapperSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C56423B2203199400F9BDA9 /* ApiWrapperSwift.swift */; }; 6C770A59205269C800F3D51D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C770A58205269C800F3D51D /* AppDelegate.swift */; }; 6C770A5B205269C800F3D51D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C770A5A205269C800F3D51D /* ViewController.swift */; }; 6C770A5E205269C800F3D51D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6C770A5C205269C800F3D51D /* Main.storyboard */; }; 6C770A60205269C800F3D51D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6C770A5F205269C800F3D51D /* Assets.xcassets */; }; 6C770A63205269C800F3D51D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6C770A61205269C800F3D51D /* LaunchScreen.storyboard */; }; + A5D322752566A06100E8C9A2 /* PolarBleSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5D322742566A06100E8C9A2 /* PolarBleSdk.framework */; }; + A5D322762566A06100E8C9A2 /* PolarBleSdk.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A5D322742566A06100E8C9A2 /* PolarBleSdk.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + A5D3227825678D8100E8C9A2 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5D3227725678D8000E8C9A2 /* RxSwift.framework */; }; + A5D3227925678D8100E8C9A2 /* RxSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A5D3227725678D8000E8C9A2 /* RxSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -26,8 +26,8 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 6C2409052212EB69001C1A84 /* PolarBleSdk.framework in Embed Frameworks */, - 6C2409072212EB69001C1A84 /* RxSwift.framework in Embed Frameworks */, + A5D3227925678D8100E8C9A2 /* RxSwift.framework in Embed Frameworks */, + A5D322762566A06100E8C9A2 /* PolarBleSdk.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -44,8 +44,6 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 6C2409002212EB63001C1A84 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxSwift.framework; path = "../../polar-sdk-ios/RxSwift.framework"; sourceTree = ""; }; - 6C2409012212EB63001C1A84 /* PolarBleSdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PolarBleSdk.framework; path = "../../polar-sdk-ios/PolarBleSdk.framework"; sourceTree = ""; }; 6C56423B2203199400F9BDA9 /* ApiWrapperSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApiWrapperSwift.swift; sourceTree = ""; }; 6C770A55205269C800F3D51D /* polarBleSdkTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = polarBleSdkTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6C770A58205269C800F3D51D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -55,6 +53,8 @@ 6C770A62205269C800F3D51D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 6C770A64205269C800F3D51D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 6C770A9F2057A35A00F3D51D /* polarBleSdkTestApp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "polarBleSdkTestApp-Bridging-Header.h"; sourceTree = ""; }; + A5D322742566A06100E8C9A2 /* PolarBleSdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PolarBleSdk.framework; path = "../../polar-sdk-ios/PolarBleSdk.framework"; sourceTree = ""; }; + A5D3227725678D8000E8C9A2 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxSwift.framework; path = Carthage/Build/iOS/RxSwift.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -62,8 +62,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 6C2409032212EB63001C1A84 /* RxSwift.framework in Frameworks */, - 6C2409042212EB63001C1A84 /* PolarBleSdk.framework in Frameworks */, + A5D3227825678D8100E8C9A2 /* RxSwift.framework in Frameworks */, + A5D322752566A06100E8C9A2 /* PolarBleSdk.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -105,8 +105,8 @@ 6C770A6A20526A9500F3D51D /* Frameworks */ = { isa = PBXGroup; children = ( - 6C2409012212EB63001C1A84 /* PolarBleSdk.framework */, - 6C2409002212EB63001C1A84 /* RxSwift.framework */, + A5D3227725678D8000E8C9A2 /* RxSwift.framework */, + A5D322742566A06100E8C9A2 /* PolarBleSdk.framework */, ); name = Frameworks; sourceTree = ""; @@ -140,7 +140,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1220; ORGANIZATIONNAME = Polar; TargetAttributes = { 6C770A54205269C800F3D51D = { @@ -244,6 +244,7 @@ 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; @@ -269,7 +270,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -303,6 +304,7 @@ 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; @@ -322,7 +324,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -343,10 +345,11 @@ "$(PROJECT_DIR)/../", "$(PROJECT_DIR)", "$(PROJECT_DIR)/../../polar-sdk-ios/", + "$(PROJECT_DIR)/Carthage/Build/iOS", ); HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = polarBleSdkTestApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/Frameworks/PolarBleSdk.framework"; PRODUCT_BUNDLE_IDENTIFIER = com.polar.polarBleSdkTestApp; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -371,10 +374,11 @@ "$(PROJECT_DIR)/../", "$(PROJECT_DIR)", "$(PROJECT_DIR)/../../polar-sdk-ios/", + "$(PROJECT_DIR)/Carthage/Build/iOS", ); HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = polarBleSdkTestApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/Frameworks/PolarBleSdk.framework"; PRODUCT_BUNDLE_IDENTIFIER = com.polar.polarBleSdkTestApp; PRODUCT_NAME = "$(TARGET_NAME)";