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

RSKImageCropper.framework and QBImagePicker.framework contains unsupported architectures with CocoaPods #880

Open
DareFail opened this issue Nov 14, 2018 · 4 comments

Comments

@DareFail
Copy link

Apologies if I am missing something obvious. I updated a project and it builds and archives fine. It also runs on the ios/android simulator fine. I only get an error when I submit the archive to the app store and testflight.

I am well aware of previous issues:
#56
#61
#76
#105
#632

But I am using CocoaPods so confused why this is still using the development binaries. How do I fix this? I tried everything in the previous issues over and over for a week without progress.

screen shot 2018-11-13 at 8 15 00 pm

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.21.3
  • react-native v0.57.4

Platform

Tell us to which platform this issue is related

Xcode 10
IOS simulator

App Store Connect Operation Error
ERROR ITMS-90680: "The binary you uploaded was invalid."

App Store Connect Operation Error
ERROR ITMS-90087: "Unsupported Architectures. The executable for /ImageCropPickerSDK/QBImagePicker.framework contains unsupported architectures '[x86_64, i386]'."

App Store Connect Operation Error
ERROR ITMS-90087: "Unsupported Architectures. The executable for /ImageCropPickerSDK/RSKImageCropper.framework contains unsupported architectures '[x86_64, i386]'."

App Store Connect Operation Error
ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle /ImageCropPickerSDK/QBImagePicker.framework" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains armv7(bitcode) and arm64(bitcode), while the nested bundle Mach-O contains X86_64ALL(machine code). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting."

App Store Connect Operation Error
ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle /ImageCropPickerSDK/RSKImageCropper.framework" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains armv7(bitcode) and arm64(bitcode), while the nested bundle Mach-O contains X86_64ALL(machine code). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting."

App Store Connect Operation Error
ERROR ITMS-90685: "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'com.ruslanskorb.RSKImageCropper' under the iOS application ''."

App Store Connect Operation Error
ERROR ITMS-90685: "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'jp.questbeat.QBImagePicker' under the iOS application ''."

App Store Connect Operation Error
ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'ImageCropPickerSDK/QBImagePicker.framework/QBImagePicker' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."

App Store Connect Operation Error
ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'ImageCropPickerSDK/RSKImageCropper.framework/RSKImageCropper' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."

App Store Connect Operation Error
ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."

App Store Connect Operation Warning
WARNING ITMS-90080: "The executable 'ImageCropPickerSDK/QBImagePicker.framework' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library."

App Store Connect Operation Warning
WARNING ITMS-90080: "The executable 'ImageCropPickerSDK/RSKImageCropper.framework' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library."
@samet-umur-crea
Copy link

similar error
Unable to run command 'Ld RSKImageCropper' - this target might include its own product. Unable to run command 'Ld RSKImageCropper' - this target might include its own product. Unable to run command 'CreateUniversalBinary RSKImageCropper' - this target might include its own product. Unable to run command 'GenerateDSYMFile RSKImageCropper.framework.dSYM' - this target might include its own product. Unable to run command 'Touch RSKImageCropper.framework' - this target might include its own product. Unable to run command 'CodeSign RSKImageCropper.framework' - this target might include its own product.

@mouthzipper
Copy link

@jamespsteinberg have you solved this? Got the same error.

@DareFail
Copy link
Author

DareFail commented Dec 9, 2018

Solution was to not use this library 😆
This suits my needs fine: https://facebook.github.io/react-native/docs/imageeditor
Example from stackoverflow covering it: https://stackoverflow.com/questions/40627018/how-to-focus-crop-image-in-react-native

@ekinburak
Copy link

ekinburak commented Dec 21, 2018

Can we improve the below script to fix archs & frameworks ?
The following steps fix arch problem of these problems.
Add a Run Script step to your "Build Phases", put it after your step to embed frameworks, set it to use /bin/sh and enter the following script.

This script loops through the frameworks embedded in the application and removes unused architectures.

APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
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

Here is the reference link for the script.

After this script project runs on a simulator as expected; however, it does not work on a device. And also, Validation fails.

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

4 participants