Skip to content

Commit b9990ce

Browse files
authored
Merge pull request #195 from mattrubin/screenshots
Hide camera permissions alert in screenshots
2 parents aae066c + 207802a commit b9990ce

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Authenticator/Source/QRScanner.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ class QRScanner: NSObject, AVCaptureMetadataOutputObjectsDelegate {
9797
}
9898

9999
class func requestAccess(_ completionHandler: @escaping (Bool) -> Void) {
100+
guard !CommandLine.isDemo else {
101+
return
102+
}
100103
AVCaptureDevice.requestAccess(forMediaType: AVMediaTypeVideo, completionHandler: completionHandler)
101104
}
102105

fastlane/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ xcode-select --install
2727
<td width="33%"><code>sudo gem install fastlane -NV</code></td>
2828
</tr>
2929
</table>
30+
3031
# Available Actions
3132
## iOS
3233
### ios icons

fastlane/SnapshotHelper.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
// Copyright © 2015 Felix Krause. All rights reserved.
77
//
88

9+
// -----------------------------------------------------
10+
// IMPORTANT: When modifying this file, make sure to
11+
// increment the version number at the very
12+
// bottom of the file to notify users about
13+
// the new SnapshotHelper.swift
14+
// -----------------------------------------------------
15+
916
import Foundation
1017
import XCTest
1118

@@ -145,7 +152,7 @@ open class Snapshot: NSObject {
145152
print("Can't prepare environment. Simulator home location is inaccessible. Does \(simulatorHostHome) exist?")
146153
return nil
147154
}
148-
homeDir = homeDirUrl
155+
homeDir = URL(fileURLWithPath: homeDirUrl.path)
149156
#endif
150157
return homeDir.appendingPathComponent("Library/Caches/tools.fastlane")
151158
}
@@ -163,4 +170,4 @@ extension XCUIElement {
163170

164171
// Please don't remove the lines below
165172
// They are used to detect outdated configuration files
166-
// SnapshotHelperVersion [1.3]
173+
// SnapshotHelperVersion [1.4]

0 commit comments

Comments
 (0)