Skip to content
Closed
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
6 changes: 6 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,12 @@ jobs:
- name: Run tests on iOS
if: ${{ matrix.platform == 'ios' }}
run: ./dev-packages/e2e-tests/cli.mjs ${{ matrix.platform }} --test

- name: Copy Sentry logs
if: ${{ always() }}
run: |
mkdir -p ./dev-packages/e2e-tests/maestro-logs
cp $(find ~/Library/Developer/CoreSimulator -name "sentry.log" | head -n 1) ./dev-packages/e2e-tests/maestro-logs/ || true

- name: Upload logs
if: ${{ always() }}
Expand Down
14 changes: 14 additions & 0 deletions dev-packages/e2e-tests/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@ if (actions.includes('create')) {
env: env,
});

// Add this new step to modify the Podfile to use specific commit
console.log('Patching Podfile to use specific Sentry commit...');
const podfilePath = `${appDir}/ios/Podfile`;
let podfileContent = fs.readFileSync(podfilePath, 'utf8');

// Add this line at the beginning of the target block
podfileContent = podfileContent.replace(
/target .* do/,
`$&\n pod 'Sentry/HybridSDK', :git => 'https://github.com/getsentry/sentry-cocoa.git', :commit => '97c634a07762db3be14c989e5137b0736a1479cb'`
);

fs.writeFileSync(podfilePath, podfileContent);
console.log('Podfile patched successfully');

if (fs.existsSync(`${appDir}/Gemfile`)) {
execSync(`bundle install`, { stdio: 'inherit', cwd: appDir, env: env });
execSync('bundle exec pod install --repo-update', { stdio: 'inherit', cwd: `${appDir}/ios`, env: env });
Expand Down
2 changes: 2 additions & 0 deletions dev-packages/e2e-tests/patch-scripts/rn.patch.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Sentry.init({
integrations: [
Sentry.mobileReplayIntegration(),
],
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
});
`;
const e2eComponentPatch = '<EndToEndTestsScreen />';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/RNSentry.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Pod::Spec.new do |s|

s.compiler_flags = other_cflags

s.dependency 'Sentry/HybridSDK', '8.51.0'
s.dependency 'Sentry/HybridSDK'

if defined? install_modules_dependencies
# Default React Native dependencies for 0.71 and above (new and legacy architecture)
Expand Down
2 changes: 2 additions & 0 deletions packages/core/RNSentryCocoaTester/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ target 'RNSentryCocoaTesterTests' do
pod 'RNSentry', :path => '../RNSentry.podspec'
pod 'OCMock', '3.9.1'

pod 'Sentry/HybridSDK', :git => 'https://github.com/getsentry/sentry-cocoa.git', :commit => '97c634a07762db3be14c989e5137b0736a1479cb'

post_install do |installer|
set_react_native_path(installer)
end
Expand Down
2 changes: 2 additions & 0 deletions samples/react-native/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ target 'sentryreactnativesample' do
pod 'AppTurboModules', :path => "./../tm"
end

pod 'Sentry/HybridSDK', :git => 'https://github.com/getsentry/sentry-cocoa.git', :commit => '97c634a07762db3be14c989e5137b0736a1479cb'

target 'sentryreactnativesampleTests' do
inherit! :complete
# Pods for testing
Expand Down
Loading