Conversation
Remove `#import <netinet6/in6.h>` from RollbarReachability.m. This header is marked private in Xcode 26.4 RC, causing a compilation error. The import was unused as no IPv6-specific symbols are referenced in this file; `<netinet/in.h>` provides all required types (sockaddr_in, AF_INET, IN_LINKLOCALNETNUM). Fixes SDK-587 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…llbar#369) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ar#371) Ruby comma-separated assignment created an Array for module_map, which only accepts a single String. This caused pod trunk push to fail with "no implicit conversion of Array into String". Removed the invalid module_map; CocoaPods will auto-generate one for the umbrella pod. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Changes: Maintenance (1), Bugfix (1), Test improvement (1), Documentation update (1)
This PR updates the Rollbar Apple SDK to version 3.4.0 (per upstream), including crash-report formatting/parsing fixes to support newer Xcode toolchains and to prevent crashes from address arithmetic overflow.
Changes:
- Bump SDK version references to 3.4.0 across podspecs and internal constants.
- Harden crash report parsing/formatting (overflow-safe address math, binary image validation, improved URL parsing) and adjust formatting pipeline to propagate validation/formatting failures.
- Update examples, tests, and documentation (changelog + new
CLAUDE.mdguidance).
Reviewed changes
Copilot reviewed 30 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| RollbarReport.podspec | Bumps RollbarReport pod version to 3.4.0. |
| RollbarNotifier/Tests/RollbarReportTests/RollbarReportTests.swift | Adds a regression test for invalid crash formatting input. |
| RollbarNotifier/Tests/RollbarNotifierTests/RollbarNotifierDTOsTests.swift | Updates DTO version expectation to v3.4.0. |
| RollbarNotifier/Tests/RollbarNotifierTests-ObjC/DTOsTests.m | Reformats tests and updates expected module version to v3.4.0. |
| RollbarNotifier/Sources/RollbarReport/Report/Report.swift | Makes binaryImages validated and error-producing via Result. |
| RollbarNotifier/Sources/RollbarReport/Report/BinaryImage.swift | Makes BinaryImage parsing failable and overflow-safe for address ranges. |
| RollbarNotifier/Sources/RollbarReport/Report/Address.swift | Makes address +/- overflow-aware by returning optionals. |
| RollbarNotifier/Sources/RollbarReport/Formatter/RollbarCrashFormattingFilter.swift | Updates formatting pipeline to handle formatter errors via Result. |
| RollbarNotifier/Sources/RollbarReport/Formatter/FormatBuilder.swift | Generalizes Formatted/builder to support Result-producing formatting. |
| RollbarNotifier/Sources/RollbarReport/Error.swift | Adds invalidBinaryImages and invalidAddress NSError constructors. |
| RollbarNotifier/Sources/RollbarReport/Diagnostic/RollbarCrashDiagnosticFilter.swift | Fails diagnosis when binary images are invalid (uses new Result). |
| RollbarNotifier/Sources/RollbarNotifier/RollbarReachability.m | Removes problematic header import for newer Xcode compilation. |
| RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m | Updates notifier version constant to 3.4.0 and refactors formatting. |
| RollbarNotifier/Sources/RollbarCrash/Recording/RollbarCrashReportVersion.h | Updates crash report version macro to 3.4.0. |
| RollbarNotifier.podspec | Bumps RollbarNotifier pod version to 3.4.0. |
| RollbarDeploys.podspec | Bumps RollbarDeploys pod version to 3.4.0. |
| RollbarCrash.podspec | Bumps RollbarCrash pod version to 3.4.0. |
| RollbarCommon.podspec | Bumps RollbarCommon pod version to 3.4.0. |
| RollbarCocoaLumberjack.podspec | Bumps RollbarCocoaLumberjack pod version to 3.4.0. |
| RollbarAUL.podspec | Bumps RollbarAUL pod version to 3.4.0. |
| Rollbar.podspec | Bumps umbrella pod version to 3.4.0 and removes module_map tuple. |
| README.md | Fixes “iOS” capitalization. |
| Examples/RollbarDemo/RollbarDemo/ContentView.swift | Adds example showing attaching stack trace data for caught errors. |
| Examples/RollbarDemo/RollbarDemo.xcodeproj/project.pbxproj | Updates demo app build + marketing versions. |
| Examples/Integration/CocoapodsFramework/Podfile.lock | Updates CocoaPods lockfile (currently pinned to 3.3.2). |
| Examples/Integration/CocoapodsFramework/Podfile | Updates integration example to depend on ~> 3.4.0. |
| Examples/Integration/CocoapodsApp/Podfile.lock | Updates CocoaPods lockfile (currently pinned to 3.3.2). |
| Examples/Integration/CocoapodsApp/Podfile | Updates integration example to depend on ~> 3.4.0. |
| Examples/Integration/CocoapodsApp/CocoapodsApp.xcodeproj/xcshareddata/xcschemes/CocoapodsApp.xcscheme | Adds shared Xcode scheme for the integration example. |
| CLAUDE.md | Adds repo build/test/architecture guidance. |
| CHANGELOG.md | Adds 3.4.0 release notes. |
| .ruby-version | Pins Ruby major/minor to 3.3. |
Comments suppressed due to low confidence (1)
RollbarNotifier/Sources/RollbarReport/Formatter/RollbarCrashFormattingFilter.swift:43
- The completion is building
reportsusingformattedResults.compactMap(\.success?.string).map(NSString.init). Becausesuccess?.stringis a double-optional (String??), this produces[String?]rather than[String]and won’t type-check withNSString.init. Consider unwrapping the inner optional (e.g., an additionalcompactMap) before mapping toNSString.
complete?(
/*reports:*/formattedResults.compactMap(\.success?.string).map(NSString.init),
/*didFinish:*/formattedResults.allSatisfy(\.isSuccess),
/*error:*/formattedResults.first(where: \.isFailure)?.failure)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| static func buildExpression<Success: StringProtocol, Failure: Error>( | ||
| _ expression: Formatted<Success>? | ||
| ) -> Formatted<T> where T == Result<Success, Failure> { | ||
| Formatted(string: (expression?.string).map { .success($0) }) |
There was a problem hiding this comment.
buildExpression(_ expression: Formatted<Success>?) maps expression?.string which is a nested optional (Success??) into .success($0), producing a type mismatch (Success? vs Success). This should be flattened (e.g., using flatMap to unwrap the inner optional) so the result builder compiles and correctly lifts Formatted<String>? into Formatted<Result<...>>.
| Formatted(string: (expression?.string).map { .success($0) }) | |
| Formatted(string: expression.flatMap(\.string).map { .success($0) }) |
| let diagnosedCrash = Bundle.module | ||
| .url(forResource: "diagnosed_invalid.json", withExtension: .none) | ||
| .flatMap { try! Data(contentsOf: $0) } | ||
| .flatMap { try! JSONSerialization.jsonObject(with: $0) } |
There was a problem hiding this comment.
This test uses try! when reading/parsing the fixture JSON. If the resource is missing or the JSON becomes invalid, the test will crash rather than fail with a useful assertion. Prefer try? + XCTUnwrap/XCTFail so failures are reported cleanly.
Context
3.4.0 contains fixes that make it compile with xcode 26.3 which is blocking us from updating the xcode we are using in the guild
Checklist
[x] Change meets or does not compromise the Baseline Security Requirements