16

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

3 Answers 3

28

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I cannot believe that this isn't in the official documentation. Do people really write iOS plugins without intellisense?
Usually, yes, as most people use Xcode, which does not have IntelliSense, which is Microsoft technology.
10
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.

Comments

5

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.