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
d2434a2b
Unverified
Commit
d2434a2b
authored
Sep 08, 2022
by
gaaclarke
Committed by
GitHub
Sep 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added platform channel integration tests for macos (#110606)
parent
ec75399b
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1338 additions
and
27 deletions
+1338
-27
.ci.yaml
.ci.yaml
+19
-0
TESTOWNERS
TESTOWNERS
+26
-25
channels_integration_test_macos.dart
dev/devicelab/bin/tasks/channels_integration_test_macos.dart
+12
-0
main.dart
dev/integration_tests/channels/lib/main.dart
+9
-2
.gitignore
dev/integration_tests/channels/macos/.gitignore
+7
-0
Flutter-Debug.xcconfig
...ation_tests/channels/macos/Flutter/Flutter-Debug.xcconfig
+1
-0
Flutter-Release.xcconfig
...ion_tests/channels/macos/Flutter/Flutter-Release.xcconfig
+1
-0
project.pbxproj
...ion_tests/channels/macos/Runner.xcodeproj/project.pbxproj
+573
-0
IDEWorkspaceChecks.plist
...project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
Runner.xcscheme
...s/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+87
-0
contents.xcworkspacedata
...hannels/macos/Runner.xcworkspace/contents.xcworkspacedata
+7
-0
IDEWorkspaceChecks.plist
.../Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
AppDelegate.swift
...integration_tests/channels/macos/Runner/AppDelegate.swift
+13
-0
Contents.json
...tests/channels/macos/Runner/Assets.xcassets/Contents.json
+6
-0
MainMenu.xib
...ation_tests/channels/macos/Runner/Base.lproj/MainMenu.xib
+343
-0
AppInfo.xcconfig
...tion_tests/channels/macos/Runner/Configs/AppInfo.xcconfig
+14
-0
Debug.xcconfig
...ration_tests/channels/macos/Runner/Configs/Debug.xcconfig
+2
-0
Release.xcconfig
...tion_tests/channels/macos/Runner/Configs/Release.xcconfig
+2
-0
Warnings.xcconfig
...ion_tests/channels/macos/Runner/Configs/Warnings.xcconfig
+13
-0
DebugProfile.entitlements
...ion_tests/channels/macos/Runner/DebugProfile.entitlements
+12
-0
Info.plist
dev/integration_tests/channels/macos/Runner/Info.plist
+32
-0
MainFlutterWindow.swift
...ation_tests/channels/macos/Runner/MainFlutterWindow.swift
+135
-0
Release.entitlements
...egration_tests/channels/macos/Runner/Release.entitlements
+8
-0
No files found.
.ci.yaml
View file @
d2434a2b
...
...
@@ -3768,6 +3768,25 @@ targets:
-
bin/**
-
.ci.yaml
-
name
:
Mac channels_integration_test
recipe
:
devicelab/devicelab_drone
timeout
:
60
bringup
:
true
properties
:
dependencies
:
>-
[
{"dependency": "xcode", "version": "13f17a"},
{"dependency": "gems", "version": "v3.3.14"}
]
tags: >
["devicelab", "hostonly"]
task_name: channels_integration_test_macos
runIf
:
-
dev/**
-
packages/flutter_tools/**
-
bin/**
-
.ci.yaml
-
name
:
Mac run_release_test_macos
recipe
:
devicelab/devicelab_drone
timeout
:
60
...
...
TESTOWNERS
View file @
d2434a2b
...
...
@@ -206,49 +206,50 @@
/dev/devicelab/bin/tasks/tiles_scroll_perf_ios__timeline_summary.dart @zanderso @flutter/engine
## Host only DeviceLab tests
/dev/devicelab/bin/tasks/basic_material_app_macos__compile.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/build_aar_module_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart @jmagman @flutter/tool
/dev/devicelab/bin/tasks/channels_integration_test_macos.dart @gaaclarke @flutter/desktop
/dev/devicelab/bin/tasks/complex_layout_macos__compile.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/complex_layout_macos__start_up.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/complex_layout_win_desktop__compile.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/complex_layout_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/dart_plugin_registry_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/entrypoint_dart_registrant.dart @aaclarke @flutter/plugin
/dev/devicelab/bin/tasks/flutter_gallery_macos__compile.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/flutter_gallery_macos__start_up.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/flutter_gallery_win_desktop__compile.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/flutter_gallery_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/flutter_view_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/gradle_desugar_classes_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/gradle_non_android_plugin_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_non_android_plugin_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_plugin_bundle_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_plugin_bundle_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_plugin_fat_apk_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_plugin_fat_apk_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_plugin_light_apk_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_plugin_light_apk_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/hello_world_macos__compile.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/hello_world_win_desktop__compile.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/hot_mode_dev_cycle_win_target__benchmark.dart @cbracken @flutter/desktop
/dev/devicelab/bin/tasks/module_custom_host_app_name_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/module_host_with_custom_build_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/module_test_ios.dart @jmagman @flutter/tool
/dev/devicelab/bin/tasks/module_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/native_ui_tests_macos.dart @cbracken @flutter/desktop
/dev/devicelab/bin/tasks/platform_channel_sample_test_windows.dart @cbracken @flutter/desktop
/dev/devicelab/bin/tasks/plugin_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/platform_view_macos__start_up.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/platform_view_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/plugin_lint_mac.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/plugin_test_ios.dart @jmagman @flutter/ios
/dev/devicelab/bin/tasks/plugin_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/run_release_test_macos.dart @cbracken @flutter/tool
/dev/devicelab/bin/tasks/technical_debt__cost.dart @HansMuller @flutter/framework
/dev/devicelab/bin/tasks/web_benchmarks_canvaskit.dart @yjbanov @flutter/web
/dev/devicelab/bin/tasks/web_benchmarks_html.dart @yjbanov @flutter/web
/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart @jmagman @flutter/tool
/dev/devicelab/bin/tasks/dart_plugin_registry_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_non_android_plugin_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_plugin_bundle_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_plugin_fat_apk_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/gradle_plugin_light_apk_test.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/module_test_ios.dart @jmagman @flutter/tool
/dev/devicelab/bin/tasks/plugin_lint_mac.dart @stuartmorgan @flutter/plugin
/dev/devicelab/bin/tasks/run_release_test_macos.dart @cbracken @flutter/tool
/dev/devicelab/bin/tasks/entrypoint_dart_registrant.dart @aaclarke @flutter/plugin
/dev/devicelab/bin/tasks/windows_home_scroll_perf__timeline_summary.dart @jonahwilliams @flutter/engine
/dev/devicelab/bin/tasks/hello_world_win_desktop__compile.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/flutter_gallery_win_desktop__compile.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/flutter_gallery_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/complex_layout_win_desktop__compile.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/complex_layout_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/flutter_view_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/platform_view_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/hello_world_macos__compile.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/basic_material_app_macos__compile.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/complex_layout_macos__start_up.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/windows_startup_test.dart @loic-sharma @flutter/desktop
/dev/devicelab/bin/tasks/complex_layout_macos__compile.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/flutter_gallery_macos__compile.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/flutter_gallery_macos__start_up.dart @a-wallen @flutter/desktop
/dev/devicelab/bin/tasks/platform_view_macos__start_up.dart @a-wallen @flutter/desktop
## Host only framework tests
# Linux analyze
...
...
dev/devicelab/bin/tasks/channels_integration_test_macos.dart
0 → 100644
View file @
d2434a2b
// Copyright 2014 The Flutter 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
'package:flutter_devicelab/framework/devices.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
macos
;
await
task
(
createChannelsIntegrationTest
());
}
dev/integration_tests/channels/lib/main.dart
View file @
d2434a2b
...
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:io'
show
Platform
;
import
'dart:typed_data'
;
import
'package:flutter/material.dart'
;
...
...
@@ -110,11 +111,17 @@ class _TestAppState extends State<TestApp> {
()
=>
methodCallStandardErrorHandshake
(
'world'
),
()
=>
methodCallStandardNotImplementedHandshake
(),
()
=>
basicBinaryHandshake
(
null
),
()
=>
basicBinaryHandshake
(
ByteData
(
0
)),
if
(!
Platform
.
isMacOS
)
// Note, it was decided that this will function differently on macOS. See
// also: https://github.com/flutter/flutter/issues/110865.
()
=>
basicBinaryHandshake
(
ByteData
(
0
)),
()
=>
basicBinaryHandshake
(
ByteData
(
4
)..
setUint32
(
0
,
0x12345678
)),
()
=>
basicStringHandshake
(
'hello, world'
),
()
=>
basicStringHandshake
(
'hello
\
u263A
\
u{1f602} unicode'
),
()
=>
basicStringHandshake
(
''
),
if
(!
Platform
.
isMacOS
)
// Note, it was decided that this will function differently on macOS. See
// also: https://github.com/flutter/flutter/issues/110865.
()
=>
basicStringHandshake
(
''
),
()
=>
basicStringHandshake
(
null
),
()
=>
basicJsonHandshake
(
null
),
()
=>
basicJsonHandshake
(
true
),
...
...
dev/integration_tests/channels/macos/.gitignore
0 → 100644
View file @
d2434a2b
# Flutter-related
**/Flutter/ephemeral/
**/Pods/
# Xcode-related
**/dgph
**/xcuserdata/
dev/integration_tests/channels/macos/Flutter/Flutter-Debug.xcconfig
0 → 100644
View file @
d2434a2b
#include "ephemeral/Flutter-Generated.xcconfig"
dev/integration_tests/channels/macos/Flutter/Flutter-Release.xcconfig
0 → 100644
View file @
d2434a2b
#include "ephemeral/Flutter-Generated.xcconfig"
dev/integration_tests/channels/macos/Runner.xcodeproj/project.pbxproj
0 → 100644
View file @
d2434a2b
This diff is collapsed.
Click to expand it.
dev/integration_tests/channels/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
d2434a2b
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
IDEDidComputeMac32BitWarning
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
dev/integration_tests/channels/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
0 → 100644
View file @
d2434a2b
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion =
"1300"
version =
"1.3"
>
<BuildAction
parallelizeBuildables =
"YES"
buildImplicitDependencies =
"YES"
>
<BuildActionEntries>
<BuildActionEntry
buildForTesting =
"YES"
buildForRunning =
"YES"
buildForProfiling =
"YES"
buildForArchiving =
"YES"
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"channels.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv =
"YES"
>
<MacroExpansion>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"channels.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
debugDocumentVersioning =
"YES"
debugServiceExtension =
"internal"
allowLocationSimulation =
"YES"
>
<BuildableProductRunnable
runnableDebuggingMode =
"0"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"channels.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration =
"Profile"
shouldUseLaunchSchemeArgsEnv =
"YES"
savedToolIdentifier =
""
useCustomWorkingDirectory =
"NO"
debugDocumentVersioning =
"YES"
>
<BuildableProductRunnable
runnableDebuggingMode =
"0"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"channels.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration =
"Debug"
>
</AnalyzeAction>
<ArchiveAction
buildConfiguration =
"Release"
revealArchiveInOrganizer =
"YES"
>
</ArchiveAction>
</Scheme>
dev/integration_tests/channels/macos/Runner.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
d2434a2b
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"group:Runner.xcodeproj"
>
</FileRef>
</Workspace>
dev/integration_tests/channels/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
d2434a2b
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
IDEDidComputeMac32BitWarning
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
dev/integration_tests/channels/macos/Runner/AppDelegate.swift
0 → 100644
View file @
d2434a2b
// Copyright 2014 The Flutter 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
Cocoa
import
FlutterMacOS
@NSApplicationMain
class
AppDelegate
:
FlutterAppDelegate
{
override
func
applicationShouldTerminateAfterLastWindowClosed
(
_
sender
:
NSApplication
)
->
Bool
{
return
true
}
}
dev/integration_tests/channels/macos/Runner/Assets.xcassets/Contents.json
0 → 100644
View file @
d2434a2b
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
dev/integration_tests/channels/macos/Runner/Base.lproj/MainMenu.xib
0 → 100644
View file @
d2434a2b
This diff is collapsed.
Click to expand it.
dev/integration_tests/channels/macos/Runner/Configs/AppInfo.xcconfig
0 → 100644
View file @
d2434a2b
// Application-level settings for the Runner target.
//
// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
// future. If not, the values below would default to using the project name when this becomes a
// 'flutter create' template.
// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = channels
// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.channels
// The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2022 com.yourcompany. All rights reserved.
dev/integration_tests/channels/macos/Runner/Configs/Debug.xcconfig
0 → 100644
View file @
d2434a2b
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
dev/integration_tests/channels/macos/Runner/Configs/Release.xcconfig
0 → 100644
View file @
d2434a2b
#include "../../Flutter/Flutter-Release.xcconfig"
#include "Warnings.xcconfig"
dev/integration_tests/channels/macos/Runner/Configs/Warnings.xcconfig
0 → 100644
View file @
d2434a2b
WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
GCC_WARN_UNDECLARED_SELECTOR = YES
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_PRAGMA_PACK = YES
CLANG_WARN_STRICT_PROTOTYPES = YES
CLANG_WARN_COMMA = YES
GCC_WARN_STRICT_SELECTOR_MATCH = YES
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
GCC_WARN_SHADOW = YES
CLANG_WARN_UNREACHABLE_CODE = YES
dev/integration_tests/channels/macos/Runner/DebugProfile.entitlements
0 → 100644
View file @
d2434a2b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
com.apple.security.app-sandbox
</key>
<true/>
<key>
com.apple.security.cs.allow-jit
</key>
<true/>
<key>
com.apple.security.network.server
</key>
<true/>
</dict>
</plist>
dev/integration_tests/channels/macos/Runner/Info.plist
0 → 100644
View file @
d2434a2b
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_IDENTIFIER
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
$
(
FLUTTER_BUILD_NAME
)<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
$
(
FLUTTER_BUILD_NUMBER
)<
/string
>
<
k
e
y
>
LSMinimumSystemVersion
<
/k
e
y
>
<
string
>
$
(
MACOSX_DEPLOYMENT_TARGET
)<
/string
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
>
$
(
PRODUCT_COPYRIGHT
)<
/string
>
<
k
e
y
>
NSMainNibFile
<
/k
e
y
>
<
string
>
MainMenu
<
/string
>
<
k
e
y
>
NSPrincipalClass
<
/k
e
y
>
<
string
>
NSApplication
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
dev/integration_tests/channels/macos/Runner/MainFlutterWindow.swift
0 → 100644
View file @
d2434a2b
// Copyright 2014 The Flutter 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
Cocoa
import
FlutterMacOS
let
DATE
:
UInt8
=
128
let
PAIR
:
UInt8
=
129
class
Pair
{
let
first
:
Any
?
let
second
:
Any
?
init
(
first
:
Any
?,
second
:
Any
?)
{
self
.
first
=
first
self
.
second
=
second
}
}
class
ExtendedWriter
:
FlutterStandardWriter
{
override
func
writeValue
(
_
value
:
Any
)
{
if
let
date
=
value
as?
Date
{
self
.
writeByte
(
DATE
)
let
time
=
date
.
timeIntervalSince1970
var
ms
=
Int64
(
time
*
1000.0
)
self
.
writeBytes
(
&
ms
,
length
:
UInt
(
MemoryLayout
<
Int64
>.
size
))
}
else
if
let
pair
=
value
as?
Pair
{
self
.
writeByte
(
PAIR
)
self
.
writeValue
(
pair
.
first
!
)
self
.
writeValue
(
pair
.
second
!
)
}
else
{
super
.
writeValue
(
value
)
}
}
}
class
ExtendedReader
:
FlutterStandardReader
{
override
func
readValue
(
ofType
type
:
UInt8
)
->
Any
?
{
if
type
==
DATE
{
var
ms
:
Int64
=
0
self
.
readBytes
(
&
ms
,
length
:
UInt
(
MemoryLayout
<
Int64
>.
size
))
let
time
:
Double
=
Double
(
ms
)
/
1000.0
return
NSDate
(
timeIntervalSince1970
:
time
)
}
else
if
type
==
PAIR
{
return
Pair
(
first
:
self
.
readValue
(),
second
:
self
.
readValue
())
}
else
{
return
super
.
readValue
(
ofType
:
type
)
}
}
}
class
ExtendedReaderWriter
:
FlutterStandardReaderWriter
{
override
func
reader
(
with
data
:
Data
)
->
FlutterStandardReader
{
return
ExtendedReader
(
data
:
data
)
}
override
func
writer
(
with
data
:
NSMutableData
)
->
FlutterStandardWriter
{
return
ExtendedWriter
(
data
:
data
)
}
}
class
MainFlutterWindow
:
NSWindow
{
override
func
awakeFromNib
()
{
let
flutterViewController
=
FlutterViewController
.
init
()
let
windowFrame
=
self
.
frame
self
.
contentViewController
=
flutterViewController
self
.
setFrame
(
windowFrame
,
display
:
true
)
RegisterGeneratedPlugins
(
registry
:
flutterViewController
)
let
registrar
=
flutterViewController
.
registrar
(
forPlugin
:
"channel-integration-test"
)
setupMessagingHandshakeOnChannel
(
FlutterBasicMessageChannel
(
name
:
"binary-msg"
,
binaryMessenger
:
registrar
.
messenger
,
codec
:
FlutterBinaryCodec
.
sharedInstance
()))
setupMessagingHandshakeOnChannel
(
FlutterBasicMessageChannel
(
name
:
"string-msg"
,
binaryMessenger
:
registrar
.
messenger
,
codec
:
FlutterStringCodec
.
sharedInstance
()))
setupMessagingHandshakeOnChannel
(
FlutterBasicMessageChannel
(
name
:
"json-msg"
,
binaryMessenger
:
registrar
.
messenger
,
codec
:
FlutterJSONMessageCodec
.
sharedInstance
()))
setupMessagingHandshakeOnChannel
(
FlutterBasicMessageChannel
(
name
:
"std-msg"
,
binaryMessenger
:
registrar
.
messenger
,
codec
:
FlutterStandardMessageCodec
(
readerWriter
:
ExtendedReaderWriter
())))
setupMethodHandshakeOnChannel
(
FlutterMethodChannel
(
name
:
"json-method"
,
binaryMessenger
:
registrar
.
messenger
,
codec
:
FlutterJSONMethodCodec
.
sharedInstance
()))
setupMethodHandshakeOnChannel
(
FlutterMethodChannel
(
name
:
"std-method"
,
binaryMessenger
:
registrar
.
messenger
,
codec
:
FlutterStandardMethodCodec
(
readerWriter
:
ExtendedReaderWriter
())))
super
.
awakeFromNib
()
}
func
setupMessagingHandshakeOnChannel
(
_
channel
:
FlutterBasicMessageChannel
)
{
channel
.
setMessageHandler
{
message
,
reply
in
channel
.
sendMessage
(
message
)
{
messageReply
in
channel
.
sendMessage
(
messageReply
)
reply
(
message
)
}
}
}
func
setupMethodHandshakeOnChannel
(
_
channel
:
FlutterMethodChannel
)
{
channel
.
setMethodCallHandler
{
call
,
result
in
if
call
.
method
==
"success"
{
channel
.
invokeMethod
(
call
.
method
,
arguments
:
call
.
arguments
)
{
value
in
channel
.
invokeMethod
(
call
.
method
,
arguments
:
value
)
result
(
call
.
arguments
)
}
}
else
if
call
.
method
==
"error"
{
channel
.
invokeMethod
(
call
.
method
,
arguments
:
call
.
arguments
)
{
value
in
let
error
=
value
as!
FlutterError
channel
.
invokeMethod
(
call
.
method
,
arguments
:
error
.
details
)
result
(
error
)
}
}
else
{
channel
.
invokeMethod
(
call
.
method
,
arguments
:
call
.
arguments
)
{
value
in
channel
.
invokeMethod
(
call
.
method
,
arguments
:
nil
)
result
(
FlutterMethodNotImplemented
)
}
}
}
}
}
dev/integration_tests/channels/macos/Runner/Release.entitlements
0 → 100644
View file @
d2434a2b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
com.apple.security.app-sandbox
</key>
<true/>
</dict>
</plist>
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