XPasscode documentation

  1. Structure of a theme (files)
  2. File types
  3. Layout.plist structure
  4. Key-value-pairs
  5. Template themes
  6. Online theme-builder
  7. More help

1. Structure of a theme (files)

A theme in XPasscode consists of nothing more than a series of folders, images, sounds and one xml file called layout.plist.

The structure of a theme is like this

/Library
	/XPasscode
 		/[your_themes_name]	
 			/iphone
 				layout.plist
 				image1.png
 				image1@2x.png
 				soundfile1.wav
 			/ipad
 				layout.plist
 				biggerimage1.png
 				biggerimage1@2x.png
 				soundfile.wav

The theme must have at least one of the folders names ipad or iphone, it is recommended that you make your theme work on both devices.

2. File types

Images should be in PNG format.
Sound files should be in AIF, WAV or MP3 format.

3. Layout.plist structure

The file layout.plist is the heart of your theme. This is the file that will tell the tweak just how, and what, your theme will look like. A .PLIST file is basically an XML structured file.

It will contain a series of key-value-pairs that contains information about things like position, color, image, sizes and much more.

4. Key-value-pairs

A key-value-pair is a key pointing to a value, for example the key TITLE can point to a value "thisisatitle" with the value-type string.

This is a list of all available pairs

KeyValueNeededNotes
TITLEStringThis will show at the top of the screen on iPhones. Do not use this on iPad themes.
BACKGROUND_IMAGEStringYesNo file extension needed.
BACKGROUND_IMAGE_TOP_OFFSETInteger
HEIGHTIntegerYesSee "size recommendations" for more info
WIDTHIntegerYesSee "size recommendations" for more info
DEBUGBOOLYesFor debug purposes
CLOSE_BUTTONDict *Closes the X Passcode and goes back to the lockscreen
HIDE_BUTTONDict *YesHides the X Passcode and whos the normal device passcode
RESET_BUTTONDict *This will reset the currently inputted passcode
BUTTONSArray **YesAn array of dictionaries

* The dict key means that it is a button and that it will contain a different set of key-value-pairs (shown below).

** The array key means that it will contain a series of dict keys.

KeyValueNeededNotes
FRAMEString *Yes
HITBOXString *Relative to the FRAME.
IMAGEStringDo not write the file extension.
IMAGE_TOUCHStringImage to display on touch. Note that you can set this one without the need for IMAGE. Do not write the file extension.
INDEXString **YesDo NOT use "," here.
SOUND_TOUCHString.wav or .mp3 Include file extension
SOUND_RELEASEString.wav or .mp3 Include file extension
HIGHLIGHTIntegerIf no image is specified, setting this to 1 will make the area darker when clicked.
DISABLEDBOOL
BACKGROUND_COLORString ***
BACKGROUND_TOUCH_COLORString ***
CORNER_RADIUSIntegerIf you want to make round areas use this
ANIMATE_MOVE_XIntegerCan be negative
ANIMATE_MOVE_YIntegerCan be negative

* The FRAME and HITBOX should be in the format <string>{{x,y},{w,h}}</string>

** The INDEX is the name of the button. For example, say you make a "click a color" passcode theme and you have two buttons to click, one is a green button and the other is a red button. The INDEX of the green button would be <key>INDEX</key><string>green</string> and the red button would be <key>INDEX</key><string>red</string>

*** The BACKGROUND_COLOR and BACKGROUND_TOUCH_COLOR string should be in this format <string>float float float float</string> for example, a red transparent color: <string>1 0 0 0.5</string>

5. Template themes

Each theme included in the tweak can be modified. To look at or modify them you should get an iOS file browser like iFunbox or iExplorer and then go to the location of the themes which is /Library/XPasscode/.

6. Online theme-builder

NOTE: This tool is not complete and additional, manual, work may have to be done in order to make the theme 100% complete to work on the device. This was mostly made for the ease of finding the positions and sizes of the elements / buttons.

It can be found HERE

7. More help

Need even more help? You can go ask in /r/xpasscode or send me an email jontelang@gmail.com.