-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
121 lines (85 loc) · 5.79 KB
/
index.html
File metadata and controls
121 lines (85 loc) · 5.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<html>
<head>
<title>IntentKit</title>
<link href="style.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700' rel='stylesheet' type='text/css'>
</head>
<body>
<header>
<h1>IntentKit</h1>
<div class='subtitle'>The iOS tool for inter-app linking.</div>
</header>
<nav>
<ul>
<li><a href="https://github.com/intentkit/IntentKit">GitHub</a></li>
<li><a href="http://cocoadocs.org/docsets/IntentKit/">Documentation</a></li>
<li><a href="https://github.com/intentkit/IntentKit/issues">Support</a></li>
<li><a href="https://twitter.com/IntentKit">Twitter</a></li>
</ul>
</nav>
<div id='content'>
<h2>What is IntentKit?</h2>
<p>IntentKit is an open-source iOS library that makes it easier to link to other apps. It's sort of like Android's Intents or Windows Phone's Contracts.</p>
<h2>Why should I use it?</h2>
<img src="images/choices.png" class='bullet'/>
<div class='why-block'>
<h3>People like choices.</h3>
<p>IntentKit makes it easy for users to use their favorite third-party apps instead of Apple's defaults for tasks like browsing the web, mapping, and sending mail.</p>
</div>
<img src="images/code.png" class='bullet'/>
<div class='why-block'>
<h3>Readable code matters.</h3>
<p>Constructing URLs by hand is ugly. IntentKit replaces string manipulation with a clean, semantic API, making your code easier to work with.</p></li>
</div>
<img src="images/time.png" class='bullet'/>
<div class='why-block'>
<h3>Your time is valuable.</h3>
<p>IntentKit is maintained by the community, so you don't have to worry about manually fixing your app when a third-party app changes their URL scheme.</p>
</div>
<h2>What does it look like?</h2>
<p>IntentKit has an example project you can use to see it in action. Assuming you have Cocoapods installed, you can take it for a spin by typing the following command at a terminal prompt:</p>
<pre>$ pod try IntentKit</pre>
<p>Otherwise, follow the instructions on <a href="https://github.com/IntentKit/IntentKit">GitHub</a> to get the example project up and running.</p>
<h2>How can I get it?</h2>
<p>IntenKit is easiest to install using <a href="http://cocoapods.org">CocoaPods</a>. If your project already uses CocoaPods, it's as easy as adding it to your Podfile. </p>
<pre>pod "IntentKit"</pre>
<p>It's also possible to use IntentKit without CocoaPods.</p>
<h2>How do I use it?</h2>
<p>To use IntentKit, you just need to instantiate a handler object, give it an action to perform, and tell the resulting presenter object to present itself. Handlers exist for common tasks such as opening web sites, displaying maps, and interacting with Twitter.</p>
<p>Here's how you'd compose an email:</p>
<pre class='block'>
INKMailHandler *mailHandler = [[INKMailHandler alloc] init];
[[mailHandler sendMailTo:@"steve@apple.com"] presentModally];
</pre>
<p>If the user doesn't have any third-party email clients installed, this will open up an inline <code>MFMailComposeController</code>. If the user has other mail clients, this will display a modal sheet giving them a choice of all currently-installed apps. All that from two lines of code!</p>
<img class='example' src="images/example-email.gif"/>
<br/>
<p>The real power of IntentKit shines through when you start dealing with more complex actions, like opening up turn-by-turn directions in a mapping application.</p>
<p><pre>
INKMapsHandler *mapsHandler = [[INKMapsHandler alloc] init];
mapsHandler.center = CLLocationCoordinate2DMake(42.523, -73.544);
mapsHandler.zoom = 14;
[mapsHandler directionsFrom:@"Washington Square Park" to:@"Lincoln Center"];
</pre></p>
<p>If you don't want to bug the user by asking them which app to use, IntentKit can be more hands-off. It can be configured to use system defaults and instead provide a configuration screen within your app's settings page to let power users change their defaults at their own leisure.</p>
<img class='example' src="https://raw.githubusercontent.com/intentkit/IntentKit/master/example-defaults.gif"/>
<p>IntentKit has lots of other features as well, such as a built-in in-app browser to display web sites. More complete usage instructions are available on <a href="https://github.com/intentkit/IntentKit">GitHub</a>. An up-to-date list of available handlers can be found on <a href="http://cocoadocs.org/docsets/IntentKit/">CocoaDocs</a>.</p>
<h2>How Do I Learn About Changes to IntentKit?</h2>
<p>IntentKit is under active development, so new improvements happen rather frequently. Follow <a href="https://twitter.com/IntentKit">@IntentKit</a> on Twitter to keep up-to-date on the latest news and releases.</p>
<h2>Add Your Own URL Scheme</h2>
<p>IntentKit might not yet support some of your favorite applications. Fortunately, adding support for a new URL scheme is easy. In most cases, it doesn't require writing any code!<p>
<p>Just fork the IntentKit <a href="http://github.com/intentkit/IntentKit">GitHub repo</a>, create a property list detailing a URL scheme, drop in some icons, and send a pull request. For detailed instructions, check out <a href="http://github.com/IntentKit/IntentKit">GitHub</a>.</p>
</div>
<footer>
IntentKit was created by <a href="http://lazerwalker.com">Mike Lazer-Walker</a> and is released under the <a href="https://raw.github.com/intentkit/IntentKit/master/LICENSE">MIT License</a>.
</footer>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46496943-1', 'intentkit.github.io');
ga('send', 'pageview');
</script>
</body>
</html>