I want make some changes in plugin. For android part everything is clear. But how can I open iOs part of plugin? There are no Xcode project just several .h and .m files.
How to open iOs plugin at Xcode?
https://github.com/flutter/plugins/tree/master/packages/video_player/video_player/ios
Open the default Xcode workspace in your project by running open ios/Runner.xcworkspace in a terminal window from your Flutter project directory. Select the device you intend to deploy to in the device drop-down menu next to the run button. Select the Runner project in the left navigation panel.
Note! Unlike Android studio, flutter isn't supported to XCode yet, you have to open iOS folder of Flutter project only and solely.
Flutter is a multi-platform application development framework that enables you, among other platforms, to develop iOS and Android apps from the same source code. However, you need to use Xcode to build an iOS app and Xcode will only work on macOS.
First, be sure to run the example app at least once.
$ cd example
$ flutter run
Then open the project in Xcode. The Xcode project is in example/ios
. The swift (or obj-c) code that implements the iOS end of the method channel is found in (replace the italic strings with the actual plugin name):
Pods/Development Pods/plugin_name/../../example/ios/.symlinks/plugins/plugin_name/ios/Classes
which you can find by opening the tree in the left pane.
go to root of package then.
cd example
flutter build ios --no-codesign
Launch Xcode.
Select File > Open, and select the hello/example/ios/Runner.xcworkspace file.
The iOS platform code for your plugin is located in Pods/Development Pods/hello/../../example/ios/.symlinks/plugins/hello/ios/Classes in the Project Navigator.
The quickest way to open Xcode is xed ios
when you are in the root project directory.
The plugins are put in $project_dir/ios/Pods
The plugins are actually installed by running pod install
. flutter run
will call pod install
for you while also building the app. If you want to save time, just run cd ios; pod install
and don't build your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With