Open alexander-albers opened 1 year ago
In order to fix this bug it is enough to change the Bundle.module to Bundle.main in VrsProvider.swift line 31.
This will allow all Users that use VRS to be able to integrate the package directly from SPM. Currently a workaround is needed for VRS users.
Hi @cseh17, sorry for the long delay. I am struggling to reproduce the issue on my side: I have set up a clean macOS command line app within Xcode and imported the TripKit library using Xcode SwiftPM. From there, I have no problems making requests using
VrsProvider(certAuthorization: ["certName": "vrs-client-certificate.pfx", "password": "..."])
Could you please try the same or send me a sample project?
I have tried it again and it seems to work now. I think you can close the issue.
Question: when can we expect a new version with the changes?
Sorry, I have somewhat neglected to update the version in the past months. It used to match the versions of ÖPNV Navigator, but I don't think this is a great way moving forward.
I'd like to reopen this issue as I have new information to share. Upon doing some further testing, I have discovered the following: As you mentioned earlier, you performed some tests and were unable to replicate the issue. This is accurate because if you follow the example provided, you'll successfully load the certificate contained within the framework itself.
However, in my scenario, if your certificate is situated outside the framework and elsewhere within the project structure, Bundle.module will only search within the framework structure. Oppositely, Bundle.main appears to search throughout the entire project structure, including within the framework (although I'm not 100% about the framework part).
Thank you, I will recheck this later.
Any update on this issue?
When importing TripKit using SPM, the certificate for the VRS provider (vrs-client-certificate.pfx) cannot be found.