'How to open existing flutter project from Xcode?

Could not open file

I have an existing flutter project, which coded with VS Code. Now I want to open it from Xcode to do some configurations in Runner.xcworkspace. But it was unable to open the project from Xcode and it shows the above warning. So, how can I open my existing project from Xcode now?



Solution 1:[1]

If you want to make changes in the Runner.xcworkspace and you are using VSCode, I would suggest you open the project in VSCode and Right-Click on the ios folder.

Here you will see an option: Open in Xcode.

Select that option and the iOS project of the Flutter project will open in Xcode and you can carry on with the changes as you want

One thing to note is that like Android Studio, Xcode is not supported for Flutter Development as of now so if you try to open the whole project it will not let you.

Solution 2:[2]

I successfully open the AppFrameworkInfo.plist file with Xcode as follows.

  1. Open the project with Android Studio
  2. Select the iOS > Runner folder
  3. Navigate to Tools > Flutter > Open iOS Module in Xcode

Solution 3:[3]

Note! Unlike Android studio, flutter isn't supported to XCode yet, you have to open iOS folder of Flutter project only and solely.

1- Open XCode

2- Select 'Open existing Projects'

3- Search your project through search bar in window or search manually through directory.

4- From your Flutter Project, open the iOS folder.

And here we go! You have opened it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Saheb Singh
Solution 2 Chanaka Niroshan
Solution 3 Bilal Saeed