getbouncer / cardscan-ios

A library for scanning credit and debit cards
MIT License
203 stars 67 forks source link

Error Uploading to App Store #260

Closed julioarregoitia closed 3 years ago

julioarregoitia commented 3 years ago

I adapted CardScan from Carthage to Swift Package Manager, removed the reference to / usr / local / bin / carthage copy-frameworks that belonged toCardScan now when uploading the app the next error appears. (see the next image)

If you can, try including CardScan with Swift Package Manager in an app and try uploading the Build to the App Store

Captura de Pantalla 2021-02-09 a la(s) 6 16 23 p  m
jaimejiyepark commented 3 years ago

Hello @julioarregoitia, Let me take a look for you. Can you tell me what version of CardScan you are trying to use? Also from the looks of the first build error, it looks CardScan.framework is not in the folder Frameworks. If you haven't already, please give this solution a try!

With the second build error, looks like the Carthage install of CardScan is still there after your SPM installation. While I try to replicate this can you give your Build Phase a look and check if the old reference to CardScan is still there?

julioarregoitia commented 3 years ago

First of all thanks for answering:

Captura de Pantalla 2021-02-09 a la(s) 6 54 17 p  m
julioarregoitia commented 3 years ago

I reread the CardScan installation instructions (https://docs.getbouncer.com/bouncer-scan/credit-card-ocr/ios-integration-guide#installation) for SPM and made sure I was doing this, at the end of the process CardScan is added as shown in the image. What is the relationship with .xcframework for your case ???

All I find regarding the .xcframework in your installation project is the quote:

In our deployments we use XCFrameworks to encapsulate our code and resources.
XCFrameworks have the advantage of faster compilation times and simplified bundle management..

Can you help??

Captura de Pantalla 2021-02-09 a la(s) 7 04 27 p  m
julioarregoitia commented 3 years ago

By the way, in this part of here you quote https://github.com/getbouncer/cardscan-ios/git , but I got an error with that. I think must be https://github.com/getbouncer/cardscan-ios.git , it is a dot before the git word

Captura de Pantalla 2021-02-09 a la(s) 7 18 03 p  m
jaimejiyepark commented 3 years ago

Thank you for pointing error out in the docs, I will fix it ASAP. Can you check Build Phase -> Link Binary with Libraries to see if CardScan is there? Also I will provide an example app below. Please let me know if you can run it on your machine.

CarthageBuildTest.zip

julioarregoitia commented 3 years ago

The example run it here. Also run in my project CardScan. The trouble is at the moment of the upload

Captura de Pantalla 2021-02-09 a la(s) 7 40 08 p  m

julioarregoitia commented 3 years ago

And in my project CardScan also exist in the path Build Phase -> Link Binary with Libraries Any other idea??

Captura de Pantalla 2021-02-09 a la(s) 7 41 09 p  m

kingst commented 3 years ago

Hi @julioarregoitia let me lean in to help out with this. To answer your earlier question, yes, we've had many apps that have shipped the latest version of our SDK to the app store, so we do know that it's possible and I just uploaded one of our test apps that uses SPM to double check.

Based on the error message that you posted originally it looks like there are two copies of CardScan in your app right now, if I'm reading that correctly. Can you look through the directory where xcode stores your archives to see if there are two copies of CardScan.framework there?

julioarregoitia commented 3 years ago

I already deleted the entire DerivedData folder that contained all the files that Xcode stores. I checked in my project folder if there was still any CardScan and nothing there either. I reopened the project to load all the SPM files and still when doing the Archive it appears double CardScan as you can see in the next image 🤷‍♂️🤷‍♂️

Captura de Pantalla 2021-02-10 a la(s) 3 56 49 p  m
julioarregoitia commented 3 years ago

I really don't understand what is the problem your project has with SPM. I removed the version of SPM and added the manual project and so if it works well as you can see in the images. I repeat, it has not been fixed with SPM, if manual is added it works fine, if it is added withSPM it does not work

Captura de Pantalla 2021-02-10 a la(s) 4 46 18 p  m Captura de Pantalla 2021-02-10 a la(s) 4 50 26 p  m
kingst commented 3 years ago

Can you open the Carthage directory to see if there is still a stray copy of CardScan there?

julioarregoitia commented 3 years ago

Thanks guys, I don't know what it is. I made the Archive of your example and it had no problem. In the project folder there was nothing of CardScan, inDerivedData neither is there. I went to plan B and downloaded the source code, compiled it with Carthage (which now allows generating the .XCFrameworks) and added it to the project. Thanks for your support and effort, I don't know what the problem will be with SPM but we are not going to waste any more time with something that I don't understand what it is.

kingst commented 3 years ago

Glad that worked, I suspect that there is a strange interaction with Carthage and SPM, I'll keep my eyes out for anything else that pops up.