NeutrinosPlatform / cordova-plugin-mobile-ocr

A cordova plugin that can accept image URI or Base64 data and returns the text present in the image as string without need for network. You can also try :- https://github.com/NeutrinosPlatform/cordova-plugin-ml-text
MIT License
49 stars 30 forks source link

Cocoapod breaks during installation on PhoneGap Build service #8

Closed Intonovi closed 5 years ago

Intonovi commented 5 years ago

Hello,

I'm having trouble compiling and building iOS app on build.phonegap.com service online. It does support cocoapods and installs them I guess correctly, but then this happens:

PhaseScriptExecution [CP]\ Copy\ Pods\ Resources /Library/Developer/Xcode/DerivedData/TestOCR-aluvbdrrxvzobagsgrsuhdirkkqc/Build/Intermediates.noindex/ArchiveIntermediates/TestOCR/IntermediateBuildFilesPath/TestOCR.build/Release-iphoneos/TestOCR.build/Script-687AC84BF8C1D4279CD552B0.sh
    cd /project
    /bin/sh -c /Library/Developer/Xcode/DerivedData/TestOCR-aluvbdrrxvzobagsgrsuhdirkkqc/Build/Intermediates.noindex/ArchiveIntermediates/TestOCR/IntermediateBuildFilesPath/TestOCR.build/Release-iphoneos/TestOCR.build/Script-687AC84BF8C1D4279CD552B0.sh
error: Resource "/Library/Developer/Xcode/DerivedData/TestOCR-aluvbdrrxvzobagsgrsuhdirkkqc/Build/Intermediates.noindex/ArchiveIntermediates/TestOCR/BuildProductsPath/Release-iphoneos/GoogleMobileVision/GoogleMVTextDetectorResources.bundle" not found. Run 'pod install' to update the copy resources script.

** ARCHIVE FAILED **

The following build commands failed:
    PhaseScriptExecution [CP]\ Copy\ Pods\ Resources /Library/Developer/Xcode/DerivedData/TestOCR-aluvbdrrxvzobagsgrsuhdirkkqc/Build/Intermediates.noindex/ArchiveIntermediates/TestOCR/IntermediateBuildFilesPath/TestOCR.build/Release-iphoneos/TestOCR.build/Script-687AC84BF8C1D4279CD552B0.sh
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/private/project/cordova/build-release.xcconfig,-workspace,TestOCR.xcworkspace,-scheme,TestOCR,-configuration,Release,-destination,generic/platform=iOS,-archivePath,TestOCR.xcarchive,archive,CONFIGURATION_BUILD_DIR=/private/project/build/device,SHARED_PRECOMPS_DIR=/private/project/build/sharedpch,-UseModernBuildSystem=0

I am not sure why this happens, any help?

I know your guide says there's a manual step for iOS for installing pod, but I don't have Mac, so online build is my only choice. :(

ChrisTomAlx commented 5 years ago

There must be some way to do pod install via the online service. I am not entirely sure how else you can get this to work. I will look into this and let you know if I find something, but no promises.

Cheers, Chris Neutrinos

ChrisTomAlx commented 5 years ago

Hey @Intonovi. Sorry about the delay. I removed the need for cocoapods and directly inserted the required frameworks within the plugin. Although this might cause issues if you have other plugins using the same frameworks. Most likely candidates to cause problems are push notifications plugin and plugins that use firebase.

I could not push this to either github or npm due to file size limitations. So I pushed it to bitbucket from where you can add it as below. This might take a while depending on your connection. cordova plugin add https://bitbucket.org/bhivedevs/cordova-plugin-mobile-ocr.git

If phonegap does not allow you to add from bitbucket you could also try git cloning the plugin repo, placing it somewhere within your project and then cordova plugin add <path_to_cloned_folder_containing_plugin.xml>

Note:- There have been a few breaking changes over the past few weeks so make sure to go through the readme if you are using plugin versions that are few versions old.

Cheers, Chris Neutrinos

ChrisTomAlx commented 5 years ago

Closing this issue. Please reopen if you would like to add something. Thanks!

Cheers, Chris Neutrinos