How to open flutter plugins at Xcode?

故事扮演 提交于 2020-05-23 11:01:27

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/59255961/how-to-open-flutter-plugins-at-xcode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!