SimplicityMobile / Simplicity

A simple way to implement Facebook and Google login in your iOS apps.
Apache License 2.0
681 stars 66 forks source link

Allows user to specify from which view controller we want to present safari controller #10

Closed gorzalczany closed 8 years ago

edjiang commented 8 years ago

Thanks for the PR. I'll take a closer look at this and test it out.

edjiang commented 8 years ago

I looked through this, and think that I'd like to take a different approach, which may require further investigation.

There's probably more customization that people will want to do than just selecting which VC to present from. Eg, changing the UIModalPresentationStyle, etc.

So, I think I'd like to take the approach of allowing you to get the destination Safari view controller from Simplicity. Something like this, perhaps:

@available(iOS 9, *)
Simplicity.safariViewController(for: LoginProvider) -> SFSafariViewController

The other way would be to get the URL and manually trigger the SFSafariViewController in the way you'd like. Not sure about this approach, though.

Simplicity.manualLogin(for: LoginProvider) -> NSURL

Which would you prefer?

edjiang commented 8 years ago

Looks like you're just forking Simplicity for your own uses. Glad it's working out for you!

LouisBorlee commented 7 years ago

Hi,

I think that allowing the user to do whatever he wants should not be the way of using Simplicity. I, personally, like to use it because it is so simple; if I wanted to add complexity, I'd fork it and that would be it.

But anyways, that's just the way I see it, adding delegate methods should be fine as well.

Cordially

edjiang commented 7 years ago

I believe #22 should fix the concerns from this PR. It's now pushed under 2.0.1. Let me know if this does not!