Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archiving on iOS Failed - Several issues with the iOS integration #147

Closed
atulmy opened this issue Jan 19, 2019 · 2 comments
Closed

Archiving on iOS Failed - Several issues with the iOS integration #147

atulmy opened this issue Jan 19, 2019 · 2 comments

Comments

@atulmy
Copy link

atulmy commented Jan 19, 2019

While Archiving the project for iOS distribution, I'm getting following issues:

screenshot 2019-01-20 at 4 31 24 am

@atulmy
Copy link
Author

atulmy commented Jan 20, 2019

If anyone is facing this issue, follow these steps:

Xcode -> Select your project on left -> Build Phases -> Click on + -> New Run Script Phases

Copy following 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

Click on Xcode -> Product -> Archive.

It should work now. I think these steps should be present in Readme.

These steps are also available in this video.

@atulmy atulmy closed this as completed Jan 20, 2019
@iThink32
Copy link
Contributor

@atulmy the video which you referred is present in the docs in a different section.We purposely shifted it to integration videos as a lot of people prefer watching over reading.Here's the link if you missed it.
https://razorpay.com/docs/ios/integration-videos/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants