Skip to main content

Common Issues (iOS/Swift)

Under iOS, you may face some common issues while developing that are related to Master-Controller, e.g. switching between debug and release version.

Selection of debug vs. release version

For the selection of master controller SDK, you may have to write some scripts that will automatically select your framework.

Write this script under the build phase section in Xcode.

destinationFolder=${PROJECT\_DIR}/artifacts/libsToUse

if [ $CONFIGURATION = "Debug" ]; **then**

    sourceFolder="${PROJECT_DIR}/artifacts/debug"

    **echo** "copy from ${sourceFolder} to ${destinationFolder}"

    cp -R -f -v "${sourceFolder}/KSMasterController.xcframework" ${destinationFolder}

    **else**

    sourceFolder="${PROJECT_DIR}/artifacts/release"

    **echo** "copy from ${sourceFolder} to ${destinationFolder}"

    cp -R -f -v "${sourceFolder}/KSMasterController.xcframework" ${destinationFolder}
 fi