Skip to content

Commit

Permalink
Release 9.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
iProovBot committed Mar 18, 2022
1 parent a0d39b9 commit 1f8eac2
Show file tree
Hide file tree
Showing 29 changed files with 46 additions and 97 deletions.
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- Alamofire (5.4.3)
- iProov (9.3.0):
- iProov (9.3.1):
- Socket.IO-Client-Swift (~> 16.0)
- iProovAPIClient (1.0.0):
- Alamofire (~> 5.0)
Expand Down Expand Up @@ -34,12 +34,12 @@ CHECKOUT OPTIONS:

SPEC CHECKSUMS:
Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9
iProov: 9b36589700a73ec3bc5f0069956936fdd57f69bc
iProov: 8cb34cace60c10ec56426933f7e5ce3062d4050e
iProovAPIClient: d0246a5a46e48c7f0f9f61f6606b92de7faa3959
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
Socket.IO-Client-Swift: c116d6dc9fd6be9c259bacfe143f8725bce7d79e
Starscream: 5178aed56b316f13fa3bc55694e583d35dd414d9

PODFILE CHECKSUM: 39da1444dfba6fa4a1792b0aceedd179eef46153

COCOAPODS: 1.11.2
COCOAPODS: 1.11.3
118 changes: 33 additions & 85 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![iProov: Flexible authentication for identity assurance](images/banner.jpg)

# iProov Biometrics iOS SDK v9.3.0
# iProov Biometrics iOS SDK v9.3.1

## Table of contents

Expand Down Expand Up @@ -101,131 +101,79 @@ The SDK is distributed as an XCFramework, therefore **you are required to use Co

### Carthage

Cocoapods is recommend for the easiest integration, however we also support Carthage. Full instructions installing and setting up Carthage [are available here](https://github.com/Carthage/Carthage).
We recommend using Cocoapods for dependency management, however we also support Carthage. Full instructions installing and setting up Carthage are available [here](https://github.com/Carthage/Carthage).

You have a choice of two different methods to install iProov using Carthage, depending on your requirements. If you are unsure which to choose, then for most people choosing the XCFrameworks approach is likely to be the simplest and most appropriate.

<details>
<summary>Use XCFrameworks (for Carthage 0.37.0 and newer)</summary>

Carthage 0.37.0 now supports building XCFrameworks. Unfortunately, however, pre-built binary XCFrameworks such as iProov [are still not supported properly](https://github.com/Carthage/Carthage/issues/3103).

Therefore, this guide will then explain how to build Socket.IO (and its dependency, Starscream) as XCFrameworks using Carthage, and then you will need to copy them, together with the pre-built iProov.xcframework, into your project.
**You are strongly advised to use Carthage v0.38.0 or above**, which has full support for pre-built XCFrameworks, however older versions of Carthage are still supported (but you must use traditional universal/"fat" frameworks instead).

1. Add the following to your Cartfile:

```
binary "https://raw.githubusercontent.com/iProov/ios/master/carthage/IProov.json"
github "socketio/socket.io-client-swift" == 16.0.1
```

2. Create the following workaround script in your root Carthage directory:
2. Create the following script named _carthage.sh_ in your root Carthage directory:

```sh
# carthage.sh
# Usage example: ./carthage.sh build --use-xcframeworks --platform iOS
# Usage example: ./carthage.sh build --platform iOS

set -euo pipefail

xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT

echo "FRAMEWORK_SEARCH_PATHS=\$(inherited) $(pwd)/Carthage/Build" >> $xcconfig
if [[ "$@" != *'--use-xcframeworks'* ]]; then
# See https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md for further details

CURRENT_XCODE_VERSION="$(xcodebuild -version | grep "Xcode" | cut -d' ' -f2 | cut -d'.' -f1)00"
CURRENT_XCODE_BUILD=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)

echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_${CURRENT_XCODE_VERSION}__BUILD_${CURRENT_XCODE_BUILD} = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_'${CURRENT_XCODE_VERSION}' = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_$(XCODE_VERSION_MAJOR)__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
fi

echo 'BUILD_LIBRARY_FOR_DISTRIBUTION=YES' >> $xcconfig

export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"
```

This script contains two workarounds:
This script contains two important workarounds:

1. It sets `FRAMEWORK_SEARCH_PATHS` to include the Carthage Build folder, so that Socket.IO can correctly find Starscream.xcframework when it builds.
2. It enables `BUILD_LIBRARY_FOR_DISTRIBUTION` so that iProov's dependencies are built with this option enabled.
1. When building universal ("fat") frameworks, it ensures that duplicate architectures are not lipo'd into the same framework when building on Apple Silicon Macs, in accordance with [the official Carthage workaround](https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md) (note that the document refers to Xcode 12 but it also applies to Xcode 13).

2. It ensures that the SocketIO & Starscream frameworks are built with the `BUILD_LIBRARY_FOR_DISTRIBUTION` setting enabled.

3. Make the script executable:

```sh
chmod +x carthage.sh
```

4. You can now build SocketIO.xcframework and Starscream.xcframework with the following command:

```sh
./carthage.sh update --use-xcframeworks --platform ios
```

> NOTE: Ensure you use `./carthage.sh` instead of `carthage`. All command usages remain the same.

5. From the Carthage/Build folder, add SocketIO.xcframework & Starscream.xcframework to your app's *"Frameworks, Libraries, and Embedded Content"* section.

6. From this repository, copy iProov.xcframework to your app's *"Frameworks, Libraries, and Embedded Content"* section.

7. Add an `NSCameraUsageDescription` entry to your app's Info.plist, with the reason why your app requires camera access (e.g. "To iProov you in order to verify your identity.")

</details>

<details>
<summary>Use universal frameworks (for all Carthage versions)</summary>

If you are using Carthage 0.36.0 or earlier, or you wish to remain using traditional universal (fat) frameworks, you can follow these steps to install iProov and its dependencies as universal frameworks using Carthage.
4. You must now use `./carthage.sh` instead of `carthage` to build the dependencies.

1. Add the following to your Cartfile:

```
binary "https://raw.githubusercontent.com/iProov/ios/master/carthage/IProov.json"
github "socketio/socket.io-client-swift" == 16.0.1
```
**Carthage 0.38.0 and above (use XCFrameworks):**

2. Create the following workaround script in your root Carthage directory:

```sh
# 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

# Enable BUILD_LIBRARY_FOR_DISTRIBUTION for all frameworks.

echo 'BUILD_LIBRARY_FOR_DISTRIBUTION=YES' >> $xcconfig

export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"
./carthage.sh update --use-xcframeworks --platform ios
```

This script contains two workarounds:
**Carthage 0.37.0 and below (use universal frameworks):**

1. Universal frameworks cannot support multiple copies of the same architecture. This workaround prevents Xcode 12 for building for the arm64 simulator (Apple Silicon) which will cause `lipo` to fail to produce the fat universal framework. This is taken from [the official Carthage Xcode 12 workaround](https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md).
2. It enables `BUILD_LIBRARY_FOR_DISTRIBUTION` so that iProov's dependencies are built with this option enabled.

3. Make the script executable:

```sh
chmod +x carthage.sh
./carthage.sh update --platform ios
```

4. You can now build all the dependencies as follows:
5. Add the built .framework/.xcframework files from the _Carthage/Build_ folder to your project in the usual way.

```sh
./carthage.sh update
```
**Carthage 0.37.0 and below only:**

> NOTE: Ensure you use `./carthage.sh` instead of `carthage`. All command usages remain the same.

5. Follow the [normal steps](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos) to add the frameworks built by Carthage to your project. You need to add iProov.framework, SocketIO.framework & Starscream.framework.
You should follow the additional instructions [here](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos) to remove simulator architectures from your universal binaries prior to running your app/submitting to the App Store.

6. Add an `NSCameraUsageDescription` entry to your app's Info.plist, with the reason why your app requires camera access (e.g. "To iProov you in order to verify your identity.")
</details>

## Get started

Expand Down
3 changes: 2 additions & 1 deletion carthage/IProov.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
"9.0.1": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_9_0_1.zip",
"9.1.0": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_9_1_0.zip",
"9.2.0": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_9_2_0.zip",
"9.3.0": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_9_3_0.zip"
"9.3.0": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov_9_3_0.zip",
"9.3.1": "https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov-v9.3.1.framework.zip?alt=https://raw.githubusercontent.com/iProov/ios/master/carthage/iProov-v9.3.1.xcframework.zip"
}
Binary file added carthage/iProov-v9.3.1.framework.zip
Binary file not shown.
Binary file added carthage/iProov-v9.3.1.xcframework.zip
Binary file not shown.
Binary file not shown.
Binary file modified iProov.framework/Info.plist
Binary file not shown.
Binary file modified iProov.framework/Modules/iProov.swiftmodule/arm.swiftmodule
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified iProov.framework/Modules/iProov.swiftmodule/arm64.swiftmodule
Binary file not shown.
Binary file not shown.
Binary file modified iProov.framework/Modules/iProov.swiftmodule/armv7.swiftmodule
Binary file not shown.
Binary file not shown.
Binary file modified iProov.framework/Modules/iProov.swiftmodule/i386.swiftmodule
Binary file not shown.
Binary file not shown.
Binary file modified iProov.framework/Modules/iProov.swiftmodule/x86_64.swiftmodule
Binary file not shown.
Binary file modified iProov.framework/iProov
Binary file not shown.
Binary file modified iProov.framework/iProov.plist
Binary file not shown.
2 changes: 1 addition & 1 deletion iProov.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'iProov'
s.version = '9.3.0'
s.version = '9.3.1'
s.summary = 'Flexible authentication for identity assurance'
s.homepage = 'https://www.iproov.com/'
s.license = { :type => 'commercial', :file => 'LICENSE.md' }
Expand Down
14 changes: 7 additions & 7 deletions iProov.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>iProov.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>iProov.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Binary file modified iProov.xcframework/ios-arm64_armv7/iProov.framework/Info.plist
Binary file not shown.
Binary file modified iProov.xcframework/ios-arm64_armv7/iProov.framework/iProov
Binary file not shown.
Binary file modified iProov.xcframework/ios-arm64_armv7/iProov.framework/iProov.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 1f8eac2

Please sign in to comment.