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

Reason: image not found Message from debugger: Terminated due to signal 6 #42

Open
FlutterForefront opened this issue Jul 2, 2019 · 6 comments

Comments

@FlutterForefront
Copy link

dyld: Library not loaded: @rpath/PayUCustomBrowser.framework/PayUCustomBrowser
Referenced from: /Users/jatin/Library/Developer/CoreSimulator/Devices/244F3B04-8895-470C-9D8B-B072AA0AA823/data/Containers/Bundle/Application/98E4984D-E16C-4019-9C9D-35E1D92292EE/Runner.app/Runner
Reason: image not found
Message from debugger: Terminated due to signal 6

@shirishbankar1
Copy link

This is happening to me too when I dont add PayUCustomBrowser.framework under EmbeddedFrameworks. If added it works but only on device and simulator. If tried to release to Appstore it doesnt pass Validation and gives errors.

Screenshot 2019-10-03 at 01 12 33

To solve these I found out you can add script in Build phases run script tab. But that doesn't change anything. Below is the script provided in documentation.

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

@punithbm
Copy link

@FlutterForefront @shirishbankar1 Did you guys fond any solutions for above queries

@shirishbankar1
Copy link

Try this :
open terminal , goto your framework path . execute following command :
lipo -remove i386 PayUCustomBrowser -o PayUCustomBrowser && lipo -remove x86_64 PayUCustomBrowser -o PayUCustomBrowser
if there's some error executing, you can move the framework file to desktop and execute command at that path on the file, then again copy the file to your project directory.

@punithbm
Copy link

@shirishbankar1 thanks for your time. I was able to build successfully.

@shirishbankar1
Copy link

shirishbankar1 commented Dec 16, 2019 via email

@punithbm
Copy link

@shirishbankar1 I was able to push the build but got an error from the apple portal

ITMS-90562: Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.

ITMS-90562: Invalid Bundle - The app submission can not be successfully recompiled from bitcode due to missing symbols during linking. You can try to reproduce and diagnose such issues locally by following the instructions from: https://developer.apple.com/library/archive/technotes/tn2432/_index.html

I have following setting
Under General > PayUCustomBrowser.framework - Embed & Sign
Build Phases > Embed Frameworks > Code sign on Copy

I've dragged
SDK, SDKUI & Custom Broswers folders from the sample app to application and defined following in bridging header
#import "PayU_iOS_CoreSDK.h"
#import "PUUIPaymentOptionVC.h"
#import "PUUIConstants.h"
#import "PUSAHelperClass.h"

Please check if you can help.

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

3 participants