You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -15,12 +15,18 @@ Use the [ShortLook](https://dynastic.co/shortlook) API to create plugins that pr
15
15
5. Implement your logic inside your main class's `contactPhotoPromiseOfferForNotification:` method ([details](#provider-classes)).
16
16
6. Configure your `Makefile` and `control` as you would a normal tweak, [using these tips](#metadata-tips).
17
17
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
+
18
24
## Provider Structure and Explanation
19
25
20
26
Every provider plugin must have the following two things:
21
27
22
28
- 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)
24
30
25
31
### Info.plist
26
32
@@ -45,7 +51,7 @@ Each provider class implements the following method:
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).
49
55
50
56
> **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.
<li>Rename your main class (DD_RENAMETHIS_ContactPhotoProvider).</li>
79
79
<li>Using the <ahref="#infoplist">Info.plist reference</a>, change any values you may need to in <code>Info.plist</code>.</li>
80
80
<li>Implement your logic inside your main class’s <code>contactPhotoPromiseOfferForNotification:</code> method (<ahref="#provider-classes">details</a>).</li>
81
+
<li>Configure your <code>Makefile</code> and <code>control</code> as you would a normal tweak, <ahref="#metadata-tips">using these tips</a>.</li>
<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>
82
90
<h2id='provider-structure-and-explanation' class='heading'>Provider Structure and Explanation</h2>
83
91
84
92
<p>Every provider plugin must have the following two things:</p>
85
93
86
94
<ul>
87
95
<li>An <code>Info.plist</code> file describing how ShortLook should register the provider: <ahref="#infoplist">Documentation</a><ahref="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><ahref="Protocols/DDNotificationContactPhotoProviding.html">DDNotificationContactPhotoProviding</a></code>: <ahref="#provider-classes">Documentation</a><ahref="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><ahref="Protocols/DDNotificationContactPhotoProviding.html">DDNotificationContactPhotoProviding</a></code>: <ahref="#provider-classes">Documentation</a><ahref="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m">Example</a></li>
<p>If you’d like to see a working version, check out an <ahref="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’d like to see a working version, check out an <ahref="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m">example of a provider class here</a>.</p>
113
121
114
122
<blockquote>
115
123
<p><strong>Heads up!</strong> 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.</p>
@@ -126,6 +134,12 @@ <h4 id='promises-and-offers' class='heading'>Promises and Offers</h4>
126
134
<h5id='what-if-i-can-get-my-image-instantly' class='heading'>What if I can get my image instantly?</h5>
127
135
128
136
<p>If your image is returned instantly, rather than by using a network request, you can use a convenience method on <code><ahref="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>
<li>Rename your main class (DD_RENAMETHIS_ContactPhotoProvider).</li>
79
79
<li>Using the <ahref="#infoplist">Info.plist reference</a>, change any values you may need to in <code>Info.plist</code>.</li>
80
80
<li>Implement your logic inside your main class’s <code>contactPhotoPromiseOfferForNotification:</code> method (<ahref="#provider-classes">details</a>).</li>
81
+
<li>Configure your <code>Makefile</code> and <code>control</code> as you would a normal tweak, <ahref="#metadata-tips">using these tips</a>.</li>
<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>
82
90
<h2id='provider-structure-and-explanation' class='heading'>Provider Structure and Explanation</h2>
83
91
84
92
<p>Every provider plugin must have the following two things:</p>
85
93
86
94
<ul>
87
95
<li>An <code>Info.plist</code> file describing how ShortLook should register the provider: <ahref="#infoplist">Documentation</a><ahref="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><ahref="Protocols/DDNotificationContactPhotoProviding.html">DDNotificationContactPhotoProviding</a></code>: <ahref="#provider-classes">Documentation</a><ahref="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><ahref="Protocols/DDNotificationContactPhotoProviding.html">DDNotificationContactPhotoProviding</a></code>: <ahref="#provider-classes">Documentation</a><ahref="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m">Example</a></li>
<p>If you’d like to see a working version, check out an <ahref="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’d like to see a working version, check out an <ahref="https://www.github.com/dynastic/ShortLook-API-Template/blob/master/RENAMETHISContactPhotoProvider.m">example of a provider class here</a>.</p>
113
121
114
122
<blockquote>
115
123
<p><strong>Heads up!</strong> 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.</p>
@@ -126,6 +134,12 @@ <h4 id='promises-and-offers' class='heading'>Promises and Offers</h4>
126
134
<h5id='what-if-i-can-get-my-image-instantly' class='heading'>What if I can get my image instantly?</h5>
127
135
128
136
<p>If your image is returned instantly, rather than by using a network request, you can use a convenience method on <code><ahref="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>
0 commit comments