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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ecc75a51b623a2c9319dee4fb2ed9f276ec02789876663375bc73dc3abd7bae
4
- data.tar.gz: 6715ec7cf9f373608e442ba4916a097b1094efee050a05639fe14dfaf1c0dead
3
+ metadata.gz: 5ac823e1a7112068b8ad2a7df14432af30254bf2172f8faeca7e793c4abf5a36
4
+ data.tar.gz: 0251b7ec744b21bc36bc77c04fb92101496cbc3290b012a846cbb0a1ff67cd0e
5
5
  SHA512:
6
- metadata.gz: 1251ab137c4071f94587385a0211273f71e93652d3714f7da8ac20a87df8caf5e55d8003a1b6a419b7ac33f9dccae7e89f1d6e71ae8bde1f7a7512c7dc171229
7
- data.tar.gz: 5cbb5c9c206799a6a7d70923e42494ef4ba9deb8ede37afc4fe5a8a6e8ed94847d7587a76afbc64aa7a4a547aab9a81e49cb04ef91e85c20fe3d1cb940307682
6
+ metadata.gz: 722fb50d3a51c1e0b734aa1ba0e0312e99d6486b6bf5ce6cd182a5e0023392a6557d05592b9b370bb7584e31020c6ff33955ed93f9bb0d2ff0ec74eec9c71fb0
7
+ data.tar.gz: 5404f7537f7536d2e83b58a092df634a77b585a126a1614f79fa6dbcb32759504ae86be8b261c3e81fa53ad9dcad2e04d80cdcd0f98ec05a9d08ce6fe079154d
data/README.md CHANGED
@@ -1,35 +1,87 @@
1
- # Adsedare
1
+ # AdSedare
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
3
+ *(from Latin **"Ad Sedare"** *to calm*)*
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/adsedare`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- ## Installation
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
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
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
- Install the gem and add to the application's Gemfile by executing:
15
+ ## Why the Name?
12
16
 
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
17
+ The name **AdSedare** comes from personal suffering.
14
18
 
15
- If bundler is not being used to manage dependencies, install the gem by executing:
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
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
22
+ ## Docs
18
23
 
19
- ## Usage
24
+ Right now, AdSedare is provided as a **Ruby library**, with plans to add CLI support later this year (™).
20
25
 
21
- TODO: Write usage instructions here
26
+ ### `Adsedare::renew_profiles(project_path = nil, certificate_id = nil, team_id = nil)`
22
27
 
23
- ## Development
28
+ This is the **crown jewel** of the library.
24
29
 
25
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
38
+ ### `patch_project(project_path, team_id = nil)`
28
39
 
29
- ## Contributing
40
+ Need to prep your Xcode project for ad-hoc builds? This does it cleanly:
30
41
 
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/adsedare.
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
- ## License
47
+ - `APPSTORE_CONNECT_KEY_ID`
48
+ - `APPSTORE_CONNECT_ISSUER_ID`
49
+ - `APPSTORE_CONNECT_KEY`
34
50
 
35
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
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
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Adsedare
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
@@ -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
@@ -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"s developer portal
18
+ # AuthHelper handles authentication with Apple's developer portal
19
19
  class AuthHelper
20
20
  include Logging
21
21
 
data/lib/starship.rb CHANGED
@@ -5,6 +5,8 @@ require "json"
5
5
 
6
6
  require_relative "starship/auth_helper"
7
7
 
8
+ # Starship is a wrapper around Apple's developer portal API
9
+ # Inspired by Fatslane's Spaceship
8
10
  module Starship
9
11
  class Client
10
12
  DEV_SERVICES_V1 = "https://developer.apple.com/services-account/v1"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adsedare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - alexstrnik