Open steffanhalv opened 4 years ago
Unfortunately we don't offer official support for Cordova/Phonegap at this time but will take this feedback into consideration as we look into alternative development options in the future.
Is there anyway to workaround this error I think there's so many people using Cordova/Phonegap and your Here service is getting popular so you should rush on this before the hype goes some where else
Hello @steffanhalv, you can add the PayPalHereSDKv2 to a cordova project with the cordova-plugin-cocoapod-support.
Just modify you config.xml to something like the following:
<platform name="ios">
<dependency id="cordova-plugin-cocoapod-support"/>
<pods-config use-frameworks="true"></pods-config>
<pod name="PayPalHereSDKv2/Release" />
<!-- Add the rest of the scripts afterwards (i.e. config-file, source-file etc...) -->
</platform>
After installing the plugin, just run the command cordova prepare ios
, it will automatically install the pod PayPalHereSDKv2 in your project.
asa47 we tried your solutions but we've got the same result 'PPRetailInstrumentInterface/PPRetailInstrumentInterface.h' file not found is there any specific version working with this method? we tried last 20 with no luck, is it working for you?
@DowsingUK Yes it working for us. Just to confirm, after installing the pod, are you opening the xcworkspace or the xcodeproj? You should be using the xcworkspace.
@asa47 Does it also work for Android? I haven't got time to test your ios solution just yet, but it would be awesome if it works.
@asa47 sure we're using xcworkspace and we've try with different versions of MacOSX, Cordova/Phonegap, XCodes and nothing works always getting 'PPRetailInstrumentInterface/PPRetailInstrumentInterface.h' file not found
@steffanhalv Android has been working good so far for us
@DowsingUK @steffanhalv I have forked your plugin, please see my changes. corodova-plugin-paypal-here
cordova plugin add https://github.com/asa47/corodova-plugin-paypal-here.git
cordova prepare ios
If you are still having issues there might be something wrong with your XCode project.
@steffanhalv I havent used the android SDK, but it should be straightforward, just update your gradle with the new dependency and build the project in Android studio.
- You will have to re-write the ios src code in Objective C or you can just use a Bridging-Header and use the previous implementation.
@asa47 That is actually a big part of the problem. AFNetworking is not working which should be used there. See my error log in the first post 😅.
And honestly I am also not so good at writing Objective C code...
Otherwise, thank you very much ;)
add this line in config.xml and try running a clean ios platform install
<preference
name="deployment-target" value="8.1" />
Will you add cordova / phonegap support for this please? We tried to fork a project from npm and edit it with the latest version of the library, but when we run the xcode project we get an error:
"Include of non-modular header inside framework module 'PayPalRetailSDK':
And if we fix this by copying those two files into the framework the app runs successfully but crashes with the following error:
Here is a link to our repo: https://github.com/StorePilot/corodova-plugin-paypal-here
Edit: The latest error we got looks related to this: https://github.com/paypal/paypal-here-sdk-ios-distribution/issues/255