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
178f446d
Commit
178f446d
authored
May 29, 2017
by
Mikkel Nygaard Ravn
Committed by
GitHub
May 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add generated plugin registry (#10375)
parent
a755ccd4
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
86 additions
and
7 deletions
+86
-7
MainActivity.java
...c/main/java/com/example/platformchannel/MainActivity.java
+2
-1
GeneratedPluginRegistrant.java
...in/java/io/flutter/plugins/GeneratedPluginRegistrant.java
+11
-0
project.pbxproj
...les/platform_channel/ios/Runner.xcodeproj/project.pbxproj
+6
-0
AppDelegate.m
examples/platform_channel/ios/Runner/AppDelegate.m
+3
-2
GeneratedPluginRegistrant.h
...s/platform_channel/ios/Runner/GeneratedPluginRegistrant.h
+14
-0
GeneratedPluginRegistrant.m
...s/platform_channel/ios/Runner/GeneratedPluginRegistrant.m
+12
-0
project.pbxproj
...atform_channel_swift/ios/Runner.xcodeproj/project.pbxproj
+6
-1
AppDelegate.swift
examples/platform_channel_swift/ios/Runner/AppDelegate.swift
+2
-1
GeneratedPluginRegistrant.h
...form_channel_swift/ios/Runner/GeneratedPluginRegistrant.h
+14
-0
GeneratedPluginRegistrant.m
...form_channel_swift/ios/Runner/GeneratedPluginRegistrant.m
+12
-0
Runner-Bridging-Header.h
...latform_channel_swift/ios/Runner/Runner-Bridging-Header.h
+4
-2
No files found.
examples/platform_channel/android/app/src/main/java/com/example/platformchannel/MainActivity.java
View file @
178f446d
...
...
@@ -22,6 +22,7 @@ import io.flutter.plugin.common.MethodChannel;
import
io.flutter.plugin.common.MethodChannel.MethodCallHandler
;
import
io.flutter.plugin.common.MethodChannel.Result
;
import
io.flutter.plugin.common.MethodCall
;
import
io.flutter.plugins.GeneratedPluginRegistrant
;
public
class
MainActivity
extends
FlutterActivity
{
private
static
final
String
BATTERY_CHANNEL
=
"samples.flutter.io/battery"
;
...
...
@@ -30,7 +31,7 @@ public class MainActivity extends FlutterActivity {
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
GeneratedPluginRegistrant
.
registerWith
(
this
);
new
EventChannel
(
getFlutterView
(),
CHARGING_CHANNEL
).
setStreamHandler
(
new
StreamHandler
()
{
private
BroadcastReceiver
chargingStateChangeReceiver
;
...
...
examples/platform_channel/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
0 → 100644
View file @
178f446d
package
io
.
flutter
.
plugins
;
import
io.flutter.plugin.common.PluginRegistry
;
/**
* Generated file. Do not edit.
*/
public
final
class
GeneratedPluginRegistrant
{
public
static
void
registerWith
(
PluginRegistry
registry
)
{
}
}
examples/platform_channel/ios/Runner.xcodeproj/project.pbxproj
View file @
178f446d
...
...
@@ -10,6 +10,7 @@
3B3967161E833CAA004F5970
/* AppFrameworkInfo.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
;
};
3B80C3941E831B6300D905FE
/* App.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
};
3B80C3951E831B6300D905FE
/* App.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
74970F681EDC0F26000507F3
/* GeneratedPluginRegistrant.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
74970F671EDC0F26000507F3
/* GeneratedPluginRegistrant.m */
;
};
9705A1C61CF904A100538489
/* Flutter.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9740EEBA1CF902C7004384FC
/* Flutter.framework */
;
};
9705A1C71CF904A300538489
/* Flutter.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9740EEBA1CF902C7004384FC
/* Flutter.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
9740EEB41CF90195004384FC
/* Debug.xcconfig in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9740EEB21CF90195004384FC
/* Debug.xcconfig */
;
};
...
...
@@ -40,6 +41,8 @@
/* Begin PBXFileReference section */
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
name
=
AppFrameworkInfo.plist
;
path
=
Flutter/AppFrameworkInfo.plist
;
sourceTree
=
"<group>"
;
};
3B80C3931E831B6300D905FE
/* App.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
App.framework
;
path
=
Flutter/App.framework
;
sourceTree
=
"<group>"
;
};
74970F661EDC0F26000507F3
/* GeneratedPluginRegistrant.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GeneratedPluginRegistrant.h
;
sourceTree
=
"<group>"
;
};
74970F671EDC0F26000507F3
/* GeneratedPluginRegistrant.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GeneratedPluginRegistrant.m
;
sourceTree
=
"<group>"
;
};
7AFA3C8E1D35360C0083082E
/* Release.xcconfig */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.xcconfig
;
name
=
Release.xcconfig
;
path
=
Flutter/Release.xcconfig
;
sourceTree
=
"<group>"
;
};
7AFFD8ED1D35381100E5BB4D
/* AppDelegate.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AppDelegate.h
;
sourceTree
=
"<group>"
;
};
7AFFD8EE1D35381100E5BB4D
/* AppDelegate.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AppDelegate.m
;
sourceTree
=
"<group>"
;
};
...
...
@@ -103,6 +106,8 @@
97C146F01CF9000F007C117D
/* Runner */
=
{
isa
=
PBXGroup
;
children
=
(
74970F661EDC0F26000507F3
/* GeneratedPluginRegistrant.h */
,
74970F671EDC0F26000507F3
/* GeneratedPluginRegistrant.m */
,
7AFFD8ED1D35381100E5BB4D
/* AppDelegate.h */
,
7AFFD8EE1D35381100E5BB4D
/* AppDelegate.m */
,
97C146FA1CF9000F007C117D
/* Main.storyboard */
,
...
...
@@ -239,6 +244,7 @@
files
=
(
978B8F6F1D3862AE00F588F7
/* AppDelegate.m in Sources */
,
97C146F31CF9000F007C117D
/* main.m in Sources */
,
74970F681EDC0F26000507F3
/* GeneratedPluginRegistrant.m in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
examples/platform_channel/ios/Runner/AppDelegate.m
View file @
178f446d
...
...
@@ -4,7 +4,7 @@
#import "AppDelegate.h"
#import <Flutter/Flutter.h>
#import "GeneratedPluginRegistrant.h"
@implementation
AppDelegate
{
FlutterEventSink
_eventSink
;
...
...
@@ -12,6 +12,7 @@
-
(
BOOL
)
application
:
(
UIApplication
*
)
application
didFinishLaunchingWithOptions
:
(
NSDictionary
*
)
launchOptions
{
[
GeneratedPluginRegistrant
registerWithRegistry
:
self
];
FlutterViewController
*
controller
=
(
FlutterViewController
*
)
self
.
window
.
rootViewController
;
...
...
@@ -38,7 +39,7 @@
eventChannelWithName
:
@"samples.flutter.io/charging"
binaryMessenger
:
controller
];
[
chargingChannel
setStreamHandler
:
self
];
return
YES
;
return
[
super
application
:
application
didFinishLaunchingWithOptions
:
launchOptions
]
;
}
-
(
int
)
getBatteryLevel
{
...
...
examples/platform_channel/ios/Runner/GeneratedPluginRegistrant.h
0 → 100644
View file @
178f446d
//
// Generated file. Do not edit.
//
#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h
#import <Flutter/Flutter.h>
@interface
GeneratedPluginRegistrant
:
NSObject
+
(
void
)
registerWithRegistry
:(
NSObject
<
FlutterPluginRegistry
>*
)
registry
;
@end
#endif
/* GeneratedPluginRegistrant_h */
examples/platform_channel/ios/Runner/GeneratedPluginRegistrant.m
0 → 100644
View file @
178f446d
//
// Generated file. Do not edit.
//
#import "GeneratedPluginRegistrant.h"
@implementation
GeneratedPluginRegistrant
+
(
void
)
registerWithRegistry
:(
NSObject
<
FlutterPluginRegistry
>*
)
registry
{
}
@end
examples/platform_channel_swift/ios/Runner.xcodeproj/project.pbxproj
View file @
178f446d
...
...
@@ -11,6 +11,7 @@
3B80C3941E831B6300D905FE
/* App.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
};
3B80C3951E831B6300D905FE
/* App.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
3BAEBBFF1EBA9DA300EE9294
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3BAEBBFE1EBA9DA300EE9294
/* AppDelegate.swift */
;
};
74970F6B1EDC12EC000507F3
/* GeneratedPluginRegistrant.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
74970F6A1EDC12EC000507F3
/* GeneratedPluginRegistrant.m */
;
};
9705A1C61CF904A100538489
/* Flutter.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9740EEBA1CF902C7004384FC
/* Flutter.framework */
;
};
9705A1C71CF904A300538489
/* Flutter.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9740EEBA1CF902C7004384FC
/* Flutter.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
9740EEB41CF90195004384FC
/* Debug.xcconfig in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9740EEB21CF90195004384FC
/* Debug.xcconfig */
;
};
...
...
@@ -41,6 +42,8 @@
3B80C3931E831B6300D905FE
/* App.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
App.framework
;
path
=
Flutter/App.framework
;
sourceTree
=
"<group>"
;
};
3BAEBBFE1EBA9DA300EE9294
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
3BAEBC001EBA9DCA00EE9294
/* Runner-Bridging-Header.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"Runner-Bridging-Header.h"
;
sourceTree
=
"<group>"
;
};
74970F691EDC12EC000507F3
/* GeneratedPluginRegistrant.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GeneratedPluginRegistrant.h
;
sourceTree
=
"<group>"
;
};
74970F6A1EDC12EC000507F3
/* GeneratedPluginRegistrant.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GeneratedPluginRegistrant.m
;
sourceTree
=
"<group>"
;
};
7AFA3C8E1D35360C0083082E
/* Release.xcconfig */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.xcconfig
;
name
=
Release.xcconfig
;
path
=
Flutter/Release.xcconfig
;
sourceTree
=
"<group>"
;
};
9740EEB21CF90195004384FC
/* Debug.xcconfig */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.xcconfig
;
name
=
Debug.xcconfig
;
path
=
Flutter/Debug.xcconfig
;
sourceTree
=
"<group>"
;
};
9740EEB31CF90195004384FC
/* Generated.xcconfig */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.xcconfig
;
name
=
Generated.xcconfig
;
path
=
Flutter/Generated.xcconfig
;
sourceTree
=
"<group>"
;
};
...
...
@@ -101,6 +104,8 @@
97C146F01CF9000F007C117D
/* Runner */
=
{
isa
=
PBXGroup
;
children
=
(
74970F691EDC12EC000507F3
/* GeneratedPluginRegistrant.h */
,
74970F6A1EDC12EC000507F3
/* GeneratedPluginRegistrant.m */
,
3BAEBBFE1EBA9DA300EE9294
/* AppDelegate.swift */
,
97C146FA1CF9000F007C117D
/* Main.storyboard */
,
97C146FD1CF9000F007C117D
/* Assets.xcassets */
,
...
...
@@ -236,6 +241,7 @@
buildActionMask
=
2147483647
;
files
=
(
3BAEBBFF1EBA9DA300EE9294
/* AppDelegate.swift in Sources */
,
74970F6B1EDC12EC000507F3
/* GeneratedPluginRegistrant.m in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -400,7 +406,6 @@
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_VERSION
=
3.0
;
};
name
=
Release
;
};
...
...
examples/platform_channel_swift/ios/Runner/AppDelegate.swift
View file @
178f446d
...
...
@@ -12,6 +12,7 @@ import Flutter
override
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplicationLaunchOptionsKey
:
Any
]?)
->
Bool
{
GeneratedPluginRegistrant
.
register
(
with
:
self
);
let
controller
:
FlutterViewController
=
window
?
.
rootViewController
as!
FlutterViewController
;
let
batteryChannel
=
FlutterMethodChannel
.
init
(
name
:
"samples.flutter.io/battery"
,
binaryMessenger
:
controller
);
...
...
@@ -27,7 +28,7 @@ import Flutter
let
chargingChannel
=
FlutterEventChannel
.
init
(
name
:
"samples.flutter.io/charging"
,
binaryMessenger
:
controller
);
chargingChannel
.
setStreamHandler
(
self
);
return
true
return
super
.
application
(
application
,
didFinishLaunchingWithOptions
:
launchOptions
);
}
private
func
receiveBatteryLevel
(
result
:
FlutterResult
)
{
...
...
examples/platform_channel_swift/ios/Runner/GeneratedPluginRegistrant.h
0 → 100644
View file @
178f446d
//
// Generated file. Do not edit.
//
#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h
#import <Flutter/Flutter.h>
@interface
GeneratedPluginRegistrant
:
NSObject
+
(
void
)
registerWithRegistry
:(
NSObject
<
FlutterPluginRegistry
>*
)
registry
;
@end
#endif
/* GeneratedPluginRegistrant_h */
examples/platform_channel_swift/ios/Runner/GeneratedPluginRegistrant.m
0 → 100644
View file @
178f446d
//
// Generated file. Do not edit.
//
#import "GeneratedPluginRegistrant.h"
@implementation
GeneratedPluginRegistrant
+
(
void
)
registerWithRegistry
:(
NSObject
<
FlutterPluginRegistry
>*
)
registry
{
}
@end
examples/platform_channel_swift/ios/Runner/Runner-Bridging-Header.h
View file @
178f446d
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "../Flutter/Flutter.framework/Headers/Flutter.h"
#import "GeneratedPluginRegistrant.h"
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