Publish app installers (.pkg, .dmg, .zip) with permanent download links. Each upload is one immutable version.
Commands use $API (https://api.heremyapp.com/v1) and $AUTH (the bearer token header) from the shell setup.
Before uploading (macOS)
heremyapp does not sign, notarize or vouch for installers. Sign the app with Developer ID (Hardened Runtime), package it, notarize and staple before uploading. Unsigned or unnotarized downloads are blocked by Gatekeeper on users' Macs. heremyapp only looks for signs of signing after the upload (Verification), so the checks below are yours to run.
Check readiness first, before you ask the user anything, so that any missing credential goes into your single question (Start here):
security find-identity -v -p codesigning # needs "Developer ID Application: ..." (and "Developer ID Installer" for .pkg)
grep -rn "keychain-profile" --include="*.sh" --include="Makefile" --include="*.yml" --include="*.md" . | head
xcrun notarytool history --keychain-profile PROFILE_NAME >/dev/null && echo "profile works"The notarization profile name is chosen by the user, so look for it in the project's build scripts, CI files and
README first. If there is no profile, ask the user to create one themselves in a terminal
(xcrun notarytool store-credentials PROFILE_NAME, with an Apple ID app-specific password or an App Store Connect API
key) and to tell you the name; never ask them to paste credentials into the conversation.
Package and check the signed MyApp.app, in one of three formats:
| Format | Package, notarize, staple | Check |
|---|---|---|
.dmg (drag to Applications) |
hdiutil create -volname "MyApp" -srcfolder MyApp.app -ov -format UDZO MyApp.dmg, then codesign --sign "Developer ID Application: NAME (TEAMID)" MyApp.dmg, xcrun notarytool submit MyApp.dmg --keychain-profile PROFILE_NAME --wait, xcrun stapler staple MyApp.dmg |
spctl --assess --type open --context context:primary-signature -vv MyApp.dmg |
.pkg (installer) |
pkgbuild --component MyApp.app --install-location /Applications --sign "Developer ID Installer: NAME (TEAMID)" MyApp.pkg (or productbuild), then notarize and staple MyApp.pkg the same way |
spctl --assess --type install -vv MyApp.pkg |
.zip (simplest) |
Notarize the zipped app, staple the app, then zip it again (a zip itself cannot be stapled): ditto -c -k --keepParent MyApp.app MyApp.zip, xcrun notarytool submit MyApp.zip --keychain-profile PROFILE_NAME --wait, xcrun stapler staple MyApp.app, then run the ditto command again |
spctl --assess --type execute -vv MyApp.app |
Each check should print accepted and source=Notarized Developer ID. Agents: if a check fails, stop and ask the user
before uploading.
For a .zip, also list what is in it: unzip -l MyApp.zip should show only MyApp.app/.... On the Free plan a .zip
with anything else that runs on Windows is refused (Verification); if a build script added other
files, zip the app alone into a new file and tell the user.
Names and versions
filename: the bare file name, without folders. 1-100 characters of letters, digits,.,_or-, ending in.pkg,.dmgor.zip. Keep it the same across releases (MyApp.pkg, notMyApp-1.2.0.pkg).version: a semantic version such as1.2.0, normally the app'sCFBundleShortVersionString. It must be higher than the previous release of the same file.build(recommended): the app's build number, such asCFBundleVersion(46or1.2.46). It must also increase.notes(optional): a one-line summary of what changed. Show it on the landing page as release notes.ed_signature,minimum_system_version(optional): for apps that update with Sparkle; see Sparkle updates.- See Releases and versioning for how to choose the next version and build.
latestmeans the most recently published version, not the highest version number.
Because the filename is stable, the latest link is predictable before you upload:
https://heremyapp.com/dl/ACCOUNT/SPACE/latest/FILENAME. Publishing the installer before the site means the link works as soon
as the site is live.
Always use this absolute URL in the site. The site runs on its own origin, so a relative link such as /dl/...
would point at the site itself and return 404.
1. Measure the file
FILE=./build/MyApp.pkg
NAME=$(basename "$FILE")
SIZE=$(stat -f%z "$FILE" 2>/dev/null || stat -c%s "$FILE")
SHA=$(shasum -a 256 "$FILE" | cut -d' ' -f1)2. Register it
curl -sS --fail-with-body -X POST "$API/spaces/my-app/artifacts" -H "$AUTH" -H "content-type: application/json" \
-d "{\"filename\":\"$NAME\",\"version\":\"1.2.0\",\"build\":\"46\",\"notes\":\"Faster sync\",\"size\":$SIZE,\"sha256\":\"$SHA\"}"Success is 201 with the artifact in "status":"pending":
{"id":"art_3kq9...","space":"peter/my-app","filename":"MyApp.pkg","version":"1.2.0","size":18234567,
"sha256":"4583...75fa","status":"pending",
"download_url":"https://heremyapp.com/dl/peter/my-app/v/1.2.0/MyApp.pkg",
"latest_url":"https://heremyapp.com/dl/peter/my-app/latest/MyApp.pkg",
"upload":{"mode":"single","method":"PUT","url":"https://api.heremyapp.com/v1/artifacts/art_3kq9.../content",
"command":"curl -sS --fail-with-body -T MyApp.pkg -H \"Authorization: Bearer $HEREMYAPP_TOKEN\" https://api.heremyapp.com/v1/artifacts/art_3kq9.../content"}}For a larger file, upload looks like this instead:
{"mode":"multipart","part_size":52428800,"part_count":3,
"part_url":"https://api.heremyapp.com/v1/artifacts/art_3kq9.../parts/{part_number}","complete_url":"https://api.heremyapp.com/v1/artifacts/art_3kq9.../complete",
"command":"split -b 52428800 -a 3 MyApp.pkg /tmp/art_3kq9....part. && ..."}upload.mode tells you which upload to do. upload.command is a ready-made shell command that contains no secrets.
It refers to the file by its bare name, so run it from the folder that contains the file (cd "$(dirname "$FILE")"),
with HEREMYAPP_TOKEN set. Or follow the steps below with your own path.
Registering the same filename and version again while it is still pending replaces the pending one.
3a. Upload in one request ("mode":"single", up to 95 MiB)
curl -sS --fail-with-body -T "$FILE" -H "$AUTH" "$API/artifacts/ARTIFACT_ID/content"The response is the artifact with "status":"active" and an advice list, which is empty when the signing checks in
Verification find nothing to fix.
3b. Upload in parts ("mode":"multipart", up to the plan's limit)
upload.part_size (in bytes; use it as PART_SIZE below) and upload.part_count describe the parts. Parts are numbered from 1, and every part except the
last must be exactly part_size bytes. A failed part can simply be sent again.
split -b PART_SIZE -a 3 "$FILE" /tmp/heremyapp-part.
n=1; ok=1
for f in /tmp/heremyapp-part.*; do
curl -sS --fail-with-body -T "$f" -H "$AUTH" "$API/artifacts/ARTIFACT_ID/parts/$n" || { ok=0; break; }
n=$((n+1))
done
[ "$ok" = 1 ] && curl -sS --fail-with-body -X POST -H "$AUTH" "$API/artifacts/ARTIFACT_ID/complete"
rm -f /tmp/heremyapp-part.*complete returns the artifact with "status":"active" and advice, or missing_parts listing parts still to send.
Verification
The server checks the exact size, the SHA-256 and the file signature (pkg = xar archive, dmg = UDIF image, zip).
If a check fails (checksum_mismatch, invalid_file_content), the artifact is discarded: fix the file or the
values and register again. Published versions are immutable, and each release must have a higher version and build
than the last one (409 version_not_increasing or build_not_increasing, with suggested values in details).
It then reads what it can without unpacking the file:
| Check | What happens |
|---|---|
Contents of a .zip |
On the Free plan a .zip may contain only a macOS app and its files. Windows programs (.exe, .msi, .bat and the like) outside an app bundle, password-protected entries or a file list that cannot be read fail with 422 installer_rejected, and the upload is discarded. Paid plans accept them |
| Code signature | advice says when a .pkg is not signed with Developer ID Installer, a .dmg is not signed with Developer ID Application, or the app in a .zip is not signed (installer_unsigned, installer_not_developer_id) |
| Notarization ticket | For a signed app in a .zip, advice says when no ticket is stapled (installer_not_stapled). An unsigned app gets only installer_unsigned |
These are hints, not a Gatekeeper check: heremyapp does not verify certificates or ask Apple whether a file is
notarized, so run the spctl checks above before uploading. An installer with advice is still published. Tell the user,
fix it and publish a new version.
Download links
latest_url:https://heremyapp.com/dl/ACCOUNT/SPACE/latest/FILENAME. Use this for the download button.download_url:https://heremyapp.com/dl/ACCOUNT/SPACE/v/VERSION/FILENAME. This exact version, forever.
Downloads use Content-Disposition: attachment, support resumable Range requests and HEAD, and send the SHA-256 in
ETag and X-Checksum-SHA256.
# quick check without downloading: which version latest points to, and its hash
curl -sIL https://heremyapp.com/dl/ACCOUNT/my-app/latest/MyApp.pkg | grep -iE "^location|^x-checksum-sha256"
# full check: download and hash
curl -fsSL -o /tmp/check.pkg https://heremyapp.com/dl/ACCOUNT/my-app/latest/MyApp.pkg && shasum -a 256 /tmp/check.pkgSparkle updates (macOS)
Apps that use Sparkle can update themselves from heremyapp. Each installer filename has
an update feed (appcast) built from its published versions, at a permanent URL that is also in the artifact's
appcast_url:
https://heremyapp.com/dl/ACCOUNT/SPACE/appcast/FILENAME.xml (for example .../appcast/MyApp.dmg.xml)
It redirects (302) to the download host, which Sparkle follows. It returns 404 until the first version of that
filename is registered; after that it is always a valid feed, listing only signed versions. If the space is paused
(see Changing plans), the feed and downloads pause with it.
- Info.plist: set
SUFeedURLto that URL (it stays the same for every release) andSUPublicEDKeyto the app's public EdDSA key. If the project already hasSUPublicEDKey, keep it. Otherwise ask the user to run Sparkle'sgenerate_keysonce in a terminal: it stores the private key in their login Keychain and prints the public key. With Swift Package Manager the tools are in DerivedData:find ~/Library/Developer/Xcode/DerivedData -path "*artifacts/sparkle/Sparkle/bin/sign_update" | head -1. Never print, copy or ask for the private key. - Version and build: Sparkle compares
build(the app'sCFBundleVersion), so send it with every release (Releases and versioning).notesappear in the update window. - Sign the exact file you upload, after notarizing and stapling:
SIG=$(path/to/bin/sign_update -p "$FILE")prints only the signature (without-pit printssparkle:edSignature="..." length="...", which heremyapp also accepts). - Register it with
ed_signatureand, if the app sets one,minimum_system_version(itsLSMinimumSystemVersion, such as13.0):
curl -sS --fail-with-body -X POST "$API/spaces/my-app/artifacts" -H "$AUTH" -H "content-type: application/json" \
-d "{\"filename\":\"$NAME\",\"version\":\"1.3.0\",\"build\":\"47\",\"notes\":\"Faster sync\",\"size\":$SIZE,\"sha256\":\"$SHA\",\"ed_signature\":\"$SIG\",\"minimum_system_version\":\"13.0\"}"Then upload as usual. Only active versions with a signature are in the feed ("in_appcast": true), newest
first; the app refuses an update it cannot verify, so an unsigned version is left out rather than offered. To add a
version you already published, or fix a value: PATCH $API/artifacts/ARTIFACT_ID with
{"ed_signature":"...","minimum_system_version":"13.0"} (null removes a value).
Check the feed: curl -sSL https://heremyapp.com/dl/ACCOUNT/my-app/appcast/MyApp.dmg.xml. Each item has sparkle:version (the build,
or the version if there is none), sparkle:shortVersionString, the release notes and an enclosure with the fixed
download URL of that version, its size and sparkle:edSignature; a .pkg is marked
sparkle:installationType="package" (Sparkle asks for an administrator password to install it). Installed apps check the
feed on their own, and each check counts as one request in your usage. It is not a visit in
visitor stats.
Manage
GET $API/spaces/my-app/artifactslists installers with all-timedownloads(automated ones included) andbytes_served. For how many people downloaded in the last 7, 30 or 90 days, and from where, use visitor stats.GET $API/artifacts/ARTIFACT_IDshows one, including upload instructions while it is pending.PATCH $API/artifacts/ARTIFACT_IDsets or clears its Sparkle values.DELETE $API/artifacts/ARTIFACT_IDremoves a version. Its URL then returns410 Gone,latestfalls back to the previous version (so does the Sparkle feed), and the version cannot be reused.