Scriptable 简介
- Plain JavaScript: Supports JavaScript ES6. Scripts are stored as plain JS files on disk.
- Native APIs: Integrate with the native APIs of iOS directly from JavaScript.
- Siri Shortcuts: Run scripts from Siri Shortcuts. Present tables, websites, HTML and more in Siri.
- Documentation: All native APIs that are bridged to JavaScript have documentation which is available offline.
- Share Sheet Extension: Run a script from a share sheet and process the inputs.
- Files Integration: Integrated with the file system and Files.app enabling you to perform operations on files.
- Customizable: The editor can be customized to match your preferences.
- Example scripts: Comes with several example scripts to get you started.
- x-callback-url: Communicate with other apps using x-callback-url.
Made by Simon Støvring in Copenhagen; Scriptable uses Apples JavaScriptCore
- ios JavaScript Core
- 一篇简介文章
使用天气小组件
效果图:

附:open weather 摘要说明
调用 Api:
let wetherurl = "http://api.openweathermap.org/data/2.5/weather?id=" + CITY_WEATHER + "&APPID=" + APP_ID + "&units=metric"
华氏度设置为英制 imperial,摄氏度设置为公制 metric。其中部分 CITY_WEATHER 代码如下:
1 | // 北京 1816670 |
在此处获取免费的API密钥:https://openweathermap.org/appid
示例:
http://api.openweathermap.org/data/2.5/weather?id=1805753&APPID=********&units=metric
返回值:
1 | { |