Skip to content

Commit a74f978

Browse files
authored
Merge pull request #56 from tstump-phunware/task/xcode_15
Update project and installation methods (CocoaPods and Swift Package Manager) for Xcode 15
2 parents 40504c1 + d532ba6 commit a74f978

35 files changed

+968
-197
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,56 +10,45 @@ on:
1010
branches:
1111
- master
1212

13+
env:
14+
# Use Xcode 15.2 or newer to support VisionOS
15+
DEVELOPER_DIR: /Applications/Xcode_15.2.app
16+
1317
jobs:
1418
test:
1519
name: Test
1620
runs-on: macos-latest
1721
strategy:
1822
matrix:
19-
platform: ['iOS Simulator,name=iPhone 13']
23+
platform: ['iOS Simulator,name=iPhone 15']
2024
steps:
2125
- uses: actions/checkout@v2
22-
- uses: maxim-lobanov/setup-xcode@v1
23-
with:
24-
xcode-version: '13.4.1'
2526
- name: Test
2627
run: make test
2728
analyze:
2829
name: Analyze
2930
runs-on: macos-latest
3031
steps:
3132
- uses: actions/checkout@v2
32-
- uses: maxim-lobanov/setup-xcode@v1
33-
with:
34-
xcode-version: '13.4.1'
3533
- name: analyze
3634
run: make analyze
3735
cocoapods:
3836
name: CocoaPods
3937
runs-on: macos-latest
4038
steps:
4139
- uses: actions/checkout@v2
42-
- uses: maxim-lobanov/setup-xcode@v1
43-
with:
44-
xcode-version: '13.4.1'
4540
- name: Cocoapods lint
4641
run: make cocoapods
4742
carthage:
4843
name: Carthage
4944
runs-on: macos-latest
5045
steps:
5146
- uses: actions/checkout@v2
52-
- uses: maxim-lobanov/setup-xcode@v1
53-
with:
54-
xcode-version: '13.4.1'
5547
- name: carthage
5648
run: make carthage
5749
swift-package-manager:
5850
runs-on: macos-latest
5951
steps:
6052
- uses: actions/checkout@v2
61-
- uses: maxim-lobanov/setup-xcode@v1
62-
with:
63-
xcode-version: '13.4.1'
64-
- name: Verify that PINCache can be build by SPM
53+
- name: Verify that PINOperation can be built by SPM
6554
run: make spm

.github/workflows/publish_release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ on:
55
release-type:
66
description: 'The type of release. Must be major, minor or patch'
77
required: true
8+
9+
env:
10+
# Use Xcode 15.2 or newer to support VisionOS
11+
DEVELOPER_DIR: /Applications/Xcode_15.2.app
12+
813
jobs:
914
create_release:
1015
runs-on: macos-latest
1116
steps:
1217
- uses: actions/checkout@v2
1318
# Make sure we can lint before creating the release.
14-
- uses: maxim-lobanov/setup-xcode@v1
15-
with:
16-
xcode-version: '13.4.1'
1719
- name: Cocoapods lint
1820
run: make cocoapods
1921
- name: Create Release Commit

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## [1.2.3](https://github.com/Pinterest/PINOperation/tree/1.2.3) (TBD)
4+
5+
[Full Changelog](https://github.com/Pinterest/PINOperation/compare/1.2.2...1.2.3)
6+
7+
8+
- Update project to build and run using Xcode 15
9+
- Update CocoaPods Podspec to include Privacy Manifest file
10+
- Bump minimum deployment targets to iOS 12, tvOS 12, watchOS 4, and macOS 10.13
11+
312
## [1.2.2](https://github.com/Pinterest/PINOperation/tree/1.2.2) (2022-11-28)
413

514
[Full Changelog](https://github.com/Pinterest/PINOperation/compare/1.2.1...1.2.2)

Example/PINOperationExample.xcodeproj/project.pbxproj

Lines changed: 12 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 60;
77
objects = {
88

99
/* Begin PBXBuildFile section */
1010
1387274F245D5BB500C1F56D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1387274E245D5BB500C1F56D /* AppDelegate.swift */; };
1111
13872758245D5BB800C1F56D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13872757245D5BB800C1F56D /* Assets.xcassets */; };
1212
1387275B245D5BB800C1F56D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 13872759245D5BB800C1F56D /* LaunchScreen.storyboard */; };
1313
13872765245D5D8200C1F56D /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 13872764245D5D8200C1F56D /* MainViewController.m */; };
14-
6DD78925193625590E803994 /* libPods-PINOperationExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BDDE545CD189CC0B424ECD0 /* libPods-PINOperationExample.a */; };
1514
/* End PBXBuildFile section */
1615

1716
/* Begin PBXFileReference section */
@@ -23,17 +22,13 @@
2322
13872762245D5D8200C1F56D /* PINOperationExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PINOperationExample-Bridging-Header.h"; sourceTree = "<group>"; };
2423
13872763245D5D8200C1F56D /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
2524
13872764245D5D8200C1F56D /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
26-
15635AC2BB0501241D3126BA /* Pods-PINOperationExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PINOperationExample.release.xcconfig"; path = "Target Support Files/Pods-PINOperationExample/Pods-PINOperationExample.release.xcconfig"; sourceTree = "<group>"; };
27-
2F8A2FBFCEF95140E01995E8 /* Pods-PINOperationExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PINOperationExample.debug.xcconfig"; path = "Target Support Files/Pods-PINOperationExample/Pods-PINOperationExample.debug.xcconfig"; sourceTree = "<group>"; };
28-
7BDDE545CD189CC0B424ECD0 /* libPods-PINOperationExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PINOperationExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
2925
/* End PBXFileReference section */
3026

3127
/* Begin PBXFrameworksBuildPhase section */
3228
13872748245D5BB500C1F56D /* Frameworks */ = {
3329
isa = PBXFrameworksBuildPhase;
3430
buildActionMask = 2147483647;
3531
files = (
36-
6DD78925193625590E803994 /* libPods-PINOperationExample.a in Frameworks */,
3732
);
3833
runOnlyForDeploymentPostprocessing = 0;
3934
};
@@ -43,8 +38,6 @@
4338
110EBBE34DCD59092AC3306C /* Pods */ = {
4439
isa = PBXGroup;
4540
children = (
46-
2F8A2FBFCEF95140E01995E8 /* Pods-PINOperationExample.debug.xcconfig */,
47-
15635AC2BB0501241D3126BA /* Pods-PINOperationExample.release.xcconfig */,
4841
);
4942
path = Pods;
5043
sourceTree = "<group>";
@@ -55,7 +48,6 @@
5548
1387274D245D5BB500C1F56D /* PINOperationExample */,
5649
1387274C245D5BB500C1F56D /* Products */,
5750
110EBBE34DCD59092AC3306C /* Pods */,
58-
5C200BF654CB547E7117CE2B /* Frameworks */,
5951
);
6052
sourceTree = "<group>";
6153
};
@@ -81,22 +73,13 @@
8173
path = PINOperationExample;
8274
sourceTree = "<group>";
8375
};
84-
5C200BF654CB547E7117CE2B /* Frameworks */ = {
85-
isa = PBXGroup;
86-
children = (
87-
7BDDE545CD189CC0B424ECD0 /* libPods-PINOperationExample.a */,
88-
);
89-
name = Frameworks;
90-
sourceTree = "<group>";
91-
};
9276
/* End PBXGroup section */
9377

9478
/* Begin PBXNativeTarget section */
9579
1387274A245D5BB500C1F56D /* PINOperationExample */ = {
9680
isa = PBXNativeTarget;
9781
buildConfigurationList = 1387275F245D5BB800C1F56D /* Build configuration list for PBXNativeTarget "PINOperationExample" */;
9882
buildPhases = (
99-
6C859F1C363A79193D42EFC9 /* [CP] Check Pods Manifest.lock */,
10083
13872747245D5BB500C1F56D /* Sources */,
10184
13872748245D5BB500C1F56D /* Frameworks */,
10285
13872749245D5BB500C1F56D /* Resources */,
@@ -116,8 +99,9 @@
11699
13872743245D5BB500C1F56D /* Project object */ = {
117100
isa = PBXProject;
118101
attributes = {
102+
BuildIndependentTargetsInParallel = YES;
119103
LastSwiftUpdateCheck = 1140;
120-
LastUpgradeCheck = 1140;
104+
LastUpgradeCheck = 1520;
121105
ORGANIZATIONNAME = Pinterest;
122106
TargetAttributes = {
123107
1387274A245D5BB500C1F56D = {
@@ -127,7 +111,7 @@
127111
};
128112
};
129113
buildConfigurationList = 13872746245D5BB500C1F56D /* Build configuration list for PBXProject "PINOperationExample" */;
130-
compatibilityVersion = "Xcode 9.3";
114+
compatibilityVersion = "Xcode 15.0";
131115
developmentRegion = en;
132116
hasScannedForEncodings = 0;
133117
knownRegions = (
@@ -156,31 +140,6 @@
156140
};
157141
/* End PBXResourcesBuildPhase section */
158142

159-
/* Begin PBXShellScriptBuildPhase section */
160-
6C859F1C363A79193D42EFC9 /* [CP] Check Pods Manifest.lock */ = {
161-
isa = PBXShellScriptBuildPhase;
162-
buildActionMask = 2147483647;
163-
files = (
164-
);
165-
inputFileListPaths = (
166-
);
167-
inputPaths = (
168-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
169-
"${PODS_ROOT}/Manifest.lock",
170-
);
171-
name = "[CP] Check Pods Manifest.lock";
172-
outputFileListPaths = (
173-
);
174-
outputPaths = (
175-
"$(DERIVED_FILE_DIR)/Pods-PINOperationExample-checkManifestLockResult.txt",
176-
);
177-
runOnlyForDeploymentPostprocessing = 0;
178-
shellPath = /bin/sh;
179-
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
180-
showEnvVarsInLog = 0;
181-
};
182-
/* End PBXShellScriptBuildPhase section */
183-
184143
/* Begin PBXSourcesBuildPhase section */
185144
13872747245D5BB500C1F56D /* Sources */ = {
186145
isa = PBXSourcesBuildPhase;
@@ -231,6 +190,7 @@
231190
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
232191
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
233192
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
193+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
234194
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
235195
CLANG_WARN_STRICT_PROTOTYPES = YES;
236196
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -255,7 +215,7 @@
255215
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
256216
GCC_WARN_UNUSED_FUNCTION = YES;
257217
GCC_WARN_UNUSED_VARIABLE = YES;
258-
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
218+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
259219
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
260220
MTL_FAST_MATH = YES;
261221
ONLY_ACTIVE_ARCH = YES;
@@ -291,6 +251,7 @@
291251
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
292252
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
293253
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
254+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
294255
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
295256
CLANG_WARN_STRICT_PROTOTYPES = YES;
296257
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -309,7 +270,7 @@
309270
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
310271
GCC_WARN_UNUSED_FUNCTION = YES;
311272
GCC_WARN_UNUSED_VARIABLE = YES;
312-
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
273+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
313274
MTL_ENABLE_DEBUG_INFO = NO;
314275
MTL_FAST_MATH = YES;
315276
SDKROOT = iphoneos;
@@ -321,20 +282,20 @@
321282
};
322283
13872760245D5BB800C1F56D /* Debug */ = {
323284
isa = XCBuildConfiguration;
324-
baseConfigurationReference = 2F8A2FBFCEF95140E01995E8 /* Pods-PINOperationExample.debug.xcconfig */;
325285
buildSettings = {
326286
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
327287
CLANG_ENABLE_MODULES = YES;
288+
CODE_SIGN_IDENTITY = "Apple Development";
328289
CODE_SIGN_STYLE = Automatic;
329290
DEVELOPMENT_TEAM = "";
330291
INFOPLIST_FILE = PINOperationExample/Info.plist;
331-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
332292
LD_RUNPATH_SEARCH_PATHS = (
333293
"$(inherited)",
334294
"@executable_path/Frameworks",
335295
);
336296
PRODUCT_BUNDLE_IDENTIFIER = com.pinterest.PINOperationExample;
337297
PRODUCT_NAME = "$(TARGET_NAME)";
298+
PROVISIONING_PROFILE_SPECIFIER = "";
338299
SWIFT_OBJC_BRIDGING_HEADER = "PINOperationExample/PINOperationExample-Bridging-Header.h";
339300
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
340301
SWIFT_VERSION = 5.0;
@@ -344,20 +305,20 @@
344305
};
345306
13872761245D5BB800C1F56D /* Release */ = {
346307
isa = XCBuildConfiguration;
347-
baseConfigurationReference = 15635AC2BB0501241D3126BA /* Pods-PINOperationExample.release.xcconfig */;
348308
buildSettings = {
349309
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
350310
CLANG_ENABLE_MODULES = YES;
311+
CODE_SIGN_IDENTITY = "Apple Development";
351312
CODE_SIGN_STYLE = Automatic;
352313
DEVELOPMENT_TEAM = "";
353314
INFOPLIST_FILE = PINOperationExample/Info.plist;
354-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
355315
LD_RUNPATH_SEARCH_PATHS = (
356316
"$(inherited)",
357317
"@executable_path/Frameworks",
358318
);
359319
PRODUCT_BUNDLE_IDENTIFIER = com.pinterest.PINOperationExample;
360320
PRODUCT_NAME = "$(TARGET_NAME)";
321+
PROVISIONING_PROFILE_SPECIFIER = "";
361322
SWIFT_OBJC_BRIDGING_HEADER = "PINOperationExample/PINOperationExample-Bridging-Header.h";
362323
SWIFT_VERSION = 5.0;
363324
TARGETED_DEVICE_FAMILY = "1,2";

Example/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source 'https://cdn.cocoapods.org/'
2-
platform :ios, '8.0'
2+
platform :ios, '12.0'
33

44
target 'PINOperationExample' do
55
pod 'PINOperation', :path => '../'

Example/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- PINOperation (1.1.2)
2+
- PINOperation (1.2.3)
33

44
DEPENDENCIES:
55
- PINOperation (from `../`)
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
99
:path: "../"
1010

1111
SPEC CHECKSUMS:
12-
PINOperation: 24b774353ca248fcf87d67b2d61eef42087c125a
12+
PINOperation: fb563bcc9c32c26d6c78aaff967d405aa2ee74a7
1313

14-
PODFILE CHECKSUM: b83a75d584abe07185e7be951687702dadbabf84
14+
PODFILE CHECKSUM: 590bbecb30df161f3cdb5ab267c95244b0df928f
1515

16-
COCOAPODS: 1.9.1
16+
COCOAPODS: 1.15.2

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PLATFORM="platform=iOS Simulator,name=iPhone 13"
1+
PLATFORM="platform=iOS Simulator,name=iPhone 15"
22
SDK="iphonesimulator"
33
SHELL=/bin/bash -o pipefail
44
XCODE_MAJOR_VERSION=$(shell xcodebuild -version | HEAD -n 1 | sed -E 's/Xcode ([0-9]+).*/\1/')
@@ -24,15 +24,14 @@ analyze: install_xcbeautify
2424
rm -rf $(shell pwd)/clang
2525

2626
test: install_xcbeautify
27+
# TODO: Fix data races and enable thread sanitizer with '-enableThreadSanitizer YES'
2728
xcodebuild clean test -destination ${PLATFORM} -sdk ${SDK} -project PINOperation.xcodeproj -scheme PINOperation \
2829
ONLY_ACTIVE_ARCH=NO \
2930
CODE_SIGNING_REQUIRED=NO | xcbeautify
3031

3132
spm:
32-
# For now just check whether we can assemble it
33-
# TODO: replace it with "swift test --enable-test-discovery --sanitize=thread" when swiftPM resource-related bug would be fixed.
34-
# https://bugs.swift.org/browse/SR-13560
35-
swift build
33+
# TODO: Fix data races and enable thread sanitizer with '--sanitize thread'
34+
swift test
3635

3736
release-major:
3837

@@ -41,4 +40,4 @@ release-minor:
4140
release-patch:
4241

4342

44-
all: carthage cocoapods test analyze spm
43+
all: carthage cocoapods test analyze spm

PINOperation.podspec

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
Pod::Spec.new do |s|
22
s.name = 'PINOperation'
3-
s.version = '1.2.2'
3+
s.version = '1.2.3'
44
s.homepage = 'https://github.com/pinterest/PINOperation'
55
s.summary = 'Fast, concurrency-limited task queue for iOS and OS X.'
66
s.authors = { 'Garrett Moon' => 'garrett@pinterest.com' }
77
s.source = { :git => 'https://github.com/pinterest/PINOperation.git', :tag => "#{s.version}" }
88
s.license = { :type => 'Apache 2.0', :file => 'LICENSE.txt' }
99
s.requires_arc = true
1010
s.frameworks = 'Foundation'
11-
s.ios.deployment_target = '8.0'
12-
s.osx.deployment_target = '10.8'
13-
s.tvos.deployment_target = '9.0'
14-
s.watchos.deployment_target = '2.0'
11+
s.cocoapods_version = '>= 1.13.0'
12+
s.ios.deployment_target = '12.0'
13+
s.osx.deployment_target = '10.13'
14+
s.tvos.deployment_target = '12.0'
15+
s.visionos.deployment_target = '1.0'
16+
s.watchos.deployment_target = '4.0'
1517
pch_PIN = <<-EOS
1618
#ifndef TARGET_OS_WATCH
1719
#define TARGET_OS_WATCH 0
1820
#endif
1921
EOS
2022
s.prefix_header_contents = pch_PIN
21-
s.source_files = 'Source/**/*.{h,m,mm}'
23+
s.source_files = 'Source/*.{h,m}'
24+
s.resource_bundles = { 'PINOperation' => ['Source/PrivacyInfo.xcprivacy'] }
2225
end

0 commit comments

Comments
 (0)