Files
Felitendo 0c38693f05 feat: merge ftstore-manager into the monorepo
the manager lands in manager/, next to ios/ and web/. it is a fork of
this repo's own app, not of feather, so scripts/apply-rebrand.sh
excludes it the same way it excludes web/ — the generic feather-to-
ftstore rule would rewrite its app.ftstore.manager identity and mangle
the lineage notes in its docs.

zsign and idevicekitten were vendored copies in the old repo. they are
registered as submodules here instead, pinned to the same commits ios/
uses and verified byte-identical to what was vendored. that keeps 71 MB
of duplicated source out of the tree and leaves the xcode project's
relative paths intact, so project.pbxproj needed no edits.

the server moves to ftstore.app in both apps: managerrepoclient, the
seeded default source and managerconfig's fallback. downloadmanager
keeps the old admin host in its user-agent allowlist — that check is permissive,
not identifying, and dropping it would stop sending the header to
installs whose stored override still names the old host.

the rest of the admin rename lands too: the client id, the base-url
environment variable, the info.plist key, and user-facing errors. the
userdefaults override key is renamed with a
one-time migration read, so an existing install keeps the address its
owner configured instead of falling back to the default.

tags gain a third namespace: manager-v* for releases, manager-dev for
the rolling prerelease. both repos published to a tag called `dev`
before; sharing it here would make each build overwrite the other's
release assets.
2026-08-03 13:21:48 +02:00

90 lines
2.1 KiB
Swift

//
// Bundle+versions.swift
// Loader
//
// Created by samara on 18.03.2025.
//
import Foundation.NSBundle
extension Bundle {
/// Get the name of the app
public var name: String {
if
let displayName = object(forInfoDictionaryKey: "CFBundleDisplayName") as? String,
!displayName.isEmpty
{
return displayName
}
if
let name = object(forInfoDictionaryKey: "CFBundleName") as? String,
!name.isEmpty
{
return name
}
return object(forInfoDictionaryKey: "CFBundleExecutable") as? String ?? ""
}
/// Get the executable name of the app
public var exec: String {
return object(forInfoDictionaryKey: "CFBundleExecutable") as? String ?? ""
}
/// Get the "short" version of the app
public var version: String {
if let version = object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String {
return version
}
return object(forInfoDictionaryKey: "CFBundleVersion") as? String ?? ""
}
/// Get the icon of the app
public var iconFileName: String? {
if
let icons = object(forInfoDictionaryKey: "CFBundleIcons") as? [String: Any],
let primary = icons["CFBundlePrimaryIcon"] as? [String: Any],
let files = primary["CFBundleIconFiles"] as? [String],
let name = files.last
{
return name
}
if
let iPadIcons = object(forInfoDictionaryKey: "CFBundleIcons~ipad") as? [String: Any],
let primary = iPadIcons["CFBundlePrimaryIcon"] as? [String: Any],
let files = primary["CFBundleIconFiles"] as? [String],
let name = files.last
{
return name
}
if
let iconFiles = object(forInfoDictionaryKey: "CFBundleIconFiles") as? [String],
let name = iconFiles.last ?? iconFiles.first
{
return name
}
if
let iPhoneIconFiles = object(forInfoDictionaryKey: "CFBundleIconFiles~iphone") as? [String],
let name = iPhoneIconFiles.last ?? iPhoneIconFiles.first
{
return name
}
if
let iPadIconFiles = object(forInfoDictionaryKey: "CFBundleIconFiles~ipad") as? [String],
let name = iPadIconFiles.last ?? iPadIconFiles.first
{
return name
}
if let iconFile = object(forInfoDictionaryKey: "CFBundleIconFile") as? String {
return iconFile
}
return nil
}
}