Installation

Installation

Requirements:

If you are using different Swift version, please contact us

Cocoapods installation​‌

  • Project dependencies are specified in a file called Podfile. Create this file in the same directory as your Xcode project (.xcodeproj) file if it doesn't exists.

  • Add the following lines to your Podfile:

platform :ios, '10.0'
source 'https://authenteq_client@bitbucket.org/authenteq/cocoapods-specs.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'YOUR_PROJECT_NAME' do
use_frameworks!
pod 'AuthenteqFlow', :git => 'https://authenteq_client@bitbucket.org/authenteq/flow-ios-release.git'
end
  • Run Terminal command to install the dependencies in your project:

$ pod install
  • On the first install, you will be asked for a password:

Cloning spec repo `bitbucket-flow-ios-release` from `https://authenteq_client@bitbucket.org/authenteq/flow-ios-release.git`
Password for 'https://authenteq_client@bitbucket.org':

Please ask your contact at Authenteq for this password.

  • Add description of camera usage to NSCameraUsageDescription key in your Info.plist file

Submitting an app to the App Store or Testflight

The AuthenteqFlow.framework is a dynamic framework which contains slices for all architectures - device and simulator. If you intend to extract the .ipa file for ad-hoc or App Store distribution, you’ll need to pre-process the framework to remove simulator architectures.

The best solution is to add a script at the build phase and after the embed frameworks build phase, which strips unused slices from the embedded frameworks.

The build step is based on the one provided here: http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/​​.

Script
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done