Skip to content

Commit 915be5a

Browse files
author
Cesar Vargas Casaseca
committed
Support SPM
1 parent b4c111b commit 915be5a

File tree

4 files changed

+36
-9
lines changed

4 files changed

+36
-9
lines changed

Package.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// swift-tools-version:5.0
2+
3+
/**
4+
* Warhol
5+
* Copyright (c) César Vargas Casaseca 2020
6+
* Licensed under the MIT license (see LICENSE file)
7+
*/
8+
9+
import PackageDescription
10+
11+
let package = Package(
12+
name: "Warhol",
13+
platforms: [
14+
.iOS(.v11)],
15+
products: [
16+
.library(
17+
name: "Warhol",
18+
targets: ["Warhol"]
19+
)
20+
],
21+
targets: [
22+
.target(name: "Warhol",
23+
path: "Warhol/Warhol")
24+
]
25+
)

Warhol/SampleApp/Info.plist

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
<string>1</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
23+
<key>NSCameraUsageDescription</key>
24+
<string>Needs Camera to try Warhol</string>
2325
<key>NSMainStoryboardFile</key>
2426
<string>Main</string>
2527
<key>UILaunchStoryboardName</key>
2628
<string>LaunchScreen</string>
27-
<key>NSCameraUsageDescription</key>
28-
<string>Needs Camera to try Warhol</string>
2929
<key>UIMainStoryboardFile~iphone</key>
3030
<string>Main</string>
3131
<key>UIRequiredDeviceCapabilities</key>
@@ -35,8 +35,6 @@
3535
<key>UISupportedInterfaceOrientations</key>
3636
<array>
3737
<string>UIInterfaceOrientationPortrait</string>
38-
<string>UIInterfaceOrientationLandscapeLeft</string>
39-
<string>UIInterfaceOrientationLandscapeRight</string>
4038
</array>
4139
<key>UISupportedInterfaceOrientations~ipad</key>
4240
<array>

Warhol/Warhol.xcodeproj/project.pbxproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@
510510
PROVISIONING_PROFILE_SPECIFIER = "";
511511
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
512512
SKIP_INSTALL = YES;
513+
SUPPORTS_MACCATALYST = NO;
513514
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
514515
SWIFT_VERSION = 5.0;
515516
TARGETED_DEVICE_FAMILY = "1,2";
@@ -541,6 +542,7 @@
541542
PROVISIONING_PROFILE_SPECIFIER = "";
542543
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
543544
SKIP_INSTALL = YES;
545+
SUPPORTS_MACCATALYST = NO;
544546
SWIFT_VERSION = 5.0;
545547
TARGETED_DEVICE_FAMILY = "1,2";
546548
};
@@ -552,14 +554,14 @@
552554
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
553555
CODE_SIGN_STYLE = Automatic;
554556
DEVELOPMENT_ASSET_PATHS = "";
555-
DEVELOPMENT_TEAM = EKP9ZV782L;
557+
DEVELOPMENT_TEAM = "";
556558
ENABLE_PREVIEWS = YES;
557559
INFOPLIST_FILE = SampleApp/Info.plist;
558560
LD_RUNPATH_SEARCH_PATHS = (
559561
"$(inherited)",
560562
"@executable_path/Frameworks",
561563
);
562-
PRODUCT_BUNDLE_IDENTIFIER = de.axelspringer.weltmobil.Warhol.SampleApp;
564+
PRODUCT_BUNDLE_IDENTIFIER = com.casaseca.Warhol.SampleApp;
563565
PRODUCT_NAME = "$(TARGET_NAME)";
564566
SWIFT_VERSION = 5.0;
565567
TARGETED_DEVICE_FAMILY = "1,2";
@@ -572,14 +574,14 @@
572574
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
573575
CODE_SIGN_STYLE = Automatic;
574576
DEVELOPMENT_ASSET_PATHS = "";
575-
DEVELOPMENT_TEAM = EKP9ZV782L;
577+
DEVELOPMENT_TEAM = "";
576578
ENABLE_PREVIEWS = YES;
577579
INFOPLIST_FILE = SampleApp/Info.plist;
578580
LD_RUNPATH_SEARCH_PATHS = (
579581
"$(inherited)",
580582
"@executable_path/Frameworks",
581583
);
582-
PRODUCT_BUNDLE_IDENTIFIER = de.axelspringer.weltmobil.Warhol.SampleApp;
584+
PRODUCT_BUNDLE_IDENTIFIER = com.casaseca.Warhol.SampleApp;
583585
PRODUCT_NAME = "$(TARGET_NAME)";
584586
SWIFT_VERSION = 5.0;
585587
TARGETED_DEVICE_FAMILY = "1,2";

Warhol/Warhol/CameraFaceDetectionViewController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import AVFoundation
10-
import UIKit
10+
#if !os(macOS)
11+
import UIKit
12+
#endif
1113
import Vision
1214

1315
/// Views to be updated when a face is detected should comply with this protocol

0 commit comments

Comments
 (0)