payu-intrepos / Documentations

Documentation to integrate PayU SDKs
26 stars 10 forks source link

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

Open FlutterForefront opened 5 years ago

FlutterForefront commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

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

shirishbankar1 commented 4 years ago

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 commented 4 years ago

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

shirishbankar1 commented 4 years ago

Build isn't the issue. Try pushing it to testflight or appstore. That time it shouldn't give error.

On Mon, Dec 16, 2019, 5:21 PM Punith B M notifications@github.com wrote:

@shirishbankar1 https://github.com/shirishbankar1 thanks for your time. I was able to build successfully.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/payu-intrepos/Documentations/issues/42?email_source=notifications&email_token=AFOCC6LE3NWQ6R2GO37ZRJ3QY5TSPA5CNFSM4H4YYHS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG6OX7Y#issuecomment-566029311, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFOCC6LP4IIUFLQKOZ5EY4DQY5TSPANCNFSM4H4YYHSQ .

punithbm commented 4 years ago

@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.