Integrate native IOS plug-ins into the flutter project

Modify signature

First, open the flutter project, open IOS module in Xcode, open the IOS folder in Xcode, modify the team, and change the signature to your IOS app signature.

In Android studio, run it on IOS simulator, and make sure there is no problem.

Add plug-in dependency

In pubspec.yaml, add plug-ins under dependencies to integrate zhgd with source code_ native_ Take the plugin native plug-in as an example

zhgd_native_plugin:
path: ../zhgd_native_plugin

Note: the plug-in project is located in the same level directory of the flutter project.

common problem

    file not found with < angled> include; Use "quotes" instead select target, build settings – & gt; Header search paths, add the corresponding header file search path, such as “${pods_ CONFIGURATION_ BUILD_ DIR}/Masonry/Masonry.framework/Headers” 'Masonry.h' file not found with < angled> include; Use is used in the use "quotes" instead podfile file_ frameworks!( Because several pods are swift libraries, and swift can only be integrated by framework. Therefore, the import method of header file has changed. It can only be imported through # import “masonry. H”, not # Import & lt; Masonry.h> Import in the same way:-1: Undefined symbol: _ OBJC_ CLASS_$_ Fluttermethodchannel and : - 1: undefined symbol:_ OBJC_ CLASS_$_ The fluttermethodchannel compiler cannot find the flutter. H header file. Most likely, use is used in podfile_ frameworks!( Because a swift plug-in is referenced in the project. This problem is the problem of flutter itself https://github.com/flutter/flutter/issues/10968 。

Read More: