Requirements:
Swift 5+
Project dependencies are specified in a file called Podfile
. Create this file in the same directory as your Xcode project file (.xcodeproj
) if it doesn't already exist.
Add the following lines to your Podfile
: (make sure to replace YOUR_PROJECT_NAME)
platform :ios, '10.0'source 'https://bitbucket.org/authenteq/cocoapods-specs.git'source 'https://github.com/CocoaPods/Specs.git'target 'YOUR_PROJECT_NAME' douse_frameworks!pod 'AuthenteqFlow'end
Run Terminal command to install the dependencies in your project:
$ pod install
Add NSCameraUsageDescription
key in your Info.plist file
Under the Info tab, add description as to why camera access is required by clicking the small `+` button and adding the text
For example: 'Camera permission is needed to take a photo of your document and face for identification.'
Under the Build Settings tab, make sure the build settings is 8.0 or higher
If issues with building the app, save the project as a workspace, then close project and open workspace
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/.
ScriptAPP_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 FRAMEWORKdoFRAMEWORK_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 $ARCHSdoecho "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")doneecho "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