Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
permission_handler
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
permission_handler
Commits
9b7f4c4e
Commit
9b7f4c4e
authored
Nov 27, 2018
by
Maurits van Beusekom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build error on latest Xcode (iOS 12)
parent
993641f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
example/ios/Podfile
+1
-0
example/ios/Runner.xcodeproj/project.pbxproj
+2
-0
ios/Classes/PermissionManager.swift
+8
-4
No files found.
example/ios/Podfile
View file @
9b7f4c4e
...
...
@@ -60,6 +60,7 @@ post_install do |installer|
installer
.
pods_project
.
targets
.
each
do
|
target
|
target
.
build_configurations
.
each
do
|
config
|
config
.
build_settings
[
'ENABLE_BITCODE'
]
=
'NO'
config
.
build_settings
[
'SWIFT_VERSION'
]
=
'4.2'
end
end
end
example/ios/Runner.xcodeproj/project.pbxproj
View file @
9b7f4c4e
...
...
@@ -367,6 +367,7 @@
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
iphoneos
;
SWIFT_VERSION
=
4.2
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
name
=
Debug
;
...
...
@@ -417,6 +418,7 @@
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
iphoneos
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Owholemodule"
;
SWIFT_VERSION
=
4.2
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
VALIDATE_PRODUCT
=
YES
;
};
...
...
ios/Classes/PermissionManager.swift
View file @
9b7f4c4e
...
...
@@ -47,10 +47,14 @@ class PermissionManager: NSObject {
static
func
openAppSettings
(
result
:
@escaping
FlutterResult
)
{
if
#available(iOS 8.0, *)
{
if
#available(iOS 10, *)
{
UIApplication
.
shared
.
open
(
URL
.
init
(
string
:
UIApplication
.
openSettingsURLString
)
!
,
options
:
convertToUIApplicationOpenExternalURLOptionsKeyDictionary
([:]),
completionHandler
:
{
(
success
)
in
result
(
success
)
})
guard
let
url
=
URL
(
string
:
UIApplication
.
openSettingsURLString
),
UIApplication
.
shared
.
canOpenURL
(
url
)
else
{
return
}
let
optionsKeyDictionary
=
[
UIApplication
.
OpenExternalURLOptionsKey
(
rawValue
:
"universalLinksOnly"
):
NSNumber
(
value
:
true
)]
UIApplication
.
shared
.
open
(
url
,
options
:
optionsKeyDictionary
,
completionHandler
:
nil
)
}
else
{
let
success
=
UIApplication
.
shared
.
openURL
(
URL
.
init
(
string
:
UIApplication
.
openSettingsURLString
)
!
)
result
(
success
)
...
...
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