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

Missing exported QONErrorDomain constant #411

Closed
megastep opened this issue Nov 4, 2023 · 4 comments · Fixed by #416
Closed

Missing exported QONErrorDomain constant #411

megastep opened this issue Nov 4, 2023 · 4 comments · Fixed by #416
Labels
enhancement New feature or request

Comments

@megastep
Copy link

megastep commented Nov 4, 2023

Just ran into this issue trying to parse NSError returned by the SDK (version 5.2.0).

It appears that the QONErrorDomain constant is not defined anywhere publicly in the SDK, so referencing it in my code to check the domain of errors prevents my app from linking.

This line from QONErrors.h:

extern NSErrorDomain const QONErrorDomain NS_SWIFT_NAME(Qonversion.ErrorDomain);

There is no corresponding symbol declaration in the module. It feels like it should be in QONErrors.m and be set to the value of the private internal constant keyQONErrorDomain. I'm not sure what your conventions are for this but it should be trivial enough to fix.

@megastep
Copy link
Author

megastep commented Nov 4, 2023

This relates to issue #392 and would allow regular type checking to work in Swift. If we don't check for the domain there is a potential for collisions with other error domains.

@suriksarkisyan
Copy link
Contributor

Hi, @megastep
Thanks for the issue. You are right; we should add public const. I think we can do it in the next update.

Copy link
Contributor

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the awaiting answers There is no activity for a while label Nov 17, 2023
@suriksarkisyan suriksarkisyan added enhancement New feature or request and removed awaiting answers There is no activity for a while labels Nov 20, 2023
@suriksarkisyan suriksarkisyan linked a pull request Nov 21, 2023 that will close this issue
@suriksarkisyan
Copy link
Contributor

suriksarkisyan commented Nov 22, 2023

Hi, @megastep
Thanks again for creating this issue, and I am happy to say that in the latest version of our SDK, you can use two constants: QonversionErrorDomain, QonversionApiErrorDomain to determine what kind of error is happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants