Replace AppDelegate.m to AppDelegate.swift

1,468 views
Skip to first unread message

Ramziddin Toshmukhamedov

unread,
Aug 28, 2018, 3:26:49 AM8/28/18
to Flutter Dev
How to add AppDelegate.swift to the existing Flutter project with default Objective C AppDelegate.m

Mikkel Ravn

unread,
Aug 28, 2018, 3:46:14 AM8/28/18
to rtoshmu...@gmail.com, Flutter Dev
If you have made no changes to the ios/ folder, you can just delete it and have Flutter tooling recreate it in Swift mode using

$ cd <parent folder of my_project>
$ rm -rf my_project/ios/
$ flutter create -i swift my_project       // Add -a kotlin and/or --org com.some.where, if you did so originally

Otherwise, you can study the differences between the Objective-C templates and the Swift templates using the links below:

The common iOS project template:


One notable difference is that you need a bridging header file in the Runner folder. Remember to add/remove files to the Xcode project, not just the underlying folders.

Hope this helps,
Mikkel

On Tue, Aug 28, 2018 at 9:26 AM Ramziddin Toshmukhamedov <rtoshmu...@gmail.com> wrote:
How to add AppDelegate.swift to the existing Flutter project with default Objective C AppDelegate.m

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Mikkel Nygaard Ravn
Software Engineer

Ramziddin Toshmukhamedov

unread,
Aug 31, 2018, 7:28:10 AM8/31/18
to Flutter Dev
Thanks. It's working
Reply all
Reply to author
Forward
0 new messages