Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VRS: cannot find certificate #77

Open
alexander-albers opened this issue Dec 20, 2022 · 7 comments
Open

VRS: cannot find certificate #77

alexander-albers opened this issue Dec 20, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@alexander-albers
Copy link
Owner

When importing TripKit using SPM, the certificate for the VRS provider (vrs-client-certificate.pfx) cannot be found.

@alexander-albers alexander-albers added the bug Something isn't working label Dec 20, 2022
@cseh17
Copy link

cseh17 commented Jan 10, 2023

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.

@alexander-albers
Copy link
Owner Author

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?

@cseh17
Copy link

cseh17 commented Jun 9, 2023

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?

@alexander-albers
Copy link
Owner Author

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.

@cseh17
Copy link

cseh17 commented Apr 30, 2024

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).

@alexander-albers
Copy link
Owner Author

Thank you, I will recheck this later.

@cseh17
Copy link

cseh17 commented Sep 22, 2024

Any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants