Skip to content

fix(ios): Fix check for dynamic lib#6032

Merged
NathanWalker merged 1 commit into
NativeScript:mainfrom
PeterStaev:fix-incorrect-dynamic-lib-check
May 22, 2026
Merged

fix(ios): Fix check for dynamic lib#6032
NathanWalker merged 1 commit into
NativeScript:mainfrom
PeterStaev:fix-incorrect-dynamic-lib-check

Conversation

@PeterStaev
Copy link
Copy Markdown
Contributor

@PeterStaev PeterStaev commented May 8, 2026

PR Checklist

What is the current behavior?

There seems to be a problem with the check whether or not a library is dynamic so it can be set to embed. This causes problems with some 3rd party plugins (see triniwiz/nativescript-plugins#223) and makes the apps crash on startup (both simulator and device).

For some reason the current logic isn't looking at the BinaryPath that there is in the Info.plist for the framework, but is trying to "guess" the path to the binary from other parts.

For example for the CouchBase plugin the path that the current logic generates is:

/path/to/project/node_modules/@triniwiz/nativescript-couchbase/platforms/ios/CouchbaseLite.xcframework/ios-arm64_x86_64-maccatalyst/CouchbaseLite.framework/CouchbaseLite

But the correct path is:

/path/to/project/node_modules/@triniwiz/nativescript-couchbase/platforms/ios/CouchbaseLite.xcframework/ios-arm64_x86_64-maccatalyst/CouchbaseLite.framework/Versions/A/CouchbaseLite

What is the new behavior?

The binary path is calculated first based on the BinaryPath from the Info.plist and if that is not present the old logic is used.

Fixes/Implements/Closes #[Issue Number].

Summary by CodeRabbit

  • Refactor
    • Improved iOS framework binary detection and resolution mechanisms.

Review Change Stack

@NathanWalker
Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 51d7172b-1d74-40b6-98d3-59d420d051b0

📥 Commits

Reviewing files that changed from the base of the PR and between 7d540b6 and fb7559d.

📒 Files selected for processing (1)
  • lib/services/ios-project-service.ts

📝 Walkthrough

Walkthrough

iOS dynamic framework detection refactored framework binary path resolution. The isDynamicFrameworkBundle helper now accepts a single pre-computed frameworkBinaryPath parameter instead of deriving it from bundlePath and frameworkName. For .xcframework bundles, binary path resolution leverages library.BinaryPath when available; for regular frameworks, the path is computed directly and passed to the helper.

Changes

iOS Framework Binary Path Resolution

Layer / File(s) Summary
Helper signature and framework binary path resolution
lib/services/ios-project-service.ts
Helper signature refactored to accept frameworkBinaryPath instead of deriving it. .xcframework handling computes paths using library.BinaryPath when present; non-.xcframework path joins frameworkPath and frameworkName before passing to the helper.

🎯 4 (Complex) | ⏱️ ~35 minutes

🐰 A helper refactored, paths now clear,
Binaries found and passed with cheer,
.xcframework gets library's way,
Frameworks rejoice in paths today! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(ios): Fix check for dynamic lib' is partially related to the changeset, referring to a real aspect of the change (iOS dynamic library detection) but uses vague phrasing ('Fix check') that doesn't clearly convey the specific fix involving binary path resolution from framework Info.plist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@NathanWalker NathanWalker merged commit d88337c into NativeScript:main May 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants