diff --git a/.gitignore b/.gitignore index c525d8208..b4f418287 100644 --- a/.gitignore +++ b/.gitignore @@ -125,6 +125,7 @@ Thumbs.db *.p12 *.mobileprovision Secrets.xcconfig +Local.xcconfig # Debug *.log diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 12c6658f5..e5df309a5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,18 +15,22 @@ brew install swiftlint swiftformat ### Building with a personal Apple team -To Debug-build under your own team, open `TablePro.xcodeproj`, select the `TablePro` target, then **Signing & Capabilities → Debug** sub-tab: - -1. **Team**: pick your personal team. If another target fails to sign later, repeat there. -2. **Bundle Identifier**: change `com.TablePro` to something unique (e.g. `com..TablePro`). -3. **Code Signing Entitlements** (Build Settings tab): switch Debug to `TablePro/TablePro.Debug.entitlements`. It ships in the repo and drops iCloud, which free teams don't support. Sync auto-disables at runtime. - -Don't commit the resulting `pbxproj` changes. They break official Release signing. Skip them locally: +The project's signing settings are read from `Configurations/Shared.xcconfig`, which optionally includes a gitignored `Local.xcconfig` for per-developer overrides. To Debug-build under your own team, copy the example file and edit: ```bash -git update-index --skip-worktree TablePro.xcodeproj/project.pbxproj +cp Local.xcconfig.example Local.xcconfig ``` +In `Local.xcconfig`, uncomment and set the values you need: + +- `DEVELOPMENT_TEAM`: your team ID (Xcode > Settings > Accounts > Manage Certificates). +- `PRODUCT_BUNDLE_IDENTIFIER`: make it unique under your team (e.g. `com.yourhandle.TablePro`). +- `CODE_SIGN_ENTITLEMENTS = TablePro/TablePro.Debug.entitlements`: only if your team is free (no iCloud capability). Sync auto-disables at runtime. + +That's it. No pbxproj edits. `Local.xcconfig` is gitignored so your overrides stay local; the project file keeps signing for the official team. + +Note: free personal teams hit Apple's 10-bundle-IDs-per-7-days limit because the project signs around a dozen plugin bundles. Expect occasional waits if you re-create your team's signing identity often. + To verify: save a connection password, relaunch, reopen. The password should still be there. Build: diff --git a/Configurations/Shared.xcconfig b/Configurations/Shared.xcconfig new file mode 100644 index 000000000..f6e4043ed --- /dev/null +++ b/Configurations/Shared.xcconfig @@ -0,0 +1,13 @@ +// TablePro shared build settings. +// +// Wired as the project-level Configuration File for both Debug and Release +// (Project Editor > Project > Info > Configurations). +// +// Defaults below match the official D7HJ5TFYCU team. Contributors override +// per-developer values in Local.xcconfig (gitignored). See CONTRIBUTING.md. + +DEVELOPMENT_TEAM = D7HJ5TFYCU +PRODUCT_BUNDLE_IDENTIFIER = com.TablePro +CODE_SIGN_ENTITLEMENTS = TablePro/TablePro.entitlements + +#include? "../Local.xcconfig" diff --git a/Local.xcconfig.example b/Local.xcconfig.example new file mode 100644 index 000000000..a945049a4 --- /dev/null +++ b/Local.xcconfig.example @@ -0,0 +1,14 @@ +// Copy this file to Local.xcconfig and uncomment the lines you want to override. +// Local.xcconfig is gitignored. See CONTRIBUTING.md for details. + +// Your Apple Developer team ID. +// Find it in Xcode > Settings > Accounts > select account > Manage Certificates, +// or System Settings > Apple ID > Sign in with your Apple ID > Developer. +// DEVELOPMENT_TEAM = ABCD123456 + +// Your bundle identifier. Must be unique under your team. +// PRODUCT_BUNDLE_IDENTIFIER = com.yourhandle.TablePro + +// Path to a custom entitlements file (relative to project root). +// Free personal teams cannot sign the iCloud capability; point at the iCloud-free variant. +// CODE_SIGN_ENTITLEMENTS = TablePro/TablePro.Debug.entitlements