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

Only one Open Method #7

Closed
EinfachHans opened this issue Apr 3, 2021 · 12 comments
Closed

Only one Open Method #7

EinfachHans opened this issue Apr 3, 2021 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@EinfachHans
Copy link

Is there a reason you seperate the Methode in a openIos and openAndroid? I don't like that as i always have to add a platform detection before Plugin Call.

Why did you decide to do it like this and not like jn the Cordova one?

@RaphaelWoude
Copy link
Owner

I created the plugin like this because the naming of certain calls is not the same on every platform. For in the future I will create a generic method that will support this functionality.

@RaphaelWoude RaphaelWoude added the enhancement New feature or request label Apr 7, 2021
@RaphaelWoude RaphaelWoude self-assigned this Apr 7, 2021
@RaphaelWoude
Copy link
Owner

RaphaelWoude commented Oct 27, 2021

It's been a while. Finally have a lot of time again to work on projects.

To revisit this issue, I came up with another solution that will make it easy to open IOS & android settings without having the check the platform.

image

This is the current solution. With this, you can map whichever options you wanna open on each platform.
Would this satisfy your need? @EinfachHans

@EinfachHans
Copy link
Author

Would work but not the best solution, so users have to always add both options 🤔

@alexcroox
Copy link

alexcroox commented Oct 27, 2021

It makes sense to me because both iOS and Android settings options are different so you can't unify them. This solution would mean I could skip the platform check (which was the OP's original issue) so I'm all for it 👍

@alexcroox
Copy link

alexcroox commented Oct 27, 2021

The only way around it would be to map all the different options into a single unified list of options that the plugin. But I've not looked closely enough to know how much overlap there is and where the gaps are and how we'd handle them (perhaps by defaulting the gaps to the generic settings option).

@EinfachHans
Copy link
Author

Yes, personally i think thats a better solution

@alexcroox
Copy link

alexcroox commented Oct 27, 2021

I do think having the seperate options does force the developer to consider their options though, rather than silently defaulting to the wrong place where Android offers a destination that iOS doesn't.

That, and as others have said, most of the options recently introduced for iOS in this plugin are using private APIs which Apple will probably reject, which leads to further confusion.

Remember the cordova plugin was made in older versions of iOS with APIs that are now no longer usable. Notice how the cordova plugin readme specifies iOS 10 and below only and has several issues talking about Apple rejecting their app in higher versions.

@RaphaelWoude
Copy link
Owner

RaphaelWoude commented Oct 27, 2021

I will have to agree with @alexcroox here. Pretty much everything you said is exactly what I was gonna say.
Gonna start working on this. Will have a draft out soon.

@RaphaelWoude RaphaelWoude mentioned this issue Oct 27, 2021
2 tasks
@RaphaelWoude
Copy link
Owner

Draft has been up for a bit now. Android is done. Waiting on @dennisameling for iOS.

@reslear
Copy link

reslear commented Feb 4, 2022

@dennisameling wait you for iOS :)

@dennisameling
Copy link
Contributor

Just added the iOS code: #19

Sorry for the delay!

@RaphaelWoude
Copy link
Owner

Merged. New version coming out this week.

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

Successfully merging a pull request may close this issue.

5 participants