Skip to content

Commit 672f4ac

Browse files
committed
Improve documentation
1 parent 14de31d commit 672f4ac

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_send_app_size_metrics.rb

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,39 @@ def self.description
5050
end
5151

5252
def self.details
53-
'Send iOS app size metrics to our metrics server'
53+
<<~DETAILS
54+
Send iOS app size metrics to our metrics server.
55+
56+
In order to get xcode generate the `app-thinning.plist` file (during `gym` and the export of the `.xcarchive`), you need to:
57+
(1) Use either of `ad-hoc`, `enterprise` or `development` export method,
58+
(2) Provide `thinning: '<thin-for-all-variants>'` as part of your `export_options` of `gym` (or in your `options.plist` file if you use raw `xcodebuild`)
59+
See https://help.apple.com/xcode/mac/11.0/index.html#/devde46df08a
60+
61+
For builds exported with the `app-store` method, `xcodebuild` won't generate an `app-thinning.plist` file and you will only be able
62+
to get the file size as a metric, but won't get the per-device, broken-down install and download sizes for each thinned variant.
63+
64+
See https://github.com/Automattic/apps-metrics for the API contract expected by the Metrics server you will send those metrics to.
65+
66+
Tip: If you provide a `file://` URL for the `api_base_url`, the action will write the payload on disk at the specified path
67+
instead of sending the data to a endpoint over network. This can be very useful to inspect the data sent and debug without requiring a
68+
DETAILS
5469
end
5570

5671
def self.available_options
5772
[
5873
FastlaneCore::ConfigItem.new(
5974
key: :api_base_url,
6075
env_name: 'FL_IOS_SEND_APP_SIZE_METRICS_API_BASE_URL',
61-
description: 'The endpoint API URL to publish metrics to',
76+
description: 'The endpoint API URL to publish metrics to. (Note: you can also point to a `file://` URL to write the payload to a file instead)',
6277
type: String,
6378
optional: false
6479
),
6580
FastlaneCore::ConfigItem.new(
6681
key: :api_token,
6782
env_name: 'FL_IOS_SEND_APP_SIZE_METRICS_API_TOKEN',
68-
description: 'The bearer token to call to API',
83+
description: 'The bearer token to call the API. Required unless `api_base_url` is a `file://` URL',
6984
type: String,
70-
optional: true # Required unless `api_base_url` is a `file://` URL
85+
optional: true
7186
),
7287
FastlaneCore::ConfigItem.new(
7388
key: :app_name,

0 commit comments

Comments
 (0)