Taracque / cordova-plugin-braintree

:credit_card: A Cordova plugin for the Braintree mobile payment processing SDK.
MIT License
27 stars 42 forks source link

xcodeproj can not be parsed by Xcode after adding the plugin #34

Open migburillo opened 7 years ago

migburillo commented 7 years ago

Hello,

I can not open the xcode project file after adding the plugin. I tested several times these both options:

Using Xcode 9.0 beta

migburillo commented 7 years ago

More info, I was comparing both xcodeproj files and found the issue. Seems PayPalUtils framework is not installed. HashID is missing, which is breaking the whole file format.

/ PayPalUtils.framework in Embed Fra........ 65D1E2F371EA4BBCB4399D8D / Braintree3DSecure.framework C3F63F4BE46646FF85CC7ECE /* BraintreeApplePay.framework

prasannavsa commented 7 years ago

Hi migburillo, I got the same issue, but it is fixed for me when I try to install ios version 4.3.1. Please try to remove existing ios and add this version. ionic cordova platform rm ios ionic cordova platform add ios@4.3.1

Thanks Prasanna

antkers commented 7 years ago

Exactly the same problem with Xcode 8.3.2., did you manage to solve that problem somehow? (except removing that line manually from the .pbxproj file)

prasannavsa commented 7 years ago

Its worked for me in Xcode 8.3.2 . try following commands cordova platform rm ios cordova platform add ios@4.3.1

antkers commented 7 years ago

Thanks @prasannavsa but I use Visual Studio and Microsoft remotebuild on Mac in order to make a build - and it seems remotebuild is ignoring my "cordovaPlatforms": [ "ios@4.3.1" ]" directive in package.json. remotebuild automatically takes the newest cordova ios platform version (4.4.0).

@Taracque do you plan to fix that issue for cordova ios 4.4.0? Or could you give me a hint how to solve that myself (I know I can remove that line after each build manually, but I need that solved automatically for continous integration...)? Thank you!

Here's the line that causes the problem in the .pbxproj file: /* PayPalUtils.framework in Embed Frameworks cordova-plugin-braintree */ = {isa = PBXBuildFile; fileRef = 4EA352635C974FF296F36A8B /* PayPalUtils.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };

also see screenshot from project.pbxproj image

Deeeej commented 6 years ago

It would be really useful to see if anyone is able to answer @antkers question above. I am importing the package to a cloud IDE platform where we have little control over the build and we are getting the similar error: Build Error: Error: Sandbox Exec Error: [ Error: Could not parse project.pbxproj: SyntaxError: Expected "/ Begin ", "/ End ", "\"" or [A-Za-z0-9_.] but "/" found.

Its not entirely clear from the above messages if there is something I do to the source files to remove this error?

Deeeej commented 6 years ago

In case in helps someone in the future, I removed the lines: `

<!-- Hook to embed iOS frameworks after installation -->
    <hook type="after_plugin_install" src="scripts/add_embedded_ios_frameworks.js" />

` from plugin.xml

and this fixed the issue.

Taracque commented 6 years ago

Yep, that seems working with cordova 7. Thx for feedback.

tulga870911 commented 6 years ago

@Deeeej I've removed those lines, but I still get the same error. Thanks in advance for your help. Expected "/ Begin ", "/ End ", """ or [A-Za-z0-9_.] but "/" found.

Deeeej commented 6 years ago

Its worth noting I am running cordova version 6.5.0 and without removing the above hooks the project will not build, so this issue is not just for cordova 7 and above. Also, even when I remove the hooks and the project successfully builds, PayPal does not work, I think this is due to the embedded ios frameworks no longer being copied. Doe any one know what is causing the hash of PayPalUtils.framework not be output, as this is fundamentally the issue that needs to be fixed?

tulga870911 commented 6 years ago

@Deeeej Thanks for your reply. Now I am able to build the project. But the new problem is that Apple Pay does not show up in the Drop-In UI when setupApplePay() is successful. Does anyone have any idea on this?

fatzhou commented 5 years ago

@Deeeej Thanks for your reply. Now I am able to build the project. But the new problem is that Apple Pay does not show up in the Drop-In UI when setupApplePay() is successful. Does anyone have any idea on this?

How do you fixed your problem? I am going mad with it.