From 94eccb8e73f780abee694105a7c557fa0213b9e9 Mon Sep 17 00:00:00 2001 From: Nate Walczak Date: Mon, 11 Jan 2021 13:39:58 -0500 Subject: [PATCH 1/5] Add DerivedData folder to git ignore list --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ed74ad6..8e3ae2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +DerivedData/ xcuserdata/ build .build From 9c4f3bdfe3de81a5116e8a0ecda103f83853ee31 Mon Sep 17 00:00:00 2001 From: Nate Walczak Date: Mon, 11 Jan 2021 13:41:04 -0500 Subject: [PATCH 2/5] Update Cocoapods installation readme documentation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 402ee8f..8b9752d 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ Orchard can be installed using CocoaPods. There are two subspecs, `Swift` and `ObjC`, so use either of these lines in your `Podfile`: `pod "Orchard/ObjC"` + `pod "Orchard/Swift"` #### Swift Package Manager From 4f64348e4b09e9697c83b0dc08f4899481559a16 Mon Sep 17 00:00:00 2001 From: Nate Walczak Date: Mon, 11 Jan 2021 13:55:51 -0500 Subject: [PATCH 3/5] Add support for Apple silicon --- Orchard-ObjC/iOS/OrchardiOSDevice.m | 2 +- Orchard-ObjC/iOS/OrchardiOSDevice.m.gyb | 2 +- Orchard-ObjC/tvOS/OrchardtvOSDevice.m | 2 +- Orchard-ObjC/tvOS/OrchardtvOSDevice.m.gyb | 2 +- Orchard-ObjC/watchOS/OrchardwatchOSDevice.m | 2 +- Orchard-ObjC/watchOS/OrchardwatchOSDevice.m.gyb | 2 +- Orchard-Swift/DeviceIdentification.swift | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Orchard-ObjC/iOS/OrchardiOSDevice.m b/Orchard-ObjC/iOS/OrchardiOSDevice.m index eb57cab..97e2000 100644 --- a/Orchard-ObjC/iOS/OrchardiOSDevice.m +++ b/Orchard-ObjC/iOS/OrchardiOSDevice.m @@ -21,7 +21,7 @@ OrchardiOSDevice OrchardiOSDeviceFromNSString(NSString * _Nonnull string) { #pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma clang diagnostic ignored "-Wunguarded-availability" - if ([string orchard_isEqualToOneOfStrings:@[@"i386", @"x86_64"]]) { + if ([string orchard_isEqualToOneOfStrings:@[@"arm64", @"i386", @"x86_64"]]) { return OrchardiOSDeviceSimulator; } diff --git a/Orchard-ObjC/iOS/OrchardiOSDevice.m.gyb b/Orchard-ObjC/iOS/OrchardiOSDevice.m.gyb index a686c24..694ef60 100644 --- a/Orchard-ObjC/iOS/OrchardiOSDevice.m.gyb +++ b/Orchard-ObjC/iOS/OrchardiOSDevice.m.gyb @@ -22,7 +22,7 @@ OrchardiOSDevice OrchardiOSDeviceFromNSString(NSString * _Nonnull string) { #pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma clang diagnostic ignored "-Wunguarded-availability" - if ([string orchard_isEqualToOneOfStrings:@[@"i386", @"x86_64"]]) { + if ([string orchard_isEqualToOneOfStrings:@[@"arm64", @"i386", @"x86_64"]]) { return OrchardiOSDeviceSimulator; } diff --git a/Orchard-ObjC/tvOS/OrchardtvOSDevice.m b/Orchard-ObjC/tvOS/OrchardtvOSDevice.m index ae0be9c..80b1706 100644 --- a/Orchard-ObjC/tvOS/OrchardtvOSDevice.m +++ b/Orchard-ObjC/tvOS/OrchardtvOSDevice.m @@ -15,7 +15,7 @@ #import "OrchardDeviceIdentification.h" OrchardtvOSDevice OrchardtvOSDeviceFromNSString(NSString *string) { - if ([string orchard_isEqualToOneOfStrings:@[@"i386", @"x86_64"]]) { + if ([string orchard_isEqualToOneOfStrings:@[@"arm64", @"i386", @"x86_64"]]) { return OrchardtvOSDeviceSimulator; } else if ([string isEqualToString:@"AppleTV5,3"]) { diff --git a/Orchard-ObjC/tvOS/OrchardtvOSDevice.m.gyb b/Orchard-ObjC/tvOS/OrchardtvOSDevice.m.gyb index cd6f465..a5cf789 100644 --- a/Orchard-ObjC/tvOS/OrchardtvOSDevice.m.gyb +++ b/Orchard-ObjC/tvOS/OrchardtvOSDevice.m.gyb @@ -16,7 +16,7 @@ #import "OrchardDeviceIdentification.h" OrchardtvOSDevice OrchardtvOSDeviceFromNSString(NSString *string) { - if ([string orchard_isEqualToOneOfStrings:@[@"i386", @"x86_64"]]) { + if ([string orchard_isEqualToOneOfStrings:@[@"arm64", @"i386", @"x86_64"]]) { return OrchardtvOSDeviceSimulator; } % import sys diff --git a/Orchard-ObjC/watchOS/OrchardwatchOSDevice.m b/Orchard-ObjC/watchOS/OrchardwatchOSDevice.m index 4474cd2..347bc19 100644 --- a/Orchard-ObjC/watchOS/OrchardwatchOSDevice.m +++ b/Orchard-ObjC/watchOS/OrchardwatchOSDevice.m @@ -17,7 +17,7 @@ #import "OrchardDeviceIdentification.h" OrchardwatchOSDevice OrchardwatchOSDeviceFromNSString(NSString *string) { - if ([string orchard_isEqualToOneOfStrings:@[@"i386", @"x86_64"]]) { + if ([string orchard_isEqualToOneOfStrings:@[@"arm64", @"i386", @"x86_64"]]) { return OrchardwatchOSDeviceSimulator; } else if ([string isEqualToString:@"Watch1,1"]) { diff --git a/Orchard-ObjC/watchOS/OrchardwatchOSDevice.m.gyb b/Orchard-ObjC/watchOS/OrchardwatchOSDevice.m.gyb index 138711b..3db294a 100644 --- a/Orchard-ObjC/watchOS/OrchardwatchOSDevice.m.gyb +++ b/Orchard-ObjC/watchOS/OrchardwatchOSDevice.m.gyb @@ -18,7 +18,7 @@ #import "OrchardDeviceIdentification.h" OrchardwatchOSDevice OrchardwatchOSDeviceFromNSString(NSString *string) { - if ([string orchard_isEqualToOneOfStrings:@[@"i386", @"x86_64"]]) { + if ([string orchard_isEqualToOneOfStrings:@[@"arm64", @"i386", @"x86_64"]]) { return OrchardwatchOSDeviceSimulator; } % import sys diff --git a/Orchard-Swift/DeviceIdentification.swift b/Orchard-Swift/DeviceIdentification.swift index d7e9c0f..b6c57a2 100644 --- a/Orchard-Swift/DeviceIdentification.swift +++ b/Orchard-Swift/DeviceIdentification.swift @@ -81,7 +81,7 @@ internal func parseDeviceIdentity(from modelString: String) -> DeviceIdentity { } #endif - if modelString == "i386" || modelString == "x86_64" { + if ["arm64", "i386", "x86_64"].contains(modelString) { return .simulator } From 910a24aa48062f462fa37813dae89d84781cb58d Mon Sep 17 00:00:00 2001 From: Nate Walczak Date: Mon, 11 Jan 2021 16:44:21 -0500 Subject: [PATCH 4/5] Add makefile to streamline versioning and publishing process --- .version | 1 + Makefile | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .version create mode 100644 Makefile diff --git a/.version b/.version new file mode 100644 index 0000000..f8e233b --- /dev/null +++ b/.version @@ -0,0 +1 @@ +1.9.0 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cf7b953 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +VERSION_FILE=.version +VERSION_STRING=$(shell cat "$(VERSION_FILE)") + +.PHONY: get-version set-version git-tag pod-publish publish + +get-version: + @echo $(VERSION_STRING) + +set-version: + $(eval NEW_VERSION := $(filter-out $@,$(MAKECMDGOALS))) + @echo "$(NEW_VERSION)" > "$(VERSION_FILE)" + @sed -i '' '/^[[:blank:]]*spec.version/ s/'\"'[^'\"'][^'\"']*'\"'/'\"'$(NEW_VERSION)'\"'/' Orchard.podspec + @sed -i '' '/^[[:blank:]]*MARKETING_VERSION/ s/= [^;]*;/= $(NEW_VERSION);/' Orchard.xcodeproj/project.pbxproj + $(eval CHANGELOG_URL := "\#\# \[$(NEW_VERSION)\]\(https:\/\/github.com\/Detroit-Labs\/Orchard\/releases\/tag\/$(NEW_VERSION)\)") + $(eval CHANGELOG_DATE := "\*\*Released:\*\* `date +"%Y-%m-%d"`") + @sed -i '' '3s/^/'$(CHANGELOG_URL)'\n'$(CHANGELOG_DATE)'\n\n/' CHANGELOG.md + +git-tag: +ifneq ($(strip $(shell git status --untracked-files=no --porcelain 2>/dev/null)),) + $(error git state is not clean) +endif + git tag -a "$(VERSION_STRING)" -m "$(VERSION_STRING)" + git push origin "$(VERSION_STRING)" + +pod-publish: + pod trunk push Orchard.podspec + +publish: pod-publish + +%: + @: From 620763dec47391bba652ba2cd611f781fd877142 Mon Sep 17 00:00:00 2001 From: Nate Walczak Date: Tue, 12 Jan 2021 10:40:15 -0500 Subject: [PATCH 5/5] Bump version --- .version | 2 +- CHANGELOG.md | 6 ++++++ Orchard.podspec | 2 +- Orchard.xcodeproj/project.pbxproj | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.version b/.version index f8e233b..81c871d 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -1.9.0 +1.10.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index bec348b..f47a3ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Orchard Change Log +## [1.10.0](https://github.com/Detroit-Labs/Orchard/releases/tag/1.10.0) +**Released:** 2021-01-12 + +### Added +- Support for Apple Silicon + ## [1.9.0](https://github.com/Detroit-Labs/Orchard/releases/tag/1.9.0) **Released:** 2021-01-08 diff --git a/Orchard.podspec b/Orchard.podspec index adddcfd..67bef2e 100644 --- a/Orchard.podspec +++ b/Orchard.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |spec| spec.name = "Orchard" - spec.version = "1.9.0" + spec.version = "1.10.0" spec.summary = "Device identification for iOS, watchOS, and tvOS." spec.description = <<-DESC diff --git a/Orchard.xcodeproj/project.pbxproj b/Orchard.xcodeproj/project.pbxproj index 3a0610f..4292cbe 100644 --- a/Orchard.xcodeproj/project.pbxproj +++ b/Orchard.xcodeproj/project.pbxproj @@ -575,7 +575,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 1.9.0; + MARKETING_VERSION = 1.10.0; ONLY_ACTIVE_ARCH = YES; RUN_CLANG_STATIC_ANALYZER = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos"; @@ -617,7 +617,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 1.9.0; + MARKETING_VERSION = 1.10.0; RUN_CLANG_STATIC_ANALYZER = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos"; SWIFT_COMPILATION_MODE = wholemodule;