Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
dist/
.DS_Store
*.xcuserdata/
*.xcuserdatad/
*.xcuserstate
DerivedData/
*.zip
*.dmg
Expand Down
688 changes: 688 additions & 0 deletions Locale.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions Locale.xcodeproj/xcshareddata/xcschemes/LocaleApp.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "2650"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "111111111111111111111111"
BuildableName = "Locale.app"
BlueprintName = "LocaleApp"
ReferencedContainer = "container:Locale.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "111111111111111111111111"
BuildableName = "Locale.app"
BlueprintName = "LocaleApp"
ReferencedContainer = "container:Locale.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "111111111111111111111111"
BuildableName = "Locale.app"
BlueprintName = "LocaleApp"
ReferencedContainer = "container:Locale.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

Locale is a native macOS utility for switching named DNS contexts.

It is built with SwiftUI and Swift Package Manager. Locale stores contexts
locally, applies the active host mappings through a sandboxed DNS Proxy Network
Extension, and leaves system host files untouched.
It is built with SwiftUI. Day-to-day local builds can use Swift Package
Manager, while App Store archives should use the checked-in Xcode project.
Locale stores contexts locally, applies the active host mappings through a
sandboxed DNS Proxy Network Extension, and leaves system host files untouched.

## Features

Expand Down Expand Up @@ -51,3 +52,10 @@ The app bundle is written to:
```text
dist/Locale.app
```

## Xcode Archive

Open `Locale.xcodeproj`, select the `LocaleApp` scheme, then use
Product > Archive. Do not archive the Swift package workspace directly; package
archives appear in Organizer as Generic Xcode Archives instead of macOS app
archives.
32 changes: 32 additions & 0 deletions Resources/Locale-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Locale</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleIconName</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
<string>Locale</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
34 changes: 34 additions & 0 deletions Resources/LocaleDNSProxy-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Locale DNS Proxy</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
<string>LocaleDNSProxy</string>
<key>CFBundlePackageType</key>
<string>SYSX</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NetworkExtension</key>
<dict>
<key>NEProviderClasses</key>
<dict>
<key>com.apple.networkextension.dns-proxy</key>
<string>$(PRODUCT_MODULE_NAME).DNSProxyProvider</string>
</dict>
<key>NEMachServiceName</key>
<string>$(DEVELOPMENT_TEAM).$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</dict>
<key>NSSystemExtensionUsageDescription</key>
<string>Locale uses a DNS proxy system extension to switch local hostname mappings without editing system files.</string>
</dict>
</plist>
10 changes: 10 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ Distribution builds must be signed with profiles that include:
- A saved notary profile named `LocaleNotary` for direct distribution.
- Network Extension and System Extension capabilities enabled for the app identifiers in the Apple Developer portal.

## App Store Archives In Xcode

Open `Locale.xcodeproj`, select the `LocaleApp` scheme, and archive that
scheme. The app and `LocaleDNSProxy` targets use automatic signing with the
development team `6VDP675K4L`.

Do not archive the Swift package workspace directly. Xcode treats package
archives as Generic Xcode Archives because there is no installable app target
owning the archive.

Create the notary profile with:

```bash
Expand Down
Loading