chore: generate template (#17)
This commit is contained in:
committed by
GitHub
parent
5baf0dfa61
commit
699457e663
@@ -0,0 +1,4 @@
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
@interface {{project_name.pascalCase()}}Plugin : NSObject <FlutterPlugin>
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
#import "{{project_name.pascalCase()}}Plugin.h"
|
||||
|
||||
@implementation {{project_name.pascalCase()}}Plugin
|
||||
|
||||
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
|
||||
FlutterMethodChannel *channel =
|
||||
[FlutterMethodChannel methodChannelWithName:@"{{project_name.snakeCase()}}_ios"
|
||||
binaryMessenger:registrar.messenger];
|
||||
[channel setMethodCallHandler:^(FlutterMethodCall *call, FlutterResult result) {
|
||||
if ([@"getPlatformName" isEqualToString:call.method]) {
|
||||
result(@"iOS");
|
||||
} else {
|
||||
result(FlutterMethodNotImplemented);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
||||
#
|
||||
Pod::Spec.new do |s|
|
||||
s.name = '{{project_name.snakeCase()}}_ios'
|
||||
s.version = '0.0.1'
|
||||
s.summary = 'An iOS implementation of the {{project_name.snakeCase()}} plugin.'
|
||||
s.description = <<-DESC
|
||||
An iOS implementation of the {{project_name.snakeCase()}} plugin.
|
||||
DESC
|
||||
s.homepage = 'http://example.com'
|
||||
s.license = { :type => 'BSD', :file => '../LICENSE' }
|
||||
s.author = { 'Your Company' => 'email@example.com' }
|
||||
s.source = { :path => '.' }
|
||||
s.source_files = 'Classes/**/*'
|
||||
s.public_header_files = 'Classes/**/*.h'
|
||||
s.dependency 'Flutter'
|
||||
|
||||
s.platform = :ios, '9.0'
|
||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
|
||||
end
|
||||
Reference in New Issue
Block a user