Hi Maki
iSH is a bit of a hack: it essentially uses an x86 emulator to run Linux as a way to get around the app store rules, and so performance and compatibility are both poor.
Both Play.js and JSBox support Node.js apps, but the difference is that JSBox also offers a rich API for creating native iOS user interfaces and accessing native platform features. In contrast, Play.js apps are pretty much restricted to running a web server or processing files, without deep integration with the underlying platform. So, I'd generally recommend starting with Play.js unless you plan to explore some exotic platform integration.
I will try to write proper instructions for installing TW5 on Play.js, but the rough outline is:
1. Create a new project in Play.js, with the type set to "Node.js"
2. Play.js will open a file called "index.js" in the root. Paste the following content:
var path = require("path");
var $tw = require("./node_modules/tiddlywiki/boot/boot.js").TiddlyWiki();
bootTW();
function bootTW() {
// Pass the command line arguments to the boot kernel
$tw.boot.argv = Array.prototype.slice.call(process.argv,2);
$tw.boot.argv = [path.resolve(process.cwd(),"./wiki"),"--listen"];
// Boot the TW5 app
$tw.boot.boot(function() {
// console.log($tw.boot)
});
}
3. Click the "files" button at the top of the sidebar on the left. Choose the file called "package.json" and add a reference to TiddlyWiki:
{
"name": "My Wiki",
"version": "1.0.0",
"dependencies": {
"tiddlywiki": "^5.1.22"
}
}
4. Create a file in the root called "index.js" containing:
5. Click the "scripts" button at the bottom left that reads "$ default: node index.js"
6. Tap "Install" in the "Scripts" dialogue that appears
7. Tap the "Resolve modules" button on the "Dependencies" dialogue that appears
8. Tap "Resolve" on the "Resolve modules" dialogue that appears
9. A bunch of text should appear, wait until you see "found 0 vulnerabilities", then you can click "back" and then "X" to back out of the dialogues
10. Create a folder called "wiki" in the root
{
"description": "My great wiki",
"plugins": [
"tiddlywiki/filesystem",
"tiddlywiki/tiddlyweb"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
]
}
12. Click the "scripts" button again, but this time choose "Default"
13. Click the "play" button at the bottom left
14. Click the globe button to open the web browser
You should now have a functioning wiki. When you're done, close the browser and click the "stop" button.
Good luck, let us know how you get on,
Best wishes
Jeremy
I don't own any apple products, but looking over google, I see that Apple started requiring all apps to use https back in 2016. I wonder if using http could be the problem?