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

Wrap openURL so that Down compiles in app extensions #133

Merged
merged 1 commit into from
Apr 11, 2019
Merged

Wrap openURL so that Down compiles in app extensions #133

merged 1 commit into from
Apr 11, 2019

Conversation

nheagy
Copy link
Contributor

@nheagy nheagy commented Apr 9, 2019

I'd like to use Down within the WordPress app, but the primary use would be in our share extension, when Markdown is imported from other apps.

Currently Down can't be used in app extensions because DownView uses UIApplication.shared.openURL, which isn't available in AppExtensions. With this change a wrapper method is used to allow DownView to compile and be usable in app extensions, with the concession that links cannot be opened in app extensions.

I'm open to suggestions on better ways to allow Down to be used in app extensions.

- DownView couldn’t compile in app extensions because of the use of UIApplication.shared.openURL
- With this change, an empty wrapper is used to allow DownView to compile and be usable in app extensions, with the downside that links cannot be opened
@coveralls
Copy link

Coverage Status

Coverage increased (+0.9%) to 91.483% when pulling 3b3e833 on nheagy:master into a146258 on iwasrobbed:master.

Copy link
Collaborator

@iwasrobbed iwasrobbed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I read a lot of the Slack discussion and prefer this to the alternatives.

Thanks Nate!

@iwasrobbed iwasrobbed merged commit 07a117e into johnxnguyen:master Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants