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
acbc16af
Unverified
Commit
acbc16af
authored
Dec 01, 2017
by
Phil Quitslund
Committed by
GitHub
Dec 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swift templates tweaks. (#13291)
Dropped optional semicolons.
parent
a4bc470f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
AppDelegate.swift
.../templates/create/ios-swift.tmpl/Runner/AppDelegate.swift
+2
-2
SwiftpluginClass.swift.tmpl
...plugin/ios-swift.tmpl/Classes/SwiftpluginClass.swift.tmpl
+4
-4
No files found.
packages/flutter_tools/templates/create/ios-swift.tmpl/Runner/AppDelegate.swift
View file @
acbc16af
...
...
@@ -7,7 +7,7 @@ import Flutter
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplicationLaunchOptionsKey
:
Any
]?
)
->
Bool
{
GeneratedPluginRegistrant
.
register
(
with
:
self
)
;
return
super
.
application
(
application
,
didFinishLaunchingWithOptions
:
launchOptions
)
;
GeneratedPluginRegistrant
.
register
(
with
:
self
)
return
super
.
application
(
application
,
didFinishLaunchingWithOptions
:
launchOptions
)
}
}
packages/flutter_tools/templates/plugin/ios-swift.tmpl/Classes/SwiftpluginClass.swift.tmpl
View file @
acbc16af
...
...
@@ -3,12 +3,12 @@ import UIKit
public class Swift{{pluginClass}}: NSObject, FlutterPlugin {
public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "{{projectName}}", binaryMessenger: registrar.messenger())
;
let instance = Swift{{pluginClass}}()
;
registrar.addMethodCallDelegate(instance, channel: channel)
;
let channel = FlutterMethodChannel(name: "{{projectName}}", binaryMessenger: registrar.messenger())
let instance = Swift{{pluginClass}}()
registrar.addMethodCallDelegate(instance, channel: channel)
}
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
result("iOS " + UIDevice.current.systemVersion)
;
result("iOS " + UIDevice.current.systemVersion)
}
}
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