Skip to content

Commit b965035

Browse files
feat: allow localhost testing (#233)
TestApp allow access to localhost <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Changes are limited to the test app ATS flag, CI validation, and publish log verbosity with no production runtime or auth impact. > > **Overview** > **TestApp** can hit **local backends** during development by enabling **`NSAllowsLocalNetworking`** under App Transport Security in `TestApp/Info.plist`, so HTTP to localhost works with the existing `otlpEndpoint` / `backendUrl` build settings. > > **CI** adds a **`lint-pods`** job on PRs that runs **`pod lib lint`** on `LaunchDarklyObservability.podspec` and `LaunchDarklySessionReplay.podspec` (with `--include-podspecs` for the dependency). **Publish** drops **`--verbose`** from `pod trunk push` for both pods. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 0f8e330. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 653b824 commit b965035

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/actions/publish/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ runs:
1010
- name: Push LaunchDarklyObservability to CocoaPods
1111
if: ${{ inputs.dry_run == 'false' }}
1212
shell: bash
13-
run: pod trunk push LaunchDarklyObservability.podspec --allow-warnings --synchronous --verbose
13+
run: pod trunk push LaunchDarklyObservability.podspec --allow-warnings --synchronous
1414

1515
- name: Push LaunchDarklySessionReplay to CocoaPods
1616
if: ${{ inputs.dry_run == 'false' }}
1717
shell: bash
18-
run: pod trunk push LaunchDarklySessionReplay.podspec --allow-warnings --synchronous --verbose
18+
run: pod trunk push LaunchDarklySessionReplay.podspec --allow-warnings --synchronous

.github/workflows/test-pr.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,22 @@ jobs:
1414
- uses: ./.github/actions/test-swiftpm
1515
with:
1616
ios-sim: 'platform=iOS Simulator,name=iPhone 16,OS=latest'
17+
18+
lint-pods:
19+
name: Validate Podspecs
20+
runs-on: macos-15
21+
steps:
22+
- uses: actions/checkout@v6
23+
24+
# Lint against the local sources (pod lib lint) rather than the remote
25+
# tag (pod spec lint), since a PR's version tag isn't published yet.
26+
- name: Lint LaunchDarklyObservability podspec
27+
run: pod lib lint LaunchDarklyObservability.podspec --allow-warnings
28+
29+
# SessionReplay depends on LaunchDarklyObservability, which isn't
30+
# published at this version, so include the local podspec for resolution.
31+
- name: Lint LaunchDarklySessionReplay podspec
32+
run: |
33+
pod lib lint LaunchDarklySessionReplay.podspec \
34+
--allow-warnings \
35+
--include-podspecs=LaunchDarklyObservability.podspec

TestApp/Info.plist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@
88
<string>$(otlpEndpoint)</string>
99
<key>backendUrl</key>
1010
<string>$(backendUrl)</string>
11+
<key>NSAppTransportSecurity</key>
12+
<dict>
13+
<key>NSAllowsLocalNetworking</key>
14+
<true/>
15+
</dict>
1116
</dict>
1217
</plist>

0 commit comments

Comments
 (0)