Skip to content

Commit

Permalink
iOS sources updated to support Xcode 12
Browse files Browse the repository at this point in the history
  • Loading branch information
JOikarinen committed Nov 20, 2020
1 parent d024bd8 commit d88bccd
Show file tree
Hide file tree
Showing 61 changed files with 782 additions and 2,357 deletions.
1 change: 1 addition & 0 deletions sources/iOS/ios-communications/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "ReactiveX/RxSwift" "5.1.1"
24 changes: 24 additions & 0 deletions sources/iOS/ios-communications/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Environment Requirements

* Xcode 12.x
* Swift 5.x


# Dependencies
* iOS communications library is dependant on [RxSwift](https://github.com/ReactiveX/RxSwift)

## Update dependency
1. install [Carthage](https://github.com/Carthage/Carthage)
2. update the `Cartfile` to version of your choice
3. Run Carthage
> **Note**: As Carthage doesn't work out of the box with Xcode 12. The recommended [workaround](https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md) is used and Carthage is wrapped into script `carthage.sh`

3.1. Make the script executable
```bash
chmod +x carthage.sh
```
3.2. Run the script
```bash
$ ./carthage.sh update --platform iOS,watchOS
```

4 changes: 2 additions & 2 deletions sources/iOS/ios-communications/build_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function cleanup {
trap cleanup EXIT
cd $WORKSPACE
echo "Rebuilding projects..."; sleep 1
xcodebuild -scheme PolarBleSdk -configuration Release -sdk `xcrun --sdk iphoneos --show-sdk-path` -derivedDataPath $DERIVED_DATA ONLY_ACTIVE_ARCH=NO ARCHS="armv7 arm64" "OTHER_SWIFT_FLAGS=-DDISABLE_TEAM_PRO_DECRYPTION" CODE_SIGN_IDENTITY='' "OTHER_CFLAGS=-fembed-bitcode"
xcodebuild -scheme PolarBleSdk -configuration Release -sdk `xcrun --sdk iphonesimulator --show-sdk-path` -derivedDataPath $DERIVED_DATA ONLY_ACTIVE_ARCH=NO ARCHS="i386 x86_64" "OTHER_SWIFT_FLAGS=-DDISABLE_TEAM_PRO_DECRYPTION" CODE_SIGN_IDENTITY='' "OTHER_CFLAGS=-fembed-bitcode"
xcodebuild -scheme PolarBleSdk -configuration Release -sdk `xcrun --sdk iphoneos --show-sdk-path` -derivedDataPath $DERIVED_DATA ONLY_ACTIVE_ARCH=NO ARCHS="armv7 arm64" CODE_SIGN_IDENTITY='' "OTHER_CFLAGS=-fembed-bitcode"
xcodebuild -scheme PolarBleSdk -configuration Release -sdk `xcrun --sdk iphonesimulator --show-sdk-path` -derivedDataPath $DERIVED_DATA ONLY_ACTIVE_ARCH=NO ARCHS="i386 x86_64" CODE_SIGN_IDENTITY='' "OTHER_CFLAGS=-fembed-bitcode"
echo "Creating universal ios-communications..."
cd $DERIVED_DATA
lipo -create -output ../3rd_party_sdk/PolarBleSdk.framework/PolarBleSdk Build/Products/Release-iphoneos/PolarBleSdk.framework/PolarBleSdk Build/Products/Release-iphonesimulator/PolarBleSdk.framework/PolarBleSdk
Expand Down
20 changes: 20 additions & 0 deletions sources/iOS/ios-communications/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
#
# 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 "$@"
12 changes: 10 additions & 2 deletions sources/iOS/ios-communications/docs/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>

<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
<a title="Classes Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html"> Docs</a> (90% documented)</p>
<p class="header-right">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</header>
<div class="content-wrapper">
Expand Down Expand Up @@ -480,8 +488,8 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-04-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-11-20)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>

<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/PolarBleApiDefaultImpl" class="dashAnchor"></a>
<a title="PolarBleApiDefaultImpl Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html"> Docs</a> (90% documented)</p>
<p class="header-right">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</header>
<div class="content-wrapper">
Expand Down Expand Up @@ -173,6 +181,7 @@
<h1>PolarBleApiDefaultImpl</h1>
<div class="declaration">
<div class="language">

<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PolarBleApiDefaultImpl</span></code></pre>

</div>
Expand Down Expand Up @@ -281,8 +290,8 @@ <h4>Return Value</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-04-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-11-20)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
Expand Down
12 changes: 10 additions & 2 deletions sources/iOS/ios-communications/docs/Enums.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>

<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Enumerations" class="dashAnchor"></a>
<a title="Enumerations Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html"> Docs</a> (90% documented)</p>
<p class="header-right">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</header>
<div class="content-wrapper">
Expand Down Expand Up @@ -294,8 +302,8 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-04-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-11-20)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
Expand Down
13 changes: 11 additions & 2 deletions sources/iOS/ios-communications/docs/Enums/Features.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>

<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Features" class="dashAnchor"></a>
<a title="Features Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html"> Docs</a> (90% documented)</p>
<p class="header-right">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</header>
<div class="content-wrapper">
Expand Down Expand Up @@ -173,6 +181,7 @@
<h1>Features</h1>
<div class="declaration">
<div class="language">

<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Features</span> <span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="kt">CaseIterable</span></code></pre>

</div>
Expand Down Expand Up @@ -351,8 +360,8 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-04-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-11-20)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
Expand Down
13 changes: 11 additions & 2 deletions sources/iOS/ios-communications/docs/Enums/RecordingInterval.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>

<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/RecordingInterval" class="dashAnchor"></a>
<a title="RecordingInterval Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html"> Docs</a> (90% documented)</p>
<p class="header-right">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</header>
<div class="content-wrapper">
Expand Down Expand Up @@ -173,6 +181,7 @@
<h1>RecordingInterval</h1>
<div class="declaration">
<div class="language">

<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">RecordingInterval</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>

</div>
Expand Down Expand Up @@ -242,8 +251,8 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-04-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-11-20)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
Expand Down
13 changes: 11 additions & 2 deletions sources/iOS/ios-communications/docs/Enums/SampleType.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>

<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/SampleType" class="dashAnchor"></a>
<a title="SampleType Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html"> Docs</a> (90% documented)</p>
<p class="header-right">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</header>
<div class="content-wrapper">
Expand Down Expand Up @@ -173,6 +181,7 @@
<h1>SampleType</h1>
<div class="declaration">
<div class="language">

<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SampleType</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>

</div>
Expand Down Expand Up @@ -242,8 +251,8 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-04-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-11-20)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
Expand Down
13 changes: 11 additions & 2 deletions sources/iOS/ios-communications/docs/Enums/UndefinedError.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>

<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/UndefinedError" class="dashAnchor"></a>
<a title="UndefinedError Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html"> Docs</a> (90% documented)</p>
<p class="header-right">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</header>
<div class="content-wrapper">
Expand Down Expand Up @@ -173,6 +181,7 @@
<h1>UndefinedError</h1>
<div class="declaration">
<div class="language">

<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">UndefinedError</span> <span class="p">:</span> <span class="kt">LocalizedError</span></code></pre>

</div>
Expand Down Expand Up @@ -242,8 +251,8 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-04-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-11-20)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
Expand Down
12 changes: 10 additions & 2 deletions sources/iOS/ios-communications/docs/Extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>

<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Extensions" class="dashAnchor"></a>
<a title="Extensions Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html"> Docs</a> (90% documented)</p>
<p class="header-right">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>
</header>
<div class="content-wrapper">
Expand Down Expand Up @@ -209,8 +217,8 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-04-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2020 <a class="link" href="" target="_blank" rel="external"></a>. All rights reserved. (Last updated: 2020-11-20)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
Expand Down
Loading

0 comments on commit d88bccd

Please sign in to comment.