Closed julioarregoitia closed 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?
First of all thanks for answering:
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??
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
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.
The example run it here. Also run in my project CardScan
. The trouble is at the moment of the upload
And in my project CardScan
also exist in the path Build Phase -> Link Binary with Libraries
Any other idea??
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?
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 🤷♂️🤷♂️
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
Can you open the Carthage
directory to see if there is still a stray copy of CardScan there?
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.
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.
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