Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
b0842491
Unverified
Commit
b0842491
authored
Oct 18, 2022
by
Jenn Magder
Committed by
GitHub
Oct 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Swift plugin Objective-C files (#113585)
parent
eea60f86
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
27 deletions
+6
-27
pluginClass.h.tmpl
...emplates/plugin/ios-swift.tmpl/Classes/pluginClass.h.tmpl
+0
-4
pluginClass.m.tmpl
...emplates/plugin/ios-swift.tmpl/Classes/pluginClass.m.tmpl
+0
-15
pluginClass.swift.tmpl
...ates/plugin/ios-swift.tmpl/Classes/pluginClass.swift.tmpl
+2
-2
template_manifest.json
packages/flutter_tools/templates/template_manifest.json
+1
-3
create_test.dart
...tter_tools/test/commands.shard/permeable/create_test.dart
+3
-3
No files found.
packages/flutter_tools/templates/plugin/ios-swift.tmpl/Classes/pluginClass.h.tmpl
deleted
100644 → 0
View file @
eea60f86
#import <Flutter/Flutter.h>
@interface {{pluginClass}} : NSObject<FlutterPlugin>
@end
packages/flutter_tools/templates/plugin/ios-swift.tmpl/Classes/pluginClass.m.tmpl
deleted
100644 → 0
View file @
eea60f86
#import "{{pluginClass}}.h"
#if __has_include(<{{projectName}}/{{projectName}}-Swift.h>)
#import <{{projectName}}/{{projectName}}-Swift.h>
#else
// Support project import fallback if the generated compatibility header
// is not copied when this plugin is created as a library.
// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816
#import "{{projectName}}-Swift.h"
#endif
@implementation {{pluginClass}}
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
[Swift{{pluginClass}} registerWithRegistrar:registrar];
}
@end
packages/flutter_tools/templates/plugin/ios-swift.tmpl/Classes/
Swift
pluginClass.swift.tmpl
→
packages/flutter_tools/templates/plugin/ios-swift.tmpl/Classes/pluginClass.swift.tmpl
View file @
b0842491
import Flutter
import UIKit
public class
Swift
{{pluginClass}}: NSObject, FlutterPlugin {
public class {{pluginClass}}: NSObject, FlutterPlugin {
public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "{{projectName}}", binaryMessenger: registrar.messenger())
let instance =
Swift
{{pluginClass}}()
let instance = {{pluginClass}}()
registrar.addMethodCallDelegate(instance, channel: channel)
}
...
...
packages/flutter_tools/templates/template_manifest.json
View file @
b0842491
...
...
@@ -258,9 +258,7 @@
"templates/plugin/ios-objc.tmpl/Classes/pluginClass.h.tmpl"
,
"templates/plugin/ios-objc.tmpl/Classes/pluginClass.m.tmpl"
,
"templates/plugin/ios-objc.tmpl/projectName.podspec.tmpl"
,
"templates/plugin/ios-swift.tmpl/Classes/pluginClass.h.tmpl"
,
"templates/plugin/ios-swift.tmpl/Classes/pluginClass.m.tmpl"
,
"templates/plugin/ios-swift.tmpl/Classes/SwiftpluginClass.swift.tmpl"
,
"templates/plugin/ios-swift.tmpl/Classes/pluginClass.swift.tmpl"
,
"templates/plugin/ios-swift.tmpl/projectName.podspec.tmpl"
,
"templates/plugin/ios.tmpl/.gitignore"
,
"templates/plugin/ios.tmpl/Assets/.gitkeep"
,
...
...
packages/flutter_tools/test/commands.shard/permeable/create_test.dart
View file @
b0842491
...
...
@@ -638,9 +638,7 @@ void main() {
'example/ios/Runner/AppDelegate.swift'
,
'example/ios/Runner/Runner-Bridging-Header.h'
,
'example/lib/main.dart'
,
'ios/Classes/FlutterProjectPlugin.h'
,
'ios/Classes/FlutterProjectPlugin.m'
,
'ios/Classes/SwiftFlutterProjectPlugin.swift'
,
'ios/Classes/FlutterProjectPlugin.swift'
,
'lib/flutter_project.dart'
,
],
unexpectedPaths:
<
String
>[
...
...
@@ -649,6 +647,8 @@ void main() {
'example/ios/Runner/AppDelegate.h'
,
'example/ios/Runner/AppDelegate.m'
,
'example/ios/Runner/main.m'
,
'ios/Classes/FlutterProjectPlugin.h'
,
'ios/Classes/FlutterProjectPlugin.m'
,
],
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment