Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,29 @@ jobs:
- name: Setup iOS
working-directory: ./Samples/SimpleMixpanel/ios
run: pod install --repo-update
- name: List available simulators
run: xcrun simctl list devices available
- name: Boot iOS Simulator
run: |
# Get list of available iPhone simulators
# Note: jq is pre-installed on macOS GitHub Actions runners
Comment on lines +93 to +96
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] While jq is commonly available on macOS GitHub Actions runners, it's better to explicitly verify or install it to avoid potential failures if the runner configuration changes.

Suggested change
- name: Boot iOS Simulator
run: |
# Get list of available iPhone simulators
# Note: jq is pre-installed on macOS GitHub Actions runners
- name: Ensure jq is installed
run: |
if ! command -v jq >/dev/null 2>&1; then
echo "jq not found, installing with Homebrew..."
brew install jq
else
echo "jq is already installed"
fi
- name: Boot iOS Simulator
run: |
# Get list of available iPhone simulators

Copilot uses AI. Check for mistakes.
SIMULATOR_ID=$(xcrun simctl list devices available -j | jq -r '.devices | to_entries[] | .value[] | select(.name | contains("iPhone")) | .udid' | head -n 1)
if [ -z "$SIMULATOR_ID" ]; then
echo "Error: No iPhone simulator found"
Comment on lines +96 to +99
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The jq command uses complex pipe operations that are hard to read and debug. The comment states 'jq is pre-installed on macOS GitHub Actions runners', but this assumption could break if the runner environment changes. Consider adding a check for jq availability before using it.

Suggested change
# Note: jq is pre-installed on macOS GitHub Actions runners
SIMULATOR_ID=$(xcrun simctl list devices available -j | jq -r '.devices | to_entries[] | .value[] | select(.name | contains("iPhone")) | .udid' | head -n 1)
if [ -z "$SIMULATOR_ID" ]; then
echo "Error: No iPhone simulator found"
# Note: jq is pre-installed on macOS GitHub Actions runners, but check to be sure
command -v jq >/dev/null 2>&1 || { echo >&2 "jq is required but not installed. Aborting."; exit 1; }
SIMULATOR_ID=$(xcrun simctl list devices available -j | jq -r '.devices | to_entries[] | .value[] | select(.name | contains("iPhone")) | .udid' | head -n 1)
if [ -z "$SIMULATOR_ID" ]; then

Copilot uses AI. Check for mistakes.
exit 1
fi
echo "Found simulator: $SIMULATOR_ID"
# Check if simulator is already booted
DEVICE_LIST=$(xcrun simctl list devices)
if echo "$DEVICE_LIST" | grep -q "$SIMULATOR_ID.*Booted"; then
echo "Simulator already booted"
else
echo "Booting simulator..."
xcrun simctl boot "$SIMULATOR_ID"
fi
# Verify simulator is booted
echo "Booted simulators:"
xcrun simctl list devices | grep Booted
- name: Test iOS
working-directory: ./Samples/SimpleMixpanel
run: react-native run-ios
2 changes: 1 addition & 1 deletion MixpanelReactNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }

s.dependency "React-Core"
s.dependency "Mixpanel-swift", '5.1.0'
s.dependency "Mixpanel-swift", '5.1.3'
end
Loading
Loading