FrontPage calls and usage
This documentation is to help you create a FrontPage theme. FrontPage applies a WKWebview to the iOS homescreen. Along with the webview, it calls code within the html to supply iOS info such as battery, music, apps, switcher, signal, wifi, notifications, and other info. The code it calls is covered below.
FrontPage requires you to have a screenshot.jpg which is the screenshot of your theme, Info.plist, and index.html.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">width auto height auto x 0 y 0 usessysteminfo <true/>usesbatteryinfo <true/>usesstatusbarinfo <true/>usesswitcherinfo <true/>usesappsinfo <true/>usesnotificationinfo <true/>usesfolderinfo <true/>usesalarminfo <true/>usesweatherinfo <true/>usesmusicinfo <true/>
Width: can be set to an interger value or auto. If set to an interger still put it in <string></string>
Height: can be set to an interger value or auto. If set to an interger still put it in <string></string>
X: can be set to an interger such as fromright:100 which will move the theme 100px from the right. fromleft:100 will move 100px from the left. Center can also be set which will center depending on width
Y: can be set to an interger such as fromtop:100 which will move the theme 100px from the top. frombottom:100 will move 100px from the bottom. Center can also be set which will center depending on height
usesXXXinfo can be set to <true/> or <false/> this defines if FrontPage will send this info to your html.
FPI is your main object. All info is stored in this object. It is called whenever iOS info changes. Then the functions below are called to let you know that info was updated. For this there is no reason to have timers checking if info is changed.
Depending on what you have enabled in your Info.plist each one of these functions are called when that info is updated. Here is an example to load device name into a div.
FPI.system.twentyfour If a user has 24hr time set. FPI.system.deviceName User name set in settings. FPI.system.systemVersion System Version FPI.system.firmwareBuild FirmwareBuild FPI.system.firmware Firmware FPI.system.systemName iPhone/iPad FPI.system.serial Serial # (fake) FPI.system.deviceType iPhone FPI.system.model iPhone6 FPI.system.events Calendar events object FPI.system.rootStorage Root storage size FPI.system.rootfreeStorage Root storage free size FPI.system.mobileStorage Mobile storage size FPI.system.mobilefreeStorage Root storage free size FPI.system.totalStorage Total storage size FPI.system.freeStorage Free storage size
FPI.battery.percent Battery percent without the % sign. FPI.battery.chargetext returns Charging or Not Charging text. FPI.battery.chargestate returns 0 or 1.
FPI.statusbar.wifiName wifi name. FPI.statusbar.wifiRSSI wifi RSSI. FPI.statusbar.wifiBars wifi bar count. FPI.statusbar.signalName carrier name. FPI.statusbar.signalStrength signal strength. FPI.statusbar.signalBars signal bar count. FPI.statusbar.bluetoothEnabled bluetooth Enabled
FPI.switcher.bundles bundle id of apps in switcher
FPI.apps.all returns all apps installed FPI.apps.all[NUMBER].bundle returns bundle of app FPI.apps.all[NUMBER].name returns name of app FPI.apps.all[NUMBER].systemApp returns if app is a system app FPI.apps.all[NUMBER].bundle returns bundle of app FPI.bundle[BUNDLEID].badge get badge for certain bundle FPI.bundle[BUNDLEID].name get name for certain bundle
FPI.music.album returns current album FPI.music.title returns current title FPI.music.artist returns current artist FPI.music.isPlaying returns if music is playing FPI.music.musicBundle returns bundle of the current app playing music FPI.music.albumArt returns album art
FPI.notifications returns object of all notifications
FPI.folderplist returns object of plist /var/mobile/Library/SpringBoard/IconSupportState.plist /var/mobile/Library/SpringBoard/IconState.plist
FPI.alarm.allalarms[COUNT].time returns alarm time FPI.alarm.allalarms returns all alarms as object
FPI.memory.ramUsed returns ram used FPI.memory.ramFree returns free ram FPI.memory.ramAvailable returns available ram FPI.memory.ramPhysical returns physical ram
FPI.weather.city returns city name FPI.weather.naturalCondition returns string of current condition FPI.weather.condition returns condition string FPI.weather.latlong returns latitude and longitude FPI.weather.temperature returns current temp FPI.weather.conditionCode returns yahoo condition code number FPI.weather.updateTimeString returns last time weather was updated FPI.weather.humidity returns humidity FPI.weather.dewPoint returns dewpoint FPI.weather.windChill returns windchill FPI.weather.feelsLike returns feels like temperature FPI.weather.windDirection returns wind direction FPI.weather.windSpeed returns wind speed FPI.weather.visibility returns visibility FPI.weather.sunsetTime returns when sun will set FPI.weather.sunriseTime returns when sun will rise FPI.weather.precipitationForecast no idea FPI.weather.low returns current low FPI.weather.high returns current high FPI.weather.celsius returns if celsius FPI.weather.chanceofrain returns chance of rain percent FPI.weather.dayForecasts returns forecast in an object each forecast has low, high, dayNumber, icon, and dayOfWeek.
FPI.reminders.all returns array of reminders.
These functions call the tweak to do specific actions. They are used by setting window.location to a string. Example