Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
tunnel
liberty-tunnel-client-library-apple
Commits
5fdc4099
Commit
5fdc4099
authored
Aug 21, 2018
by
ueshiba
Browse files
Update strings files
parent
358db728
Changes
2
Hide whitespace changes
Inline
Side-by-side
PIALibrary/Resources/UI/iOS/en.lproj/Welcome.strings
View file @
5fdc4099
...
...
@@ -60,5 +60,5 @@
"agreement.message.privacy" = "Privacy Policy";
"camera.access.error.title" = "Camera not available";
"camera.access.error.message" = "Your device does not support scanning
a
code. Please use a device with a camera.";
"camera.access.denied.message" = "
Please grant permission to use the Camera
.";
"camera.access.error.message" = "Your device does not support scanning
QR
code
s
. Please use a device with a camera.";
"camera.access.denied.message" = "
Enable camera access so you can scan QR codes to redeem a gift card
.";
PIALibrary/Sources/UI/iOS/RedeemViewController.swift
View file @
5fdc4099
...
...
@@ -147,9 +147,7 @@ class RedeemViewController: AutolayoutViewController, WelcomeChild {
@IBAction
private
func
showCameraToScanQRCodes
(
_
sender
:
Any
?)
{
if
AVCaptureDevice
.
authorizationStatus
(
for
:
AVMediaType
.
video
)
==
.
denied
{
presentAlertWith
(
title
:
L10n
.
Welcome
.
Camera
.
Access
.
Error
.
title
,
andMessage
:
L10n
.
Welcome
.
Camera
.
Access
.
Denied
.
message
,
andButtonTitle
:
L10n
.
Ui
.
Global
.
close
)
self
.
presentUnauthorizeCameraError
()
}
else
{
AVCaptureDevice
.
requestAccess
(
for
:
AVMediaType
.
video
)
{
response
in
if
response
{
...
...
@@ -157,7 +155,7 @@ class RedeemViewController: AutolayoutViewController, WelcomeChild {
self
.
perform
(
segue
:
StoryboardSegue
.
Welcome
.
signupQRCameraScannerSegue
)
}
}
else
{
self
.
errorFound
()
self
.
presentUnauthorizeCameraError
()
}
}
}
...
...
@@ -195,6 +193,12 @@ class RedeemViewController: AutolayoutViewController, WelcomeChild {
}
private
func
presentUnauthorizeCameraError
()
{
presentAlertWith
(
title
:
L10n
.
Welcome
.
Camera
.
Access
.
Error
.
title
,
andMessage
:
L10n
.
Welcome
.
Camera
.
Access
.
Denied
.
message
,
andButtonTitle
:
L10n
.
Ui
.
Global
.
close
)
}
private
func
presentAlertWith
(
title
:
String
,
andMessage
message
:
String
,
andButtonTitle
buttonTitle
:
String
)
{
...
...
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