diff --git a/.craft.yml b/.craft.yml index c60d251142d..67788e5eab9 100644 --- a/.craft.yml +++ b/.craft.yml @@ -4,6 +4,10 @@ preReleaseCommand: bash ./scripts/bump.sh targets: - name: github - name: cocoapods + id: sentryprivate-cocoapod + specPath: SentryPrivate.podspec + - name: cocoapods + id: sentry-cocoapod specPath: Sentry.podspec - name: registry sdks: diff --git a/.github/.codecov.yml b/.github/.codecov.yml index c55d289c049..9688a32e49f 100644 --- a/.github/.codecov.yml +++ b/.github/.codecov.yml @@ -1,9 +1,11 @@ codecov: + branch: main + require_ci_to_pass: yes notify: - after_n_builds: 2 # Wait for both iOS and Mac Catalyst to finish + wait_for_ci: yes coverage: - range: "93...100" + range: 85...100 parsers: gcov: @@ -14,11 +16,10 @@ parsers: macro: no ignore: - - "Sources/SentryCrash" - "Tests/SentryTests" comment: layout: "reach,diff,flags,files,footer" behavior: default require_changes: no - after_n_builds: 2 # Wait for both iOS and Mac Catalyst to finish + after_n_builds: 5 # Wait for all jobs uploading reports diff --git a/.github/workflows/benchmarking.yml b/.github/workflows/benchmarking.yml index 79d49d59999..ce0cf6e218b 100644 --- a/.github/workflows/benchmarking.yml +++ b/.github/workflows/benchmarking.yml @@ -5,6 +5,7 @@ on: push: branches: - master + - main pull_request: paths: @@ -37,7 +38,7 @@ jobs: path: | DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app - key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-${{ hashFiles('Sentry/Sources/**') }} + key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-${{ hashFiles('Sources/Sentry/**') }} - name: Cache iOS-Swift UI Test Runner App build product id: ios-swift-benchmark-runner-cache uses: actions/cache@v3 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43b37d2a658..949769039c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - main - release/** pull_request: @@ -97,26 +98,6 @@ jobs: path: | ${{ github.workspace }}/*.zip - # The framework requires Xcode 12 - build-framework: - name: Build & Validate Framework - runs-on: macos-11 - steps: - - uses: actions/checkout@v3 - - run: ./scripts/ci-select-xcode.sh 12.5.1 - - run: make build-framework - shell: sh - - run: make build-framework-sample - shell: sh - - - name: Archiving Framework.zip - uses: actions/upload-artifact@v3 - with: - name: ${{ github.sha }} - if-no-files-found: error - path: | - ${{ github.workspace }}/*.zip - # Use github.event.pull_request.head.sha instead of github.sha when available as # the github.sha is be the pre merge commit id for PRs. # See https://github.community/t/github-sha-isnt-the-value-expected/17903/17906. diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b4cc7f32f91..774d21fc566 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v3 - name: Initialize CodeQL - uses: github/codeql-action/init@4238421316c33d73aeea2801274dd286f157c2bb # pin@v2 + uses: github/codeql-action/init@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # pin@v2 with: languages: ${{ matrix.language }} @@ -35,4 +35,4 @@ jobs: -destination platform="iOS Simulator,OS=latest,name=iPhone 11 Pro" - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4238421316c33d73aeea2801274dd286f157c2bb # pin@v2 + uses: github/codeql-action/analyze@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # pin@v2 diff --git a/.github/workflows/format-code.yml b/.github/workflows/format-code.yml index df27c07186a..c998579e620 100644 --- a/.github/workflows/format-code.yml +++ b/.github/workflows/format-code.yml @@ -13,13 +13,14 @@ jobs: # if necessary format-code: name: Format Code - runs-on: macos-11 + runs-on: macos-12 steps: - uses: actions/checkout@v3 ## Update internal list of formulae to the latest - run: brew update - name: Install Clang-Format run: brew install clang-format + - run: swiftlint --version - name: Format Code run: make format diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7d6ef30fa88..c0401189c54 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - main pull_request: paths: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c724faee5d4..3373e900953 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - main paths: - 'Sources/**' - 'Tests/**' @@ -39,8 +40,8 @@ jobs: - run: ./scripts/ci-select-xcode.sh - run: make analyze - validate-podspec: - name: Validate Podspec + validate-podspec-framework: + name: Validate Podspec as Framework runs-on: macos-12 strategy: matrix: @@ -50,7 +51,35 @@ jobs: - uses: actions/checkout@v3 - run: ./scripts/ci-select-xcode.sh - name: Validate Podspec - run: pod lib lint --verbose --platforms=${{ matrix.platform }} + run: pod lib lint --verbose --platforms=${{ matrix.platform }} Sentry.podspec --include-podspecs=SentryPrivate.podspec + shell: sh + + validate-podspec-static: + name: Validate Podspec as Static library + runs-on: macos-12 + strategy: + matrix: + platform: ['ios', 'macos', 'tvos', 'watchos'] + + steps: + - uses: actions/checkout@v3 + - run: ./scripts/ci-select-xcode.sh + - name: Validate Podspec + run: pod lib lint --verbose --platforms=${{ matrix.platform }} Sentry.podspec --include-podspecs=SentryPrivate.podspec --use-libraries + shell: sh + + validate-SentrySwiftUI-podspec: + name: Validate SentrySwiftUI Podspec + runs-on: macos-12 + strategy: + matrix: + platform: ['ios', 'macos', 'tvos', 'watchos'] + + steps: + - uses: actions/checkout@v3 + - run: ./scripts/ci-select-xcode.sh + - name: Validate Podspec + run: pod lib lint --verbose --platforms=${{ matrix.platform }} SentrySwiftUI.podspec --include-podspecs=Sentry.podspec,SentryPrivate.podspec shell: sh validate-high-risk-files: diff --git a/.github/workflows/profile-data-generator.yml b/.github/workflows/profile-data-generator.yml index d107d6ca99e..dc2e513d458 100644 --- a/.github/workflows/profile-data-generator.yml +++ b/.github/workflows/profile-data-generator.yml @@ -4,6 +4,10 @@ name: Generate Profiling Test Data on: schedule: - cron: '0 */6 * * *' # every 6 hours = 4x/day + pull_request: + paths: + - 'Sources/Sentry/Public/**' + - 'Samples/TrendingMovies/**' jobs: build-profile-data-generator-targets: @@ -30,7 +34,7 @@ jobs: path: | DerivedData/Build/Products/Debug-iphoneos/TrendingMovies.app DerivedData/Build/Products/Debug-iphoneos/TrendingMovies.app.dSYM - key: trendingmovies-app-cache-key-${{ hashFiles('Samples/TrendingMovies/TrendingMovies/**') }}-${{ hashFiles('Sentry/Sources/**') }} + key: trendingmovies-app-cache-key-${{ hashFiles('Samples/TrendingMovies/TrendingMovies/**') }}-${{ hashFiles('Sources/Sentry/**') }} - name: Cache ProfileDataGenerator UI Test Runner App build product id: cache-profiledatagenerator-test-runner-app uses: actions/cache@v3 diff --git a/.github/workflows/saucelabs-UI-tests.yml b/.github/workflows/saucelabs-UI-tests.yml index 55d0ccb7c38..addda139bd1 100644 --- a/.github/workflows/saucelabs-UI-tests.yml +++ b/.github/workflows/saucelabs-UI-tests.yml @@ -7,6 +7,7 @@ on: push: branches: - master + - main pull_request: paths: @@ -25,12 +26,12 @@ jobs: strategy: matrix: include: - - runs-on: macos-11 - xcode: '12.5.1' - - runs-on: macos-12 xcode: '13.4.1' + - runs-on: macos-12 + xcode: '14.1' + steps: - uses: actions/checkout@v3 - run: ./scripts/ci-select-xcode.sh ${{matrix.xcode}} @@ -44,7 +45,7 @@ jobs: path: | DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app - key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-Xcode-${{ matrix.xcode }}-${{ hashFiles('Sentry/Sources/**') }} + key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-Xcode-${{ matrix.xcode }}-${{ hashFiles('Sources/Sentry/**') }} - name: Cache iOS-Swift UI Test Runner App build product id: ios-swift-uitest-runner-cache uses: actions/cache@v3 @@ -102,11 +103,6 @@ jobs: - xcode: '13.4.1' suite: 'iOS-13' - # iOS 12 has a failing test that we need to fix https://github.com/getsentry/sentry-cocoa/issues/1566 - # iOS 11 keeps timing out and we don't know how to fix it. - - xcode: '12.5.1' - suite: 'iOS-10' - steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index fcc7ef0aaaa..b2e56a7dd03 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,7 +7,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@9c1b1c6e115ca2af09755448e0dbba24e5061cc8 + - uses: actions/stale@6f05e4244c9a0b2ed3401882b05d701dd0a7289b with: repo-token: ${{ github.token }} days-before-stale: 21 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e05e3b7e329..191a1834d4b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - main - release/** pull_request: @@ -90,8 +91,8 @@ jobs: # iOS 14 - runs-on: macos-11 platform: 'iOS' - xcode: '12.5.1' - test-destination-os: 'latest' + xcode: '13.2.1' + test-destination-os: '14.5' timeout-minutes: 15 # iOS 15 @@ -111,7 +112,7 @@ jobs: # macOS 11 - runs-on: macos-11 platform: 'macOS' - xcode: '12.5.1' + xcode: '13.2.1' test-destination-os: 'latest' timeout-minutes: 15 @@ -131,6 +132,8 @@ jobs: test-destination-os: 'latest' timeout-minutes: 15 + # MetricKit doesn't exist for tvOS, so we can still run unit tests with + # Xcode 12 for it. # tvOS 14 - runs-on: macos-11 platform: 'tvOS' @@ -172,6 +175,17 @@ jobs: sudo ln -s /Applications/Xcode_11.7.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 13.7.simruntime xcrun simctl create custom-test-device "iPhone 8" "com.apple.CoreSimulator.SimRuntime.iOS-13-7" + # Workaround with a symlink pointed out in: https://github.com/actions/virtual-environments/issues/551#issuecomment-637344435 + - name: Prepare iOS 14.5 simulator + if: ${{ matrix.platform == 'iOS' && matrix.test-destination-os == '14.5'}} + run: | + sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes + sudo ln -s /Applications/Xcode_12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 14.5.simruntime + xcrun simctl create custom-test-device "iPhone 8" "com.apple.CoreSimulator.SimRuntime.iOS-14-5" + + - name: Install Slather + run: gem install slather + - name: Running tests # We call a script with the platform so the destination # passed to xcodebuild doesn't end up in the job name, @@ -198,12 +212,16 @@ jobs: # We can upload all coverage reports, because codecov merges them. # See https://docs.codecov.io/docs/merging-reports # Checkout .codecov.yml to see the config of Codecov + # We don't upload codecov for release branches, as we don't want a failing coverage check to block a release. - name: Push code coverage to codecov - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3 - - # SentrySystemEventsBreadcrumbsTest only run on Catalyst and iOS - # so the coverage report shows a reduced coverage. - if: ${{ contains(matrix.platform, 'Mac Catalyst') || contains(matrix.platform, 'iOS') }} + uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3.1.1 + if: ${{ contains(matrix.platform, 'iOS') && !contains(github.ref, 'release') }} + with: + # Although public repos should not have to specify a token there seems to be a bug with the Codecov GH action, which can + # be solved by specifying the token, see https://github.com/codecov/codecov-action/issues/557#issuecomment-1224970469 + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true + verbose: true # We don't run all unit tests with Thread Sanitizer enabled because # that adds a significant overhead. @@ -278,9 +296,9 @@ jobs: xcode: '13.4.1' device: 'iPhone 8 (15.2)' - - runs-on: macos-11 - xcode: '12.5.1' - device: 'iPhone 8 (14.5)' + - runs-on: macos-12 + xcode: '14.1' + device: 'iPhone 8 (16.1)' steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index 12864443079..3569ca54597 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - main paths: - 'Sources/**' - 'Samples/iOS-Swift/**' @@ -16,7 +17,8 @@ jobs: runs-on: macos-12 steps: - uses: actions/checkout@v3 - - run: ./scripts/ci-select-xcode.sh + # Xcode 14.1 has a bug with fastlane see https://github.com/fastlane/fastlane/issues/20910 + - run: ./scripts/ci-select-xcode.sh 14.0.1 - run: bundle install # We upload a new version to TestFlight on every commit on Master diff --git a/.sauce/config.yml b/.sauce/config.yml index 896f1facd4b..7ac229b3f9d 100644 --- a/.sauce/config.yml +++ b/.sauce/config.yml @@ -42,11 +42,6 @@ suites: devices: - name: "iPhone.*" platformVersion: "11.4.1" - - - name: "iOS-10" - devices: - - name: "iPhone.*" - platformVersion: "10.3.2" artifacts: download: diff --git a/.slather.yml b/.slather.yml new file mode 100644 index 00000000000..322b84775fd --- /dev/null +++ b/.slather.yml @@ -0,0 +1,8 @@ +# .slather.yml + +coverage_service: cobertura_xml +xcodeproj: Sentry.xcodeproj +workspace: Sentry.xcworkspace +scheme: Sentry +source_directory: Sources +output_directory: slather diff --git a/.swiftlint.yml b/.swiftlint.yml index 2f59270d0fc..12b61379d63 100755 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -83,6 +83,7 @@ only_rules: - vertical_whitespace - void_return - weak_delegate + - yoda_condition identifier_name: allowed_symbols: - i diff --git a/Brewfile.lock.json b/Brewfile.lock.json index 3040a4cf859..a8da3e1e4b5 100644 --- a/Brewfile.lock.json +++ b/Brewfile.lock.json @@ -2,50 +2,45 @@ "entries": { "brew": { "clang-format": { - "version": "15.0.4", + "version": "15.0.6", "bottle": { "rebuild": 0, "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "arm64_ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:22ce42d45047a82dbaeb294c988491c8dc41a14db585aba895289b94c98567b5", - "sha256": "22ce42d45047a82dbaeb294c988491c8dc41a14db585aba895289b94c98567b5" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:fbf56abfb24a21c165be6354c24784fda0404eb0009acb24e7764f985cc46396", + "sha256": "fbf56abfb24a21c165be6354c24784fda0404eb0009acb24e7764f985cc46396" }, "arm64_monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:e6687055a4bbb8c45c534c97593da173020a89464131f8e28d9c51635abdf85e", - "sha256": "e6687055a4bbb8c45c534c97593da173020a89464131f8e28d9c51635abdf85e" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:863c6e225f28a486e59d9581a15a138f12a79be7ec0e88bfbb7a13dce69caed2", + "sha256": "863c6e225f28a486e59d9581a15a138f12a79be7ec0e88bfbb7a13dce69caed2" }, "arm64_big_sur": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:635e65e903d7509bc7b66246b33e80c2c6fa7970ae5ae976b8115346298684af", - "sha256": "635e65e903d7509bc7b66246b33e80c2c6fa7970ae5ae976b8115346298684af" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:9dff09df90416010de10c0f2d5827d7088f752747b79c4b1dc2fdbfc8ec82bf2", + "sha256": "9dff09df90416010de10c0f2d5827d7088f752747b79c4b1dc2fdbfc8ec82bf2" }, "ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:313506ad3a59bdea702b964c76784cb280041960faff6f4ef30327a28e79107b", - "sha256": "313506ad3a59bdea702b964c76784cb280041960faff6f4ef30327a28e79107b" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:eaa6987f545e773b2af7030555198e441ce18ff1fc0be8728757cb167e271a4b", + "sha256": "eaa6987f545e773b2af7030555198e441ce18ff1fc0be8728757cb167e271a4b" }, "monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:840020306f475284733e073f7d3d1f4c2f2e14b8e1a89d79bfa2df8d4dee2c53", - "sha256": "840020306f475284733e073f7d3d1f4c2f2e14b8e1a89d79bfa2df8d4dee2c53" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:f2057cfecd05af214a620f359634001fe78fb25b21ec2c19885cd57e38af9e6f", + "sha256": "f2057cfecd05af214a620f359634001fe78fb25b21ec2c19885cd57e38af9e6f" }, "big_sur": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:9743f1cb8befbaacba5b60e22762fab2db9337fcbddb66ee9fae69ccb54174ab", - "sha256": "9743f1cb8befbaacba5b60e22762fab2db9337fcbddb66ee9fae69ccb54174ab" - }, - "catalina": { - "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:44458ac88b30b5fddfa0a9679339a6fdca3ad0cd9591f655387d7d12f85ce383", - "sha256": "44458ac88b30b5fddfa0a9679339a6fdca3ad0cd9591f655387d7d12f85ce383" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:047d4e2321824b31d4ec0208a85e114e579255c210f62e0415f618f1fbbe3362", + "sha256": "047d4e2321824b31d4ec0208a85e114e579255c210f62e0415f618f1fbbe3362" }, "x86_64_linux": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:ba30cee4820b592e8ff594fe0174246286ed062c709e058c713d882a073ac388", - "sha256": "ba30cee4820b592e8ff594fe0174246286ed062c709e058c713d882a073ac388" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:6a0d2f67c64a65e9411420b052c6f3cc234879ff62c8306c3090c19298abb4cc", + "sha256": "6a0d2f67c64a65e9411420b052c6f3cc234879ff62c8306c3090c19298abb4cc" } } } @@ -65,35 +60,35 @@ } }, "swiftlint": { - "version": "0.49.1", + "version": "0.50.1", "bottle": { "rebuild": 0, "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "arm64_ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:de4f931704cfdbd7300a74d8f0ef807394f3366ed1d3d59eabb87edcefa926af", - "sha256": "de4f931704cfdbd7300a74d8f0ef807394f3366ed1d3d59eabb87edcefa926af" + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:7d447fe250b531775462560ed2179b284addb279f7dd0b6d2533da12b3c9b42f", + "sha256": "7d447fe250b531775462560ed2179b284addb279f7dd0b6d2533da12b3c9b42f" }, "arm64_monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:d983879e2d9ea075bf80e223da5adb258f01d9fab4fc6f71f83c4add80490290", - "sha256": "d983879e2d9ea075bf80e223da5adb258f01d9fab4fc6f71f83c4add80490290" + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:77a486aa11b6a3cfea372752d945ff5a7f20a953261449199bdb0b0ed62da336", + "sha256": "77a486aa11b6a3cfea372752d945ff5a7f20a953261449199bdb0b0ed62da336" }, "ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:509e34c1cfdfda9dace98481bc42cc57575c78ffe7711d381b851c330ee4d8b8", - "sha256": "509e34c1cfdfda9dace98481bc42cc57575c78ffe7711d381b851c330ee4d8b8" + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:d2c6d79212a79f3b1acee88ab44018eccf20e9fce12c69c31c782536f92493d6", + "sha256": "d2c6d79212a79f3b1acee88ab44018eccf20e9fce12c69c31c782536f92493d6" }, "monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:73a9664d8a62c7b5d506a70bf100e0289795df04ece6df12f0b77651e497d42b", - "sha256": "73a9664d8a62c7b5d506a70bf100e0289795df04ece6df12f0b77651e497d42b" + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:af0964ac41d78b6dd2eb3affba7b1a01cdb43649196fe0bf139d72589195e110", + "sha256": "af0964ac41d78b6dd2eb3affba7b1a01cdb43649196fe0bf139d72589195e110" }, "x86_64_linux": { "cellar": "/home/linuxbrew/.linuxbrew/Cellar", - "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:705904346a73422be8f053d7b1c413e5d18623bd7244cb33d188d921a072e600", - "sha256": "705904346a73422be8f053d7b1c413e5d18623bd7244cb33d188d921a072e600" + "url": "https://ghcr.io/v2/homebrew/core/swiftlint/blobs/sha256:13328073f6c8f572ab9c5e5e1fe170b54ff43ac7038b13d602e361619cbea474", + "sha256": "13328073f6c8f572ab9c5e5e1fe170b54ff43ac7038b13d602e361619cbea474" } } } @@ -202,50 +197,50 @@ } }, "pre-commit": { - "version": "2.20.0", + "version": "2.20.0_1", "bottle": { - "rebuild": 2, + "rebuild": 0, "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "arm64_ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:5270c8f90c5343d8b0e5eeccfd01d1058957f05c5da7fd2c0d4e4af1fab1ed9f", - "sha256": "5270c8f90c5343d8b0e5eeccfd01d1058957f05c5da7fd2c0d4e4af1fab1ed9f" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:bc4ab3b751e5a0aafab0d8943ea66309034aed85392e8d09d252e0f14e17f08e", + "sha256": "bc4ab3b751e5a0aafab0d8943ea66309034aed85392e8d09d252e0f14e17f08e" }, "arm64_monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:70cb628421bae2e6136cbc076dd620b2e3a1229ce93e47ad5592fe7739e3420b", - "sha256": "70cb628421bae2e6136cbc076dd620b2e3a1229ce93e47ad5592fe7739e3420b" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:1cf2fbb0c8ffe108e30a425fc95eb2942fc07f5af69dc9cc023c2ef85cf56591", + "sha256": "1cf2fbb0c8ffe108e30a425fc95eb2942fc07f5af69dc9cc023c2ef85cf56591" }, "arm64_big_sur": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:667e0b88c513b4ebc18265f3885c2fe5da0f0126f759cdf4cecaf52b5b1123b8", - "sha256": "667e0b88c513b4ebc18265f3885c2fe5da0f0126f759cdf4cecaf52b5b1123b8" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:7503a587bdf501da0dcef03fa9a56839d35f6f8750eb420397ed334bb9728fe3", + "sha256": "7503a587bdf501da0dcef03fa9a56839d35f6f8750eb420397ed334bb9728fe3" }, "ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:b091378b66c94fbdf5b901c4b1a8894501e7a109722b9994de794e41136f3c5d", - "sha256": "b091378b66c94fbdf5b901c4b1a8894501e7a109722b9994de794e41136f3c5d" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:f5082e39ff0265fdaf0d6b34e5711f447b5442df8d39db831cce7b28718ea30b", + "sha256": "f5082e39ff0265fdaf0d6b34e5711f447b5442df8d39db831cce7b28718ea30b" }, "monterey": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:aff7fa28a2dacf9fbee3688cdea29c3fcf389044f791cc6284919b4f69172a5a", - "sha256": "aff7fa28a2dacf9fbee3688cdea29c3fcf389044f791cc6284919b4f69172a5a" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:a2c37345ccf7aaf9bc5f46559f3f1fff0651f2af4370e5f8c20ed1dc20513580", + "sha256": "a2c37345ccf7aaf9bc5f46559f3f1fff0651f2af4370e5f8c20ed1dc20513580" }, "big_sur": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:53f5ba9dca685812cf1de4a2760313fe134a5f7e5bd1eff1439e82c16129a94f", - "sha256": "53f5ba9dca685812cf1de4a2760313fe134a5f7e5bd1eff1439e82c16129a94f" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:72c36305b1d3fb44c59e11c3b937339c4e9759cdbe6671e134fd3f58b25131e6", + "sha256": "72c36305b1d3fb44c59e11c3b937339c4e9759cdbe6671e134fd3f58b25131e6" }, "catalina": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:0d801a89ff2c787a8c8980ff53833dc8255c885fbd1cbdf4934c27d5cd49f407", - "sha256": "0d801a89ff2c787a8c8980ff53833dc8255c885fbd1cbdf4934c27d5cd49f407" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:bb51f828d685794021556971cd2269c141fdb2f696f26e475f22104527673a3e", + "sha256": "bb51f828d685794021556971cd2269c141fdb2f696f26e475f22104527673a3e" }, "x86_64_linux": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:b08cce9e555890e9d84d0bd987ce9e9a3b87da1297c8bb6a728c17d3f59ed2c3", - "sha256": "b08cce9e555890e9d84d0bd987ce9e9a3b87da1297c8bb6a728c17d3f59ed2c3" + "url": "https://ghcr.io/v2/homebrew/core/pre-commit/blobs/sha256:9ce40596bbb828e137dcf918ba0954a3095f99b922c053cc4e9c13bb55a5b283", + "sha256": "9ce40596bbb828e137dcf918ba0954a3095f99b922c053cc4e9c13bb55a5b283" } } } @@ -305,6 +300,14 @@ "CLT": "14.0.0.0.1.1661618636", "Xcode": "14.1", "macOS": "12.6" + }, + "ventura": { + "HOMEBREW_VERSION": "3.6.14", + "HOMEBREW_PREFIX": "/opt/homebrew", + "Homebrew/homebrew-core": "456895e7fb9656a4fdc13f2b6035f208e071cbb8", + "CLT": "14.1.0.0.1.1666437224", + "Xcode": "14.1", + "macOS": "13.0.1" } } } diff --git a/CHANGELOG.md b/CHANGELOG.md index cb6e0413650..3dc2e414c0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,265 @@ # Changelog +## 8.0.0 + +This version adds a dependency on Swift. We renamed the default branch from `master` to `main`. We are going to keep the `master` branch for backwards compatibility for package managers not pointing to the `master` branch. + +### Features + +- Properly demangle Swift class name (#2162) +- Change view hierarchy attachment format to JSON (#2491) +- SwiftUI performance tracking (#2271) +- Enable [File I/O Tracking](https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#file-io-tracking) by default (#2497) +- Enable [AppHang Tracking](https://docs.sentry.io/platforms/apple/configuration/app-hangs/) by default (#2600) +- Enable [Core Data Tracing](https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#core-data-tracking) by default (#2598) +- [User Interaction Tracing](https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#user-interaction-tracing) is stable and enabled by default(#2503) +- Add synthetic for mechanism (#2501) +- Enable CaptureFailedRequests by default (#2507) +- Support the [`SENTRY_DSN` environment variable](https://docs.sentry.io/platforms/apple/guides/macos/configuration/options/#dsn) on macOS (#2534) +- Experimental MetricKit integration (#2519) for + - [MXHangDiagnostic](https://developer.apple.com/documentation/metrickit/mxhangdiagnostic) + - [MXDiskWriteExceptionDiagnostic](https://developer.apple.com/documentation/metrickit/mxdiskwriteexceptiondiagnostic) + - [MXCPUExceptionDiagnostic](https://developer.apple.com/documentation/metrickit/mxcpuexceptiondiagnostic) + +### Fixes + +- Errors shortly after `SentrySDK.init` now affect the session (#2430) +- Use the same default environment for events and sessions (#2447) +- Increase `SentryCrashMAX_STRINGBUFFERSIZE` to reduce the instances where we're dropping a crash due to size limit (#2465) +- `SentryAppStateManager` correctly unsubscribes from `NSNotificationCenter` when closing the SDK (#2460) +- The SDK no longer reports an OOM when a crash happens after closing the SDK (#2468) +- Don't capture zero size screenshots ([#2459](https://github.com/getsentry/sentry-cocoa/pull/2459)) +- Use the preexisting app release version format for profiles (#2470) +- Don't add out of date context for crashes (#2523) +- Fix ARC issue for FileManager (#2525) +- Remove delay for deleting old envelopes (#2541) +- Fix strong reference cycle for HttpTransport (#2552) +- Deleting old envelopes for empty DSN (#2562) + +### Breaking Changes + +- Rename `- [SentrySDK startWithOptionsObject:]` to `- [SentrySDK startWithOptions:]` (#2404) +- Make `SpanProtocol.data` non nullable (#2409) +- Mark `- [SpanProtocol setExtraValue:forKey:]` as deprecated (#2413) +- Make SpanContext immutable (#2408) + - Remove tags from SpanContext + - Remove context property from SentrySpan +- Bump minimum supported OS versions to macOS 10.13, iOS 11, tvOS 11, and watchOS 4 (#2414) +- Make public APIs Swift friendly + - Rename `SentrySDK.addBreadcrumb(crumb:)` to `SentrySDK.addBreadcrumb(_ crumb:)` (#2416) + - Rename `SentryScope.add(_ crumb:)` to `SentryScope.addBreadcrumb(_ crumb:)` (#2416) + - Rename `SentryScope.add(_ attachment:)` to `SentryScope.addAttachment(_ attachment:)` (#2416) + - Rename `Client` to `SentryClient` (#2403) +- Remove public APIs + - Remove `SentryScope.apply(to:)` (#2416) + - Remove `SentryScope.apply(to:maxBreadcrumb:)` (#2416) + - Remove `- [SentryOptions initWithDict:didFailWithError:]` (#2404) + - Remove `- [SentryOptions sdkInfo]` (#2404) + - Make SentrySession and SentrySDKInfo internal (#2451) +- Marks App hang's event stacktrace snapshot as true (#2441) +- Enable user interaction tracing by default (#2442) +- Remove default attachment content type (#2443) +- Rename APM tracking feature flags to tracing (#2450) + - Rename `SentryOptions.enableAutoPerformanceTracking` to `enableAutoPerformanceTracing` + - Rename `SentryOptions.enableUIViewControllerTracking` to `enableUIViewControllerTracing` + - Rename `SentryOptions.enablePreWarmedAppStartTracking` to `enablePreWarmedAppStartTracing` + - Rename `SentryOptions.enableFileIOTracking` to `enableFileIOTracing` + - Rename `SentryOptions.enableCoreDataTracking` to `enableCoreDataTracing` +- SentrySDK.close calls flush, which is a blocking call (#2453) +- Bump minimum Xcode version to 13 (#2483) +- Rename `SentryOptions.enableOutOfMemoryTracking` to `SentryOptions.enableWatchdogTerminationTracking` (#2499) +- Remove the automatic `viewAppearing` span for UIViewController APM (#2511) +- Remove the permission context for events (#2529) +- Remove captureEnvelope from Hub and Client (#2580) +- Remove confusing transaction tag (#2574) + +## 8.0.0-rc.1 + +This version adds a dependency on Swift. + +### Features + +- Properly demangle Swift class name (#2162) +- Change view hierarchy attachment format to JSON (#2491) +- SwiftUI performance tracking (#2271) +- Enable [File I/O Tracking](https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#file-io-tracking) by default (#2497) +- [User Interaction Tracing](https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#user-interaction-tracing) is stable and enabled by default(#2503) +- Add synthetic for mechanism (#2501) +- Enable CaptureFailedRequests by default (#2507) +- Support the [`SENTRY_DSN` environment variable](https://docs.sentry.io/platforms/apple/guides/macos/configuration/options/#dsn) on macOS (#2534) +- Experimental MetricKit integration (#2519) for + - [MXHangDiagnostic](https://developer.apple.com/documentation/metrickit/mxhangdiagnostic) + - [MXDiskWriteExceptionDiagnostic](https://developer.apple.com/documentation/metrickit/mxdiskwriteexceptiondiagnostic) + - [MXCPUExceptionDiagnostic](https://developer.apple.com/documentation/metrickit/mxcpuexceptiondiagnostic) + +### Fixes + +- Errors shortly after `SentrySDK.init` now affect the session (#2430) +- Use the same default environment for events and sessions (#2447) +- Increase `SentryCrashMAX_STRINGBUFFERSIZE` to reduce the instances where we're dropping a crash due to size limit (#2465) +- `SentryAppStateManager` correctly unsubscribes from `NSNotificationCenter` when closing the SDK (#2460) +- The SDK no longer reports an OOM when a crash happens after closing the SDK (#2468) +- Don't capture zero size screenshots ([#2459](https://github.com/getsentry/sentry-cocoa/pull/2459)) +- Use the preexisting app release version format for profiles (#2470) +- Don't add out of date context for crashes (#2523) +- Fix ARC issue for FileManager (#2525) +- Remove delay for deleting old envelopes (#2541) +- Fix strong reference cycle for HttpTransport (#2552) +- Deleting old envelopes for empty DSN (#2562) + +### Breaking Changes + +- Rename `- [SentrySDK startWithOptionsObject:]` to `- [SentrySDK startWithOptions:]` (#2404) +- Make `SpanProtocol.data` non nullable (#2409) +- Mark `- [SpanProtocol setExtraValue:forKey:]` as deprecated (#2413) +- Make SpanContext immutable (#2408) + - Remove tags from SpanContext + - Remove context property from SentrySpan +- Bump minimum supported OS versions to macOS 10.13, iOS 11, tvOS 11, and watchOS 4 (#2414) +- Make public APIs Swift friendly + - Rename `SentrySDK.addBreadcrumb(crumb:)` to `SentrySDK.addBreadcrumb(_ crumb:)` (#2416) + - Rename `SentryScope.add(_ crumb:)` to `SentryScope.addBreadcrumb(_ crumb:)` (#2416) + - Rename `SentryScope.add(_ attachment:)` to `SentryScope.addAttachment(_ attachment:)` (#2416) + - Rename `Client` to `SentryClient` (#2403) +- Remove public APIs + - Remove `SentryScope.apply(to:)` (#2416) + - Remove `SentryScope.apply(to:maxBreadcrumb:)` (#2416) + - Remove `- [SentryOptions initWithDict:didFailWithError:]` (#2404) + - Remove `- [SentryOptions sdkInfo]` (#2404) + - Make SentrySession and SentrySDKInfo internal (#2451) +- Marks App hang's event stacktrace snapshot as true (#2441) +- Enable user interaction tracing by default (#2442) +- Remove default attachment content type (#2443) +- Rename APM tracking feature flags to tracing (#2450) + - Rename `SentryOptions.enableAutoPerformanceTracking` to `enableAutoPerformanceTracing` + - Rename `SentryOptions.enableUIViewControllerTracking` to `enableUIViewControllerTracing` + - Rename `SentryOptions.enablePreWarmedAppStartTracking` to `enablePreWarmedAppStartTracing` + - Rename `SentryOptions.enableFileIOTracking` to `enableFileIOTracing` + - Rename `SentryOptions.enableCoreDataTracking` to `enableCoreDataTracing` +- SentrySDK.close calls flush, which is a blocking call (#2453) +- Bump minimum Xcode version to 13 (#2483) +- Rename `SentryOptions.enableOutOfMemoryTracking` to `SentryOptions.enableWatchdogTerminationTracking` (#2499) +- Remove the automatic `viewAppearing` span for UIViewController APM (#2511) +- Remove the permission context for events (#2529) +- Remove captureEnvelope from Hub and Client (#2580) +- Remove confusing transaction tag (#2574) + +## 8.0.0-beta.6 + +This version adds a dependency on Swift. + +### Features + +- Properly demangle Swift class name (#2162) +- Change view hierarchy attachment format to JSON (#2491) +- SwiftUI performance tracking (#2271) +- Enable [File I/O Tracking](https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#file-io-tracking) by default (#2497) +- [User Interaction Tracing](https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#user-interaction-tracing) is stable and enabled by default(#2503) +- Add synthetic for mechanism (#2501) +- Enable CaptureFailedRequests by default (#2507) +- Support the [`SENTRY_DSN` environment variable](https://docs.sentry.io/platforms/apple/guides/macos/configuration/options/#dsn) on macOS (#2534) + +### Fixes + +- Errors shortly after `SentrySDK.init` now affect the session (#2430) +- Use the same default environment for events and sessions (#2447) +- Increase `SentryCrashMAX_STRINGBUFFERSIZE` to reduce the instances where we're dropping a crash due to size limit (#2465) +- `SentryAppStateManager` correctly unsubscribes from `NSNotificationCenter` when closing the SDK (#2460) +- The SDK no longer reports an OOM when a crash happens after closing the SDK (#2468) +- Don't capture zero size screenshots ([#2459](https://github.com/getsentry/sentry-cocoa/pull/2459)) +- Use the preexisting app release version format for profiles (#2470) +- Don't add out of date context for crashes (#2523) +- Fix ARC issue for FileManager (#2525) +- Remove delay for deleting old envelopes (#2541) +- Fix strong reference cycle for HttpTransport (#2552) +- Deleting old envelopes for empty DSN (#2562) + +### Breaking Changes + +- Rename `- [SentrySDK startWithOptionsObject:]` to `- [SentrySDK startWithOptions:]` (#2404) +- Make `SpanProtocol.data` non nullable (#2409) +- Mark `- [SpanProtocol setExtraValue:forKey:]` as deprecated (#2413) +- Make SpanContext immutable (#2408) + - Remove tags from SpanContext + - Remove context property from SentrySpan +- Bump minimum supported OS versions to macOS 10.13, iOS 11, tvOS 11, and watchOS 4 (#2414) +- Make public APIs Swift friendly + - Rename `SentrySDK.addBreadcrumb(crumb:)` to `SentrySDK.addBreadcrumb(_ crumb:)` (#2416) + - Rename `SentryScope.add(_ crumb:)` to `SentryScope.addBreadcrumb(_ crumb:)` (#2416) + - Rename `SentryScope.add(_ attachment:)` to `SentryScope.addAttachment(_ attachment:)` (#2416) + - Rename `Client` to `SentryClient` (#2403) +- Remove public APIs + - Remove `SentryScope.apply(to:)` (#2416) + - Remove `SentryScope.apply(to:maxBreadcrumb:)` (#2416) + - Remove `- [SentryOptions initWithDict:didFailWithError:]` (#2404) + - Remove `- [SentryOptions sdkInfo]` (#2404) + - Make SentrySession and SentrySDKInfo internal (#2451) +- Marks App hang's event stacktrace snapshot as true (#2441) +- Enable user interaction tracing by default (#2442) +- Remove default attachment content type (#2443) +- Rename APM tracking feature flags to tracing (#2450) + - Rename `SentryOptions.enableAutoPerformanceTracking` to `enableAutoPerformanceTracing` + - Rename `SentryOptions.enableUIViewControllerTracking` to `enableUIViewControllerTracing` + - Rename `SentryOptions.enablePreWarmedAppStartTracking` to `enablePreWarmedAppStartTracing` + - Rename `SentryOptions.enableFileIOTracking` to `enableFileIOTracing` + - Rename `SentryOptions.enableCoreDataTracking` to `enableCoreDataTracing` +- SentrySDK.close calls flush, which is a blocking call (#2453) +- Bump minimum Xcode version to 13 (#2483) +- Rename `SentryOptions.enableOutOfMemoryTracking` to `SentryOptions.enableWatchdogTerminationTracking` (#2499) +- Remove the automatic `viewAppearing` span for UIViewController APM (#2511) +- Remove the permission context for events (#2529) +- Remove confusing transaction tag (#2574) + +## 8.0.0-beta.4 + +This version adds a dependency on Swift. + +### Features + +- Properly demangle Swift class name (#2162) + +### Fixes + +- Errors shortly after `SentrySDK.init` now affect the session (#2430) +- Use the same default environment for events and sessions (#2447) +- Increase `SentryCrashMAX_STRINGBUFFERSIZE` to reduce the instances where we're dropping a crash due to size limit (#2465) +- `SentryAppStateManager` correctly unsubscribes from `NSNotificationCenter` when closing the SDK (#2460) +- The SDK no longer reports an OOM when a crash happens after closing the SDK (#2468) +- Don't capture zero size screenshots ([#2459](https://github.com/getsentry/sentry-cocoa/pull/2459)) +- Use the preexisting app release version format for profiles (#2470) +- Remove `SentrySystemEventBreadcrumbs` observers with the most specific detail possible (#2489) + +### Breaking Changes + +- Rename `- [SentrySDK startWithOptionsObject:]` to `- [SentrySDK startWithOptions:]` (#2404) +- Make `SpanProtocol.data` non nullable (#2409) +- Mark `- [SpanProtocol setExtraValue:forKey:]` as deprecated (#2413) +- Make SpanContext immutable (#2408) + - Remove tags from SpanContext + - Remove context property from SentrySpan +- Bump minimum supported OS versions to macOS 10.13, iOS 11, tvOS 11, and watchOS 4 (#2414) +- Make public APIs Swift friendly + - Rename `SentrySDK.addBreadcrumb(crumb:)` to `SentrySDK.addBreadcrumb(_ crumb:)` (#2416) + - Rename `SentryScope.add(_ crumb:)` to `SentryScope.addBreadcrumb(_ crumb:)` (#2416) + - Rename `SentryScope.add(_ attachment:)` to `SentryScope.addAttachment(_ attachment:)` (#2416) + - Rename `Client` to `SentryClient` (#2403) +- Remove public APIs + - Remove `SentryScope.apply(to:)` (#2416) + - Remove `SentryScope.apply(to:maxBreadcrumb:)` (#2416) + - Remove `- [SentryOptions initWithDict:didFailWithError:]` (#2404) + - Remove `- [SentryOptions sdkInfo]` (#2404) + - Make SentrySession and SentrySDKInfo internal (#2451) +- Marks App hang's event stacktrace snapshot as true (#2441) +- Enable user interaction tracing by default (#2442) +- Remove default attachment content type (#2443) +- Rename APM tracking feature flags to tracing (#2450) + - Rename `SentryOptions.enableAutoPerformanceTracking` to `enableAutoPerformanceTracing` + - Rename `SentryOptions.enableUIViewControllerTracking` to `enableUIViewControllerTracing` + - Rename `SentryOptions.enablePreWarmedAppStartTracking` to `enablePreWarmedAppStartTracing` + - Rename `SentryOptions.enableFileIOTracking` to `enableFileIOTracing` + - Rename `SentryOptions.enableCoreDataTracking` to `enableCoreDataTracing` +- SentrySDK.close calls flush, which is a blocking call (#2453) +- Bump minimum Xcode version to 13 (#2483) ## 7.31.5 ### Fixes diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f002d239ccf..c62fe1cab57 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -95,6 +95,16 @@ To make a header public follow these steps: * Add it to the Umbrella Header [Sentry.h](/Sources/Sentry/Public/Sentry.h). * Set the target membership to public. +## Configuring certificates and provisioning profiles locally + +You can run samples in a real device without changing certificates and provisioning profiles if you are a Sentry employee with access to Sentry profiles repository and 1Password account. + +* Configure your environment to use SSH to access GitHub. Follow [this instructions](https://docs.github.com/en/authentication/connecting-to-github-with-ssh). +* You will need `Cocoa codesigning match encryption password` from your Sentry 1Password account. +* run `fastlane match_local` + +This will setup certificates and provisioning profiles into your machine, but in order to be able to run a sample in a real device you need to register that device with Sentry AppConnect account, add the device to the provisioning profile you want to use, download the profile again and open it with Xcode. + ## Final Notes When contributing to the codebase, please make note of the following: diff --git a/Gemfile b/Gemfile index 5cce8ee3bad..0767766c40a 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,6 @@ gem "cocoapods", ">= 1.9.1" gem "fastlane" gem "rest-client" gem "xcpretty" +gem "slather" eval_gemfile("fastlane/Pluginfile") diff --git a/Gemfile.lock b/Gemfile.lock index 16f9357a92d..591b0d62997 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -34,6 +34,7 @@ GEM aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.1.0) + clamp (1.3.2) cocoapods (1.11.3) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) @@ -215,6 +216,7 @@ GEM mime-types-data (3.2022.0105) mini_magick (4.11.0) mini_mime (1.1.2) + mini_portile2 (2.8.0) minitest (5.16.3) molinillo (0.8.0) multi_json (1.15.0) @@ -223,10 +225,14 @@ GEM nap (1.1.0) naturally (2.2.1) netrc (0.11.0) + nokogiri (1.13.10) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) optparse (0.1.1) os (1.1.4) plist (3.6.0) public_suffix (4.0.7) + racc (1.6.1) rake (13.0.6) representable (3.2.0) declarative (< 0.1.0) @@ -252,6 +258,12 @@ GEM simctl (1.6.8) CFPropertyList naturally + slather (2.7.3) + CFPropertyList (>= 2.2, < 4) + activesupport + clamp (~> 1.3) + nokogiri (>= 1.13.9) + xcodeproj (~> 1.21) terminal-notifier (2.0.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) @@ -293,7 +305,8 @@ DEPENDENCIES fastlane fastlane-plugin-sentry rest-client + slather xcpretty BUNDLED WITH - 2.3.23 + 2.3.21 diff --git a/Makefile b/Makefile index b42715b09fb..ea43494c8f4 100644 --- a/Makefile +++ b/Makefile @@ -34,9 +34,13 @@ format-clang: format-swift: swiftlint --fix + +## Current git reference name +GIT-REF := $(shell git rev-parse --abbrev-ref HEAD) + test: @echo "--> Running all tests" - xcodebuild -workspace Sentry.xcworkspace -scheme Sentry -configuration Test GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES -destination "platform=macOS" test | rbenv exec bundle exec xcpretty -t + ./scripts/xcode-test.sh iOS latest $(GIT-REF) YES .PHONY: test run-test-server: @@ -62,17 +66,6 @@ build-xcframework-sample: cd Samples/Carthage-Validation/XCFramework/ && carthage update --use-xcframeworks xcodebuild -project "Samples/Carthage-Validation/XCFramework/XCFramework.xcodeproj" -configuration Release CODE_SIGNING_ALLOWED="NO" build -# Building the .frameworsk.zip only works with Xcode 12, as there is no workaround yet for Xcode 13. -build-framework: - @echo "--> Carthage: creating Sentry framework" - ./scripts/carthage-xcode12-workaround.sh build --no-skip-current - ./scripts/carthage-xcode12-workaround.sh archive Sentry --output Sentry.framework.zip - -build-framework-sample: - ./scripts/create-carthage-json.sh - cd Samples/Carthage-Validation/Framework/ && carthage update - xcodebuild -project "Samples/Carthage-Validation/Framework/Framework.xcodeproj" -configuration Release CODE_SIGNING_ALLOWED="NO" build - ## Build Sentry as a XCFramework that can be used with watchOS and save it to ## the watchOS sample. watchOSLibPath = ./Samples/watchOS-Swift/libs @@ -107,4 +100,6 @@ git-commit-add: git push --tags release-pod: + pod trunk push SentryPrivate.podspec pod trunk push Sentry.podspec + pod trunk push SentrySwiftUI.podspec diff --git a/Package.swift b/Package.swift index 1fde2484238..a98125dadba 100644 --- a/Package.swift +++ b/Package.swift @@ -3,14 +3,16 @@ import PackageDescription let package = Package( name: "Sentry", - platforms: [.iOS(.v9), .macOS(.v10_10), .tvOS(.v9), .watchOS(.v2)], + platforms: [.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4)], products: [ .library(name: "Sentry", targets: ["Sentry"]), - .library(name: "Sentry-Dynamic", type: .dynamic, targets: ["Sentry"]) + .library(name: "Sentry-Dynamic", type: .dynamic, targets: ["Sentry"]), + .library(name: "SentrySwiftUI", targets: ["SentrySwiftUI"]) ], targets: [ .target( name: "Sentry", + dependencies: ["SentryPrivate"], path: "Sources", sources: [ "Sentry/", @@ -20,6 +22,7 @@ let package = Package( cxxSettings: [ .define("GCC_ENABLE_CPP_EXCEPTIONS", to: "YES"), .headerSearchPath("Sentry/include"), + .headerSearchPath("Sentry/include/HybridPublic"), .headerSearchPath("Sentry/Public"), .headerSearchPath("SentryCrash/Installations"), .headerSearchPath("SentryCrash/Recording"), @@ -33,7 +36,29 @@ let package = Package( .linkedLibrary("z"), .linkedLibrary("c++") ] - ) + ), + .target( name: "SentryPrivate", + path: "Sources", + sources: [ + "Swift" + ] + ), + .target ( name: "SentrySwiftUI", + dependencies: ["Sentry", "SentryInternal"], + path: "Sources", + exclude: ["SentrySwiftUI/SentryInternal/"], + sources: [ + "SentrySwiftUI" + ] + ), + //SentryInternal is how we expose some internal Sentry SDK classes to SentrySwiftUI. + .target( name: "SentryInternal", + path: "Sources", + sources: [ + "SentrySwiftUI/SentryInternal/" + ], + publicHeadersPath: "SentrySwiftUI/SentryInternal/" + ) ], cxxLanguageStandard: .cxx14 ) diff --git a/README.md b/README.md index b78988765a3..b6c6b19ae81 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ _Bad software is everywhere, and we're tired of it. Sentry is on a mission to he This SDK is written in Objective-C but also provides a nice Swift interface. +**Where is the master branch?** + +We renamed the default branch from `master` to `main`. We are going to keep the `master` branch for backwards compatibility for package managers not pointing to the [`master` branch](https://github.com/getsentry/sentry-cocoa/tree/master). + # Initialization *Remember to call this as early in your application life cycle as possible* diff --git a/Samples/Carthage-Validation/Framework/Cartfile b/Samples/Carthage-Validation/Framework/Cartfile deleted file mode 100644 index b05656691a6..00000000000 --- a/Samples/Carthage-Validation/Framework/Cartfile +++ /dev/null @@ -1 +0,0 @@ -binary "../Sentry.Carthage.json" ~> 1.0 diff --git a/Samples/Carthage-Validation/Framework/Framework.xcodeproj/project.pbxproj b/Samples/Carthage-Validation/Framework/Framework.xcodeproj/project.pbxproj deleted file mode 100644 index 92fe2aa4783..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework.xcodeproj/project.pbxproj +++ /dev/null @@ -1,410 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 7BA13E57267B851B00DEE308 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA13E56267B851B00DEE308 /* AppDelegate.swift */; }; - 7BA13E59267B851B00DEE308 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA13E58267B851B00DEE308 /* SceneDelegate.swift */; }; - 7BA13E5B267B851B00DEE308 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BA13E5A267B851B00DEE308 /* ContentView.swift */; }; - 7BA13E5D267B851D00DEE308 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7BA13E5C267B851D00DEE308 /* Assets.xcassets */; }; - 7BA13E60267B851D00DEE308 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7BA13E5F267B851D00DEE308 /* Preview Assets.xcassets */; }; - 7BA13E63267B851D00DEE308 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7BA13E61267B851D00DEE308 /* LaunchScreen.storyboard */; }; - 7BA13E74267B85A300DEE308 /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BA13E71267B859500DEE308 /* Sentry.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 7BA13E53267B851B00DEE308 /* Framework.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Framework.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 7BA13E56267B851B00DEE308 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7BA13E58267B851B00DEE308 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - 7BA13E5A267B851B00DEE308 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 7BA13E5C267B851D00DEE308 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 7BA13E5F267B851D00DEE308 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 7BA13E62267B851D00DEE308 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 7BA13E64267B851D00DEE308 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7BA13E6B267B856B00DEE308 /* Sentry.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sentry.framework; path = Carthage/Build/iOS/Sentry.framework; sourceTree = ""; }; - 7BA13E70267B859500DEE308 /* 59F5ED1B-0692-3E28-8041-2FF74F5224DF.bcsymbolmap */ = {isa = PBXFileReference; lastKnownFileType = text; path = "59F5ED1B-0692-3E28-8041-2FF74F5224DF.bcsymbolmap"; sourceTree = ""; }; - 7BA13E71267B859500DEE308 /* Sentry.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sentry.framework; sourceTree = ""; }; - 7BA13E72267B859500DEE308 /* Sentry.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; path = Sentry.framework.dSYM; sourceTree = ""; }; - 7BA13E73267B859500DEE308 /* EEC56027-C176-3ABE-8012-00961E008F29.bcsymbolmap */ = {isa = PBXFileReference; lastKnownFileType = text; path = "EEC56027-C176-3ABE-8012-00961E008F29.bcsymbolmap"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 7BA13E50267B851B00DEE308 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7BA13E74267B85A300DEE308 /* Sentry.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 7BA13E4A267B851B00DEE308 = { - isa = PBXGroup; - children = ( - 7BA13E55267B851B00DEE308 /* Framework */, - 7BA13E54267B851B00DEE308 /* Products */, - 7BA13E6A267B856B00DEE308 /* Frameworks */, - ); - sourceTree = ""; - }; - 7BA13E54267B851B00DEE308 /* Products */ = { - isa = PBXGroup; - children = ( - 7BA13E53267B851B00DEE308 /* Framework.app */, - ); - name = Products; - sourceTree = ""; - }; - 7BA13E55267B851B00DEE308 /* Framework */ = { - isa = PBXGroup; - children = ( - 7BA13E56267B851B00DEE308 /* AppDelegate.swift */, - 7BA13E58267B851B00DEE308 /* SceneDelegate.swift */, - 7BA13E5A267B851B00DEE308 /* ContentView.swift */, - 7BA13E5C267B851D00DEE308 /* Assets.xcassets */, - 7BA13E61267B851D00DEE308 /* LaunchScreen.storyboard */, - 7BA13E64267B851D00DEE308 /* Info.plist */, - 7BA13E5E267B851D00DEE308 /* Preview Content */, - ); - path = Framework; - sourceTree = ""; - }; - 7BA13E5E267B851D00DEE308 /* Preview Content */ = { - isa = PBXGroup; - children = ( - 7BA13E5F267B851D00DEE308 /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; - 7BA13E6A267B856B00DEE308 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7BA13E6F267B859500DEE308 /* iOS */, - 7BA13E6B267B856B00DEE308 /* Sentry.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 7BA13E6F267B859500DEE308 /* iOS */ = { - isa = PBXGroup; - children = ( - 7BA13E70267B859500DEE308 /* 59F5ED1B-0692-3E28-8041-2FF74F5224DF.bcsymbolmap */, - 7BA13E71267B859500DEE308 /* Sentry.framework */, - 7BA13E72267B859500DEE308 /* Sentry.framework.dSYM */, - 7BA13E73267B859500DEE308 /* EEC56027-C176-3ABE-8012-00961E008F29.bcsymbolmap */, - ); - name = iOS; - path = Carthage/Build/iOS; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 7BA13E52267B851B00DEE308 /* Framework */ = { - isa = PBXNativeTarget; - buildConfigurationList = 7BA13E67267B851D00DEE308 /* Build configuration list for PBXNativeTarget "Framework" */; - buildPhases = ( - 7BA13E77267B85CB00DEE308 /* ShellScript */, - 7BA13E4F267B851B00DEE308 /* Sources */, - 7BA13E50267B851B00DEE308 /* Frameworks */, - 7BA13E51267B851B00DEE308 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Framework; - productName = Framework; - productReference = 7BA13E53267B851B00DEE308 /* Framework.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 7BA13E4B267B851B00DEE308 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1250; - LastUpgradeCheck = 1250; - TargetAttributes = { - 7BA13E52267B851B00DEE308 = { - CreatedOnToolsVersion = 12.5; - }; - }; - }; - buildConfigurationList = 7BA13E4E267B851B00DEE308 /* Build configuration list for PBXProject "Framework" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 7BA13E4A267B851B00DEE308; - productRefGroup = 7BA13E54267B851B00DEE308 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 7BA13E52267B851B00DEE308 /* Framework */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 7BA13E51267B851B00DEE308 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7BA13E63267B851D00DEE308 /* LaunchScreen.storyboard in Resources */, - 7BA13E60267B851D00DEE308 /* Preview Assets.xcassets in Resources */, - 7BA13E5D267B851D00DEE308 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 7BA13E77267B85CB00DEE308 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "$(SRCROOT)/input.xcfilelist", - ); - inputPaths = ( - ); - outputFileListPaths = ( - "$(SRCROOT)/output.xcfilelist", - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n/usr/local/bin/carthage copy-frameworks\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 7BA13E4F267B851B00DEE308 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7BA13E57267B851B00DEE308 /* AppDelegate.swift in Sources */, - 7BA13E59267B851B00DEE308 /* SceneDelegate.swift in Sources */, - 7BA13E5B267B851B00DEE308 /* ContentView.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 7BA13E61267B851D00DEE308 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 7BA13E62267B851D00DEE308 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 7BA13E65267B851D00DEE308 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 7BA13E66267B851D00DEE308 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 7BA13E68267B851D00DEE308 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_ASSET_PATHS = "\"Framework/Preview Content\""; - DEVELOPMENT_TEAM = 97JCY7859U; - ENABLE_PREVIEWS = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Framework/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.carthage.Framework; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 7BA13E69267B851D00DEE308 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_ASSET_PATHS = "\"Framework/Preview Content\""; - DEVELOPMENT_TEAM = 97JCY7859U; - ENABLE_PREVIEWS = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Framework/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.carthage.Framework; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 7BA13E4E267B851B00DEE308 /* Build configuration list for PBXProject "Framework" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7BA13E65267B851D00DEE308 /* Debug */, - 7BA13E66267B851D00DEE308 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 7BA13E67267B851D00DEE308 /* Build configuration list for PBXNativeTarget "Framework" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7BA13E68267B851D00DEE308 /* Debug */, - 7BA13E69267B851D00DEE308 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 7BA13E4B267B851B00DEE308 /* Project object */; -} diff --git a/Samples/Carthage-Validation/Framework/Framework.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Samples/Carthage-Validation/Framework/Framework.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Samples/Carthage-Validation/Framework/Framework/AppDelegate.swift b/Samples/Carthage-Validation/Framework/Framework/AppDelegate.swift deleted file mode 100644 index a4620abc2d4..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework/AppDelegate.swift +++ /dev/null @@ -1,31 +0,0 @@ -import Sentry -import UIKit - -@main -class AppDelegate: UIResponder, UIApplicationDelegate { - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - - SentrySDK.start { options in - options.dsn = "https://a92d50327ac74b8b9aa4ea80eccfb267@o447951.ingest.sentry.io/5428557" - options.debug = true - } - - return true - } - - // MARK: UISceneSession Lifecycle - - func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { - // Called when a new scene session is being created. - // Use this method to select a configuration to create the new scene with. - return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) - } - - func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { - // Called when the user discards a scene session. - // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. - // Use this method to release any resources that were specific to the discarded scenes, as they will not return. - } - -} diff --git a/Samples/Carthage-Validation/Framework/Framework/Assets.xcassets/AccentColor.colorset/Contents.json b/Samples/Carthage-Validation/Framework/Framework/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb878970081..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Samples/Carthage-Validation/Framework/Framework/Assets.xcassets/AppIcon.appiconset/Contents.json b/Samples/Carthage-Validation/Framework/Framework/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 9221b9bb1a3..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Samples/Carthage-Validation/Framework/Framework/Assets.xcassets/Contents.json b/Samples/Carthage-Validation/Framework/Framework/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7f..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Samples/Carthage-Validation/Framework/Framework/Base.lproj/LaunchScreen.storyboard b/Samples/Carthage-Validation/Framework/Framework/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 865e9329f37..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/Carthage-Validation/Framework/Framework/ContentView.swift b/Samples/Carthage-Validation/Framework/Framework/ContentView.swift deleted file mode 100644 index 6c03b104d2f..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework/ContentView.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Sentry -import SwiftUI - -struct ContentView: View { - var body: some View { - VStack { - Button("CaptureMessage") { - SentrySDK.capture(message: "Yeah captured a message") - } - } - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -} diff --git a/Samples/Carthage-Validation/Framework/Framework/Info.plist b/Samples/Carthage-Validation/Framework/Framework/Info.plist deleted file mode 100644 index 2688b32b32f..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework/Info.plist +++ /dev/null @@ -1,62 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - $(PRODUCT_MODULE_NAME).SceneDelegate - - - - - UIApplicationSupportsIndirectInputEvents - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Samples/Carthage-Validation/Framework/Framework/Preview Content/Preview Assets.xcassets/Contents.json b/Samples/Carthage-Validation/Framework/Framework/Preview Content/Preview Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7f..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework/Preview Content/Preview Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Samples/Carthage-Validation/Framework/Framework/SceneDelegate.swift b/Samples/Carthage-Validation/Framework/Framework/SceneDelegate.swift deleted file mode 100644 index 21d0a4f98d2..00000000000 --- a/Samples/Carthage-Validation/Framework/Framework/SceneDelegate.swift +++ /dev/null @@ -1,53 +0,0 @@ -import SwiftUI -import UIKit - -class SceneDelegate: UIResponder, UIWindowSceneDelegate { - - var window: UIWindow? - - func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { - // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. - // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. - // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). - - // Create the SwiftUI view that provides the window contents. - let contentView = ContentView() - - // Use a UIHostingController as window root view controller. - if let windowScene = scene as? UIWindowScene { - let window = UIWindow(windowScene: windowScene) - window.rootViewController = UIHostingController(rootView: contentView) - self.window = window - window.makeKeyAndVisible() - } - } - - func sceneDidDisconnect(_ scene: UIScene) { - // Called as the scene is being released by the system. - // This occurs shortly after the scene enters the background, or when its session is discarded. - // Release any resources associated with this scene that can be re-created the next time the scene connects. - // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). - } - - func sceneDidBecomeActive(_ scene: UIScene) { - // Called when the scene has moved from an inactive state to an active state. - // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. - } - - func sceneWillResignActive(_ scene: UIScene) { - // Called when the scene will move from an active state to an inactive state. - // This may occur due to temporary interruptions (ex. an incoming phone call). - } - - func sceneWillEnterForeground(_ scene: UIScene) { - // Called as the scene transitions from the background to the foreground. - // Use this method to undo the changes made on entering the background. - } - - func sceneDidEnterBackground(_ scene: UIScene) { - // Called as the scene transitions from the foreground to the background. - // Use this method to save data, release shared resources, and store enough scene-specific state information - // to restore the scene back to its current state. - } - -} diff --git a/Samples/Carthage-Validation/Framework/input.xcfilelist b/Samples/Carthage-Validation/Framework/input.xcfilelist deleted file mode 100644 index 6c87cbf0d27..00000000000 --- a/Samples/Carthage-Validation/Framework/input.xcfilelist +++ /dev/null @@ -1 +0,0 @@ -$(SRCROOT)/Carthage/Build/iOS/Sentry.framework \ No newline at end of file diff --git a/Samples/Carthage-Validation/Framework/output.xcfilelist b/Samples/Carthage-Validation/Framework/output.xcfilelist deleted file mode 100644 index e2973ee20c3..00000000000 --- a/Samples/Carthage-Validation/Framework/output.xcfilelist +++ /dev/null @@ -1 +0,0 @@ -$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Sentry.framework \ No newline at end of file diff --git a/Samples/Carthage-Validation/README.md b/Samples/Carthage-Validation/README.md index a28270fd73f..e1699f20316 100644 --- a/Samples/Carthage-Validation/README.md +++ b/Samples/Carthage-Validation/README.md @@ -3,17 +3,17 @@ This directory contains samples to validate installing the SDK via Carthage. Carthage can resolve a dependency by downloading the source code into `Carthage/Checkouts` or downloading a pre-compiled framework. The library authors can either attach the pre-compiled framework to a GitHub release or use a [binary project specification][1] for binary-only frameworks that don't provide the source code. -Carthage encourages its users [to use XCFrameworks][2] since version 0.37.0, released in January 2021. The SentrySDK also still supports using normal frameworks. +Carthage encourages its users [to use XCFrameworks][2] since version 0.37.0, released in January 2021. Given the above, there are three different ways of installing a dependency via Carthage: 1. pre-compiled XCFramework -2. pre-compiled framework +2. pre-compiled framework (Dropped support for that in 8.0.0) 3. downloading the source code -Since Carthage only downloads the source code if no pre-compiled binaries are available and we upload these binaries for every release, we only have to validate the first two. +Since Carthage only downloads the source code if no pre-compiled binaries are available and we upload these binaries for every release, we only have to validate the first way. + +Take a look at [GitHub Actions](../../.github/workflows/build.yml) to see how the validation works. [1]: https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#binary-project-specification [2]: https://github.com/Carthage/Carthage#getting-started - -Take a look at [GitHub Actions](../../.github/workflows/buildandtest.yml) to see how the validation works. diff --git a/Samples/SPM-Dynamic/Package.swift b/Samples/SPM-Dynamic/Package.swift index c3fd602d0fc..39178fa1ef0 100644 --- a/Samples/SPM-Dynamic/Package.swift +++ b/Samples/SPM-Dynamic/Package.swift @@ -5,6 +5,7 @@ import PackageDescription let package = Package( name: "SPM-Dynamic", + platforms: [.macOS(.v10_13)], products: [ .library(name: "SPM-Dynamic", type: .dynamic, targets: ["SPM-Dynamic"]) ], diff --git a/Samples/TrendingMovies/TrendingMovies/ImageProcessing/ColorArt.swift b/Samples/TrendingMovies/TrendingMovies/ImageProcessing/ColorArt.swift index e59a410d2ef..b0c6a7b2d86 100644 --- a/Samples/TrendingMovies/TrendingMovies/ImageProcessing/ColorArt.swift +++ b/Samples/TrendingMovies/TrendingMovies/ImageProcessing/ColorArt.swift @@ -319,7 +319,7 @@ private struct RGBADecimalComponents: Hashable { // Relative luminance formula: https://en.wikipedia.org/wiki/Relative_luminance var luminance: CGFloat { - 0.212_6 * r + 0.715_2 * g + 0.072_2 * b + 0.2126 * r + 0.7152 * g + 0.0722 * b } var isDarkColor: Bool { diff --git a/Samples/TrendingMovies/TrendingMovies/Utilities/Tracer.swift b/Samples/TrendingMovies/TrendingMovies/Utilities/Tracer.swift index 788bdcc76d1..b0c36b8112f 100644 --- a/Samples/TrendingMovies/TrendingMovies/Utilities/Tracer.swift +++ b/Samples/TrendingMovies/TrendingMovies/Utilities/Tracer.swift @@ -33,8 +33,8 @@ extension Tracer { options.sessionTrackingIntervalMillis = 5_000 // Sampling 100% - In Production you probably want to adjust this options.tracesSampleRate = 1.0 - options.enableFileIOTracking = true - options.enableCoreDataTracking = true + options.enableFileIOTracing = true + options.enableCoreDataTracing = true options.profilesSampleRate = 1.0 options.attachScreenshot = true options.attachViewHierarchy = true @@ -75,12 +75,12 @@ extension Tracer { var span: Span func annotate(key: String, value: String) { - print("[TrendingMovies] annotating span \(span.context.spanId.sentrySpanIdString), key \(key) and value \(value)") - span.context.setTag(value: value, key: key) + print("[TrendingMovies] annotating span \(span.spanId.sentrySpanIdString), key \(key) and value \(value)") + span.setTag(value: value, key: key) } func end() { - print("[TrendingMovies] ending span \(span.context.spanId.sentrySpanIdString)") + print("[TrendingMovies] ending span \(span.spanId.sentrySpanIdString)") span.finish() } } diff --git a/Samples/iOS-ObjectiveC/iOS-ObjectiveC.xcodeproj/project.pbxproj b/Samples/iOS-ObjectiveC/iOS-ObjectiveC.xcodeproj/project.pbxproj index 7a23119d6b7..35c133cde3c 100644 --- a/Samples/iOS-ObjectiveC/iOS-ObjectiveC.xcodeproj/project.pbxproj +++ b/Samples/iOS-ObjectiveC/iOS-ObjectiveC.xcodeproj/project.pbxproj @@ -21,6 +21,13 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 0AE58866292B7C5E00494AF8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 630853352440C45500DDE4CE /* Sentry.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D81A3488291D0AC0005A27A9; + remoteInfo = SentryPrivate; + }; 6308533A2440C45500DDE4CE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 630853352440C45500DDE4CE /* Sentry.xcodeproj */; @@ -110,6 +117,7 @@ children = ( 6308533B2440C45500DDE4CE /* Sentry.framework */, 6308533D2440C45500DDE4CE /* SentryTests.xctest */, + 0AE58867292B7C5E00494AF8 /* SentryPrivate.framework */, ); name = Products; sourceTree = ""; @@ -255,6 +263,13 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ + 0AE58867292B7C5E00494AF8 /* SentryPrivate.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = SentryPrivate.framework; + remoteRef = 0AE58866292B7C5E00494AF8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 6308533B2440C45500DDE4CE /* Sentry.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; @@ -468,7 +483,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "iOS-ObjectiveC/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -490,7 +505,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "iOS-ObjectiveC/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -509,7 +524,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-ObjectiveCUITests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -531,7 +546,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-ObjectiveCUITests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -611,7 +626,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "iOS-ObjectiveC/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -630,7 +645,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-ObjectiveCUITests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -710,7 +725,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "iOS-ObjectiveC/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -729,7 +744,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-ObjectiveCUITests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m index 15fe78f8e36..dd60df1b5a0 100644 --- a/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m +++ b/Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m @@ -20,7 +20,7 @@ - (BOOL)application:(UIApplication *)application options.sessionTrackingIntervalMillis = 5000UL; // Sampling 100% - In Production you probably want to adjust this options.tracesSampleRate = @1.0; - options.enableFileIOTracking = YES; + options.enableFileIOTracing = YES; options.attachScreenshot = YES; options.attachViewHierarchy = YES; options.enableUserInteractionTracing = YES; diff --git a/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj b/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj index 35beffbfdab..d57a530118c 100644 --- a/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj +++ b/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj @@ -16,6 +16,8 @@ 637AFDB3243B02770034958B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 637AFDB2243B02770034958B /* Assets.xcassets */; }; 637AFDB6243B02770034958B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 637AFDB4243B02770034958B /* LaunchScreen.storyboard */; }; 7B3427F825876A5200056519 /* Tongariro.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 7B3427F725876A5200056519 /* Tongariro.jpg */; }; + 7B5525B32938B5B5006A2932 /* DiskWriteException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B5525B22938B5B5006A2932 /* DiskWriteException.swift */; }; + 7B5525B62938B644006A2932 /* DiskWriteException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B5525B22938B5B5006A2932 /* DiskWriteException.swift */; }; 7B64386B26A6C544000D0F65 /* LaunchUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B64386A26A6C544000D0F65 /* LaunchUITests.swift */; }; 7B79000429028C7300A7F467 /* MetricKitManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B79000329028C7300A7F467 /* MetricKitManager.swift */; }; 7BFC8B0626D4D24B000D3504 /* LoremIpsum.txt in Resources */ = {isa = PBXBuildFile; fileRef = 7BFC8B0526D4D24B000D3504 /* LoremIpsum.txt */; }; @@ -132,6 +134,13 @@ remoteGlobalIDString = 637AFDA5243B02760034958B; remoteInfo = "iOS-Swift"; }; + D81A3499291D0B2C005A27A9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6308532C2440C44F00DDE4CE /* Sentry.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D81A3488291D0AC0005A27A9; + remoteInfo = SentryPrivate; + }; D83A30CA279F075800372D0A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 6308532C2440C44F00DDE4CE /* Sentry.xcodeproj */; @@ -238,6 +247,7 @@ 7B3427F725876A5200056519 /* Tongariro.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Tongariro.jpg; sourceTree = ""; }; 7B4F33F7271EBD2500C8591E /* SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUI.swift; sourceTree = ""; }; 7B4F33FA271EBE0C00C8591E /* SwiftUIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIViewController.swift; sourceTree = ""; }; + 7B5525B22938B5B5006A2932 /* DiskWriteException.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiskWriteException.swift; sourceTree = ""; }; 7B64386826A6C544000D0F65 /* iOS-SwiftUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "iOS-SwiftUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 7B64386A26A6C544000D0F65 /* LaunchUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchUITests.swift; sourceTree = ""; }; 7B64386C26A6C544000D0F65 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -350,6 +360,7 @@ children = ( 630853322440C44F00DDE4CE /* Sentry.framework */, 630853342440C44F00DDE4CE /* SentryTests.xctest */, + D81A349A291D0B2C005A27A9 /* SentryPrivate.framework */, ); name = Products; sourceTree = ""; @@ -503,6 +514,7 @@ D8D7BB492750067900044146 /* UIAssert.swift */, D8D7BB4D27501B9400044146 /* SpanObserver.swift */, 84FB812C2840021B00F3A94A /* iOS-Swift-Bridging-Header.h */, + 7B5525B22938B5B5006A2932 /* DiskWriteException.swift */, ); path = Tools; sourceTree = ""; @@ -720,6 +732,13 @@ remoteRef = 630853332440C44F00DDE4CE /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + D81A349A291D0B2C005A27A9 /* SentryPrivate.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = SentryPrivate.framework; + remoteRef = D81A3499291D0B2C005A27A9 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -794,6 +813,7 @@ D8444E4C275E38090042F4DE /* UIViewControllerExtension.swift in Sources */, 637AFDAE243B02760034958B /* ViewController.swift in Sources */, 0AABE2EA28855FF80057ED69 /* PermissionsViewController.swift in Sources */, + 7B5525B32938B5B5006A2932 /* DiskWriteException.swift in Sources */, 84FB8120283EEDB900F3A94A /* PerformanceViewController.swift in Sources */, D8F3D062274EBD4800B56F8C /* SpanExtension.swift in Sources */, 637AFDAA243B02760034958B /* AppDelegate.swift in Sources */, @@ -843,6 +863,7 @@ D8269A4F274C09A400BD5BD5 /* SwiftUI.swift in Sources */, D8444E57275F795D0042F4DE /* UIViewControllerExtension.swift in Sources */, D8F3D058274E57D600B56F8C /* TableViewController.swift in Sources */, + 7B5525B62938B644006A2932 /* DiskWriteException.swift in Sources */, D8269A58274C0FC700BD5BD5 /* ViewController.swift in Sources */, 844DA821282584C300E6B62E /* CoreDataViewController.swift in Sources */, D8444E55275F79570042F4DE /* SpanExtension.swift in Sources */, @@ -1091,7 +1112,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-Swift/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1120,7 +1141,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-Swift/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1145,7 +1166,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-SwiftUITests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1169,7 +1190,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-SwiftUITests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1194,7 +1215,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "PerformanceBenchmarks/PerformanceBenchmarks-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1220,7 +1241,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "PerformanceBenchmarks/PerformanceBenchmarks-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1304,7 +1325,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-Swift/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1329,7 +1350,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-SwiftUITests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1354,7 +1375,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "PerformanceBenchmarks/PerformanceBenchmarks-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1527,7 +1548,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-Swift/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1552,7 +1573,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "iOS-SwiftUITests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1577,7 +1598,7 @@ CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = 97JCY7859U; INFOPLIST_FILE = "PerformanceBenchmarks/PerformanceBenchmarks-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift b/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift index 203c22620c6..e48415a7928 100644 --- a/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift +++ b/Samples/iOS-Swift/iOS-Swift/AppDelegate.swift @@ -19,23 +19,26 @@ class AppDelegate: UIResponder, UIApplicationDelegate { return event } options.debug = true + if #available(iOS 15.0, *) { + options.enableMetricKit = true + } // Sampling 100% - In Production you probably want to adjust this options.tracesSampleRate = 1.0 options.sessionTrackingIntervalMillis = 5_000 - options.enableFileIOTracking = true - options.enableCoreDataTracking = true + options.enableFileIOTracing = true + options.enableCoreDataTracing = true options.profilesSampleRate = 1.0 options.attachScreenshot = true options.attachViewHierarchy = true options.environment = "test-app" let isBenchmarking = ProcessInfo.processInfo.arguments.contains("--io.sentry.test.benchmarking") - options.enableAutoPerformanceTracking = !isBenchmarking + options.enableAutoPerformanceTracing = !isBenchmarking // the benchmark test starts and stops a custom transaction using a UIButton, and automatic user interaction tracing stops the transaction that begins with that button press after the idle timeout elapses, stopping the profiler (only one profiler runs regardless of the number of concurrent transactions) options.enableUserInteractionTracing = !isBenchmarking - options.enableAutoPerformanceTracking = !isBenchmarking - options.enablePreWarmedAppStartTracking = !isBenchmarking + options.enableAutoPerformanceTracing = !isBenchmarking + options.enablePreWarmedAppStartTracing = !isBenchmarking // because we run CPU for 15 seconds at full throttle, we trigger ANR issues being sent. disable such during benchmarks. options.enableAppHangTracking = !isBenchmarking @@ -50,7 +53,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { AppDelegate.startSentry() - if #available(iOS 14.0, *) { + if #available(iOS 15.0, *) { metricKit.receiveReports() } @@ -58,14 +61,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } func applicationWillTerminate(_ application: UIApplication) { - if #available(iOS 14.0, *) { + if #available(iOS 15.0, *) { metricKit.pauseReports() } } // Workaround for 'Stored properties cannot be marked potentially unavailable with '@available'' private var _metricKit: Any? - @available(iOS 14.0, *) + @available(iOS 15.0, *) fileprivate var metricKit: MetricKitManager { if _metricKit == nil { _metricKit = MetricKitManager() diff --git a/Samples/iOS-Swift/iOS-Swift/Base.lproj/Main.storyboard b/Samples/iOS-Swift/iOS-Swift/Base.lproj/Main.storyboard index 029585c65a8..c5caddff8b0 100644 --- a/Samples/iOS-Swift/iOS-Swift/Base.lproj/Main.storyboard +++ b/Samples/iOS-Swift/iOS-Swift/Base.lproj/Main.storyboard @@ -18,13 +18,13 @@ - + - + - + - + + + - +