Make flutter project swift compatible AFTER creation
1,481
Delete the ios
directory and run in the project directory
flutter create -i swift .
Previous manual changes need to be re-applied.
Author by
FunnyStunny
Updated on November 19, 2022Comments
-
FunnyStunny over 1 year
When i created my flutter project I didn't make it swift compatible because we didn't think we would need it, but now, after months of development and a couple releases on android, I've been asked to run/test the app on ios devices.
Is there a way to enable swift support at this point without having to create a new project from scratch and copy/paste the code there? There are a couple packages that require it in order to be run on ios.
-
FunnyStunny over 5 yearsThank you, this worked, now i have to set up all the swift configurations in order for the packages that needed this to run properly.
-
joseph.hainline about 4 years"Previous manual changes need to be re-applied" is the crux of the problem. Is there no way to do it without having to re-apply manual changes?
-
Günter Zöchbauer about 4 yearsIf you use git it shouldn't be too hard. You can check the diff after the `flutter create command and then decide case by case if you want the change in your new code. If you are unsure you can try with or without applying a change and keep what works. I'm not aware of an easier way.
-
zizutg over 3 yearsThank you. For some dummy as myself :D, I skipped the "." in the end, which was a huge mistake.