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

Add a Swift Receiver Demo #68

Merged
merged 5 commits into from
Jul 16, 2015
Merged

Add a Swift Receiver Demo #68

merged 5 commits into from
Jul 16, 2015

Conversation

platedbay
Copy link
Contributor

I've created a simple example of how to use the DeepLinkKit in Swift. As of creating this PR, the only way to handle routes is by creating classes that subclasses the DPLRouteHandlerclass. This was requested in #65.

In order to support the shorthand approach of registering a DPLRouteHandlerBlock to a route, we'd need (I believe) to enhance the library a bit more (create a sort of class/struct that has the DPLRouteHandlerBlock as a property would be a potential solution). This is out of scope of this PR as per #28.

I can also create a Swift version of the SenderDemo; however, there aren't many changes involved with that one. Let me know what you guys think!

@@ -48,6 +48,8 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea why or how that got in there! Let me remove that.

import Foundation

public class DPLMessageRouteHandler: DPLRouteHandler
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Switching between same & next line open braces in this file ;)

@chrismaddern
Copy link
Contributor

@platedbay A couple stylistic consistency nitpicks but I'm excited to get this merged! :)

@chrismaddern
Copy link
Contributor

Nice, let's wait for tests to pass then LGTM

@platedbay
Copy link
Contributor Author

👍

@chrismaddern
Copy link
Contributor

As a side-note, anything you come across as you build on DLK on Swift, feel free to open an issue - I'd love to make it better in any way we can.

@platedbay
Copy link
Contributor Author

Will do!

chrismaddern added a commit that referenced this pull request Jul 16, 2015
@chrismaddern chrismaddern merged commit a997b21 into button:master Jul 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants