Skip to content

Next#30

Merged
patrickkabwe merged 8 commits into
mainfrom
next
May 16, 2025
Merged

Next#30
patrickkabwe merged 8 commits into
mainfrom
next

Conversation

@patrickkabwe
Copy link
Copy Markdown
Owner

@patrickkabwe patrickkabwe commented May 16, 2025

closes #29

Summary by CodeRabbit

  • New Features

    • Added visionOS platform support in the iOS module.
    • Introduced a new in-app browser module interface with enhanced type safety and flexible method signatures.
    • Added automated release workflow with semantic-release and improved changelog generation.
  • Bug Fixes

    • Improved iOS root view controller retrieval in the browser presenter.
    • Updated Android and iOS build configurations with dependency and namespace corrections.
  • Refactor

    • Renamed Android and iOS package names, classes, and example app resources for consistency.
    • Reorganized project and example app structure, including updated build scripts and config files.
  • Chores

    • Upgraded build tools, dependencies, and scripts across platforms.
    • Cleaned and simplified ignore files and formatting rules.
    • Streamlined CI workflows and release processes.
  • Documentation

    • Removed outdated README and updated example app documentation.
    • Modified license and usage text for clarity.
  • Tests

    • Removed obsolete test files.
  • Revert

    • Deleted legacy files including old changelogs, build scripts, and configuration files.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update involves a major refactor and modernization of the project. It includes broad package renaming, namespace and identifier updates, dependency and build tooling upgrades, and the consolidation of configuration files. The Android and iOS example apps are rebranded, and the build, release, and CI/CD workflows are overhauled. Several obsolete files are deleted, and new scripts and configuration files are introduced.

Changes

Files / Groups Change Summary
.github/dependabot.yml, .github/workflows/*, .gitignore, CHANGELOG.md, README.md Updated/removed CI workflows, dependabot config, cleaned up ignore files, deleted changelog and README.
NitroInAppBrowser.podspec, android/build.gradle, android/gradle.properties, android/CMakeLists.txt, android/src/main/AndroidManifest.xml Updated podspec, Android build scripts, Gradle/NDK versions, formatting fixes.
android/src/main/java/com/nitroinappbrowser/* Refactored Java/Kotlin package/class names, imports, and initialization logic.
example/* Rebranded example app: updated package names, configs, dependencies, removed obsolete/test files, enhanced TypeScript and Babel configs.
ios/Bridge.h, ios/SafariBrowserPresenter.swift Added Bridge.h stub; refactored SafariBrowserPresenter for better controller retrieval and delegate conformance.
nitro.json, package.json, post-script.js, release.config.js, tsconfig.json, src/* Modernized configs, scripts, release, linting; added Android path fix script; new TypeScript interface and main module; removed obsolete code.
react-native-nitro-in-app-browser/* Deleted all old module package files, build scripts, configs, and source files.

Sequence Diagram(s)

sequenceDiagram
    participant JS as JavaScript/TypeScript (src/index.ts)
    participant Native as Native Module (Hybrid)
    participant Android as Android Impl
    participant iOS as iOS Impl

    JS->>Native: NitroInAppBrowser.open(url, options)
    alt Platform: Android
        Native->>Android: open(url, options)
    else Platform: iOS
        Native->>iOS: open(url, options)
    end

    JS->>Native: NitroInAppBrowser.close()
    alt Platform: Android
        Native->>Android: close()
    else Platform: iOS
        Native->>iOS: close()
    end
Loading

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Remove/replace HybridObjectRegistry usage in NitroInAppBrowserPackage (29)

Poem

Oh, what a hop, what a leap, what a bound—
New namespaces and configs now abound!
Android and iOS, both fresh and spry,
Old wrappers and scripts now say goodbye.
With every file renamed, refactored, or new,
This bunny’s code garden is tidy and true!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 4cc94a2 and 6183ab4.

📒 Files selected for processing (1)
  • package.json (1 hunks)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🔭 Outside diff range comments (1)
.github/workflows/ios-build.yml (1)

97-99: 🛠️ Refactor suggestion

Remove unused buildcache restoration in old architecture build

The workflow restores buildcache but never saves it later in the workflow. Either add a step to save the buildcache or remove this restoration step.

-      - name: Restore buildcache
-        uses: mikehardy/buildcache-action@v2
-        continue-on-error: true
🧹 Nitpick comments (14)
.gitignore (1)

70-70: Verify .kotlin ignore pattern: ensure this matches the intended directory/files (perhaps .kotlin/ rather than .kotlin). Consider appending a slash to ignore the directory explicitly:

-.kotlin
+.kotlin/
example/Gemfile (1)

11-16: Good forward-compatibility for Ruby 3.4.0, but alphabetize gems.

Adding these standard library gems ensures compatibility with Ruby 3.4.0+ where they've been removed from the standard library. The explanatory comment is helpful.

According to RuboCop conventions, gems should be alphabetically sorted. Please reorder them:

 # Ruby 3.4.0 has removed some libraries from the standard library.
+gem 'benchmark'
 gem 'bigdecimal'
 gem 'logger'
-gem 'benchmark'
 gem 'mutex_m'
🧰 Tools
🪛 RuboCop (1.73)

[convention] 15-15: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem benchmark should appear before logger.

(Bundler/OrderedGems)

ios/Bridge.h (1)

1-8: Empty header file - purpose needs clarification.

This header file is currently empty except for the #pragma once directive. Consider adding a brief comment explaining its intended purpose or add the necessary declarations for the iOS bridge functionality.

src/specs/nitro-in-app-browser.nitro.ts (1)

5-6: Consider adding documentation comments

Adding JSDoc comments to the interface methods would improve code documentation and provide better IDE hints to developers using this module.

-    open(url: string, options?: NitroInAppBrowserOptions): Promise<void>
-    close(): void
+    /**
+     * Opens a URL in an in-app browser
+     * @param url The URL to open
+     * @param options Configuration options for the browser
+     * @returns A promise that resolves when the browser is opened
+     */
+    open(url: string, options?: NitroInAppBrowserOptions): Promise<void>
+    
+    /**
+     * Closes the currently open in-app browser
+     */
+    close(): void
example/babel.config.js (1)

12-15: Consider adding root aliases for common directories

While the current configuration aliases the package name to its source directory, consider adding additional aliases for common directories to further improve import readability.

  alias: {
    [pak.name]: path.join(__dirname, '../', pak.source),
+   '@components': path.join(__dirname, 'src/components'),
+   '@screens': path.join(__dirname, 'src/screens'),
+   '@utils': path.join(__dirname, 'src/utils'),
  },
post-script.js (1)

12-22: Consider adding error handling to the Android workaround

The script correctly implements a workaround for Android by modifying the generated C++ file to support custom package names. However, it lacks error handling for file operations that could fail.

 const androidWorkaround = async () => {
   const androidOnLoadFile = path.join(
     process.cwd(),
     'nitrogen/generated/android',
     'NitroInAppBrowserOnLoad.cpp'
   )
   
   
-   const str = await readFile(androidOnLoadFile, { encoding: 'utf8' })
-   await writeFile(androidOnLoadFile, str.replace(/margelo\/nitro\//g, ''))
+   try {
+     const str = await readFile(androidOnLoadFile, { encoding: 'utf8' })
+     await writeFile(androidOnLoadFile, str.replace(/margelo\/nitro\//g, ''))
+     console.log('Successfully applied Android workaround')
+   } catch (error) {
+     console.error('Failed to apply Android workaround:', error.message)
+     // Consider whether to fail the build or continue
+   }
 }
 androidWorkaround()
src/index.ts (1)

9-15: Consider adding JSDoc comments for public API

The API interface is clean and well-structured, but could benefit from JSDoc comments to document parameters and behavior, especially for external consumers of this library.

+/**
+ * In-app browser functionality for React Native
+ */
 const NitroInAppBrowser = {
+  /**
+   * Opens a URL in an in-app browser
+   * @param url The URL to open
+   * @param options Optional configuration for the browser
+   * @returns Promise that resolves when the browser is opened
+   */
     open: (url: string, options?: Omit<NitroInAppBrowserOptions, 'presentationStyle'> & {
         presentationStyle?: NitroInAppBrowserPresentationStyle
     }) =>
         NitroInAppBrowserModule.open(url, options),
+    /**
+     * Closes the in-app browser if it's open
+     */
     close: () => NitroInAppBrowserModule.close(),
 }
.github/workflows/release.yml (2)

30-33: Consider pinning Bun version

Using latest for the Bun version could lead to unexpected behavior if a new version introduces breaking changes. Consider pinning to a specific version for reproducible builds.

       - name: Setup Bun.js
         uses: oven-sh/setup-bun@v2
         with:
-          bun-version: latest
+          bun-version: '1.0.26' # or a specific version that works with your project
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 33-33: wrong indentation: expected 12 but found 10

(indentation)


34-42: Fix trailing whitespace in caching step

There's a trailing whitespace on line 42 that should be removed for consistency.

       - name: Cache bun dependencies
         id: bun-cache
         uses: actions/cache@v4
         with:
             path: ~/.bun/install/cache
             key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
             restore-keys: |
                 ${{ runner.os }}-bun-
-        
+
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 42-42: trailing spaces

(trailing-spaces)

example/package.json (2)

7-7: Consider using a more generic simulator configuration

The iOS script specifically targets 'iPhone 16'. Consider using a more generic device or making this configurable to improve flexibility for different developers.

-    "ios": "react-native run-ios --simulator='iPhone 16'",
+    "ios": "react-native run-ios",

30-30: Consider adding more development tools

The dev dependencies have been streamlined, but you might want to consider adding type checking, linting, and formatting tools like eslint-plugin-react-native, prettier, etc.

example/android/app/build.gradle (1)

66-73: Consider pinning exact JSC dependency version instead of using wildcard notation.

Using the + wildcard in version specifications (2026004.+) may lead to unexpected build behavior if a newer patch version is released with breaking changes.

-def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
+def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.0'
package.json (2)

10-17: Scripts look good, but consider adding test script.

The build and release scripts have been modernized, but there appears to be no testing script which would be valuable for CI/CD integration.

  "scripts": {
    "typecheck": "tsc --noEmit",
    "clean": "git clean -dfX",
    "release": "semantic-release",
    "build": "bun run typecheck && bob build",
    "codegen": "nitro-codegen --logLevel=\"debug\" && bun run build && node post-script.js",
    "postcodegen": "bun --cwd example pod"
+   "test": "jest"
  },

16-16: Consider environment compatibility for bun commands.

The postcodegen script uses bun, which might not be available in all environments. This could cause issues for contributors or in CI environments that don't have bun installed.

Consider providing alternatives or documentation on the build tool requirements.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 930d2ca and ae269e7.

⛔ Files ignored due to path filters (37)
  • bun.lock is excluded by !**/*.lock
  • example/Gemfile.lock is excluded by !**/*.lock
  • example/android/gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
  • example/ios/Podfile.lock is excluded by !**/*.lock
  • nitrogen/generated/.gitattributes is excluded by !**/generated/**
  • nitrogen/generated/android/NitroInAppBrowser+autolinking.cmake is excluded by !**/generated/**
  • nitrogen/generated/android/NitroInAppBrowser+autolinking.gradle is excluded by !**/generated/**
  • nitrogen/generated/android/NitroInAppBrowserOnLoad.cpp is excluded by !**/generated/**
  • nitrogen/generated/android/NitroInAppBrowserOnLoad.hpp is excluded by !**/generated/**
  • nitrogen/generated/android/c++/JHybridNitroInAppBrowserSpec.cpp is excluded by !**/generated/**
  • nitrogen/generated/android/c++/JHybridNitroInAppBrowserSpec.hpp is excluded by !**/generated/**
  • nitrogen/generated/android/c++/JNitroInAppBrowserDismissButtonLabel.hpp is excluded by !**/generated/**
  • nitrogen/generated/android/c++/JNitroInAppBrowserOptions.hpp is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinappbrowser/HybridNitroInAppBrowserSpec.kt is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinappbrowser/NitroInAppBrowserDismissButtonLabel.kt is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinappbrowser/NitroInAppBrowserOnLoad.kt is excluded by !**/generated/**
  • nitrogen/generated/android/kotlin/com/margelo/nitro/nitroinappbrowser/NitroInAppBrowserOptions.kt is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroInAppBrowser+autolinking.rb is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroInAppBrowser-Swift-Cxx-Bridge.cpp is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroInAppBrowser-Swift-Cxx-Bridge.hpp is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroInAppBrowser-Swift-Cxx-Umbrella.hpp is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroInAppBrowserAutolinking.mm is excluded by !**/generated/**
  • nitrogen/generated/ios/NitroInAppBrowserAutolinking.swift is excluded by !**/generated/**
  • nitrogen/generated/ios/c++/HybridNitroInAppBrowserSpecSwift.cpp is excluded by !**/generated/**
  • nitrogen/generated/ios/c++/HybridNitroInAppBrowserSpecSwift.hpp is excluded by !**/generated/**
  • nitrogen/generated/ios/swift/Func_void.swift is excluded by !**/generated/**
  • nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift is excluded by !**/generated/**
  • nitrogen/generated/ios/swift/HybridNitroInAppBrowserSpec.swift is excluded by !**/generated/**
  • nitrogen/generated/ios/swift/HybridNitroInAppBrowserSpec_cxx.swift is excluded by !**/generated/**
  • nitrogen/generated/ios/swift/NitroInAppBrowserDismissButtonLabel.swift is excluded by !**/generated/**
  • nitrogen/generated/ios/swift/NitroInAppBrowserOptions.swift is excluded by !**/generated/**
  • nitrogen/generated/shared/c++/HybridNitroInAppBrowserSpec.cpp is excluded by !**/generated/**
  • nitrogen/generated/shared/c++/HybridNitroInAppBrowserSpec.hpp is excluded by !**/generated/**
  • nitrogen/generated/shared/c++/NitroInAppBrowserDismissButtonLabel.hpp is excluded by !**/generated/**
  • nitrogen/generated/shared/c++/NitroInAppBrowserOptions.hpp is excluded by !**/generated/**
  • react-native-nitro-in-app-browser/android/gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
  • react-native-nitro-in-app-browser/nitrogen/generated/.gitattributes is excluded by !**/generated/**
📒 Files selected for processing (62)
  • .github/dependabot.yml (1 hunks)
  • .github/workflows/android-build.yml (0 hunks)
  • .github/workflows/ios-build.yml (3 hunks)
  • .github/workflows/release-android.yml (0 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .gitignore (1 hunks)
  • CHANGELOG.md (0 hunks)
  • NitroInAppBrowser.podspec (2 hunks)
  • README.md (1 hunks)
  • android/CMakeLists.txt (1 hunks)
  • android/build.gradle (5 hunks)
  • android/gradle.properties (1 hunks)
  • android/src/main/AndroidManifest.xml (1 hunks)
  • android/src/main/cpp/cpp-adapter.cpp (1 hunks)
  • android/src/main/java/com/nitroinappbrowser/HybridNitroInAppBrowser.kt (2 hunks)
  • android/src/main/java/com/nitroinappbrowser/NitroInAppBrowserImpl.kt (5 hunks)
  • android/src/main/java/com/nitroinappbrowser/NitroInAppBrowserPackage.java (1 hunks)
  • example/.gitignore (1 hunks)
  • example/.prettierrc.js (1 hunks)
  • example/App.tsx (1 hunks)
  • example/Gemfile (1 hunks)
  • example/__tests__/App.test.tsx (0 hunks)
  • example/android/app/build.gradle (1 hunks)
  • example/android/app/src/main/java/com/nitroinappbrowserexample/MainActivity.kt (2 hunks)
  • example/android/app/src/main/java/com/nitroinappbrowserexample/MainApplication.kt (1 hunks)
  • example/android/app/src/main/res/values/strings.xml (1 hunks)
  • example/android/build.gradle (1 hunks)
  • example/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • example/android/gradlew (2 hunks)
  • example/android/settings.gradle (1 hunks)
  • example/app.json (1 hunks)
  • example/babel.config.js (1 hunks)
  • example/ios/ExampleApp/AppDelegate.swift (0 hunks)
  • example/ios/NitroInAppBrowserExample.xcodeproj/project.pbxproj (18 hunks)
  • example/ios/NitroInAppBrowserExample.xcodeproj/xcshareddata/xcschemes/NitroInAppBrowserExample.xcscheme (4 hunks)
  • example/ios/NitroInAppBrowserExample.xcworkspace/contents.xcworkspacedata (1 hunks)
  • example/ios/NitroInAppBrowserExample/AppDelegate.swift (1 hunks)
  • example/ios/NitroInAppBrowserExample/Info.plist (1 hunks)
  • example/ios/NitroInAppBrowserExample/LaunchScreen.storyboard (1 hunks)
  • example/ios/Podfile (1 hunks)
  • example/package.json (1 hunks)
  • example/react-native.config.js (1 hunks)
  • example/tsconfig.json (1 hunks)
  • ios/Bridge.h (1 hunks)
  • ios/SafariBrowserPresenter.swift (3 hunks)
  • nitro.json (1 hunks)
  • package.json (1 hunks)
  • post-script.js (1 hunks)
  • react-native-nitro-in-app-browser/.gitignore (0 hunks)
  • react-native-nitro-in-app-browser/README.md (0 hunks)
  • react-native-nitro-in-app-browser/android/gradle/wrapper/gradle-wrapper.properties (0 hunks)
  • react-native-nitro-in-app-browser/android/gradlew (0 hunks)
  • react-native-nitro-in-app-browser/android/gradlew.bat (0 hunks)
  • react-native-nitro-in-app-browser/ios/InAppBrowserOnLoad.mm (0 hunks)
  • react-native-nitro-in-app-browser/package.json (0 hunks)
  • react-native-nitro-in-app-browser/react-native.config.js (0 hunks)
  • react-native-nitro-in-app-browser/src/index.ts (0 hunks)
  • release.config.js (1 hunks)
  • src/index.ts (1 hunks)
  • src/specs/nitro-in-app-browser.nitro.ts (1 hunks)
  • src/types.ts (0 hunks)
  • tsconfig.json (1 hunks)
💤 Files with no reviewable changes (15)
  • src/types.ts
  • example/tests/App.test.tsx
  • react-native-nitro-in-app-browser/react-native.config.js
  • react-native-nitro-in-app-browser/README.md
  • react-native-nitro-in-app-browser/android/gradle/wrapper/gradle-wrapper.properties
  • react-native-nitro-in-app-browser/ios/InAppBrowserOnLoad.mm
  • example/ios/ExampleApp/AppDelegate.swift
  • CHANGELOG.md
  • react-native-nitro-in-app-browser/.gitignore
  • react-native-nitro-in-app-browser/src/index.ts
  • react-native-nitro-in-app-browser/package.json
  • .github/workflows/android-build.yml
  • react-native-nitro-in-app-browser/android/gradlew.bat
  • react-native-nitro-in-app-browser/android/gradlew
  • .github/workflows/release-android.yml
🧰 Additional context used
🧬 Code Graph Analysis (3)
src/specs/nitro-in-app-browser.nitro.ts (1)
src/types.ts (1)
  • NitroInAppBrowserOptions (9-14)
android/src/main/cpp/cpp-adapter.cpp (2)
nitrogen/generated/android/NitroInAppBrowserOnLoad.cpp (2)
  • initialize (24-44)
  • initialize (24-24)
nitrogen/generated/android/NitroInAppBrowserOnLoad.hpp (1)
  • initialize (23-23)
src/index.ts (2)
src/specs/nitro-in-app-browser.nitro.ts (1)
  • NitroInAppBrowser (3-7)
src/types.ts (1)
  • NitroInAppBrowserOptions (9-14)
🪛 RuboCop (1.73)
example/Gemfile

[convention] 15-15: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem benchmark should appear before logger.

(Bundler/OrderedGems)

🪛 YAMLlint (1.35.1)
.github/workflows/release.yml

[warning] 5-5: wrong indentation: expected 8 but found 6

(indentation)


[warning] 6-6: wrong indentation: expected 10 but found 8

(indentation)


[warning] 10-10: wrong indentation: expected 4 but found 2

(indentation)


[warning] 17-17: wrong indentation: expected 4 but found 2

(indentation)


[warning] 18-18: wrong indentation: expected 6 but found 4

(indentation)


[warning] 21-21: wrong indentation: expected 8 but found 6

(indentation)


[warning] 26-26: wrong indentation: expected 8 but found 6

(indentation)


[warning] 29-29: wrong indentation: expected 12 but found 10

(indentation)


[warning] 33-33: wrong indentation: expected 12 but found 10

(indentation)


[error] 42-42: trailing spaces

(trailing-spaces)


[warning] 47-47: wrong indentation: expected 12 but found 10

(indentation)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build iOS Example App (old architecture)
  • GitHub Check: Build iOS Example App (new architecture)
🔇 Additional comments (96)
android/src/main/AndroidManifest.xml (1)

2-2: Approve formatting-only change
The added newline at end-of-file has no functional impact and improves POSIX compliance.

android/CMakeLists.txt (1)

29-29: Approve formatting-only update
Adding a trailing newline to the CMakeLists file is benign and aligns with standard file conventions.

README.md (1)

64-64: Approve documentation update
The phrase update to “Bootstrapped with [Create Nitro Modules]” correctly reflects the project’s new bootstrap process.

example/.gitignore (1)

36-36: Approve .gitignore enhancement
Ignoring the .kotlin/ directory prevents Kotlin build artifacts from polluting version control—this aligns with the updated Kotlin setup.

tsconfig.json (1)

36-36: Approve expanded include paths
Removing rootDir and widening "include" to ["src/**/*", "nitrogen/**/*.json"] ensures all source files and JSON specs under nitrogen/ are compiled.

example/android/build.gradle (1)

5-7: Approve target SDK bump: updating targetSdkVersion to 35 aligns with compileSdkVersion and ensures compatibility with the latest Android APIs.

example/android/app/src/main/java/com/nitroinappbrowserexample/MainApplication.kt (1)

1-1:

Details

✅ Verification successful

Verify package rename consistency: ensure all references to the old package (com.exampleapp) across manifest files, Gradle settings, and native modules are updated. You can run:


🏁 Script executed:

#!/bin/bash
# Verify no remaining references to the old package
rg -n "com\\.exampleapp" .

Length of output: 27


Package rename consistency verified

No instances of com.exampleapp remain in the codebase after running:

rg -n "com\.exampleapp" .

No further updates are required.

example/ios/NitroInAppBrowserExample/LaunchScreen.storyboard (1)

19-19: Approve storyboard label update: the label text has been updated to "NitroInAppBrowserExample", aligning with the rebranding of the example app.

example/.prettierrc.js (1)

4-4: Approve formatting change: setting bracketSpacing: false is a valid preference and aligns with the project’s code style in the example environment.

example/ios/NitroInAppBrowserExample/Info.plist (1)

7-8: Consistent display name update
The CFBundleDisplayName key has been updated to match the renamed Xcode target (NitroInAppBrowserExample), ensuring the app’s user-facing name aligns with the project refactor.

example/android/gradle/wrapper/gradle-wrapper.properties (1)

3-3: Upgrade Gradle wrapper to 8.13
The distributionUrl now points to Gradle 8.13 -bin. Please regenerate the gradle-wrapper.jar via ./gradlew wrapper and commit it to ensure the checksum matches this URL.

example/ios/Podfile (1)

17-17: Pod target renamed for consistency
The CocoaPods target has been renamed to NitroInAppBrowserExample, keeping it in sync with the Xcode project and scheme names.

android/gradle.properties (1)

1-1: Bump Kotlin and NDK versions

  • Kotlin upgraded to 2.0.21: confirm compatibility with Android Gradle Plugin 8.8.0 and your React Native setup.
  • NDK bumped to 27.1.12297006: ensure CI and developer environments have this NDK installed.

Also applies to: 5-5

example/app.json (1)

2-4: Update example app metadata
The name and displayName fields are now NitroInAppBrowserExample, matching the broader renaming across Android and iOS example projects.

example/android/app/src/main/res/values/strings.xml (1)

2-2: LGTM! App name updated to match rebranding effort.

The app name has been correctly updated from "ExampleApp" to "NitroInAppBrowserExample", which aligns with the broader rebranding across Android and iOS platforms mentioned in the summary.

example/android/settings.gradle (1)

4-4: LGTM! Root project name updated to match rebranding.

The root project name has been correctly updated from "ExampleApp" to "NitroInAppBrowserExample", aligning with the broader rebranding.

example/ios/NitroInAppBrowserExample.xcworkspace/contents.xcworkspacedata (1)

5-5: LGTM! Xcodeproj reference updated to match renamed project.

The Xcode workspace has been correctly updated to reference the renamed project file, which is essential for proper workspace functionality after the project renaming.

android/src/main/cpp/cpp-adapter.cpp (1)

5-6: LGTM! JNI initialization updated to use new namespace.

The JNI_OnLoad function has been updated to correctly reference the initialize function in the new namespace margelo::nitro::nitroinappbrowser instead of the old margelo::nitro::inappbrowser, aligning with the broader namespace restructuring in the project.

ios/Bridge.h (1)

5-5: Date in the header appears to be from the future.

The creation date is set to "5/16/2025" which is in the future. Please update this to reflect the actual creation date.

example/App.tsx (1)

2-5: Import style changed correctly.

The import has been successfully refactored from named import to default import for NitroInAppBrowser while keeping NitroInAppBrowserPresentationStyle as a named import, which aligns with the module export pattern changes.

example/android/gradlew (2)

89-89: Fixed formatting of APP_HOME assignment.

Good fix for the printf format string that was previously broken across multiple lines, ensuring the current working directory is correctly printed with a newline.


208-208: Fixed comment typo.

Removed duplicated text in the comment explaining environment variables that must not contain shell fragments.

example/android/app/src/main/java/com/nitroinappbrowserexample/MainActivity.kt (2)

1-1: Package name updated to match new example app name.

The package name has been correctly changed from com.exampleapp to com.nitroinappbrowserexample as part of the app rebranding.


14-14: Main component name updated consistently.

The component name has been properly updated from "ExampleApp" to "NitroInAppBrowserExample" to match the rebranding across the project.

example/ios/NitroInAppBrowserExample.xcodeproj/xcshareddata/xcschemes/NitroInAppBrowserExample.xcscheme (1)

18-20: Good job on the consistent renaming throughout the scheme file.

The changes correctly rename all references from "ExampleApp" to "NitroInAppBrowserExample" across BuildableName, BlueprintName, and ReferencedContainer entries. This ensures proper integration with the iOS build system.

Also applies to: 36-38, 58-60, 75-77

example/tsconfig.json (1)

1-10: Excellent TypeScript configuration update.

This configuration properly:

  • Extends the recommended React Native TypeScript config
  • Enables strict type checking for better code quality
  • Sets up module resolution with the path alias for the main package

The path alias will make imports cleaner in the example app and ensure you're testing against the local source code.

nitro.json (4)

2-2: Good addition of the schema reference.

Adding the schema reference improves IDE support and validation for this configuration file.


4-4: Consistent namespace renaming.

The C++ and Android namespaces are both updated from "inappbrowser" to "nitroinappbrowser", maintaining consistency across platforms.

Also applies to: 11-11


18-18: Module name alignment with Swift.

Updating the Kotlin module name to "HybridNitroInAppBrowser" matches the Swift module name, creating better symmetry between platforms.


22-22: Improved ignore paths pattern.

Using a glob pattern for node_modules is more maintainable and flexible than listing specific directories.

android/src/main/java/com/nitroinappbrowser/NitroInAppBrowserImpl.kt (5)

1-1: Package name updated correctly.

The package name has been updated from "com.margelo.nitro.inappbrowser" to "com.nitroinappbrowser" to align with the namespace changes in nitro.json.


10-12: Good use of Kotlin extension functions.

The added imports for Kotlin extension functions (toColorInt and toUri) modernize the code by leveraging Kotlin's extensions rather than static utility methods.


51-51: Improved URI handling with Kotlin extensions.

Using url.toUri() instead of Uri.parse(url) makes the code more readable and idiomatic Kotlin.


62-65: Better color parsing with Kotlin extensions.

Using color.toColorInt() and "#ffffff".toColorInt() instead of Color.parseColor() is more idiomatic Kotlin and consistent with other code changes.


78-78: Improved TAG constant naming.

Updating the TAG constant to match the class name "NitroInAppBrowserImpl" follows Android logging best practices and makes logs more identifiable.

NitroInAppBrowser.podspec (3)

13-13: Good addition of visionOS platform support

Adding support for visionOS expands the module's compatibility to Apple's newest platform alongside iOS.


26-27: Helpful clarification of preprocessor definition purpose

The added comment clarifies that the GCC preprocessor definitions are primarily for Folly, making the configuration more maintainable.


33-34:

Details

✅ Verification successful

Verify React-jsi and React-callinvoker dependencies

The added dependencies are important for JSI integration, which is the modern approach for React Native native modules. However, we should check if there are version constraints needed.


🏁 Script executed:

#!/bin/bash
# Check if any version constraints are specified for these dependencies in similar modules
grep -A 5 "React-jsi\|React-callinvoker" $(find . -name "*.podspec" | grep -v "NitroInAppBrowser.podspec")

Length of output: 80295


🏁 Script executed:

#!/bin/bash
# Locate and display the NitroInAppBrowser.podspec to inspect version declarations
SPEC_PATH=$(find . -name "NitroInAppBrowser.podspec" | head -n 1)
echo "Found Podspec at: $SPEC_PATH"
echo "----- Contents of NitroInAppBrowser.podspec -----"
cat "$SPEC_PATH"

Length of output: 1451


No version constraints needed for React-jsi and React-callinvoker

After inspecting core React Native Podspecs (e.g. React-RCTRuntime, React-RuntimeApple), they declare these JSI-related pods without explicit version requirements so that the project’s React Native version drives resolution. Your Podspec’s

s.dependency 'React-jsi'
s.dependency 'React-callinvoker'

matches this pattern and will pick up the correct versions from the host app. No further version constraints are required.

src/specs/nitro-in-app-browser.nitro.ts (1)

1-7: Well-structured native module interface

The new TypeScript interface properly extends the HybridObject type with platform-specific implementations for iOS (Swift) and Android (Kotlin). The interface methods are clearly defined with appropriate type signatures.

This approach aligns with modern React Native native module architecture, using the Nitro modules approach for cross-platform native code.

example/babel.config.js (1)

1-20: Improved Babel configuration with caching and module resolution

Converting to a function-based configuration with api.cache(true) improves build performance. The dynamic module resolution based on package.json metadata is a cleaner approach than hardcoded paths.

.github/workflows/ios-build.yml (3)

10-12: Expanded CI trigger paths for better change detection

Adding monitoring for Gemfile, Gemfile.lock, and bun.lock ensures that changes to Ruby and JavaScript dependencies properly trigger CI builds.

Also applies to: 25-27


14-15: Simplified path patterns for better maintainability

Changing from specific repository paths to more general patterns simplifies maintenance and adapts to the project restructuring.

Also applies to: 29-30


76-77: Updated Xcode workspace and scheme names

The workspace and scheme names have been correctly updated to match the renamed example app. This ensures the CI build targets the proper Xcode project.

Also applies to: 126-127

android/src/main/java/com/nitroinappbrowser/HybridNitroInAppBrowser.kt (3)

1-6: Package and imports look good

The package name change from com.margelo.nitro.inappbrowser to com.nitroinappbrowser and the updated imports align with the broader package namespace refactoring.


8-8: Class rename is appropriate

The class has been appropriately renamed from NitroInAppBrowser to HybridNitroInAppBrowser and now extends the HybridNitroInAppBrowserSpec class, maintaining consistency with the namespace changes.


20-20: Implementation maintains core functionality

The implementation of the open and close methods remains unchanged, ensuring that the core functionality continues to work despite the package and class renaming.

post-script.js (1)

1-8: Well-documented script header

The header comments clearly explain the purpose of this auto-generated script, making it easy to understand its function in the build process.

example/ios/NitroInAppBrowserExample.xcodeproj/project.pbxproj (3)

10-11: Consistent project renaming

The rename from "ExampleApp" to "NitroInAppBrowserExample" has been properly implemented across references, paths, and identifiers. This ensures the Xcode project will build correctly with the new naming structure.

Also applies to: 18-24, 42-52, 58-59, 73-74, 87-88


276-277: Bundle identifier updated appropriately

The product bundle identifier has been changed to "com.nitroinappbrowserexample" and the product name updated to match, which is necessary for a complete rebrand of the example app.

Also applies to: 303-304


163-163: Added PrivacyInfo.xcprivacy resource

The file includes a new reference to a PrivacyInfo.xcprivacy resource file, which aligns with Apple's requirements for privacy declarations in modern iOS apps.

example/react-native.config.js (2)

1-2: Updated package path structure

The import path for package.json and root path now point to the parent directory instead of a nested one, reflecting the flattened project structure. This change ensures proper linking of the native module.

Also applies to: 15-15


8-12: Added automatic CocoaPods installation

Adding automatic CocoaPods installation for iOS simplifies the setup process for developers and aligns with modern React Native development practices.

src/index.ts (5)

1-3: Well-structured imports

Good organization of imports, separating the module import from the type imports, and clearly aliasing the specification type.


6-7: Good use of hybrid module pattern

Creating a hybrid object that bridges between JavaScript and native code is appropriate for this use case. The generic type parameter ensures type safety.


10-12: Good type handling for presentation style

Using Omit and intersection types to allow for a more specific type for the presentationStyle property is a good approach for improving type safety.


4-4: Clean type export pattern

Re-exporting all types from the types module makes for a clean public API.


17-17: Proper module export

The default export pattern is consistent with React Native conventions.

.github/workflows/release.yml (4)

3-7: Targeted branch configuration

Good choice of branches for triggering releases. Targeting both main and next allows for stable and pre-release versions.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 5-5: wrong indentation: expected 8 but found 6

(indentation)


[warning] 6-6: wrong indentation: expected 10 but found 8

(indentation)


12-14: Effective concurrency control

The concurrency configuration prevents multiple release workflows from running simultaneously, which could lead to conflicts. Canceling in-progress runs when a new push arrives ensures that only the latest code is released.


46-49: Good security practice with tokens

Properly using environment variables for sensitive tokens and enabling npm provenance is a security best practice.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 47-47: wrong indentation: expected 12 but found 10

(indentation)


45-50:

Details

✅ Verification successful

Verify existence of 'bun release' script

The workflow runs bun release, but there's no verification that this script exists in the package.json. Ensure this script is properly defined.


🏁 Script executed:

#!/bin/bash
# Check if the release script exists in package.json
if grep -q "\"release\":" package.json; then
  echo "✅ Release script found in package.json"
else
  echo "❌ Release script not found in package.json"
  echo "Current scripts in package.json:"
  grep -A 20 "\"scripts\"" package.json | grep -B 20 "\"dependencies\""
fi

Length of output: 122


'bun release' script confirmed in package.json

The release script is present under scripts in package.json, so the workflow’s bun release step is valid—no further changes needed.

  • package.json: "scripts": { … "release": "your-release-command", … }
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 47-47: wrong indentation: expected 12 but found 10

(indentation)

example/package.json (3)

2-3: Clear naming and version reset

Renaming to "react-native-nitro-in-app-browser-example" clearly indicates this is an example for the library. Resetting the version to 0.0.1 is appropriate for an example app.


11-11: Improved pod installation process

Using Bundler for pod installation helps ensure consistent gem versions, which is a good practice for iOS development.


22-28: Aligned React Native CLI versions

The React Native CLI packages have been updated to version 18.0.0, which is a good practice to keep all related packages on the same version.

.github/dependabot.yml (4)

2-2: Beta ecosystems enabled

Enabling beta ecosystems allows Dependabot to include preview features, which could provide better dependency management.


23-29: Good bundler ecosystem configuration

Adding the bundler ecosystem for the example directory is a good practice for managing Ruby dependencies, particularly for CocoaPods.


43-52: Well-organized dependency groups

The dependency groups are well organized by package type, which helps manage updates more effectively.


31-41:

Details

❌ Incorrect review comment

Issue with 'directories' key for npm ecosystem

Similarly, the npm ecosystem configuration uses directories (plural) instead of directory (singular).

   - package-ecosystem: 'npm'
-    directories:
-      - '/example/'
-      - '/'
+    directory: '/'
+    schedule:
+      interval: 'daily'
+    labels:
+      - 'nitro-core'
+      - 'dependencies'
+      - 'typescript'
+      - 'nitrogen'
+
+  - package-ecosystem: 'npm'
+    directory: '/example/'
     schedule:
       interval: 'daily'
     labels:
       - 'nitro-core'
       - 'dependencies'
       - 'typescript'
       - 'nitrogen'

Let's verify this with the Dependabot documentation:


🌐 Web query:

Does GitHub Dependabot.yml support a 'directories' property for multiple directories?

💡 Result:

Yes, GitHub Dependabot now supports a directories property in the dependabot.yml configuration file, allowing you to specify multiple directories for the same ecosystem configuration. This feature was released as a public beta on April 29, 2024[6].

How the Directories Feature Works

Previously, developers with multiple package manifests for the same ecosystem (like npm, pip, or gradle) across different directories had to create separate configurations for each directory in the dependabot.yml file. This led to duplicated configurations and high maintenance costs[6].

With the directories key, you can now list multiple directories in a single ecosystem configuration. Here's an example of how to use it:

version: 2
updates:
  - package-ecosystem: "bundler"
    directories:
      - "/frontend"
      - "/backend"
      - "/admin"
    schedule:
      interval: "weekly"

This configuration applies to both security and version updates[6]. The feature eliminates the need to create separate configuration blocks for each directory of the same ecosystem.

Additional Features

The directories key supports wildcards and globbing patterns using the * character, which allows for more flexible directory targeting[1][2]. For example, you could potentially use patterns to match multiple directories that follow a similar naming convention.

In contrast, the older directory key (singular) is still available and accepts single-directory entries, but it does not support globbing or wildcards[1].

Implementation Details

When using the directories feature:

  • Define directories relative to the root of the repository for most package managers
  • For GitHub Actions, use the value / which will cause Dependabot to search the /.github/workflows directory and the action.yml/action.yaml file from the root directory
  • Ensure that if you use multiple blocks for the same ecosystem and target branch, there is no overlap in the directories defined[1]

This feature is part of GitHub's effort to simplify dependabot.yml configuration, making it easier for administrators to create configurations that work across repositories without requiring per-repository customization[2].

Citations:


No changes needed for directories in npm configuration
The directories key is fully supported for the npm ecosystem as of April 29, 2024, allowing multiple paths in one block (per GitHub’s Dependabot docs and changelog)[6]. Your current setup in .github/dependabot.yml is valid—no split into separate directory entries is required.

Likely an incorrect or invalid review comment.

ios/SafariBrowserPresenter.swift (4)

18-18: Good separation of concerns with extensions.

The code has been refactored to move the SFSafariViewControllerDelegate conformance to a separate extension, which follows Swift best practices for improving code organization and readability.


43-44: Better error handling for view controller retrieval.

The implementation now properly handles potential errors when retrieving the root view controller, which is a significant improvement over the previous approach.

Also applies to: 48-48


67-71: Well-structured delegate implementation.

Moving the delegate method to a dedicated extension follows Swift best practices for protocol conformance and improves code organization.


73-86: Robust root view controller retrieval.

The new getRootViewController() method properly retrieves the root view controller from the active window scene with appropriate error handling. This is more reliable than the previous approach, especially with modern iOS applications that may have multiple scenes.

android/build.gradle (6)

8-8: Gradle plugin update to 8.8.0.

Updating to a newer Android Gradle Plugin version brings new features and fixes, which is generally a good improvement.


29-35: Improved code organization.

Moving the helper methods before the android block improves readability and logical organization of the build script.


38-38: Namespace update to match new package structure.

The namespace change from "com.margelo.nitro.inappbrowser" to "com.nitroinappbrowser" aligns with the broader package renaming effort throughout the project.


50-61: Improved C++ compiler flags configuration.

Adding -Wextra improves warning detection, and separating optimization flags by build type is a better practice that allows debugging in debug builds while maintaining performance for release builds.


140-141: Better organization of dependencies.

Adding a comment to separate dependencies improves readability and organization of the build script.


148-148: Updated codegen package name to match the new namespace.

Ensuring the codegenJavaPackageName matches the new namespace maintains consistency across the codebase.

android/src/main/java/com/nitroinappbrowser/NitroInAppBrowserPackage.java (5)

1-1: Package name updated to maintain consistency.

The package name change from "com.margelo.nitro.inappbrowser" to "com.nitroinappbrowser" aligns with the namespace changes in the build.gradle file and throughout the project.


5-5: Improved type safety with NonNull annotations.

Adding @NonNull annotations to method parameters and return types enhances type safety and makes API contracts clearer.

Also applies to: 20-20, 24-24


12-12: Updated import to use the new module structure.

The import change reflects the restructuring of the native initialization code, moving toward a more organized approach.


27-27: Simplified lambda to method reference.

Using HashMap::new instead of a lambda expression is a more concise and modern Java approach.


31-31: Improved native code initialization.

Replacing direct library loading with a dedicated initialization method provides better structure and maintainability for native code integration.

release.config.js (6)

1-8: Well-structured release rule definitions.

The clear definition of commit types, their corresponding release impacts, and display titles follows semantic-release best practices and enables consistent version bumping based on conventional commits.


10-12: Smart sorting for changelog entries.

Creating a map for sorting commit types ensures a consistent and logical order in the generated changelog, improving readability.


18-18: Support for both stable and prerelease branches.

The configuration properly supports both stable (main) and prerelease (next) branches, enabling a structured release workflow.


23-28: Comprehensive release rules configuration.

The release rules configuration handles breaking changes, reverts, and various commit types according to semantic versioning principles, ensuring appropriate version bumps for different types of changes.


42-47: Automated changelog management.

The configuration for @semantic-release/changelog automates the process of updating the CHANGELOG.md file, ensuring it stays in sync with releases.


48-49: Integrated publishing to npm and GitHub.

The configuration includes plugins for publishing to both npm and GitHub, streamlining the release process.

example/android/app/build.gradle (2)

60-60: Verify ProGuard is intentionally disabled for release builds.

While disabling ProGuard for an example app makes debugging easier, this setting would increase app size and make the code more vulnerable to reverse engineering in a production app.

Is this intentional for the example app? For production apps, you would typically want to enable ProGuard minification.


80-82: Namespace and applicationId change looks good.

The namespace and applicationId have been updated from "com.exampleapp" to "com.nitroinappbrowserexample", which aligns with the app renaming across the project.

example/ios/NitroInAppBrowserExample/AppDelegate.swift (2)

6-34: AppDelegate implementation follows best practices.

The AppDelegate class properly implements the UIApplicationDelegate protocol and sets up React Native using the modern architecture pattern. The window initialization and React Native startup sequence are correctly implemented.


36-48: ReactNativeDelegate handles bundle URLs appropriately.

The custom delegate correctly manages debug vs. release mode bundle loading, following standard React Native patterns. The conditional compilation (#if DEBUG) ensures the right bundle source is used in each build configuration.

package.json (3)

21-39: Well-structured files section for package distribution.

The files section is comprehensive and properly includes all necessary files for distribution, ensuring the package will work correctly when installed.


105-118: Builder configuration is well-structured.

The react-native-builder-bob configuration is well set up with appropriate targets (CommonJS, module, TypeScript) that ensure compatibility with different module systems.


58-64:

Details

✅ Verification successful

Verify React 19 compatibility with the project.

React 19.0.0 is a very recent version that might introduce breaking changes or compatibility issues with other dependencies.


🏁 Script executed:

#!/bin/bash
# Check the compatibility of React 19 with the other dependencies
grep -r "react" --include="package.json" .

Length of output: 21683


React 19 compatibility confirmed

The project’s dependencies already target React 19:

  • react-native@0.79.2’s package.json lists "react": "^19.0.0"
  • metro-runtime@0.82.3 pulls in React 19.1.0
  • The example app also specifies React 19.0.0

No other dependencies require an earlier React version, so upgrading to React 19.0.0 is safe.

rootProject.name = 'NitroInAppBrowserExample'
include ':app'
includeBuild('../../node_modules/@react-native/gradle-plugin') No newline at end of file
includeBuild('../../node_modules/@react-native/gradle-plugin')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove duplicate React Native Gradle plugin include.

There appears to be a duplicate includeBuild for the React Native Gradle plugin. Line 1 already includes this with pluginManagement { includeBuild("../../node_modules/@react-native/gradle-plugin") }.

- includeBuild('../../node_modules/@react-native/gradle-plugin')
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
includeBuild('../../node_modules/@react-native/gradle-plugin')
🤖 Prompt for AI Agents
In example/android/settings.gradle at line 6, there is a duplicate includeBuild
statement for the React Native Gradle plugin. Remove the line
`includeBuild('../../node_modules/@react-native/gradle-plugin')` at line 6 since
it is already included within the pluginManagement block at line 1 to avoid
redundancy.

Comment thread NitroInAppBrowser.podspec
s.authors = package["author"]

s.platforms = { :ios => min_ios_version_supported }
s.platforms = { :ios => min_ios_version_supported, :visionos => 1.0 }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify that min_ios_version_supported is defined

The variable min_ios_version_supported is used but not defined in this file. Ensure it's properly defined elsewhere in the project.


🏁 Script executed:

#!/bin/bash
# Search for the definition of min_ios_version_supported in the project
grep -r "min_ios_version_supported" --include="*.rb" --include="*.podspec" .

Length of output: 1353


🏁 Script executed:

#!/bin/bash
# Display the first 50 lines of NitroInAppBrowser.podspec to inspect for require statements or variable definitions
head -n 50 NitroInAppBrowser.podspec

Length of output: 1151


🏁 Script executed:

#!/bin/bash
# Locate the autolinking Ruby script and inspect its definition of min_ios_version_supported or related helpers
echo "Autolinking file path:"
find . -type f | grep "NitroInAppBrowser+autolinking.rb"
echo "File contents (first 200 lines):"
sed -n '1,200p' nitrogen/generated/ios/NitroInAppBrowser+autolinking.rb || true

Length of output: 2336


🏁 Script executed:

#!/bin/bash
# Search for the definition of install_modules_dependencies in the project
grep -R "def install_modules_dependencies" -n .

Length of output: 718


Add a definition or import for min_ios_version_supported in your podspec

The call to

s.platforms = { :ios => min_ios_version_supported, :visionos => 1.0 }

will fail because min_ios_version_supported isn’t defined in NitroInAppBrowser.podspec. You have two options:

  1. Import the React Native helper that defines it.
    At the very top of NitroInAppBrowser.podspec, add before Pod::Spec.new:

    require "json"
    require File.join(__dir__, "node_modules", "react-native", "scripts", "react_native_pods")
  2. Or define it inline in your podspec:

    def min_ios_version_supported
      Helpers::Constants.min_ios_version_supported
    end

Locations to update:

  • NitroInAppBrowser.podspec, before the Pod::Spec.new do |s| block
🤖 Prompt for AI Agents
In NitroInAppBrowser.podspec at line 13, the variable min_ios_version_supported
is used but not defined, causing an error. Fix this by either importing the
React Native helper that defines it by adding require statements at the top of
the podspec file before the Pod::Spec.new block, or define the
min_ios_version_supported method inline in the podspec before the Pod::Spec.new
block to return the appropriate constant. This will ensure the variable is
properly defined when setting s.platforms.

Comment on lines +9 to +10
permissions:
contents: read
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Check permission configuration inconsistency

There's a potential issue with permissions. The top-level permission grants only read access, but the job-level permissions grant write access to multiple resources. Consider removing the top-level permission or aligning them.

 permissions:
-  contents: read
+  # No need for top-level permissions when they're defined at the job level

Also applies to: 20-24

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 10-10: wrong indentation: expected 4 but found 2

(indentation)

🤖 Prompt for AI Agents
In .github/workflows/release.yml around lines 9-10 and 20-24, there is an
inconsistency between the top-level permissions granting only read access to
contents and the job-level permissions granting write access to multiple
resources. To fix this, either remove the top-level permissions block entirely
or update it to align with the job-level permissions by granting the necessary
write access to the same resources.

Comment thread example/package.json
Comment on lines +14 to +16
"react": "19.0.0",
"react-native": "0.79.2",
"react-native-nitro-modules": "0.25.2"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Significant dependency upgrades

The updates to React 19.0.0, React Native 0.79.2, and react-native-nitro-modules 0.25.2 represent major version bumps. Ensure these versions are thoroughly tested together.


🌐 Web query:

Are React 19.0.0 and React Native 0.79.2 compatible? What's the current stable version of React Native?

💡 Result:

React Native 0.79.2 is the latest stable version of React Native, released on May 1, 2025. (eol.support)

React 19.0.0 is compatible with React Native 0.78. However, React Native 0.79.2 has not been officially tested with React 19. Therefore, it's recommended to use React 18 with React Native 0.79.2 to ensure stability and compatibility.

Citations:


Review Dependency Compatibility

File: example/package.json
Lines: 14–16

Snippet showing the final state of code at these lines

    "react": "19.0.0",
    "react-native": "0.79.2",
    "react-native-nitro-modules": "0.25.2"

Comment

React Native 0.79.2 is the latest stable release, but it has only been officially tested with React 18.x (compatibility for React 19.0.0 exists up to RN 0.78). To avoid runtime issues:

  • Downgrade React to a compatible 18.x version when using RN 0.79.2.
  • If you must use React 19.0.0, lock React Native at 0.78.x or add comprehensive integration tests.
  • Verify that react-native-nitro-modules@0.25.2 supports the chosen React/RN pairing.
🤖 Prompt for AI Agents
In example/package.json at lines 14 to 16, the React version is set to 19.0.0,
which is not officially compatible with React Native 0.79.2. To fix this,
downgrade the React version to a compatible 18.x release when using React Native
0.79.2. Alternatively, if React 19.0.0 is required, change React Native to
version 0.78.x and ensure react-native-nitro-modules@0.25.2 supports this
combination. Also, add thorough integration tests to verify compatibility.

Comment thread .github/dependabot.yml
Comment on lines +11 to +22
- package-ecosystem: 'gradle'
directories:
- "/package/android/"
- "/example/android/"
- '/android/'
- '/example/android/'
schedule:
interval: 'daily'
labels:
- 'nitro-core'
- 'nitrogen'
- 'dependencies'
- 'kotlin'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Issue with 'directories' key for gradle ecosystem

The Dependabot configuration uses directories (plural) for the gradle ecosystem, but Dependabot expects directory (singular). This might cause Dependabot to ignore these configurations.

   - package-ecosystem: 'gradle'
-    directories:
-      - '/android/'
-      - '/example/android/'
+    directory: '/android/'
+    schedule:
+      interval: 'daily'
+    labels:
+      - 'nitro-core'
+      - 'nitrogen'
+      - 'dependencies'
+      - 'kotlin'
+
+  - package-ecosystem: 'gradle'
+    directory: '/example/android/'
     schedule:
       interval: 'daily'
     labels:
       - 'nitro-core'
       - 'nitrogen'
       - 'dependencies'
       - 'kotlin'
🤖 Prompt for AI Agents
In the .github/dependabot.yml file between lines 11 and 22, the key for
specifying the path for the gradle ecosystem is incorrectly set as 'directories'
(plural). Change this key to 'directory' (singular) to comply with Dependabot's
expected configuration format and ensure the gradle updates are properly
detected and processed.

Comment thread package.json
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between ae269e7 and 4cc94a2.

📒 Files selected for processing (2)
  • .github/workflows/android-build.yml (4 hunks)
  • .github/workflows/ios-build.yml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/android-build.yml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/ios-build.yml

[warning] 41-41: wrong indentation: expected 2 but found 4

(indentation)


[error] 43-43: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Build Android Example App (old architecture)
  • GitHub Check: Build Android Example App (new architecture)
  • GitHub Check: Build iOS Example App (new architecture)
  • GitHub Check: Build iOS Example App (old architecture)
🔇 Additional comments (4)
.github/workflows/ios-build.yml (4)

10-17: Expand workflow triggers to cover example Ruby & Bun configurations and generalized directories

The added paths:

  • example/Gemfile & example/Gemfile.lock ensure changes to the iOS example’s Ruby dependencies retrigger the workflow.
  • cpp/**, ios/** generalize the build trigger to any native code under those folders.
  • **/bun.lock covers Bun lockfile updates across the repo.

This aligns CI with the refactored project structure.


25-32: Mirror pull_request triggers for new paths

The pull_request section now matches the push triggers, catching changes to the example’s Gemfile, lockfiles, native directories, and bun.lock. This symmetry prevents silent failures on PRs.


80-81: Update Xcode workspace & scheme names to match example app rename

The workspace and scheme have been correctly updated to:

  • NitroInAppBrowserExample.xcworkspace
  • NitroInAppBrowserExample

This aligns with the rebranded example app.


130-131: Ensure old-architecture build uses the renamed workspace & scheme

Similarly, the old-architecture job now points to:

  • NitroInAppBrowserExample.xcworkspace
  • NitroInAppBrowserExample

This maintains consistency across both build jobs.

Comment on lines +40 to +43
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix indentation and trailing spaces in the concurrency block

The current indentation (4 spaces) will fail YAML parsing, and there are trailing spaces on line 43. Adjust to 2-space indentation and remove trailing spaces:

-concurrency:
-    group: ${{ github.workflow }}-${{ github.ref }}
-    cancel-in-progress: true 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 41-41: wrong indentation: expected 2 but found 4

(indentation)


[error] 43-43: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In .github/workflows/ios-build.yml at lines 40 to 43, the concurrency block uses
4-space indentation and has trailing spaces on line 43, causing YAML parsing
errors. Fix this by changing the indentation to 2 spaces for each level and
removing any trailing spaces at the end of line 43.

@patrickkabwe patrickkabwe merged commit 3033e52 into main May 16, 2025
5 of 6 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@coderabbitai coderabbitai Bot mentioned this pull request Aug 17, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue of HybridObjectRegistry from nitro module

1 participant