Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

iOS Crash on Sample Cordova App #17

Open
qucas opened this issue Jan 20, 2021 · 3 comments
Open

iOS Crash on Sample Cordova App #17

qucas opened this issue Jan 20, 2021 · 3 comments

Comments

@qucas
Copy link

qucas commented Jan 20, 2021

When running the RTRCordovaSample app in XCode on an iPhone simulator or physical device, the app launches and displays a splash screen but then crashes. The following error is showing in the console:

dyld: Library not loaded: @rpath/AbbyyRtrSDK.framework/AbbyyRtrSDK Referenced from: /private/var/containers/Bundle/Application/F83BA7A6-14D1-4FFA-888E-9EBEAB7801F9/RTRCordovaSample.app/RTRCordovaSample Reason: image not found dyld: launch, loading dependent libraries DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

image

The frameworks appear to be properly linked along with the asset files and I've copied over the license file from the trial package:
image
image
image

@qucas qucas changed the title iOS Crash on Sample App iOS Crash on Sample Cordova App Jan 20, 2021
@al0b
Copy link
Contributor

al0b commented Jan 21, 2021

Something went wrong. Check please in Xcode Products -> RTRCordovaSample.app -> Show in Finder -> Show Package Contents -> Frameworks all frameworks from libs/ios should be there.

@qucas
Copy link
Author

qucas commented Jan 21, 2021

@al0b There doesn't appear to be a Frameworks folder within that package:
image

I attempted to create one and drag and drop the iOS frameworks from the trial package into the new folder, but it looks like that was removed after re-building the app. What can I do to ensure those get added?

In the Cordova project in VS Code, I can see that the frameworks are in the proper place (platforms/ios) and the framework search path in XCode is set to platforms/ios
image
image

Edit:
Updating the Framework Search Paths to libs/ios instead and moving the frameworks into that directory returns the same error:

dyld: Library not loaded: @rpath/AbbyyUI.framework/AbbyyUI
  Referenced from: /Users/.../Library/Developer/CoreSimulator/Devices/2CE7CF5A-9D74-4795-A7E4-996D683F6E3F/data/Containers/Bundle/Application/0A08D083-935D-41D8-988C-DB5407D67CBE/RTRCordovaSample.app/RTRCordovaSample
  Reason: image not found

@al0b
Copy link
Contributor

al0b commented Jan 27, 2021

I'm sorry for delay.

In the plugin there are some hooks (cordova-plugin-abbyy-rtr-sdk/scripts/) that should simplify a setting process. ios_copy_frameworks.js is one of them. It is used to add two phases to a Xcode-project:
1. Copy ABBYY Assets to copy the resource files to a built bundle of an application.
2. Copy ABBYY Frameworks to strip, sign and copy the frameworks to the built bundle. All routine is done by special script in libs/ios/copy_frameworks.sh, in this phase the script is just called: /bin/sh "../../libs/ios/copy_frameworks.sh". Please, check ios_copy_frameworks.js for more details.

So, now you can add the Copy ABBYY Frameworks phase manually, but please, tell me more details about how you added the plugin, to determine why the hook did not work properly?

Cordova prepare workaround

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

No branches or pull requests

2 participants