Fix/expo ios - #154
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes iOS-related issues in the Expo configuration plugin for react-native-vosk, specifically addressing resource file handling and Xcode project management.
- Corrects the iOS root path calculation to use project root instead of platform project root
- Replaces manual file copying and Xcode project manipulation with Expo's built-in utilities
- Bumps the package version from 2.1.2 to 2.1.3
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| plugin/src/withVosk.ts | Fixes iOS model resource handling by using IOSConfig utilities and correcting path resolution |
| package.json | Version bump to 2.1.3 |
| configMod.modRequest.projectRoot, | ||
| relModelPath | ||
| ); | ||
| const absSource = path.relative(iosRoot, relModelPath); |
There was a problem hiding this comment.
The path.relative function returns a relative path from iosRoot to relModelPath, but the variable name absSource suggests it should be an absolute path. This will likely cause the fs.existsSync check on line 39 to fail when relModelPath is already an absolute path. Consider using path.resolve(configMod.modRequest.projectRoot, relModelPath) instead to create a proper absolute path.
Suggested change
| const absSource = path.relative(iosRoot, relModelPath); | |
| const absSource = path.resolve(iosRoot, relModelPath); |
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.
No description provided.