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
b80b9bea
Unverified
Commit
b80b9bea
authored
Sep 13, 2019
by
Jenn Magder
Committed by
GitHub
Sep 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set DEFINES_MODULE for FlutterPluginRegistrant to generate modulemap (#40302)
parent
69a29646
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
789 additions
and
22 deletions
+789
-22
.gitignore
.gitignore
+2
-0
module_test_ios.dart
dev/devicelab/bin/tasks/module_test_ios.dart
+77
-22
ViewController.m
dev/integration_tests/ios_host_app/Host/ViewController.m
+1
-0
project.pbxproj
...n_tests/ios_host_app_swift/Host.xcodeproj/project.pbxproj
+429
-0
contents.xcworkspacedata
...st.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+7
-0
IDEWorkspaceChecks.plist
...project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
AppDelegate.swift
...tegration_tests/ios_host_app_swift/Host/AppDelegate.swift
+8
-0
Contents.json
...ift/Host/Assets.xcassets/AppIcon.appiconset/Contents.json
+98
-0
Contents.json
...sts/ios_host_app_swift/Host/Assets.xcassets/Contents.json
+6
-0
LaunchScreen.storyboard
...os_host_app_swift/Host/Base.lproj/LaunchScreen.storyboard
+25
-0
Main.storyboard
..._tests/ios_host_app_swift/Host/Base.lproj/Main.storyboard
+24
-0
Info.plist
dev/integration_tests/ios_host_app_swift/Host/Info.plist
+64
-0
SceneDelegate.swift
...gration_tests/ios_host_app_swift/Host/SceneDelegate.swift
+4
-0
ViewController.swift
...ration_tests/ios_host_app_swift/Host/ViewController.swift
+27
-0
Podfile
dev/integration_tests/ios_host_app_swift/Podfile
+8
-0
plugins.dart
packages/flutter_tools/lib/src/plugins.dart
+1
-0
No files found.
.gitignore
View file @
b80b9bea
...
...
@@ -29,6 +29,8 @@
/dev/docs/flutter.docs.zip
/dev/docs/lib/
/dev/docs/pubspec.yaml
/dev/integration_tests/**/xcuserdata
/dev/integration_tests/**/Pods
/packages/flutter/coverage/
version
...
...
dev/devicelab/bin/tasks/module_test_ios.dart
View file @
b80b9bea
...
...
@@ -156,7 +156,7 @@ Future<void> main() async {
String
content
=
await
pubspec
.
readAsString
();
content
=
content
.
replaceFirst
(
'
\n
dependencies:
\n
'
,
'
\n
dependencies:
\n
device_info:
\n
package_info:
\n
'
,
'
\n
dependencies:
\n
device_info:
\n
google_maps_flutter:
\n
'
,
// One dynamic and one static framework.
);
await
pubspec
.
writeAsString
(
content
,
flush:
true
);
await
inDirectory
(
projectDir
,
()
async
{
...
...
@@ -192,7 +192,7 @@ Future<void> main() async {
if
(!
podfileLockOutput
.
contains
(
':path: Flutter/engine'
)
||
!
podfileLockOutput
.
contains
(
':path: Flutter/FlutterPluginRegistrant'
)
||
!
podfileLockOutput
.
contains
(
':path: Flutter/.symlinks/device_info/ios'
)
||
!
podfileLockOutput
.
contains
(
':path: Flutter/.symlinks/
package_info
/ios'
))
{
||
!
podfileLockOutput
.
contains
(
':path: Flutter/.symlinks/
google_maps_flutter
/ios'
))
{
return
TaskResult
.
failure
(
'Building ephemeral host app Podfile.lock does not contain expected pods'
);
}
...
...
@@ -232,18 +232,18 @@ Future<void> main() async {
return
TaskResult
.
failure
(
'Failed to build editable host .app'
);
}
section
(
'Add to existing iOS app'
);
section
(
'Add to existing iOS
Objective-C
app'
);
final
Directory
h
ostApp
=
Directory
(
path
.
join
(
tempDir
.
path
,
'hello_host_app'
));
mkdir
(
h
ostApp
);
final
Directory
objectiveCH
ostApp
=
Directory
(
path
.
join
(
tempDir
.
path
,
'hello_host_app'
));
mkdir
(
objectiveCH
ostApp
);
recursiveCopy
(
Directory
(
path
.
join
(
flutterDirectory
.
path
,
'dev'
,
'integration_tests'
,
'ios_host_app'
)),
h
ostApp
,
objectiveCH
ostApp
,
);
final
File
analyticsOutputFile
=
File
(
path
.
join
(
tempDir
.
path
,
'analytics
.log'
));
await
inDirectory
(
h
ostApp
,
()
async
{
final
File
objectiveCAnalyticsOutputFile
=
File
(
path
.
join
(
tempDir
.
path
,
'analytics-objc
.log'
));
final
Directory
objectiveCBuildDirectory
=
Directory
(
path
.
join
(
tempDir
.
path
,
'build-objc'
));
await
inDirectory
(
objectiveCH
ostApp
,
()
async
{
await
exec
(
'pod'
,
<
String
>[
'install'
]);
await
exec
(
'xcodebuild'
,
...
...
@@ -258,37 +258,37 @@ Future<void> main() async {
'CODE_SIGNING_REQUIRED=NO'
,
'CODE_SIGN_IDENTITY=-'
,
'EXPANDED_CODE_SIGN_IDENTITY=-'
,
'CONFIGURATION_BUILD_DIR=
${
tempDir
.path}
'
,
'CONFIGURATION_BUILD_DIR=
${
objectiveCBuildDirectory
.path}
'
,
'COMPILER_INDEX_STORE_ENABLE=NO'
,
],
environment:
<
String
,
String
>
{
'FLUTTER_ANALYTICS_LOG_FILE'
:
a
nalyticsOutputFile
.
path
,
'FLUTTER_ANALYTICS_LOG_FILE'
:
objectiveCA
nalyticsOutputFile
.
path
,
}
);
});
final
bool
existingAppBuilt
=
exists
(
File
(
path
.
join
(
tempDir
.
path
,
objectiveCBuildDirectory
.
path
,
'Host.app'
,
'Host'
,
)));
if
(!
existingAppBuilt
)
{
return
TaskResult
.
failure
(
'Failed to build existing app .app'
);
return
TaskResult
.
failure
(
'Failed to build existing
Objective-C
app .app'
);
}
final
String
analyticsOutput
=
a
nalyticsOutputFile
.
readAsStringSync
();
if
(!
a
nalyticsOutput
.
contains
(
'cd24: ios'
)
||
!
a
nalyticsOutput
.
contains
(
'cd25: true'
)
||
!
a
nalyticsOutput
.
contains
(
'viewName: build/bundle'
))
{
final
String
objectiveCAnalyticsOutput
=
objectiveCA
nalyticsOutputFile
.
readAsStringSync
();
if
(!
objectiveCA
nalyticsOutput
.
contains
(
'cd24: ios'
)
||
!
objectiveCA
nalyticsOutput
.
contains
(
'cd25: true'
)
||
!
objectiveCA
nalyticsOutput
.
contains
(
'viewName: build/bundle'
))
{
return
TaskResult
.
failure
(
'Building outer
app produced the following analytics: "
$a
nalyticsOutput
"'
'Building outer
Objective-C app produced the following analytics: "
$objectiveCA
nalyticsOutput
"'
'but not the expected strings: "cd24: ios", "cd25: true", "viewName: build/bundle"'
);
}
section
(
'Fail building existing iOS app if flutter script fails'
);
section
(
'Fail building existing
Objective-C
iOS app if flutter script fails'
);
int
xcodebuildExitCode
=
0
;
await
inDirectory
(
h
ostApp
,
()
async
{
await
inDirectory
(
objectiveCH
ostApp
,
()
async
{
xcodebuildExitCode
=
await
exec
(
'xcodebuild'
,
<
String
>[
...
...
@@ -303,7 +303,7 @@ Future<void> main() async {
'CODE_SIGNING_REQUIRED=NO'
,
'CODE_SIGN_IDENTITY=-'
,
'EXPANDED_CODE_SIGN_IDENTITY=-'
,
'CONFIGURATION_BUILD_DIR=
${
tempDir
.path}
'
,
'CONFIGURATION_BUILD_DIR=
${
objectiveCBuildDirectory
.path}
'
,
'COMPILER_INDEX_STORE_ENABLE=NO'
,
],
canFail:
true
...
...
@@ -311,7 +311,62 @@ Future<void> main() async {
});
if
(
xcodebuildExitCode
!=
65
)
{
// 65 returned on PhaseScriptExecution failure.
return
TaskResult
.
failure
(
'Host app build succeeded though flutter script failed'
);
return
TaskResult
.
failure
(
'Host Objective-C app build succeeded though flutter script failed'
);
}
section
(
'Add to existing iOS Swift app'
);
final
Directory
swiftHostApp
=
Directory
(
path
.
join
(
tempDir
.
path
,
'hello_host_app_swift'
));
mkdir
(
swiftHostApp
);
recursiveCopy
(
Directory
(
path
.
join
(
flutterDirectory
.
path
,
'dev'
,
'integration_tests'
,
'ios_host_app_swift'
)),
swiftHostApp
,
);
final
File
swiftAnalyticsOutputFile
=
File
(
path
.
join
(
tempDir
.
path
,
'analytics-swift.log'
));
final
Directory
swiftBuildDirectory
=
Directory
(
path
.
join
(
tempDir
.
path
,
'build-swift'
));
await
inDirectory
(
swiftHostApp
,
()
async
{
await
exec
(
'pod'
,
<
String
>[
'install'
]);
await
exec
(
'xcodebuild'
,
<
String
>[
'-workspace'
,
'Host.xcworkspace'
,
'-scheme'
,
'Host'
,
'-configuration'
,
'Debug'
,
'CODE_SIGNING_ALLOWED=NO'
,
'CODE_SIGNING_REQUIRED=NO'
,
'CODE_SIGN_IDENTITY=-'
,
'EXPANDED_CODE_SIGN_IDENTITY=-'
,
'CONFIGURATION_BUILD_DIR=
${swiftBuildDirectory.path}
'
,
'COMPILER_INDEX_STORE_ENABLE=NO'
,
],
environment:
<
String
,
String
>
{
'FLUTTER_ANALYTICS_LOG_FILE'
:
swiftAnalyticsOutputFile
.
path
,
}
);
});
final
bool
existingSwiftAppBuilt
=
exists
(
File
(
path
.
join
(
swiftBuildDirectory
.
path
,
'Host.app'
,
'Host'
,
)));
if
(!
existingSwiftAppBuilt
)
{
return
TaskResult
.
failure
(
'Failed to build existing Swift app .app'
);
}
final
String
swiftAnalyticsOutput
=
swiftAnalyticsOutputFile
.
readAsStringSync
();
if
(!
swiftAnalyticsOutput
.
contains
(
'cd24: ios'
)
||
!
swiftAnalyticsOutput
.
contains
(
'cd25: true'
)
||
!
swiftAnalyticsOutput
.
contains
(
'viewName: build/bundle'
))
{
return
TaskResult
.
failure
(
'Building outer Swift app produced the following analytics: "
$swiftAnalyticsOutput
"'
'but not the expected strings: "cd24: ios", "cd25: true", "viewName: build/bundle"'
);
}
return
TaskResult
.
success
(
null
);
...
...
dev/integration_tests/ios_host_app/Host/ViewController.m
View file @
b80b9bea
...
...
@@ -4,6 +4,7 @@
@implementation
ViewController
// Boiler-plate add-to-app demo. Not integration tested anywhere.
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
...
...
dev/integration_tests/ios_host_app_swift/Host.xcodeproj/project.pbxproj
0 → 100644
View file @
b80b9bea
This diff is collapsed.
Click to expand it.
dev/integration_tests/ios_host_app_swift/Host.xcodeproj/project.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
b80b9bea
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:Host.xcodeproj"
>
</FileRef>
</Workspace>
dev/integration_tests/ios_host_app_swift/Host.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
b80b9bea
<
?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/ios_host_app_swift/Host/AppDelegate.swift
0 → 100644
View file @
b80b9bea
import
UIKit
@UIApplicationMain
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
func
application
(
_
application
:
UIApplication
,
configurationForConnecting
connectingSceneSession
:
UISceneSession
,
options
:
UIScene
.
ConnectionOptions
)
->
UISceneConfiguration
{
return
UISceneConfiguration
(
name
:
"Default Configuration"
,
sessionRole
:
connectingSceneSession
.
role
)
}
}
dev/integration_tests/ios_host_app_swift/Host/Assets.xcassets/AppIcon.appiconset/Contents.json
0 → 100644
View file @
b80b9bea
{
"images"
:
[
{
"idiom"
:
"iphone"
,
"size"
:
"20x20"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"20x20"
,
"scale"
:
"3x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"29x29"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"29x29"
,
"scale"
:
"3x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"40x40"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"40x40"
,
"scale"
:
"3x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"60x60"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"60x60"
,
"scale"
:
"3x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"20x20"
,
"scale"
:
"1x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"20x20"
,
"scale"
:
"2x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"29x29"
,
"scale"
:
"1x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"29x29"
,
"scale"
:
"2x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"40x40"
,
"scale"
:
"1x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"40x40"
,
"scale"
:
"2x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"76x76"
,
"scale"
:
"1x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"76x76"
,
"scale"
:
"2x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"83.5x83.5"
,
"scale"
:
"2x"
},
{
"idiom"
:
"ios-marketing"
,
"size"
:
"1024x1024"
,
"scale"
:
"1x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
dev/integration_tests/ios_host_app_swift/Host/Assets.xcassets/Contents.json
0 → 100644
View file @
b80b9bea
{
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
dev/integration_tests/ios_host_app_swift/Host/Base.lproj/LaunchScreen.storyboard
0 → 100644
View file @
b80b9bea
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"13122.16"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
launchScreen=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
initialViewController=
"01J-lp-oVM"
>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13104.12"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<scenes>
<!--View Controller-->
<scene
sceneID=
"EHf-IW-A2E"
>
<objects>
<viewController
id=
"01J-lp-oVM"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"Ze5-6b-2t3"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
xcode11CocoaTouchSystemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"6Tk-OE-BBY"
/>
</view>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"iYj-Kq-Ea1"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"53"
y=
"375"
/>
</scene>
</scenes>
</document>
dev/integration_tests/ios_host_app_swift/Host/Base.lproj/Main.storyboard
0 → 100644
View file @
b80b9bea
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"13122.16"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
initialViewController=
"BYZ-38-t0r"
>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13104.12"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<scenes>
<!--View Controller-->
<scene
sceneID=
"tne-QT-ifu"
>
<objects>
<viewController
id=
"BYZ-38-t0r"
customClass=
"ViewController"
customModuleProvider=
"target"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"8bC-Xf-vdC"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
xcode11CocoaTouchSystemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"6Tk-OE-BBY"
/>
</view>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"dkx-z0-nzr"
sceneMemberID=
"firstResponder"
/>
</objects>
</scene>
</scenes>
</document>
dev/integration_tests/ios_host_app_swift/Host/Info.plist
0 → 100644
View file @
b80b9bea
<
?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
>
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
>
$
(
PRODUCT_BUNDLE_PACKAGE_TYPE
)<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UIApplicationSceneManifest
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
UIApplicationSupportsMultipleScenes
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
UISceneConfigurations
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
UIWindowSceneSessionRoleApplication
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
<
k
e
y
>
UISceneConfigurationName
<
/k
e
y
>
<
string
>
Default
Configuration
<
/string
>
<
k
e
y
>
UISceneDelegateClassName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_MODULE_NAME
)
.SceneDelegate
<
/string
>
<
k
e
y
>
UISceneStoryboardFile
<
/k
e
y
>
<
string
>
Main
<
/string
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
string
>
LaunchScreen
<
/string
>
<
k
e
y
>
UIMainStoryboardFile
<
/k
e
y
>
<
string
>
Main
<
/string
>
<
k
e
y
>
UIRequiredDeviceCapabilities
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
armv7
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
~
ipad
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationPortraitUpsideDown
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/plist
>
dev/integration_tests/ios_host_app_swift/Host/SceneDelegate.swift
0 → 100644
View file @
b80b9bea
import
UIKit
class
SceneDelegate
:
UIResponder
,
UIWindowSceneDelegate
{
}
dev/integration_tests/ios_host_app_swift/Host/ViewController.swift
0 → 100644
View file @
b80b9bea
import
UIKit
import
Flutter
import
FlutterPluginRegistrant
class
ViewController
:
UIViewController
{
var
flutterEngine
:
FlutterEngine
?;
// Boiler-plate add-to-app demo. Not integration tested anywhere.
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
let
button
=
UIButton
(
type
:
UIButton
.
ButtonType
.
custom
)
button
.
addTarget
(
self
,
action
:
#selector(
handleButtonAction
)
,
for
:
.
touchUpInside
)
button
.
setTitle
(
"Press me"
,
for
:
UIControl
.
State
.
normal
)
button
.
frame
=
CGRect
(
x
:
80.0
,
y
:
210.0
,
width
:
160.0
,
height
:
40.0
)
button
.
backgroundColor
=
UIColor
.
blue
self
.
view
.
addSubview
(
button
)
self
.
flutterEngine
=
FlutterEngine
(
name
:
"io.flutter"
,
project
:
nil
);
}
@objc
func
handleButtonAction
()
{
let
flutterEngine
=
self
.
flutterEngine
;
GeneratedPluginRegistrant
.
register
(
with
:
flutterEngine
);
let
flutterViewController
=
FlutterViewController
(
engine
:
flutterEngine
,
nibName
:
nil
,
bundle
:
nil
)
!
;
self
.
present
(
flutterViewController
,
animated
:
false
,
completion
:
nil
)
}
}
dev/integration_tests/ios_host_app_swift/Podfile
0 → 100644
View file @
b80b9bea
platform
:ios
,
'9.0'
flutter_application_path
=
'../hello'
load
File
.
join
(
flutter_application_path
,
'.ios'
,
'Flutter'
,
'podhelper.rb'
)
target
'Host'
do
install_all_flutter_pods
flutter_application_path
end
packages/flutter_tools/lib/src/plugins.dart
View file @
b80b9bea
...
...
@@ -384,6 +384,7 @@ Depends on all your plugins, and provides a function to register them.
s
.
source
=
{
:
path
=>
'.'
}
s
.
public_header_files
=
'./Classes/**/*.h'
s
.
static_framework
=
true
s
.
pod_target_xcconfig
=
{
'DEFINES_MODULE'
=>
'YES'
}
s
.
dependency
'{{framework}}'
{{
#plugins
}}
s
.
dependency
'{{name}}'
...
...
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