adsedare 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +70 -18
- data/lib/adsedare/export_options.rb +12 -0
- data/lib/adsedare/install_profiles.rb +9 -0
- data/lib/adsedare/keychain.rb +11 -0
- data/lib/adsedare/version.rb +1 -1
- data/lib/adsedare/xcodeproj.rb +11 -0
- data/lib/adsedare.rb +10 -0
- data/lib/starship/auth_helper.rb +1 -1
- data/lib/starship.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ac823e1a7112068b8ad2a7df14432af30254bf2172f8faeca7e793c4abf5a36
|
4
|
+
data.tar.gz: 0251b7ec744b21bc36bc77c04fb92101496cbc3290b012a846cbb0a1ff67cd0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 722fb50d3a51c1e0b734aa1ba0e0312e99d6486b6bf5ce6cd182a5e0023392a6557d05592b9b370bb7584e31020c6ff33955ed93f9bb0d2ff0ec74eec9c71fb0
|
7
|
+
data.tar.gz: 5404f7537f7536d2e83b58a092df634a77b585a126a1614f79fa6dbcb32759504ae86be8b261c3e81fa53ad9dcad2e04d80cdcd0f98ec05a9d08ce6fe079154d
|
data/README.md
CHANGED
@@ -1,35 +1,87 @@
|
|
1
|
-
#
|
1
|
+
# AdSedare
|
2
2
|
|
3
|
-
|
3
|
+
*(from Latin **"Ad Sedare"** — *to calm*)*
|
4
4
|
|
5
|
-
|
5
|
+
**AdSedare** is a Ruby library that makes iOS **ad-hoc distribution** smooth and stress-free. With AdSedare, you can stop dealing with the chaotic mess of:
|
6
6
|
|
7
|
-
|
7
|
+
- Manually adding every new tester device across countless ad-hoc profiles
|
8
|
+
- Keeping certificate capabilities and app group settings in sync
|
9
|
+
- Regenerating expired provisioning profiles one painful click at a time
|
10
|
+
- Writing clunky shell scripts to build keychains or install profiles from App Store
|
11
|
+
- Patching `xcodeproj` files to support ad-hoc builds, then reverting everything for production
|
8
12
|
|
9
|
-
|
13
|
+
AdSedare does all of this for you. It reads your Xcode project, understands its structure, and automates the entire profile and signing setup. It can even register new bundle IDs and request fresh provisioning profiles on the fly.
|
10
14
|
|
11
|
-
|
15
|
+
## Why the Name?
|
12
16
|
|
13
|
-
|
17
|
+
The name **AdSedare** comes from personal suffering.
|
14
18
|
|
15
|
-
|
19
|
+
After over a year of managing internal iOS testing by hand, I was completely fried. I’d wrestled with Fastlane and similar tools, and while powerful, they were often too rigid or bloated for the very specific pain of ad-hoc distribution. So I built something with a **single mission**:
|
20
|
+
Make internal iOS testing **as chill as a cucumber in a snowstorm**.
|
16
21
|
|
17
|
-
|
22
|
+
## Docs
|
18
23
|
|
19
|
-
|
24
|
+
Right now, AdSedare is provided as a **Ruby library**, with plans to add CLI support later this year (™).
|
20
25
|
|
21
|
-
|
26
|
+
### `Adsedare::renew_profiles(project_path = nil, certificate_id = nil, team_id = nil)`
|
22
27
|
|
23
|
-
|
28
|
+
This is the **crown jewel** of the library.
|
24
29
|
|
25
|
-
|
30
|
+
- Traverses all targets in your `.xcodeproj`
|
31
|
+
- Inspects capabilities and entitlements
|
32
|
+
- Creates or renews **all necessary provisioning profiles**
|
33
|
+
- Adds any missing test devices
|
34
|
+
- Works with `APPLE_DEVELOPER_USERNAME` and `APPLE_DEVELOPER_PASSWORD` (due to App Store Connect API being... _gently nerfed into the ground_)
|
35
|
+
- Handles 2FA with a **scriptable interface** — meaning you can hook in an SMS relay or similar system to auto-respond
|
36
|
+
- Stores sessions for up to \~2 weeks to avoid repeated logins
|
26
37
|
|
27
|
-
|
38
|
+
### `patch_project(project_path, team_id = nil)`
|
28
39
|
|
29
|
-
|
40
|
+
Need to prep your Xcode project for ad-hoc builds? This does it cleanly:
|
30
41
|
|
31
|
-
|
42
|
+
- Fetches correct provisioning profile names
|
43
|
+
- Applies them to each target's `PROVISIONING_PROFILE_SPECIFIER`
|
44
|
+
- Optionally overwrites `team_id` if provided
|
45
|
+
- **Does NOT** use username/password — instead, expects:
|
32
46
|
|
33
|
-
|
47
|
+
- `APPSTORE_CONNECT_KEY_ID`
|
48
|
+
- `APPSTORE_CONNECT_ISSUER_ID`
|
49
|
+
- `APPSTORE_CONNECT_KEY`
|
34
50
|
|
35
|
-
|
51
|
+
This makes it more CI-friendly and avoids the 2FA headache entirely.
|
52
|
+
|
53
|
+
### `install_profiles(project_path = nil)`
|
54
|
+
|
55
|
+
- Downloads and installs all ad-hoc profiles needed by your project
|
56
|
+
- Places them in the correct location for Xcode to pick up
|
57
|
+
- Warns you if profiles are missing or expired
|
58
|
+
- Requires the same Connect API credentials as `patch_project`
|
59
|
+
|
60
|
+
### `create_keychain(keychain_path = nil, keychain_password = nil, make_default = true)`
|
61
|
+
|
62
|
+
**Arguably the second most powerful** feature, built from many hours of trial, error, and mild mental anguish.
|
63
|
+
|
64
|
+
- Creates a dedicated build keychain
|
65
|
+
- Imports required certificate chains and partition settings
|
66
|
+
- If provided with `AD_HOC_CERTIFICATE`, `AD_HOC_PRIVATE_KEY`, and `AD_HOC_KEY_PASSWORD`, will add your ad-hoc distribution cert too
|
67
|
+
|
68
|
+
💡 This function deliberately **does not** pull certificates from App Store Connect (unlike `match`) — because:
|
69
|
+
|
70
|
+
- You can’t download private keys from Apple
|
71
|
+
- Recreating certs in CI constantly is a _certified bad idea™_
|
72
|
+
- Relying on third-party key storage wasn’t a hill I wanted to die on
|
73
|
+
|
74
|
+
### `make_export_options(project_path = nil, export_path = nil, team_id = nil, options = {})`
|
75
|
+
|
76
|
+
Creates a ready-to-use `exportOptions.plist`:
|
77
|
+
|
78
|
+
- Automatically fills in correct profile names (fetched from App Store Connect)
|
79
|
+
- Adds sensible defaults
|
80
|
+
- Supports optional overrides like `thinning`, `compileBitcode`, etc.
|
81
|
+
|
82
|
+
## Final Words
|
83
|
+
|
84
|
+
**AdSedare isn’t here to replace Fastlane.**
|
85
|
+
But it _is_ here to offer a lighter, simpler alternative for **one very specific — but very common — pain**: ad-hoc iOS testing.
|
86
|
+
|
87
|
+
It’s already running in production and saving devs real time and real headaches. If you find a bug or have an idea, feel free to open an issue or PR — I’ll be more than happy to help.
|
@@ -5,6 +5,18 @@ require_relative "../appstoreconnect"
|
|
5
5
|
|
6
6
|
module Adsedare
|
7
7
|
class << self
|
8
|
+
# Create export options for a project
|
9
|
+
# Expects environment variables to be set:
|
10
|
+
#
|
11
|
+
# - APPSTORE_CONNECT_KEY_ID Key ID from Apple Developer Portal
|
12
|
+
# - APPSTORE_CONNECT_ISSUER_ID Issuer ID from Apple Developer Portal
|
13
|
+
# - APPSTORE_CONNECT_KEY P8 key content from Apple Developer Portal
|
14
|
+
#
|
15
|
+
# @param project_path [String] The path to the Xcode project
|
16
|
+
# @param export_path [String] The path to the export options plist
|
17
|
+
# @param team_id [String] The team ID (optional)
|
18
|
+
# @param options [Hash] Additional options (optional)
|
19
|
+
# @return [void]
|
8
20
|
def make_export_options(project_path = nil, export_path = nil, team_id = nil, options = {})
|
9
21
|
raise "Project path is not set" unless project_path
|
10
22
|
raise "Export path is not set" unless export_path
|
@@ -6,6 +6,15 @@ require_relative "../appstoreconnect"
|
|
6
6
|
|
7
7
|
module Adsedare
|
8
8
|
class << self
|
9
|
+
# Install provisioning profiles for a project
|
10
|
+
# Expects environment variables to be set:
|
11
|
+
#
|
12
|
+
# - APPSTORE_CONNECT_KEY_ID Key ID from Apple Developer Portal
|
13
|
+
# - APPSTORE_CONNECT_ISSUER_ID Issuer ID from Apple Developer Portal
|
14
|
+
# - APPSTORE_CONNECT_KEY P8 key content from Apple Developer Portal
|
15
|
+
#
|
16
|
+
# @param project_path [String] The path to the Xcode project
|
17
|
+
# @return [void]
|
9
18
|
def install_profiles(project_path = nil)
|
10
19
|
raise "Project path is not set" unless project_path
|
11
20
|
|
data/lib/adsedare/keychain.rb
CHANGED
@@ -21,6 +21,17 @@ module Adsedare
|
|
21
21
|
APPLE_WWDRCA = "https://developer.apple.com/certificationauthority/AppleWWDRCA.cer"
|
22
22
|
|
23
23
|
class << self
|
24
|
+
# Create a build keychain with all required intermediate certificates
|
25
|
+
# Set following environment variables to add project specific certificates:
|
26
|
+
#
|
27
|
+
# - AD_HOC_CERTIFICATE Path to the ad-hoc certificate
|
28
|
+
# - AD_HOC_PRIVATE_KEY Path to the ad-hoc private key
|
29
|
+
# - AD_HOC_KEY_PASSWORD Password for the ad-hoc private key
|
30
|
+
#
|
31
|
+
# @param keychain_path [String] The path to the keychain
|
32
|
+
# @param keychain_password [String] The password for the keychain
|
33
|
+
# @param make_default [Boolean] Whether to make the keychain the default
|
34
|
+
# @return [void]
|
24
35
|
def create_keychain(keychain_path = nil, keychain_password = nil, make_default = true)
|
25
36
|
raise "Keychain path is not set" unless keychain_path
|
26
37
|
raise "Keychain password is not set" unless keychain_password
|
data/lib/adsedare/version.rb
CHANGED
data/lib/adsedare/xcodeproj.rb
CHANGED
@@ -5,6 +5,17 @@ require_relative "../appstoreconnect"
|
|
5
5
|
|
6
6
|
module Adsedare
|
7
7
|
class << self
|
8
|
+
# Patch a project with App Store Connect profiles & settings for ad-hoc distribution
|
9
|
+
# Will overwrite Team ID in project if provided
|
10
|
+
# Expects environment variables to be set:
|
11
|
+
#
|
12
|
+
# - APPSTORE_CONNECT_KEY_ID Key ID from Apple Developer Portal
|
13
|
+
# - APPSTORE_CONNECT_ISSUER_ID Issuer ID from Apple Developer Portal
|
14
|
+
# - APPSTORE_CONNECT_KEY P8 key content from Apple Developer Portal
|
15
|
+
#
|
16
|
+
# @param project_path [String] The path to the Xcode project
|
17
|
+
# @param team_id [String] The team ID (optional)
|
18
|
+
# @return [void]
|
8
19
|
def patch_project(project_path, team_id = nil)
|
9
20
|
raise "Project path is not set" unless project_path
|
10
21
|
|
data/lib/adsedare.rb
CHANGED
@@ -23,6 +23,16 @@ module Adsedare
|
|
23
23
|
class << self
|
24
24
|
include Logging
|
25
25
|
|
26
|
+
# Renew profiles for a project
|
27
|
+
# Expects environment variables to be set:
|
28
|
+
#
|
29
|
+
# - APPLE_DEVELOPER_USERNAME Apple Developer Portal username
|
30
|
+
# - APPLE_DEVELOPER_PASSWORD Apple Developer Portal password
|
31
|
+
#
|
32
|
+
# @param project_path [String] The path to the Xcode project
|
33
|
+
# @param certificate_id [String] The certificate ID
|
34
|
+
# @param team_id [String] The team ID (optional)
|
35
|
+
# @return [void]
|
26
36
|
def renew_profiles(project_path = nil, certificate_id = nil, team_id = nil)
|
27
37
|
raise "Project path is not set" unless project_path
|
28
38
|
raise "Certificate ID is not set" unless certificate_id
|
data/lib/starship/auth_helper.rb
CHANGED
@@ -15,7 +15,7 @@ require_relative "../logging"
|
|
15
15
|
module Starship
|
16
16
|
class Error < StandardError; end
|
17
17
|
|
18
|
-
# AuthHelper handles authentication with Apple
|
18
|
+
# AuthHelper handles authentication with Apple's developer portal
|
19
19
|
class AuthHelper
|
20
20
|
include Logging
|
21
21
|
|
data/lib/starship.rb
CHANGED