Skip to content

Commit 2ec5306

Browse files
committed
Update readme
1 parent fc8b1c6 commit 2ec5306

File tree

4 files changed

+40
-6
lines changed

4 files changed

+40
-6
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ Use the [ShortLook](https://dynastic.co/shortlook) API to create plugins that pr
1515
5. Implement your logic inside your main class's `contactPhotoPromiseOfferForNotification:` method ([details](#provider-classes)).
1616
6. Configure your `Makefile` and `control` as you would a normal tweak, [using these tips](#metadata-tips).
1717

18+
## Photo Recommendations
19+
20+
- Any format supported by iOS.
21+
- Around 1:1 in aspect ratio (or else it will be zoomed in).
22+
- Above `152x152px` in size (`@3x`, preferably).
23+
1824
## Provider Structure and Explanation
1925

2026
Every provider plugin must have the following two things:
2127

2228
- An `Info.plist` file describing how ShortLook should register the provider: [Documentation](#infoplist) [Example](https://www.github.com/dynastic/ShortLook-API-Template/blob/master/Info.plist).
23-
- An executable with (a) class(es) conforming to `DDNotificationContactPhotoProviding`: [Documentation](#provider-classes) [Example](https://www.github.com/dynastic/ShortLook-API-Template/blob/master/DD_RENAMETHIS_ContactPhotoProvider.m)
29+
- An executable with (a) class(es) conforming to `DDNotificationContactPhotoProviding`: [Documentation](#provider-classes) [Example](https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m)
2430

2531
### Info.plist
2632

@@ -45,7 +51,7 @@ Each provider class implements the following method:
4551
- (DDNotificationContactPhotoPromiseOffer *)contactPhotoPromiseOfferForNotification:(NSObject<DDNotificationDisplayable> *)notification;
4652
```
4753

48-
If you'd like to see a working version, check out an [example of a provider class here](https://www.github.com/dynastic/ShortLook-API-Template/blob/master/DD_RENAMETHIS_ContactPhotoProvider.m).
54+
If you'd like to see a working version, check out an [example of a provider class here](https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m).
4955

5056
> **Heads up!** Make sure your provider's class is unique (rename it if you used an example). In Objective-C, there may only have one class for a name. If any other classes exist with that name, your provider will crash the system.
5157

docs/docsets/ShortLook API.docset/Contents/Resources/Documents/index.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,22 @@ <h2 id='quick-start' class='heading'>Quick Start</h2>
7878
<li>Rename your main class (DD_RENAMETHIS_ContactPhotoProvider).</li>
7979
<li>Using the <a href="#infoplist">Info.plist reference</a>, change any values you may need to in <code>Info.plist</code>.</li>
8080
<li>Implement your logic inside your main class&rsquo;s <code>contactPhotoPromiseOfferForNotification:</code> method (<a href="#provider-classes">details</a>).</li>
81+
<li>Configure your <code>Makefile</code> and <code>control</code> as you would a normal tweak, <a href="#metadata-tips">using these tips</a>.</li>
8182
</ol>
83+
<h2 id='photo-recommendations' class='heading'>Photo Recommendations</h2>
84+
85+
<ul>
86+
<li>Any format supported by iOS.</li>
87+
<li>Around 1:1 in aspect ratio (or else it will be zoomed in).</li>
88+
<li>Above <code>152x152px</code> in size (<code>@3x</code>, preferably).</li>
89+
</ul>
8290
<h2 id='provider-structure-and-explanation' class='heading'>Provider Structure and Explanation</h2>
8391

8492
<p>Every provider plugin must have the following two things:</p>
8593

8694
<ul>
8795
<li>An <code>Info.plist</code> file describing how ShortLook should register the provider: <a href="#infoplist">Documentation</a> <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/Info.plist">Example</a>.</li>
88-
<li>An executable with (a) class(es) conforming to <code><a href="Protocols/DDNotificationContactPhotoProviding.html">DDNotificationContactPhotoProviding</a></code>: <a href="#provider-classes">Documentation</a> <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/DD_RENAMETHIS_ContactPhotoProvider.m">Example</a></li>
96+
<li>An executable with (a) class(es) conforming to <code><a href="Protocols/DDNotificationContactPhotoProviding.html">DDNotificationContactPhotoProviding</a></code>: <a href="#provider-classes">Documentation</a> <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m">Example</a></li>
8997
</ul>
9098
<h3 id='info-plist' class='heading'>Info.plist</h3>
9199

@@ -109,7 +117,7 @@ <h3 id='provider-classes' class='heading'>Provider classes</h3>
109117
<span class="k">-</span> <span class="p">(</span><span class="n">DDNotificationContactPhotoPromiseOffer</span> <span class="o">*</span><span class="p">)</span><span class="nf">contactPhotoPromiseOfferForNotification</span><span class="p">:(</span><span class="n">NSObject</span><span class="o">&lt;</span><span class="n">DDNotificationDisplayable</span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">notification</span><span class="p">;</span>
110118
</code></pre>
111119

112-
<p>If you&rsquo;d like to see a working version, check out an <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/DD_RENAMETHIS_ContactPhotoProvider.m">example of a provider class here</a>.</p>
120+
<p>If you&rsquo;d like to see a working version, check out an <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m">example of a provider class here</a>.</p>
113121

114122
<blockquote>
115123
<p><strong>Heads up!</strong> Make sure your provider&rsquo;s class is unique (rename it if you used an example). In Objective-C, there may only have one class for a name. If any other classes exist with that name, your provider will crash the system.</p>
@@ -126,6 +134,12 @@ <h4 id='promises-and-offers' class='heading'>Promises and Offers</h4>
126134
<h5 id='what-if-i-can-get-my-image-instantly' class='heading'>What if I can get my image instantly?</h5>
127135

128136
<p>If your image is returned instantly, rather than by using a network request, you can use a convenience method on <code><a href="Classes/DDNotificationContactPhotoPromiseOffer.html">DDNotificationContactPhotoPromiseOffer</a></code>, named <code>offerInstantlyResolvingPromiseWithPhotoIdentifier:image:</code>. Just return the generated promise from your provider. Choose wisely, though. This method should only be used if you can get your image absolutely instantly. If you take too long using this synchronous method, ShortLook may penalize your provider.</p>
137+
<h2 id='metadata-tips' class='heading'>Metadata Tips</h2>
138+
139+
<ul>
140+
<li>Your package should usually be called something like <q>APP Photo Provider for ShortLook</q> in Cydia.</li>
141+
<li>It is recommended you make your bundle name something like <q>ShortLook-APP</q>.</li>
142+
</ul>
129143
<h2 id='full-documentation' class='heading'>Full Documentation</h2>
130144

131145
<p>You can view the full class documentation for ShortLook&rsquo;s photo provider API <a href="https://dynastic.github.io/ShortLook-API/">here</a>.</p>

docs/docsets/ShortLook API.tgz

254 Bytes
Binary file not shown.

docs/index.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,22 @@ <h2 id='quick-start' class='heading'>Quick Start</h2>
7878
<li>Rename your main class (DD_RENAMETHIS_ContactPhotoProvider).</li>
7979
<li>Using the <a href="#infoplist">Info.plist reference</a>, change any values you may need to in <code>Info.plist</code>.</li>
8080
<li>Implement your logic inside your main class&rsquo;s <code>contactPhotoPromiseOfferForNotification:</code> method (<a href="#provider-classes">details</a>).</li>
81+
<li>Configure your <code>Makefile</code> and <code>control</code> as you would a normal tweak, <a href="#metadata-tips">using these tips</a>.</li>
8182
</ol>
83+
<h2 id='photo-recommendations' class='heading'>Photo Recommendations</h2>
84+
85+
<ul>
86+
<li>Any format supported by iOS.</li>
87+
<li>Around 1:1 in aspect ratio (or else it will be zoomed in).</li>
88+
<li>Above <code>152x152px</code> in size (<code>@3x</code>, preferably).</li>
89+
</ul>
8290
<h2 id='provider-structure-and-explanation' class='heading'>Provider Structure and Explanation</h2>
8391

8492
<p>Every provider plugin must have the following two things:</p>
8593

8694
<ul>
8795
<li>An <code>Info.plist</code> file describing how ShortLook should register the provider: <a href="#infoplist">Documentation</a> <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/Info.plist">Example</a>.</li>
88-
<li>An executable with (a) class(es) conforming to <code><a href="Protocols/DDNotificationContactPhotoProviding.html">DDNotificationContactPhotoProviding</a></code>: <a href="#provider-classes">Documentation</a> <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/DD_RENAMETHIS_ContactPhotoProvider.m">Example</a></li>
96+
<li>An executable with (a) class(es) conforming to <code><a href="Protocols/DDNotificationContactPhotoProviding.html">DDNotificationContactPhotoProviding</a></code>: <a href="#provider-classes">Documentation</a> <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m">Example</a></li>
8997
</ul>
9098
<h3 id='info-plist' class='heading'>Info.plist</h3>
9199

@@ -109,7 +117,7 @@ <h3 id='provider-classes' class='heading'>Provider classes</h3>
109117
<span class="k">-</span> <span class="p">(</span><span class="n">DDNotificationContactPhotoPromiseOffer</span> <span class="o">*</span><span class="p">)</span><span class="nf">contactPhotoPromiseOfferForNotification</span><span class="p">:(</span><span class="n">NSObject</span><span class="o">&lt;</span><span class="n">DDNotificationDisplayable</span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">notification</span><span class="p">;</span>
110118
</code></pre>
111119

112-
<p>If you&rsquo;d like to see a working version, check out an <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/DD_RENAMETHIS_ContactPhotoProvider.m">example of a provider class here</a>.</p>
120+
<p>If you&rsquo;d like to see a working version, check out an <a href="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m">example of a provider class here</a>.</p>
113121

114122
<blockquote>
115123
<p><strong>Heads up!</strong> Make sure your provider&rsquo;s class is unique (rename it if you used an example). In Objective-C, there may only have one class for a name. If any other classes exist with that name, your provider will crash the system.</p>
@@ -126,6 +134,12 @@ <h4 id='promises-and-offers' class='heading'>Promises and Offers</h4>
126134
<h5 id='what-if-i-can-get-my-image-instantly' class='heading'>What if I can get my image instantly?</h5>
127135

128136
<p>If your image is returned instantly, rather than by using a network request, you can use a convenience method on <code><a href="Classes/DDNotificationContactPhotoPromiseOffer.html">DDNotificationContactPhotoPromiseOffer</a></code>, named <code>offerInstantlyResolvingPromiseWithPhotoIdentifier:image:</code>. Just return the generated promise from your provider. Choose wisely, though. This method should only be used if you can get your image absolutely instantly. If you take too long using this synchronous method, ShortLook may penalize your provider.</p>
137+
<h2 id='metadata-tips' class='heading'>Metadata Tips</h2>
138+
139+
<ul>
140+
<li>Your package should usually be called something like <q>APP Photo Provider for ShortLook</q> in Cydia.</li>
141+
<li>It is recommended you make your bundle name something like <q>ShortLook-APP</q>.</li>
142+
</ul>
129143
<h2 id='full-documentation' class='heading'>Full Documentation</h2>
130144

131145
<p>You can view the full class documentation for ShortLook&rsquo;s photo provider API <a href="https://dynastic.github.io/ShortLook-API/">here</a>.</p>

0 commit comments

Comments
 (0)