summaryrefslogtreecommitdiff
path: root/posts/2019-05-05-Custom-Snowboard-Anemone-Theme/index.html
blob: 05b25aa0d6924d17eecc9aecc73f461c9e0ca6ce (plain)
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
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/posts/2019-05-05-Custom-Snowboard-Anemone-Theme"/><meta name="twitter:url" content="https://navanchauhan.github.io/posts/2019-05-05-Custom-Snowboard-Anemone-Theme"/><meta name="og:url" content="https://navanchauhan.github.io/posts/2019-05-05-Custom-Snowboard-Anemone-Theme"/><title>Creating your own custom theme for Snowboard or Anemone | Navan Chauhan</title><meta name="twitter:title" content="Creating your own custom theme for Snowboard or Anemone | Navan Chauhan"/><meta name="og:title" content="Creating your own custom theme for Snowboard or Anemone | Navan Chauhan"/><meta name="description" content="Tutorial on creating your own custom theme for Snowboard or Anemone"/><meta name="twitter:description" content="Tutorial on creating your own custom theme for Snowboard or Anemone"/><meta name="og:description" content="Tutorial on creating your own custom theme for Snowboard or Anemone"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/images/logo.png"/></head><head><script async src="//gc.zgo.at/count.js" data-goatcounter="https://navanchauhan.goatcounter.com/count"></script></head><body class="item-page"><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/about">About Me</a></li><li><a class="selected" href="/posts">Posts</a></li><li><a href="/publications">Publications</a></li><li><a href="/assets/résumé.pdf">Résumé</a></li><li><a href="https://navanchauhan.github.io/repo">Repo</a></li></ul></nav></div></header><div class="wrapper"><article><div class="content"><span class="reading-time">5 minute read</span><span class="reading-time">Created on May 5, 2019</span><span class="reading-time">Last modified on September 15, 2020</span><h1>Creating your own custom theme for Snowboard or Anemone</h1><h3>Contents</h3><ul><li>Getting Started</li><li>Theme Configuration</li><li>Creating Icons</li><li>Exporting Icons</li><li>Icon Masks</li><li>Packaging</li><li>Building the DEB</li></ul><h2>Getting Started</h2><p><strong>Note: Without the proper folder structure, your theme may not show up!</strong></p><ul><li>Create a new folder called <code>themeName.theme</code> (Replace themeName with your desired theme name)</li><li>Within <code>themeName.theme</code> folder, create another folder called <code>IconBundles</code> (<strong>You cannot change this name</strong>)</li></ul><h2>Theme Configuration</h2><ul><li>Now, inside the <code>themeName.theme</code> folder, create a file called <code>Info.plist</code> and paste the following</li></ul><pre><code><div class="highlight"><span></span>&lt;?xml <span class="nv">version</span><span class="o">=</span><span class="s2">&quot;1.0&quot;</span> <span class="nv">encoding</span><span class="o">=</span><span class="s2">&quot;UTF-8&quot;</span>?&gt;
&lt;!DOCTYPE plist PUBLIC <span class="s2">&quot;-//Apple//DTD PLIST 1.0//EN&quot;</span> <span class="s2">&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;</span>&gt;
  &lt;plist <span class="nv">version</span><span class="o">=</span><span class="s2">&quot;1.0&quot;</span>&gt;
  &lt;dict&gt;
    &lt;key&gt;PackageName&lt;/key&gt;
    &lt;string&gt;ThemeName&lt;/string&gt;
    &lt;key&gt;ThemeType&lt;/key&gt;
    &lt;string&gt;Icons&lt;/string&gt;
  &lt;/dict&gt;
&lt;/plist&gt;
</div></code></pre><ul><li>Replace <code>PackageName</code> with the name of the Package and replace <code>ThemeName</code> with the Theme Name</li></ul><p>Now, you might ask what is the difference between <code>PackageName</code> and <code>ThemeName</code>?</p><p>Well, if for example you want to publish two variants of your icons, one dark and one white but you do not want the user to seperately install them. Then, you would name the package <code>MyTheme</code> and include two themes <code>Blackie</code> and <code>White</code> thus creating two entries. More about this in the end</p><h2>Creating Icons</h2><ul><li>Open up the Image Editor of your choice and create a new file having a resolution of 512x512</li></ul><p><strong>Note: Due to IconBundles, we just need to create the icons in one size and they get resized automatically</strong> :ghost:</p><p><strong>Want to create rounded icons?</strong> Create them squared only, we will learn how to apply masks!</p><h2>Exporting Icons</h2><p><strong>Note: All icons must be saved as <code>*.png</code> (Tip: This means you can even create partially transparent icons!)</strong></p><ul><li>All Icons must be saved in <code>themeName.theme&gt;IconBundles</code> as <code>bundleID-large.png</code></li></ul><h5>Finding BundleIDs</h5><p><strong>Stock Application BundleIDs</strong></p><table><thead><tr><th>Name</th><th>BundleID</th></tr></thead><tbody><tr><td>App Store</td><td>com.apple.AppStore</td></tr><tr><td>Apple Watch</td><td>com.apple.Bridge</td></tr><tr><td>Calculator</td><td>com.apple.calculator</td></tr><tr><td>Calendar</td><td>com.apple.mobilecal</td></tr><tr><td>Camera</td><td>com.apple.camera</td></tr><tr><td>Classroom</td><td>com.apple.classroom</td></tr><tr><td>Clock</td><td>com.apple.mobiletimer</td></tr><tr><td>Compass</td><td>com.apple.compass</td></tr><tr><td>FaceTime</td><td>com.apple.facetime</td></tr><tr><td>Files</td><td>com.apple.DocumentsApp</td></tr><tr><td>Game Center</td><td>com.apple.gamecenter</td></tr><tr><td>Health</td><td>com.apple.Health</td></tr><tr><td>Home</td><td>com.apple.Home</td></tr><tr><td>iBooks</td><td>com.apple.iBooks</td></tr><tr><td>iTunes Store</td><td>com.apple.MobileStore</td></tr><tr><td>Mail</td><td>com.apple.mobilemail</td></tr><tr><td>Maps</td><td>com.apple.Maps</td></tr><tr><td>Measure</td><td>com.apple.measure</td></tr><tr><td>Messages</td><td>com.apple.MobileSMS</td></tr><tr><td>Music</td><td>com.apple.Music</td></tr><tr><td>News</td><td>com.apple.news</td></tr><tr><td>Notes</td><td>com.apple.mobilenotes</td></tr><tr><td>Phone</td><td>com.apple.mobilephone</td></tr><tr><td>Photo Booth</td><td>com.apple.Photo-Booth</td></tr><tr><td>Photos</td><td>com.apple.mobileslideshow</td></tr><tr><td>Playgrounds</td><td>come.apple.Playgrounds</td></tr><tr><td>Podcasts</td><td>com.apple.podcasts</td></tr><tr><td>Reminders</td><td>com.apple.reminders</td></tr><tr><td>Safari</td><td>com.apple.mobilesafari</td></tr><tr><td>Settings</td><td>com.apple.Preferences</td></tr><tr><td>Stocks</td><td>com.apple.stocks</td></tr><tr><td>Tips</td><td>com.apple.tips</td></tr><tr><td>TV</td><td>com.apple.tv</td></tr><tr><td>Videos</td><td>com.apple.videos</td></tr><tr><td>Voice Memos</td><td>com.apple.VoiceMemos</td></tr><tr><td>Wallet</td><td>com.apple.Passbook</td></tr><tr><td>Weather</td><td>com.apple.weather</td></tr></tbody></table><p><strong>3rd Party Applications BundleID</strong> Click <a href="http://offcornerdev.com/bundleid.html">here</a></p><h3>Icon Masks</h3><ul><li>Getting the Classic Rounded Rectangle Masks</li></ul><p>In your <code>Info.plist</code> file add the following value between <code>&lt;dict&gt;</code> and </dict>

```
<key>IB-MaskIcons</key>
    <true/>
```

* Custom Icon Masks

**NOTE: This is an optional step, if you do not want Icon Masks, skip this step**

* Inside your `themeName.theme` folder, create another folder called 'Bundles'
  * Inside `Bundles` create another folder called `com.apple.mobileicons.framework`
  
#### Designing Masks

**Masking does not support IconBundles, therefore you need to save the masks for each of the following**

| File | Resolution |
|------|------------|
| AppIconMask@2x~ipad.png    | 152x512 |
| AppIconMask@2x~iphone.png    | 120x120 |
| AppIconMask@3x~ipad.png    | 180x180 |
| AppIconMask@3x~iphone.png    | 180x180 |
| AppIconMask~ipad.png    | 76x76 |
| DocumentBadgeMask-20@2x.png    | 40x40 |
| DocumentBadgeMask-145@2x.png    | 145x145 |
| GameAppIconMask@2x.png    | 84x84 |
| NotificationAppIconMask@2x.png    | 40x40 |
| NotificationAppIconMask@3x.png    | 60x60 |
| SpotlightAppIconMask@2x.png    | 80x80 |
| SpotlightAppIconMask@3x.png    | 120x120 |
| TableIconMask@2x.png    | 58x58 |
| TableIconOutline@2x.png    | 58x58 |

* While creating the mask, make sure that the background is not a solid colour and is transparent
* Whichever area you want to make visible, it should be coloured in black

Example (Credits: Pinpal):

![Credit: Pinpal](https://pinpal.github.io/assets/theme-guide/mask-demo.png)

would result in

![Credit: Pinpal](https://pinpal.github.io/assets/theme-guide/mask-result.png)

### Packaging

* Create a new folder outside `themeName.theme` with the name you want to be shown on Cydia, e.g `themeNameForCydia`
* Create another folder called `DEBIAN` in `themeNameForCydia` (It needs to be uppercase)
* In `DEBIAN` create an extension-less file called `control` and edit it using your favourite text editor

Paste the following in it, replacing `yourname`, `themename`, `Theme Name`, `A theme with beautiful icons!` and `Your Name` with your details:

```
Package: com.yourname.themename
Name: Theme Name
Version: 1.0
Architecture: iphoneos-arm
Description: A theme with beautiful icons!
Author: Your Name
Maintainer: Your Name
Section: Themes
```

* Important Notes:
  * The package field **MUST** be lower case!
  * The version field **MUST** be changed every-time you update your theme!
  * The control file **MUST** have an extra blank line at the bottom!
  
* Now, Create another folder called `Library` in `themeNameForCydia`
* In `Library` create another folder called `Themes`
* Finally, copy `themeName.theme` to the `Themes` folder (**Copy the entire folder, not just the contents**)

### Building the DEB

**For building the deb you need a `*nix` system, otherwise you can build it using your iPhones**

##### Pre-Requisite for MacOS users
1) Install Homenbrew `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` (Run this in the terminal)
2) Install dpkg, by running `brew install dpkg`

**There is a terrible thing called .DS_Store which if not removed, will cause a problem during either build or installation**

* To remove this we first need to open the folder in the terminal

* Launch the Terminal and then drag-and-drop the 'themeNameForCydia' folder on the Terminal icon in the dock
* Now, run `find . -name "*.DS_Store" -type f -delete`

##### Pre-Requisite for Windows Users
* SSH into your iPhone and drag and drop the `themeNameForCyia` folder on the terminal

##### Common Instructions

* You should be at the root of the folder in the terminal, i.e Inside `themeNameForCydia`
* running `ls` should show the following output

```
DEBIAN  Library
```

* Now, in the terminal enter the following `cd .. && dpkg -b themeNameForCydia `

**Now you will have the `themeNameForCydia.deb` in the same directory**

You can share this with your friends :+1:
</p></div><span>Tagged with: </span><ul class="tag-list"><li><a href="/tags/tutorial">Tutorial</a></li><li><a href="/tags/jailbreak">Jailbreak</a></li><li><a href="/tags/designing">Designing</a></li><li><a href="/tags/snowboard">Snowboard</a></li><li><a href="/tags/anemone">Anemone</a></li></ul></article></div><footer><p>Made with ❤️ using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html>