iOS: extract CodePushErrorUtils into its own header - #56
Open
ofalvai wants to merge 1 commit into
Open
Conversation
ofalvai
added this pull request to stack #41
September 9, 2026 06:28
ofalvai
removed this pull request from stack #41
September 9, 2026 06:38
ofalvai
changed the base branch from
android-package-install-tests
to
ios-sha256-refactor
September 9, 2026 06:38
ofalvai
added this pull request to stack #57
September 9, 2026 06:42
There was a problem hiding this comment.
🟡 Changes recommended
The new public dependency is not exported by CocoaPods or either Xcode target.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Extracts CodePushErrorUtils into a Foundation-only header to remove its React dependency.
Changes:
- Adds the standalone error utility header.
- Updates imports and Xcode project references.
File summaries
| File | Description |
|---|---|
ios/CodePush/CodePushErrorUtils.m |
Imports the extracted header. |
ios/CodePush/CodePushErrorUtils.h |
Declares the error utility API. |
ios/CodePush/CodePush.h |
Re-exports the extracted header. |
ios/CodePush.xcodeproj/project.pbxproj |
References the new header. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| 13BE3DED1AC21097009241FE /* CodePush.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CodePush.m; path = CodePush/CodePush.m; sourceTree = "<group>"; }; | ||
| 1B23B9131BF9267B000BB2F0 /* RCTConvert+CodePushInstallMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "RCTConvert+CodePushInstallMode.m"; path = "CodePush/RCTConvert+CodePushInstallMode.m"; sourceTree = "<group>"; }; | ||
| 1B762E8F1C9A5E9A006EF800 /* CodePushErrorUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CodePushErrorUtils.m; path = CodePush/CodePushErrorUtils.m; sourceTree = "<group>"; }; | ||
| 8C69F7C2081D7CEE96691674 /* CodePushErrorUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodePushErrorUtils.h; path = CodePush/CodePushErrorUtils.h; sourceTree = "<group>"; }; |
| #endif | ||
|
|
||
| #import <Foundation/Foundation.h> | ||
| #import "CodePushErrorUtils.h" |
Collaborator
Author
There was a problem hiding this comment.
I realized CodePushErrorUtils.h more like a "package-private" header and doesn't need to be a public API at all, so it's now imported into the actual users explicitly.
ofalvai
force-pushed
the
ios-errorutil-refactor
branch
from
September 9, 2026 07:15
b19db78 to
bd90f89
Compare
ofalvai
marked this pull request as ready for review
September 9, 2026 07:29
ofalvai
force-pushed
the
ios-errorutil-refactor
branch
from
September 9, 2026 11:26
bd90f89 to
4b2056b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CodePushErrorUtils.mimportsCodePush.h, which importsReact/RCTEventEmitter.h. At the same time, all logging must be done through this error util because failed update tracking is based on catching CodePush errors explicitlyTherefore, it's impossible to do proper logging in new code without implicitly depending on
Reactitself (which complicates unit testing).