iOS

Search Knowledge Base by Keyword

Contents
  1. Make sure all steps from Mobile SDK step-by-step integration manual are completed.
  2. In the root folder of your project run pod init and add the following to the Podfile (replace YOUR_TARGET_NAME with the actual target):
target 'YOUR_TARGET_NAME' do
use_frameworks!
pod 'WinKKSDK'
end
  1. Run pod update if Winkk SDK’s version has been updated or you are configuring the integration for the project for the first time.
  2. Run pod install.
  3. Open the project’s .xcworkspace file. Add the following into Info.plist:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>winkksdkauth</string>
</array>
  1. Add simulator architecture strip build phase to allow your project to be published to App Store. Select your project’s target, switch to “Build Phases”, press “+” and select “New Run Script Phase”. Add the following script to it:
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
  1. Initialize the SDK with application ID obtained through the Mobile SDK step-by-step integration manual:
[Winkk initialize: @"YOUR_APPLICATION_ID"];
  1. The best place for this initialization is in AppDelegate‘s didFinishLaunchingWithOptions method.
  2. Start the authorization session with [Winkk.sharedManager start:delegate]; call.
  3. Refer this demonstration project for more details.
Was this article helpful?
How can we improve this article?

Leave a Reply

Your email address will not be published. Required fields are marked *