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
934e05f8
Unverified
Commit
934e05f8
authored
Sep 25, 2020
by
Jenn Magder
Committed by
GitHub
Sep 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Try accepting the local network permissions popup warning (#66621)
parent
2ae09caa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
106 deletions
+0
-106
devices.dart
packages/flutter_tools/lib/src/ios/devices.dart
+0
-6
ios_device_start_prebuilt_test.dart
...est/general.shard/ios/ios_device_start_prebuilt_test.dart
+0
-100
No files found.
packages/flutter_tools/lib/src/ios/devices.dart
View file @
934e05f8
...
...
@@ -469,12 +469,6 @@ class IOSDevice extends Device {
packageName:
FlutterProject
.
current
().
manifest
.
appName
,
);
if
(
localUri
==
null
)
{
if
(
majorSdkVersion
>=
14
)
{
_logger
.
printError
(
'Failed to attach to the observatory.'
);
_logger
.
printError
(
'Try accepting the local network permissions popup, or enable "Settings > Privacy > Local Network" for your app.'
);
_logger
.
printError
(
'For more information, see https://flutter.dev/docs/development/ios-14#debugging-flutter'
);
}
return
LaunchResult
.
failed
();
}
return
LaunchResult
.
succeeded
(
observatoryUri:
localUri
);
...
...
packages/flutter_tools/test/general.shard/ios/ios_device_start_prebuilt_test.dart
View file @
934e05f8
...
...
@@ -338,106 +338,6 @@ void main() {
Usage:
()
=>
MockUsage
(),
});
group
(
'IOSDevice.startApp on discovery failure local network permissions'
,
()
{
// Still uses context for analytics and mDNS.
testUsingContext
(
'is not prompted on < iOS 14'
,
()
async
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
FakeProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
kDeployCommand
,
kAttachDebuggerCommand
,
]);
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
IOSDevice
device
=
setUpIOSDevice
(
sdkVersion:
'13.0'
,
processManager:
processManager
,
fileSystem:
fileSystem
,
logger:
logger
,
vmServiceConnector:
(
String
string
,
{
Log
log
})
async
{
throw
const
io
.
SocketException
(
'OS Error: Connection refused, errno = 61, address = localhost, port '
'= 58943'
,
);
},
);
final
IOSApp
iosApp
=
PrebuiltIOSApp
(
projectBundleId:
'app'
,
bundleName:
'Runner'
,
bundleDir:
fileSystem
.
currentDirectory
,
);
final
FakeDeviceLogReader
deviceLogReader
=
FakeDeviceLogReader
();
device
.
portForwarder
=
const
NoOpDevicePortForwarder
();
device
.
setLogReader
(
iosApp
,
deviceLogReader
);
when
(
MDnsObservatoryDiscovery
.
instance
.
getObservatoryUri
(
any
,
any
,
usesIpv6:
anyNamed
(
'usesIpv6'
)))
.
thenAnswer
((
Invocation
invocation
)
async
=>
null
);
final
LaunchResult
launchResult
=
await
device
.
startApp
(
iosApp
,
prebuiltApplication:
true
,
debuggingOptions:
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
),
platformArgs:
<
String
,
dynamic
>{},
fallbackPollingDelay:
Duration
.
zero
,
fallbackThrottleTimeout:
const
Duration
(
milliseconds:
10
),
);
expect
(
launchResult
.
started
,
false
);
expect
(
launchResult
.
hasObservatory
,
false
);
expect
(
logger
.
errorText
,
isEmpty
);
},
overrides:
<
Type
,
Generator
>{
MDnsObservatoryDiscovery:
()
=>
MockMDnsObservatoryDiscovery
(),
Usage:
()
=>
MockUsage
(),
});
// Still uses context for analytics and mDNS.
testUsingContext
(
'is prompted on >= iOS 14'
,
()
async
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
FakeProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
kDeployCommand
,
kAttachDebuggerCommand
,
]);
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
IOSDevice
device
=
setUpIOSDevice
(
sdkVersion:
'14.0'
,
processManager:
processManager
,
fileSystem:
fileSystem
,
logger:
logger
,
vmServiceConnector:
(
String
string
,
{
Log
log
})
async
{
throw
const
io
.
SocketException
(
'OS Error: Connection refused, errno = 61, address = localhost, port '
'= 58943'
,
);
},
);
final
IOSApp
iosApp
=
PrebuiltIOSApp
(
projectBundleId:
'app'
,
bundleName:
'Runner'
,
bundleDir:
fileSystem
.
currentDirectory
,
);
final
FakeDeviceLogReader
deviceLogReader
=
FakeDeviceLogReader
();
device
.
portForwarder
=
const
NoOpDevicePortForwarder
();
device
.
setLogReader
(
iosApp
,
deviceLogReader
);
when
(
MDnsObservatoryDiscovery
.
instance
.
getObservatoryUri
(
any
,
any
,
usesIpv6:
anyNamed
(
'usesIpv6'
)))
.
thenAnswer
((
Invocation
invocation
)
async
=>
null
);
final
LaunchResult
launchResult
=
await
device
.
startApp
(
iosApp
,
prebuiltApplication:
true
,
debuggingOptions:
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
),
platformArgs:
<
String
,
dynamic
>{},
fallbackPollingDelay:
Duration
.
zero
,
fallbackThrottleTimeout:
const
Duration
(
milliseconds:
10
),
);
expect
(
launchResult
.
started
,
false
);
expect
(
launchResult
.
hasObservatory
,
false
);
expect
(
logger
.
errorText
,
contains
(
'Settings > Privacy > Local Network'
));
},
overrides:
<
Type
,
Generator
>{
MDnsObservatoryDiscovery:
()
=>
MockMDnsObservatoryDiscovery
(),
Usage:
()
=>
MockUsage
(),
});
});
// Still uses context for TimeoutConfiguration and usage
testUsingContext
(
'IOSDevice.startApp succeeds in release mode'
,
()
async
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
...
...
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