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
6762e869
Commit
6762e869
authored
May 24, 2017
by
Mikkel Nygaard Ravn
Committed by
GitHub
May 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change template indentation to 2 spaces (#10289)
parent
7156fc05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
main.m
...lutter_tools/templates/create/ios-objc.tmpl/Runner/main.m
+3
-4
AppDelegate.swift
.../templates/create/ios-swift.tmpl/Runner/AppDelegate.swift
+7
-6
SwiftpluginClass.swift.tmpl
...plugin/ios-swift.tmpl/Classes/SwiftpluginClass.swift.tmpl
+9
-9
No files found.
packages/flutter_tools/templates/create/ios-objc.tmpl/Runner/main.m
View file @
6762e869
...
...
@@ -3,8 +3,7 @@
#import
"AppDelegate.h"
int
main
(
int
argc
,
char
*
argv
[])
{
@
autoreleasepool
{
return
UIApplicationMain
(
argc
,
argv
,
nil
,
NSStringFromClass
([
AppDelegate
class
]))
;
}
@
autoreleasepool
{
return
UIApplicationMain
(
argc
,
argv
,
nil
,
NSStringFromClass
([
AppDelegate
class
]))
;
}
}
packages/flutter_tools/templates/create/ios-swift.tmpl/Runner/AppDelegate.swift
View file @
6762e869
...
...
@@ -3,10 +3,11 @@ import Flutter
@UIApplicationMain
@objc
class
AppDelegate
:
FlutterAppDelegate
{
override
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplicationLaunchOptionsKey
:
Any
]?)
->
Bool
{
GeneratedPluginRegistrant
.
register
(
with
:
self
);
return
super
.
application
(
application
,
didFinishLaunchingWithOptions
:
launchOptions
);
}
override
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplicationLaunchOptionsKey
:
Any
]?
)
->
Bool
{
GeneratedPluginRegistrant
.
register
(
with
:
self
);
return
super
.
application
(
application
,
didFinishLaunchingWithOptions
:
launchOptions
);
}
}
packages/flutter_tools/templates/plugin/ios-swift.tmpl/Classes/SwiftpluginClass.swift.tmpl
View file @
6762e869
...
...
@@ -2,13 +2,13 @@ import Flutter
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);
}
public static func register(with registrar: FlutterPluginRegistrar) {
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);
}
}
\ No newline at end of file
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
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