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

Archive = IOS Razorpay bit code missing #197

Closed
KiranreddySrDev opened this issue Jun 7, 2019 · 5 comments
Closed

Archive = IOS Razorpay bit code missing #197

KiranreddySrDev opened this issue Jun 7, 2019 · 5 comments

Comments

@KiranreddySrDev
Copy link

KiranreddySrDev commented Jun 7, 2019

React-native : 0.57
React: 16.6
Xcode: 10.2

I am using razorpay and it's working in an android fine but the thing is when IOS comes It's been getting an error like razorpay framework is not found.
I have added a framework in project/framework folder but still, I am facing an error.
Sometimes It's working but When I archive the IOS app there I get Razorpay bit code missing.

Please can anyone help me out

Thanks

@pronav
Copy link
Contributor

pronav commented Jun 7, 2019

Does error occur when running locally in simulator or only while archiving? Need screenshot for archive error..

Also see #194 (comment) if it helps

@KiranreddySrDev
Copy link
Author

while Archiving I got an error

@pronav
Copy link
Contributor

pronav commented Jun 7, 2019

Can you try script given in above comment?

@KiranreddySrDev
Copy link
Author

KiranreddySrDev commented Jun 7, 2019

Sorry It didn't work for me
I got the same issue when I archive the IOS App please help me out.
Please look over below an image

kiran_2thepoint

@KiranreddySrDev
Copy link
Author

I got this error solution
if in case anyone gets the same error please add the following code in Build Phases click + add Run script file

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

http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/

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