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
e18785fc
Unverified
Commit
e18785fc
authored
Nov 21, 2018
by
Maurits van Beusekom
Committed by
GitHub
Nov 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #41 from BaseflowIT/issues/38
Updated to latest Swift version (4.2)
parents
aa689e6c
fdc46cd4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
.travis.yml
+1
-1
example/ios/Runner.xcodeproj/project.pbxproj
+3
-3
example/ios/Runner/AppDelegate.swift
+1
-1
ios/Classes/PermissionManager.swift
+7
-2
No files found.
.travis.yml
View file @
e18785fc
...
@@ -46,7 +46,7 @@ matrix:
...
@@ -46,7 +46,7 @@ matrix:
env
:
env
:
-
SHARD="Build example ipas"
-
SHARD="Build example ipas"
language
:
generic
language
:
generic
osx_image
:
xcode
9.3
osx_image
:
xcode
10.1
before_script
:
before_script
:
-
./scripts/before_build_ipas.sh
-
./scripts/before_build_ipas.sh
-
export PATH=$HOME/flutter/bin:$HOME/flutter/bin/cache/dart-sdk/bin:$PATH
-
export PATH=$HOME/flutter/bin:$HOME/flutter/bin/cache/dart-sdk/bin:$PATH
...
...
example/ios/Runner.xcodeproj/project.pbxproj
View file @
e18785fc
...
@@ -222,7 +222,7 @@
...
@@ -222,7 +222,7 @@
);
);
inputPaths
=
(
inputPaths
=
(
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh"
,
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh"
,
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework"
,
"${PODS_ROOT}/../.symlinks/flutter/ios
-release
/Flutter.framework"
,
"${BUILT_PRODUCTS_DIR}/permission_handler/permission_handler.framework"
,
"${BUILT_PRODUCTS_DIR}/permission_handler/permission_handler.framework"
,
);
);
name
=
"[CP] Embed Pods Frameworks"
;
name
=
"[CP] Embed Pods Frameworks"
;
...
@@ -445,7 +445,7 @@
...
@@ -445,7 +445,7 @@
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_SWIFT3_OBJC_INFERENCE
=
Default
;
SWIFT_SWIFT3_OBJC_INFERENCE
=
Default
;
SWIFT_VERSION
=
4.
0
;
SWIFT_VERSION
=
4.
2
;
VERSIONING_SYSTEM
=
"apple-generic"
;
VERSIONING_SYSTEM
=
"apple-generic"
;
};
};
name
=
Debug
;
name
=
Debug
;
...
@@ -472,7 +472,7 @@
...
@@ -472,7 +472,7 @@
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_OBJC_BRIDGING_HEADER
=
"Runner/Runner-Bridging-Header.h"
;
SWIFT_SWIFT3_OBJC_INFERENCE
=
Default
;
SWIFT_SWIFT3_OBJC_INFERENCE
=
Default
;
SWIFT_VERSION
=
4.
0
;
SWIFT_VERSION
=
4.
2
;
VERSIONING_SYSTEM
=
"apple-generic"
;
VERSIONING_SYSTEM
=
"apple-generic"
;
};
};
name
=
Release
;
name
=
Release
;
...
...
example/ios/Runner/AppDelegate.swift
View file @
e18785fc
...
@@ -5,7 +5,7 @@ import Flutter
...
@@ -5,7 +5,7 @@ import Flutter
@objc
class
AppDelegate
:
FlutterAppDelegate
{
@objc
class
AppDelegate
:
FlutterAppDelegate
{
override
func
application
(
override
func
application
(
_
application
:
UIApplication
,
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplicationLaunchOptionsKey
:
Any
]?
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?
)
->
Bool
{
)
->
Bool
{
GeneratedPluginRegistrant
.
register
(
with
:
self
)
GeneratedPluginRegistrant
.
register
(
with
:
self
)
return
super
.
application
(
application
,
didFinishLaunchingWithOptions
:
launchOptions
)
return
super
.
application
(
application
,
didFinishLaunchingWithOptions
:
launchOptions
)
...
...
ios/Classes/PermissionManager.swift
View file @
e18785fc
...
@@ -47,12 +47,12 @@ class PermissionManager: NSObject {
...
@@ -47,12 +47,12 @@ class PermissionManager: NSObject {
static
func
openAppSettings
(
result
:
@escaping
FlutterResult
)
{
static
func
openAppSettings
(
result
:
@escaping
FlutterResult
)
{
if
#available(iOS 8.0, *)
{
if
#available(iOS 8.0, *)
{
if
#available(iOS 10, *)
{
if
#available(iOS 10, *)
{
UIApplication
.
shared
.
open
(
URL
.
init
(
string
:
UIApplication
OpenSettingsURLString
)
!
,
options
:
[:]
,
UIApplication
.
shared
.
open
(
URL
.
init
(
string
:
UIApplication
.
openSettingsURLString
)
!
,
options
:
convertToUIApplicationOpenExternalURLOptionsKeyDictionary
([:])
,
completionHandler
:
{
completionHandler
:
{
(
success
)
in
result
(
success
)
(
success
)
in
result
(
success
)
})
})
}
else
{
}
else
{
let
success
=
UIApplication
.
shared
.
openURL
(
URL
.
init
(
string
:
UIApplication
O
penSettingsURLString
)
!
)
let
success
=
UIApplication
.
shared
.
openURL
(
URL
.
init
(
string
:
UIApplication
.
o
penSettingsURLString
)
!
)
result
(
success
)
result
(
success
)
}
}
}
}
...
@@ -89,3 +89,8 @@ class PermissionManager: NSObject {
...
@@ -89,3 +89,8 @@ class PermissionManager: NSObject {
}
}
}
}
}
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate
func
convertToUIApplicationOpenExternalURLOptionsKeyDictionary
(
_
input
:
[
String
:
Any
])
->
[
UIApplication
.
OpenExternalURLOptionsKey
:
Any
]
{
return
Dictionary
(
uniqueKeysWithValues
:
input
.
map
{
key
,
value
in
(
UIApplication
.
OpenExternalURLOptionsKey
(
rawValue
:
key
),
value
)})
}
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