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

Support url parameter #125

Open
bakerbrooklyn opened this issue Jun 25, 2018 · 6 comments
Open

Support url parameter #125

bakerbrooklyn opened this issue Jun 25, 2018 · 6 comments

Comments

@bakerbrooklyn
Copy link

Steps to reproduce the issue

  1. I try to render this SVG file: "https://upload.wikimedia.org/wikipedia/commons/f/fc/Flag_of_Mexico.svg"
  2. Keep getting Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: [str hasPrefix:@"#"]'

Please include all relevant code, including all PocketSVG method calls made.

Has my issue been reported?

My issue has been reported in the following closed issues:

Specifications

  • PocketSVG Version: HEAD
  • Xcode Version: 9.x
  • iOS/macOS Version: iOS 11.x
@arielelkin
Copy link
Collaborator

The assertion fails with this tag: <ellipse fill="url(#rg1)"

Unfortunately, we don't support the url parameter yet.

@arielelkin arielelkin reopened this Jun 25, 2018
@arielelkin arielelkin changed the title Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: [str hasPrefix:@"#"]' Support url parameter Jun 25, 2018
@ngthanhtan91
Copy link

is there any update for this feature? I got this issue two

@arielelkin
Copy link
Collaborator

We hope to work on this feature request, but unfortunately we cannot at this stage give you a timeframe for when it'll be done. Pull requests are always welcome, of course :-)

In the meantime, a workaround is to rewrite the url parameters in your SVG file.

@kritikaperiwal12
Copy link

I also get the same error, is there any solution for this?
@arielelkin

@arielelkin
Copy link
Collaborator

As we said above, we don't support the url parameter yet unfortunately. We hope to work on this feature request, but unfortunately we cannot at this stage give you a timeframe for when it'll be done. Pull requests are always welcome, of course :-)

Would it help if we print an error message instead of throwing an exception ?

@fjolnir
Copy link
Member

fjolnir commented Apr 15, 2019

Only printing an error log would just make things fail unnoticed.

URL loading is not an appropriate feature for a simple (de)serializer like pocketSVG. although url(#rg1) looks like some sort of file-local reference, so that limited support for that might be an acceptable PR. But not something I would spend time on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants