This is a minimal outerframe app that can be deployed to a static web server.
It includes:
- A small standalone Xcode project that builds
HelloWorldStatic.bundle - A Python script that generates the
.outerdescriptor - A Python script that serves the generated site locally with the right MIME type for
.outer
From this directory:
./build_site.shThat produces a ready-to-upload static site in build/site/:
hello-world.outerbinaries/HelloWorldStatic/index.htmlbinaries/HelloWorldStatic/macos-armbinaries/HelloWorldStatic/macos-x86
If you want the raw build command, build_site.sh runs xcodebuild against HelloWorldStatic.xcodeproj and then archives the built bundle with aa.
By default, the generated .outer file points at /binaries/HelloWorldStatic, so the uploaded site is intended to live at the web server root. If you want to host it under a subpath, set BINARY_URL_PATH when building, for example:
BINARY_URL_PATH=/demo/binaries/HelloWorldStatic ./build_site.shBuild the site, then serve it locally:
python3 Scripts/serve_site.py --root build/site --port 8025Then open this URL in Outer Loop:
http://127.0.0.1:8025/hello-world.outer
Upload the contents of build/site/ to your server.
The server needs to satisfy these rules:
hello-world.outershould be served asapplication/vnd.outerframebinaries/HelloWorldStatic/macos-armandbinaries/HelloWorldStatic/macos-x86should be served as raw binary data
build_site.sh also writes binaries/HelloWorldStatic/index.html with a plain-text list of supported platforms. Current Outer Loop builds do not need to fetch that listing because they directly request the current platform archive, but it is harmless to upload.
Put the correct Content-Type metadata on the S3 objects.
If the site is hosted at the bucket root:
BUCKET=your-bucket-name
aws s3 cp build/site/hello-world.outer "s3://${BUCKET}/hello-world.outer" \
--content-type "application/vnd.outerframe"
aws s3 cp build/site/binaries/HelloWorldStatic/index.html "s3://${BUCKET}/binaries/HelloWorldStatic/index.html" \
--content-type "text/plain; charset=utf-8"
aws s3 cp build/site/binaries/HelloWorldStatic/macos-arm "s3://${BUCKET}/binaries/HelloWorldStatic/macos-arm" \
--content-type "application/octet-stream"
aws s3 cp build/site/binaries/HelloWorldStatic/macos-x86 "s3://${BUCKET}/binaries/HelloWorldStatic/macos-x86" \
--content-type "application/octet-stream"If the site is hosted under a s3 path prefix, rebuild with a matching BINARY_URL_PATH and upload to the same prefix:
BINARY_URL_PATH=/demo/binaries/HelloWorldStatic ./build_site.sh
PREFIX=demo
aws s3 cp build/site/hello-world.outer "s3://${BUCKET}/${PREFIX}/hello-world.outer" \
--content-type "application/vnd.outerframe"
aws s3 cp build/site/binaries/HelloWorldStatic/macos-arm "s3://${BUCKET}/${PREFIX}/binaries/HelloWorldStatic/macos-arm" \
--content-type "application/octet-stream"
aws s3 cp build/site/binaries/HelloWorldStatic/macos-x86 "s3://${BUCKET}/${PREFIX}/binaries/HelloWorldStatic/macos-x86" \
--content-type "application/octet-stream"curl -I https://your-domain.example/hello-world.outer
curl -I https://your-domain.example/binaries/HelloWorldStatic/macos-arm
curl -I https://your-domain.example/binaries/HelloWorldStatic/macos-x86The .outer response must include Content-Type: application/vnd.outerframe. The platform archive responses should be application/octet-stream.
After upload, navigate Outer Loop to the deployed .outer URL.
If you copy this folder and rename it, update these places together:
HelloWorldStatic.xcodeprojFrontend/HelloWorldStaticContent.swiftbuild_site.shREADME.md