Skip to content

Commit 1397d01

Browse files
authored
Merge pull request #3 from crontab/macos-fixes
macOS fixes; demo improvements
2 parents a2ae2fe + b4730cc commit 1397d01

File tree

15 files changed

+228
-284
lines changed

15 files changed

+228
-284
lines changed

PhotoCamera/Sources/CaptureService.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ actor CaptureService {
193193

194194
/// Create a new rotation coordinator for the specified device and observe its state to monitor rotation changes.
195195
private func createRotationCoordinator(for device: AVCaptureDevice) {
196+
// Somehow this function doesn't work correctly on the Mac, apparently it doesn't need rotation correction. Plus it doesn't need to since it's a Mac.
197+
guard !ProcessInfo.processInfo.isiOSAppOnMac else { return }
198+
196199
// Create a new rotation coordinator for this device.
197200
rotationCoordinator = AVCaptureDevice.RotationCoordinator(device: device, previewLayer: videoPreviewLayer)
198201

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0x00",
9+
"green" : "0x8E",
10+
"red" : "0xFF"
11+
}
12+
},
13+
"idiom" : "universal"
14+
},
15+
{
16+
"appearances" : [
17+
{
18+
"appearance" : "luminosity",
19+
"value" : "dark"
20+
}
21+
],
22+
"color" : {
23+
"color-space" : "srgb",
24+
"components" : {
25+
"alpha" : "1.000",
26+
"blue" : "0x00",
27+
"green" : "0x99",
28+
"red" : "0xFF"
29+
}
30+
},
31+
"idiom" : "universal"
32+
}
33+
],
34+
"info" : {
35+
"author" : "xcode",
36+
"version" : 1
37+
}
38+
}

PhotoCameraDemo/Sources/Assets.xcassets/AppIcon.appiconset/Artwork - Light.png renamed to PhotoCameraDemo/Assets.xcassets/AppIcon.appiconset/Artwork - Light.png

File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "Artwork - Light.png",
5+
"idiom" : "universal",
6+
"platform" : "ios",
7+
"size" : "1024x1024"
8+
}
9+
],
10+
"info" : {
11+
"author" : "xcode",
12+
"version" : 1
13+
}
14+
}
File renamed without changes.

PhotoCameraDemo/PhotoCameraDemo.xcodeproj/project.pbxproj

Lines changed: 111 additions & 155 deletions
Large diffs are not rendered by default.

PhotoCameraDemo/Sources/Assets.xcassets/AccentColor.colorset/Contents.json

Lines changed: 0 additions & 15 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)