13

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

otopba
  • 214
  • 1
  • 6
  • 14

3 Answers3

22

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.

Richard Heap
  • 48,344
  • 9
  • 130
  • 112
7
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.

ke Chankrisna
  • 171
  • 3
  • 4
3

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.

Ben Butterworth
  • 22,056
  • 10
  • 114
  • 167