Skip to content

Commit

Permalink
iOS example updated
Browse files Browse the repository at this point in the history
  • Loading branch information
JOikarinen committed Nov 23, 2020
1 parent f114a54 commit ddd5960
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 18 deletions.
2 changes: 1 addition & 1 deletion examples/example-ios/Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" "4.4.0"
github "ReactiveX/RxSwift" "5.1.1"
1 change: 1 addition & 0 deletions examples/example-ios/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "ReactiveX/RxSwift" "5.1.1"
6 changes: 6 additions & 0 deletions examples/example-ios/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Example project demonstrating usage of iOS-communications SDK

# Dependencies
* iOS-communications SDK
* [RxSwift](https://github.com/ReactiveX/RxSwift)

20 changes: 20 additions & 0 deletions examples/example-ios/carthage.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"
38 changes: 21 additions & 17 deletions examples/example-ios/polarBleSdkTestApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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;
Expand All @@ -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 = "<group>"; };
6C2409012212EB63001C1A84 /* PolarBleSdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PolarBleSdk.framework; path = "../../polar-sdk-ios/PolarBleSdk.framework"; sourceTree = "<group>"; };
6C56423B2203199400F9BDA9 /* ApiWrapperSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApiWrapperSwift.swift; sourceTree = "<group>"; };
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 = "<group>"; };
Expand All @@ -55,15 +53,17 @@
6C770A62205269C800F3D51D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6C770A64205269C800F3D51D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6C770A9F2057A35A00F3D51D /* polarBleSdkTestApp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "polarBleSdkTestApp-Bridging-Header.h"; sourceTree = "<group>"; };
A5D322742566A06100E8C9A2 /* PolarBleSdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PolarBleSdk.framework; path = "../../polar-sdk-ios/PolarBleSdk.framework"; sourceTree = "<group>"; };
A5D3227725678D8000E8C9A2 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxSwift.framework; path = Carthage/Build/iOS/RxSwift.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
6C770A52205269C800F3D51D /* Frameworks */ = {
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;
};
Expand Down Expand Up @@ -105,8 +105,8 @@
6C770A6A20526A9500F3D51D /* Frameworks */ = {
isa = PBXGroup;
children = (
6C2409012212EB63001C1A84 /* PolarBleSdk.framework */,
6C2409002212EB63001C1A84 /* RxSwift.framework */,
A5D3227725678D8000E8C9A2 /* RxSwift.framework */,
A5D322742566A06100E8C9A2 /* PolarBleSdk.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -140,7 +140,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1010;
LastUpgradeCheck = 1220;
ORGANIZATIONNAME = Polar;
TargetAttributes = {
6C770A54205269C800F3D51D = {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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";
Expand All @@ -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)";
Expand All @@ -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)";
Expand Down

0 comments on commit ddd5960

Please sign in to comment.