fix(cli): ios dev and ios build support for bun#10569
Conversation
Package Changes Through 028cffeThere are 6 changes which include tauri-build with prepatch, tauri-codegen with prerelease, tauri-utils with prerelease, tauri-cli with prerelease, @tauri-apps/cli with prerelease, tauri with prerelease Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
| // so we must change working directory to the src-tauri folder to resolve the tauri dir | ||
| if (var_os("npm_lifecycle_event").is_none() && var_os("PNPM_PACKAGE_NAME").is_none()) | ||
| || var("npm_config_user_agent").map_or(false, |agent| agent.starts_with("bun")) |
There was a problem hiding this comment.
should we remove this check and always set the directory?
There was a problem hiding this comment.
when using pnpm npm yarn etc the CWD is automatically set to the app dir, so moving up two parents would crash it.
when using cargo or bun it'll actually be under gen/apple, and we can't resolve the tauri dir from there.. so we need this condition
There was a problem hiding this comment.
we could instead check if CWD ends with gen/apple idk if it helps
There was a problem hiding this comment.
xcode-script and android-script are only valid if they are executed from a process that was launched by ios dev/build or android dev/build, right? ios dev/build or android dev/build could pass the app_dir using either the options mechanism we have or through an environment variable.
There was a problem hiding this comment.
also looking at
, we already resolve the app_dir, why not use that and set the directory to it.There was a problem hiding this comment.
we can only resolve because we changed the CWD earlier..
to use the options we need to resolve the tauri config, which means we need to resolve the tauri dir too, so it doesn't help
There was a problem hiding this comment.
and xcode isn't a big fan of environment variables, plus if there's already an opened instance it wouldn't receive it
There was a problem hiding this comment.
alright, let's merge as is and hope it doesn't crash again.
|
I believe this may still be an issue. I changed the rust build phase of the Xcode project from |
No description provided.