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
969a4287
Commit
969a4287
authored
Feb 11, 2019
by
Maurits van Beusekom
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into releases/2.1.3
parents
c7d30346
c9d6758b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
example/ios/Runner.xcodeproj/project.pbxproj
+0
-4
example/lib/main.dart
+2
-1
ios/Classes/PermissionManager.swift
+3
-1
No files found.
example/ios/Runner.xcodeproj/project.pbxproj
View file @
969a4287
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
/* Begin PBXBuildFile section */
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2
/* GeneratedPluginRegistrant.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1498D2331E8E89220040F4C2
/* GeneratedPluginRegistrant.m */
;
};
1498D2341E8E89220040F4C2
/* GeneratedPluginRegistrant.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1498D2331E8E89220040F4C2
/* GeneratedPluginRegistrant.m */
;
};
2D5378261FAA1A9400D5DBA9
/* flutter_assets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2D5378251FAA1A9400D5DBA9
/* flutter_assets */
;
};
3B3967161E833CAA004F5970
/* AppFrameworkInfo.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
;
};
3B3967161E833CAA004F5970
/* AppFrameworkInfo.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
;
};
3B80C3941E831B6300D905FE
/* App.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
};
3B80C3941E831B6300D905FE
/* App.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
};
3B80C3951E831B6300D905FE
/* App.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
3B80C3951E831B6300D905FE
/* App.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3B80C3931E831B6300D905FE
/* App.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
...
@@ -39,7 +38,6 @@
...
@@ -39,7 +38,6 @@
/* Begin PBXFileReference section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2
/* GeneratedPluginRegistrant.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GeneratedPluginRegistrant.h
;
sourceTree
=
"<group>"
;
};
1498D2321E8E86230040F4C2
/* GeneratedPluginRegistrant.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GeneratedPluginRegistrant.h
;
sourceTree
=
"<group>"
;
};
1498D2331E8E89220040F4C2
/* GeneratedPluginRegistrant.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GeneratedPluginRegistrant.m
;
sourceTree
=
"<group>"
;
};
1498D2331E8E89220040F4C2
/* GeneratedPluginRegistrant.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GeneratedPluginRegistrant.m
;
sourceTree
=
"<group>"
;
};
2D5378251FAA1A9400D5DBA9
/* flutter_assets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
name
=
flutter_assets
;
path
=
Flutter/flutter_assets
;
sourceTree
=
SOURCE_ROOT
;
};
36F84C9A972D968241208A7F
/* Pods_Runner.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
includeInIndex
=
0
;
path
=
Pods_Runner.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
36F84C9A972D968241208A7F
/* Pods_Runner.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
includeInIndex
=
0
;
path
=
Pods_Runner.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
name
=
AppFrameworkInfo.plist
;
path
=
Flutter/AppFrameworkInfo.plist
;
sourceTree
=
"<group>"
;
};
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
name
=
AppFrameworkInfo.plist
;
path
=
Flutter/AppFrameworkInfo.plist
;
sourceTree
=
"<group>"
;
};
3B80C3931E831B6300D905FE
/* App.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
App.framework
;
path
=
Flutter/App.framework
;
sourceTree
=
"<group>"
;
};
3B80C3931E831B6300D905FE
/* App.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
App.framework
;
path
=
Flutter/App.framework
;
sourceTree
=
"<group>"
;
};
...
@@ -81,7 +79,6 @@
...
@@ -81,7 +79,6 @@
9740EEB11CF90186004384FC
/* Flutter */
=
{
9740EEB11CF90186004384FC
/* Flutter */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
2D5378251FAA1A9400D5DBA9
/* flutter_assets */
,
3B80C3931E831B6300D905FE
/* App.framework */
,
3B80C3931E831B6300D905FE
/* App.framework */
,
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
,
3B3967151E833CAA004F5970
/* AppFrameworkInfo.plist */
,
9740EEBA1CF902C7004384FC
/* Flutter.framework */
,
9740EEBA1CF902C7004384FC
/* Flutter.framework */
,
...
@@ -207,7 +204,6 @@
...
@@ -207,7 +204,6 @@
97C147011CF9000F007C117D
/* LaunchScreen.storyboard in Resources */
,
97C147011CF9000F007C117D
/* LaunchScreen.storyboard in Resources */
,
3B3967161E833CAA004F5970
/* AppFrameworkInfo.plist in Resources */
,
3B3967161E833CAA004F5970
/* AppFrameworkInfo.plist in Resources */
,
97C146FE1CF9000F007C117D
/* Assets.xcassets in Resources */
,
97C146FE1CF9000F007C117D
/* Assets.xcassets in Resources */
,
2D5378261FAA1A9400D5DBA9
/* flutter_assets in Resources */
,
97C146FC1CF9000F007C117D
/* Main.storyboard in Resources */
,
97C146FC1CF9000F007C117D
/* Main.storyboard in Resources */
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
...
...
example/lib/main.dart
View file @
969a4287
...
@@ -16,7 +16,8 @@ class MyApp extends StatelessWidget {
...
@@ -16,7 +16,8 @@ class MyApp extends StatelessWidget {
IconButton
(
IconButton
(
icon:
const
Icon
(
Icons
.
settings
),
icon:
const
Icon
(
Icons
.
settings
),
onPressed:
()
{
onPressed:
()
{
PermissionHandler
().
openAppSettings
();
PermissionHandler
().
openAppSettings
().
then
((
bool
hasOpened
)
=>
debugPrint
(
'App Settings opened: '
+
hasOpened
.
toString
()));
},
},
)
)
],
],
...
...
ios/Classes/PermissionManager.swift
View file @
969a4287
...
@@ -49,12 +49,14 @@ class PermissionManager: NSObject {
...
@@ -49,12 +49,14 @@ class PermissionManager: NSObject {
if
#available(iOS 10, *)
{
if
#available(iOS 10, *)
{
guard
let
url
=
URL
(
string
:
UIApplication
.
openSettingsURLString
),
guard
let
url
=
URL
(
string
:
UIApplication
.
openSettingsURLString
),
UIApplication
.
shared
.
canOpenURL
(
url
)
else
{
UIApplication
.
shared
.
canOpenURL
(
url
)
else
{
result
(
false
)
return
return
}
}
let
optionsKeyDictionary
=
[
UIApplication
.
OpenExternalURLOptionsKey
(
rawValue
:
"universalLinksOnly"
):
NSNumber
(
value
:
true
)]
let
optionsKeyDictionary
=
[
UIApplication
.
OpenExternalURLOptionsKey
(
rawValue
:
"universalLinksOnly"
):
NSNumber
(
value
:
true
)]
UIApplication
.
shared
.
open
(
url
,
options
:
optionsKeyDictionary
,
completionHandler
:
nil
)
UIApplication
.
shared
.
open
(
url
,
options
:
optionsKeyDictionary
,
completionHandler
:
{
(
success
)
in
result
(
success
)
});
return
}
else
{
}
else
{
let
success
=
UIApplication
.
shared
.
openURL
(
URL
.
init
(
string
:
UIApplication
.
openSettingsURLString
)
!
)
let
success
=
UIApplication
.
shared
.
openURL
(
URL
.
init
(
string
:
UIApplication
.
openSettingsURLString
)
!
)
result
(
success
)
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