Fleet - Add file to Target (*OS development)

Hello,

/// I'm one of the unfortunate AppCode (RIP) users, hoping I could get Fleet to replace it.

One trivial feature I'm not able to find is simply “Adding a new source file to the project”.

In AppCode, when adding a new file, a dialog is presented with all the project Targets listed for selection. IIUC, in Fleet there's no way to edit or even view a file's Targets, and in fact creating a new file will not associate it with any targets, making it essentially not part of the project.

Do I have to resort to Xcode in order to add new files to a project? (Also, when doing that, Fleet doesn't sync the project file change and requires a restart to get code completion working…)

Surely I'm missing something?

Thanks!

0
6 comments

Hello, 

Can you please clarify which version are you using?

The feature that was added not so long ago: when a file is added to the target folder, it is automatically added to that target. When it is added to a folder not associated with the target, it gets added to the first target found.

Please check the latest version for this: https://www.jetbrains.com/fleet/download

Thank you 

0

Hi Olga, thanks for responding.

Fleet version: build 1.41.101
OS: Mac OS X (15.0.1, aarch64)

What do you mean by “The Target Folder”? How is that being determined? I'm assuming that's what's not working…

Is there no way to manually edit the file → targets associations?

0
Hello,

Thanks for your patience.

The Target Folder refers to the general naming association between a file and its corresponding target in your project. For example, if a file is added to a folder named "Test," it should be associated with a target that shares the same name.

Currently, there is no way to manually edit or view target associations directly within Fleet; this can only be done through Xcode so far.

Additionally, there is a known bug related to this functionality, which you can track here: https://youtrack.jetbrains.com/issue/FL-27346/
0

Hi Pavel, thanks for replying!

  1. The link you provided doesn't seem to work (404).
  2. I haven't seen this directory name ←→ target convention before, is it documented somewhere? Is it looking at the topmost parent directory (that is at the base of the project) or just the direct parent of the current file (not allowing for any subdirectories)? If it's the prior it should have worked in my case…

Would be great to get this working, it's perhaps the number one missing feature for smooth iOS development in Fleet.
 

0
I apologize, I misled you with my previous answer. Here's the logic I just confirmed with our developers:

Fleet checks which target corresponds to the files in a specific directory and selects the target that applies to the majority of those files. In case there are multiple candidates, the backend returns all of them. However, as there's still no UI for choosing among them, Fleet frontend chooses the first target from the returned list and applies it to a project.

As for the issue, I just changed its visibility, please check.
0

Thanks Pavel!

That's very helpful to know, I'll do some testing and update the issue (link works now) – thanks!

0

Please sign in to leave a comment.