Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command not found: xcsync #1605

Open
DgkanatsiosMasoutis opened this issue Nov 12, 2024 · 5 comments
Open

Command not found: xcsync #1605

DgkanatsiosMasoutis opened this issue Nov 12, 2024 · 5 comments
Labels

Comments

@DgkanatsiosMasoutis
Copy link

I get this error when i try to run xcsync generate on CLI VS code:

zsh: command not found: xcsync

I checked if the xcsync tool is installed and i get "Tool 'dotnet-xcsync' is already installed.". I can't find why is this happening.

@davidortinau
Copy link
Member

@DgkanatsiosMasoutis is it installed globally? This is needed at present.

On your Mac:

dotnet tool install --global dotnet-xcsync --version 0.1.0-preview.24509.2

https://www.nuget.org/packages/dotnet-xcsync/0.1.0-preview.24509.2

Perhaps uninstall what you have and install for that command.

@DgkanatsiosMasoutis
Copy link
Author

@davidortinau yes it is installed globally. I found a that it is not enabled every time and i have to enable it with a command that only works for the current session but it works fine. Also i have another issue. I want to create a widget within my Xcode project and then transfer it to my .net MAUI solution but it tells me i cannot. Do i need something specific to make it work or it is just my code? Thanks in advance!

@mcumming
Copy link

@davidortinau yes it is installed globally. I found a that it is not enabled every time and i have to enable it with a command that only works for the current session but it works fine. Also i have another issue. I want to create a widget within my Xcode project and then transfer it to my .net MAUI solution but it tells me i cannot. Do i need something specific to make it work or it is just my code? Thanks in advance!

  1. What is the command that you have to use to enable it?
  2. What type of widget are you trying to create?

@DgkanatsiosMasoutis
Copy link
Author

  1. This is the message i get every time i use open VS Code:
Tools directory '/Users/MY-PATH/.dotnet/tools' is not currently on the PATH environment variable.

If you are using zsh, you can add it to your profile by running the following command:
 
cat << \EOF >> ~/.zprofile
Add .NET Core SDK tools
export PATH="$PATH:/Users/MY-PATH/.dotnet/tools"
EOF
 
And run `zsh -l` to make it available for current session.
 
You can only add it to the current session by running the following command:
 
export PATH="$PATH:/Users/MY-PATH/.dotnet/tools"
  1. My widget is a view with a QR Code for the user to scan it using Timeline

@mcumming
Copy link

Ok, from the message you are receiving, it appears that you installed the .NET SDK using the install script and not the installer? If that is the case, the message is correct and you need to follow the instructions on adding the tools path to your profile so that you don't have to continually add it for every session.

As long as your widget is developed using C# it should work. xcsync cannot process a widget created in Xcode using ObjC, the only constructs we support syncing back from Xcode are Outlet and Actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants