Giter VIP home page Giter VIP logo

Comments (6)

jvanzummeren avatar jvanzummeren commented on August 19, 2024 1

Just release the new version!

from marky-mark.

jvanzummeren avatar jvanzummeren commented on August 19, 2024

Thanks for your input.

Is it possible to be any more specific? Which parts of markymark are not safe for extensions/frameworks and what solution are you proposing?

Regards,

Jim

from marky-mark.

mhoeller-clue avatar mhoeller-clue commented on August 19, 2024

The problem is the use of UIApplication.shared.openURL(url) in AttributedInteractiveLabel. UIApplication is not extension safe.
The proposed solution is to "hide" the API usage by using NSClassFromString(@"UIApplication") instead of UIApplication directly. This approach apparently also worked for SDWebImage.

from marky-mark.

mhoeller-clue avatar mhoeller-clue commented on August 19, 2024

An alternate, less hacky, solution could be delegation, where AttributedInteractiveLabel would have a delegate that gets informed about opening the url, but that might be a breaking change in the API. Also the AttributedInteractiveLabel will not be a drop-in solution any more if link handling is required.

from marky-mark.

jvanzummeren avatar jvanzummeren commented on August 19, 2024

Thanks for your input @mhoeller-clue, i looked into your pull-request and made #74 inspired by your approach.

This pull request will allow markymark to compile in extension by using NSSelectorFromString("sharedApplication") instead using UIApplication.shared directly.

Also, this pull request will allow customization of the open url behavior by providing an implementation of URLOpener

My collegues will review the pull request and i will let you know as soon as i release a new version. Also, let me know what you think of this approach!

from marky-mark.

mhoeller-clue avatar mhoeller-clue commented on August 19, 2024

Looks perfect! It has much deeper integration throughout the system and extends the example project too 👍
Thanks for putting the work into this library! Looking forward to the new version.

from marky-mark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.