From d7d00399690e4e596c2902548c5b538fa5ca042c Mon Sep 17 00:00:00 2001 From: Fahim Farook Date: Thu, 15 Dec 2022 10:07:18 +0400 Subject: [PATCH] xcconfig Settings * Move out code signing to xcconfig files so that anybody can compile the project with their own settings * Remove Mac (Catalyst) target and add a macOS target instead * Add a .gitignore file which ignores user-specific files and the user's own xcconfig signing files --- .gitignore | 5 ++ BuildConfiguratons/Debug.xcconfig | 13 +++++ BuildConfiguratons/Release.xcconfig | 13 +++++ .../Sign-Debug-template.xcconfig | 19 ++++++++ .../Sign-Release-template.xcconfig | 19 ++++++++ Diffusion.xcodeproj/project.pbxproj | 48 ++++++++++++++----- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ---- 7 files changed, 106 insertions(+), 19 deletions(-) create mode 100644 .gitignore create mode 100644 BuildConfiguratons/Debug.xcconfig create mode 100644 BuildConfiguratons/Release.xcconfig create mode 100644 BuildConfiguratons/Sign-Debug-template.xcconfig create mode 100644 BuildConfiguratons/Sign-Release-template.xcconfig delete mode 100644 Diffusion.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a8cfb0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +Diffusion.xcodeproj/project.xcworkspace/xcshareddata +Diffusion.xcodeproj/project.xcworkspace/xcuserdata +Diffusion.xcodeproj/xcuserdata +BuildConfiguratons/Sign-Debug.xcconfig +BuildConfiguratons/Sign-Release.xcconfig diff --git a/BuildConfiguratons/Debug.xcconfig b/BuildConfiguratons/Debug.xcconfig new file mode 100644 index 0000000..beef57a --- /dev/null +++ b/BuildConfiguratons/Debug.xcconfig @@ -0,0 +1,13 @@ +// +// Debug.xcconfig +// Diffusion +// +// Created by Fahim Farook on 15/12/2022. +// + +// Detailed explanation of how to set this up can be found here: https://ajpagente.github.io/mobile/using-xcconfig/ +// Note: This file is the one referenced from the Xcode project and this file can be checked into the Git repo. But this references the file with your personal info (Sign-Debug.xccconfig) and that file should not be checked into the repo. +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +#include "Sign-Debug.xcconfig" diff --git a/BuildConfiguratons/Release.xcconfig b/BuildConfiguratons/Release.xcconfig new file mode 100644 index 0000000..9398bcb --- /dev/null +++ b/BuildConfiguratons/Release.xcconfig @@ -0,0 +1,13 @@ +// +// Release.xcconfig +// Diffusion +// +// Created by Fahim Farook on 15/12/2022. +// + +// Detailed explanation of how to set this up can be found here: https://ajpagente.github.io/mobile/using-xcconfig/ +// Note: This file is the one referenced from the Xcode project and this file can be checked into the Git repo. But this references the file with your personal info (Sign-Debug.xccconfig) and that file should not be checked into the repo. +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +#include "Sign-Release.xcconfig" diff --git a/BuildConfiguratons/Sign-Debug-template.xcconfig b/BuildConfiguratons/Sign-Debug-template.xcconfig new file mode 100644 index 0000000..850b0eb --- /dev/null +++ b/BuildConfiguratons/Sign-Debug-template.xcconfig @@ -0,0 +1,19 @@ +// +// Sign-Debug.xcconfig +// Diffusion +// +// Created by Fahim Farook on 15/12/2022. +// + +// Detailed explanation of how to set this up can be found here: https://ajpagente.github.io/mobile/using-xcconfig/ +// Note: This is your personal signing details. *Do not* check this into the repo. The Debug.xcconfig file includes this one so that you can modify this without impacting the project. +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +// See the first link above for details on how to get the following values +DEVELOPMENT_TEAM = <10 character Team ID> +CODE_SIGN_IDENTITY[sdk=iphoneos*] = <40 character SHA1 Hash from provisionin profile for iOS> +PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*] = <36 character UUID from provisioning profile for iOS> + +CODE_SIGN_IDENTITY[sdk=macos*] = <40 character SHA1 Hash from provisionin profile for macOS> +PROVISIONING_PROFILE_SPECIFIER[sdk=macos*] = <36 character UUID from provisioning profile for macOS> diff --git a/BuildConfiguratons/Sign-Release-template.xcconfig b/BuildConfiguratons/Sign-Release-template.xcconfig new file mode 100644 index 0000000..3472ee6 --- /dev/null +++ b/BuildConfiguratons/Sign-Release-template.xcconfig @@ -0,0 +1,19 @@ +// +// Sign-Release-template.xcconfig +// Diffusion +// +// Created by Fahim Farook on 15/12/2022. +// + +// Detailed explanation of how to set this up can be found here: https://ajpagente.github.io/mobile/using-xcconfig/ +// Note: This is your personal signing details. *Do not* check this into the repo. The Debug.xcconfig file includes this one so that you can modify this without impacting the project. +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +// See the first link above for details on how to get the following values +DEVELOPMENT_TEAM = <10 character Team ID> +CODE_SIGN_IDENTITY[sdk=iphoneos*] = <40 character SHA1 Hash from provisionin profile for iOS> +PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*] = <36 character UUID from provisioning profile for iOS> + +CODE_SIGN_IDENTITY[sdk=macos*] = <40 character SHA1 Hash from provisionin profile for macOS> +PROVISIONING_PROFILE_SPECIFIER[sdk=macos*] = <36 character UUID from provisioning profile for macOS> diff --git a/Diffusion.xcodeproj/project.pbxproj b/Diffusion.xcodeproj/project.pbxproj index 0598c83..4ff8217 100644 --- a/Diffusion.xcodeproj/project.pbxproj +++ b/Diffusion.xcodeproj/project.pbxproj @@ -41,6 +41,10 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + DD651294294ADF9D0035EC0F /* Sign-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Sign-Debug.xcconfig"; sourceTree = ""; }; + DD651295294ADFAB0035EC0F /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + DD651296294AE18F0035EC0F /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + DD651297294AE1A70035EC0F /* Sign-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Sign-Release.xcconfig"; sourceTree = ""; }; EBB5BA5229425BEE003A2A5B /* PipelineLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PipelineLoader.swift; sourceTree = ""; }; EBB5BA5929426E06003A2A5B /* Downloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Downloader.swift; sourceTree = ""; }; EBE4438729488DCA00CDA605 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; @@ -88,6 +92,17 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + DD651293294ADF680035EC0F /* BuildConfiguratons */ = { + isa = PBXGroup; + children = ( + DD651294294ADF9D0035EC0F /* Sign-Debug.xcconfig */, + DD651295294ADFAB0035EC0F /* Debug.xcconfig */, + DD651296294AE18F0035EC0F /* Release.xcconfig */, + DD651297294AE1A70035EC0F /* Sign-Release.xcconfig */, + ); + path = BuildConfiguratons; + sourceTree = ""; + }; EBB5BA5129425B07003A2A5B /* Pipeline */ = { isa = PBXGroup; children = ( @@ -102,10 +117,11 @@ children = ( EBE4438729488DCA00CDA605 /* README.md */, EBE443892948953600CDA605 /* LICENSE */, - EBE755FF293E910800806B32 /* Packages */, EBE755C7293E37DD00806B32 /* Diffusion */, EBE755D9293E37DE00806B32 /* DiffusionTests */, EBE755E3293E37DE00806B32 /* DiffusionUITests */, + DD651293294ADF680035EC0F /* BuildConfiguratons */, + EBE755FF293E910800806B32 /* Packages */, EBE755C6293E37DD00806B32 /* Products */, EBE75603293E93BB00806B32 /* Frameworks */, ); @@ -476,14 +492,16 @@ }; EBE755EB293E37DE00806B32 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = DD651295294ADFAB0035EC0F /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Diffusion/Diffusion.entitlements; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_IDENTITY = "$(inherited)"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Diffusion/Preview Content\""; - DEVELOPMENT_TEAM = ZWDJQ796RU; + DEVELOPMENT_TEAM = "$(inherited)"; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -502,11 +520,12 @@ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 13.1; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.pcuenca.Diffusion; + PRODUCT_BUNDLE_IDENTIFIER = org.farook.Diffusion; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = "$(inherited)"; SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -516,14 +535,16 @@ }; EBE755EC293E37DE00806B32 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = DD651296294AE18F0035EC0F /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Diffusion/Diffusion.entitlements; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_IDENTITY = "$(inherited)"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Diffusion/Preview Content\""; - DEVELOPMENT_TEAM = ZWDJQ796RU; + DEVELOPMENT_TEAM = "$(inherited)"; ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -542,11 +563,12 @@ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 13.1; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.pcuenca.Diffusion; + PRODUCT_BUNDLE_IDENTIFIER = org.farook.Diffusion; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = "$(inherited)"; SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -556,6 +578,7 @@ }; EBE755EE293E37DE00806B32 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = DD651295294ADFAB0035EC0F /* Debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -579,6 +602,7 @@ }; EBE755EF293E37DE00806B32 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = DD651296294AE18F0035EC0F /* Release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -602,6 +626,7 @@ }; EBE755F1293E37DE00806B32 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = DD651295294ADFAB0035EC0F /* Debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; @@ -624,6 +649,7 @@ }; EBE755F2293E37DE00806B32 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = DD651296294AE18F0035EC0F /* Release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; diff --git a/Diffusion.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Diffusion.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/Diffusion.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - -