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
6a3bc62a
Unverified
Commit
6a3bc62a
authored
Feb 16, 2019
by
Razvan Cristian Lung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ios open settings
parent
4c4de275
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
22 deletions
+7
-22
ios/Classes/PermissionManager.m
+7
-22
No files found.
ios/Classes/PermissionManager.m
View file @
6a3bc62a
...
@@ -59,33 +59,18 @@
...
@@ -59,33 +59,18 @@
}
}
+
(
void
)
openAppSettings
:
(
FlutterResult
)
result
{
+
(
void
)
openAppSettings
:
(
FlutterResult
)
result
{
if
(
@available
(
iOS
8
.
0
,
*
))
{
NSURL
*
url
=
[[
NSURL
alloc
]
initWithString
:
UIApplicationOpenSettingsURLString
];
if
(
url
==
nil
)
{
result
(
@false
);
return
;
}
if
(
@available
(
iOS
10
,
*
))
{
if
(
@available
(
iOS
10
,
*
))
{
if
(
!
[
UIApplication
.
sharedApplication
canOpenURL
:
url
])
{
[[
UIApplication
sharedApplication
]
openURL
:[
NSURL
URLWithString
:
UIApplicationOpenSettingsURLString
]
result
(
@false
);
options
:[[
NSDictionary
alloc
]
init
]
return
;
completionHandler
:^
(
BOOL
success
)
{
}
NSDictionary
*
optionsKeyDictionary
=
@{
UIApplicationOpenURLOptionUniversalLinksOnly
:
@true
};
[[
UIApplication
sharedApplication
]
openURL
:
url
options
:
optionsKeyDictionary
completionHandler
:^
(
BOOL
success
)
{
result
([[
NSNumber
alloc
]
initWithBool
:
success
]);
result
([[
NSNumber
alloc
]
initWithBool
:
success
]);
}];
}];
return
;
}
else
if
(
@available
(
iOS
8
.
0
,
*
))
{
}
else
{
BOOL
success
=
[[
UIApplication
sharedApplication
]
openURL
:[
NSURL
URLWithString
:
UIApplicationOpenSettingsURLString
]];
BOOL
success
=
[[
UIApplication
sharedApplication
]
openURL
:
url
];
result
([[
NSNumber
alloc
]
initWithBool
:
success
]);
result
([[
NSNumber
alloc
]
initWithBool
:
success
]);
}
}
else
{
}
result
(
@false
);
result
(
@false
);
}
}
}
+
(
id
)
createPermissionStrategy
:
(
PermissionGroup
)
permission
{
+
(
id
)
createPermissionStrategy
:
(
PermissionGroup
)
permission
{
...
...
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