Skip to content

feat: App plugin#71

Merged
imhoffd merged 20 commits into
mainfrom
app
Nov 3, 2020
Merged

feat: App plugin#71
imhoffd merged 20 commits into
mainfrom
app

Conversation

@jcesarmobile
Copy link
Copy Markdown
Member

@jcesarmobile jcesarmobile commented Oct 16, 2020

removed openUrl and canOpenUrl functions, will be a separate plugin
add getInfo function to get information about the app (was part of Device plugin but got removed because makes more sense here)

depends on ionic-team/capacitor#3676

closes #72

Comment thread app/ios/Plugin/AppPlugin.swift
@jcesarmobile jcesarmobile requested a review from ikeith October 19, 2020 13:30
Comment thread app/src/definitions.ts Outdated
Comment thread app/src/definitions.ts Outdated
Comment thread app/src/web.ts Outdated
Comment thread app/src/web.ts Outdated
@imhoffd imhoffd added this to the Capacitor 3.0.0-alpha.6 milestone Oct 21, 2020
@jcesarmobile jcesarmobile requested a review from imhoffd November 2, 2020 17:31
Comment thread app/src/web.ts Outdated
Comment thread app/src/web.ts Outdated
Co-authored-by: Dan Imhoff <dwieeb@gmail.com>
jcesarmobile and others added 2 commits November 2, 2020 19:00
Co-authored-by: Dan Imhoff <dwieeb@gmail.com>
Comment thread app/src/web.ts
}

async getInfo(): Promise<AppInfo> {
throw this.unimplemented('Not implemented on web.');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would suggest it will be a lot more useful (and developer-friendly) to return the information you can get from package.json, rather than throw an error.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

dwieeb already answered you on the other comment, the package.json is not accesible from the app/plugin, would need some CLI work first.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Github is refusing to show me the other comment and his response, that's why I had to post it again.

I forgot this is a separate plugin now. Maybe Capacitor could make the app's package.json (or a subset of it) available to plugins.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You have to click "Show resolved":
image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, the github review UI is getting better, but is still somewhat confusing at times.

@imhoffd imhoffd merged commit 94e4219 into main Nov 3, 2020
@imhoffd imhoffd deleted the app branch November 3, 2020 00:09
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.

feat: add app name, package, version info to App plugin

5 participants