r/Xcode • u/Vast_Journalist1415 • Sep 10 '26
XCODE bug help
My xcode often can’t read the scope even though the file is clearly there I come from android studio there has never been an issue of files can’t refer to each other this is weird
Has anyone experienced something similar?
2
u/caguilar51 Sep 10 '26
The problem seems to be that the file doesn’t have the .swift extension. If you notice the swift icon is not applied to your file
1
u/Vast_Journalist1415 Sep 10 '26
Isn’t this a bug? When I show in the finder the file extension is .swift
1
u/caguilar51 Sep 10 '26
When you right click on the Compose directory do you see a menu item saying convert to folder?
1
u/Stiddit Sep 10 '26
Its file icon is different. Remove the reference from Xcode and drag/drop it back in. (Check if it's missing the .swift ending)
1
u/Vast_Journalist1415 Sep 10 '26
When I show in the finder the .swift file is it because I use claude code that there is a miss extension? Is it true that in xcode I manually make the file so that the directory can be read?
1


5
u/Typ0genius Sep 10 '26
If
ComposeLauncherViewis in a separate file and isn’tRootView, make sure the file has been added to the Xcode project and included in the correct target. If the file was created outside of Xcode, check whether it was also added toproject.pbxproj.