From 59a8efe147fe6535c93465943ccb5001962259fd Mon Sep 17 00:00:00 2001 From: Olof Hellman Date: Sat, 27 Jul 2019 21:36:29 -0700 Subject: [PATCH 1/5] Trying to set up code signing correctly with developer settings --- NetNewsWire.xcodeproj/project.pbxproj | 107 ++---------------- .../xcschemes/NetNewsWire-iOS.xcscheme | 22 ++-- xcconfig/NetNewsWire_iOS_target.xcconfig | 15 ++- xcconfig/NetNewsWire_project.xcconfig | 50 ++++---- 4 files changed, 62 insertions(+), 132 deletions(-) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index d0a9e354b..157af866c 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -1978,12 +1978,12 @@ ORGANIZATIONNAME = "Ranchero Software"; TargetAttributes = { 6581C73220CED60000F4AD34 = { - DevelopmentTeam = SHJK2V3AJG; - ProvisioningStyle = Manual; + DevelopmentTeam = MV49DW5446; + ProvisioningStyle = Automatic; }; 840D617B2029031C009BC708 = { CreatedOnToolsVersion = 9.3; - DevelopmentTeam = SHJK2V3AJG; + DevelopmentTeam = DY2XQRVWN9; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.BackgroundModes = { @@ -1993,8 +1993,7 @@ }; 849C645F1ED37A5D003D8FC0 = { CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = SHJK2V3AJG; - ProvisioningStyle = Manual; + ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.HardenedRuntime = { enabled = 1; @@ -2003,7 +2002,7 @@ }; 849C64701ED37A5D003D8FC0 = { CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = SHJK2V3AJG; + DevelopmentTeam = MV49DW5446; ProvisioningStyle = Automatic; TestTargetID = 849C645F1ED37A5D003D8FC0; }; @@ -2792,65 +2791,23 @@ isa = XCBuildConfiguration; baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOS_target.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; + DEVELOPMENT_TEAM = DY2XQRVWN9; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = iOS/Resources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.NetNewsWire-Evergreen.iOS"; - PRODUCT_NAME = NetNewsWire; - SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2861,58 +2818,17 @@ isa = XCBuildConfiguration; baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOS_target.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = DY2XQRVWN9; ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = iOS/Resources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.2; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.NetNewsWire-Evergreen.iOS"; - PRODUCT_NAME = NetNewsWire; - SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -2923,7 +2839,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D5907CDD2002F0BE005947E5 /* NetNewsWire_project_debug.xcconfig */; buildSettings = { - IPHONEOS_DEPLOYMENT_TARGET = 12.2; }; name = Debug; }; @@ -2931,7 +2846,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D5907CDC2002F0BE005947E5 /* NetNewsWire_project_release.xcconfig */; buildSettings = { - IPHONEOS_DEPLOYMENT_TARGET = 12.2; }; name = Release; }; @@ -2942,6 +2856,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_ENTITLEMENTS = Mac/Resources/NetNewsWire.entitlements; CODE_SIGN_IDENTITY = "-"; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Mac/Resources/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.14.4; @@ -2956,6 +2871,8 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_ENTITLEMENTS = Mac/Resources/NetNewsWire.entitlements; + CODE_SIGN_IDENTITY = "Mac Developer"; + DEVELOPMENT_TEAM = ""; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = Mac/Resources/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; diff --git a/NetNewsWire.xcodeproj/xcshareddata/xcschemes/NetNewsWire-iOS.xcscheme b/NetNewsWire.xcodeproj/xcshareddata/xcschemes/NetNewsWire-iOS.xcscheme index 282b0c78e..00b189403 100644 --- a/NetNewsWire.xcodeproj/xcshareddata/xcschemes/NetNewsWire-iOS.xcscheme +++ b/NetNewsWire.xcodeproj/xcshareddata/xcschemes/NetNewsWire-iOS.xcscheme @@ -27,15 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - @@ -58,6 +49,17 @@ + + + + + + + + Date: Sun, 28 Jul 2019 14:45:18 -0700 Subject: [PATCH 2/5] make codesigning work with developerSettings --- xcconfig/NetNewsWireTests_target.xcconfig | 6 +++--- xcconfig/NetNewsWire_iOS_target.xcconfig | 7 ++++++- xcconfig/NetNewsWire_project_debug.xcconfig | 2 +- xcconfig/NetNewsWire_project_release.xcconfig | 2 +- xcconfig/NetNewsWire_target.xcconfig | 10 ++++++---- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/xcconfig/NetNewsWireTests_target.xcconfig b/xcconfig/NetNewsWireTests_target.xcconfig index 43abde52e..d62f4e2a9 100644 --- a/xcconfig/NetNewsWireTests_target.xcconfig +++ b/xcconfig/NetNewsWireTests_target.xcconfig @@ -4,13 +4,13 @@ CODE_SIGN_STYLE = Automatic // See the notes in NetNewsWire_target.xcconfig on why the // DeveloperSettings.xcconfig is #included here -#include "../../SharedXcodeSettings/DeveloperSettings.xcconfig" +#include? "../../SharedXcodeSettings/DeveloperSettings.xcconfig" ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -COMBINE_HIDPI_IMAGES = YES BUNDLE_LOADER = $(TEST_HOST) -LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks +COMBINE_HIDPI_IMAGES = YES INFOPLIST_FILE = Tests/NetNewsWireTests/Info.plist +LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.NetNewsWireTests PRODUCT_NAME = $(TARGET_NAME) TEST_HOST = $(BUILT_PRODUCTS_DIR)/NetNewsWire.app/Contents/MacOS/NetNewsWire diff --git a/xcconfig/NetNewsWire_iOS_target.xcconfig b/xcconfig/NetNewsWire_iOS_target.xcconfig index 8c0bca971..330eac1dd 100644 --- a/xcconfig/NetNewsWire_iOS_target.xcconfig +++ b/xcconfig/NetNewsWire_iOS_target.xcconfig @@ -12,7 +12,9 @@ PROVISIONING_PROFILE_SPECIFIER = // As an example, make a ../../SharedXcodeSettings/DeveloperSettings.xcconfig file and // give it the contents // -// CODE_SIGN_IDENTITY = Mac Developer +// CODE_SIGN_IDENTITY[sdk=macosx*] = Mac Developer +// CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer +// CODE_SIGN_IDENTITY[sdk=iphonesimulator*] = iPhone Developer // DEVELOPMENT_TEAM = // CODE_SIGN_STYLE = Automatic // PROVISIONING_PROFILE_SPECIFIER = @@ -26,13 +28,16 @@ PROVISIONING_PROFILE_SPECIFIER = // /Users/Shared/git/SharedXcodeSettings/DeveloperSettings.xcconfig // + #include? "../../SharedXcodeSettings/DeveloperSettings.xcconfig" ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES COMBINE_HIDPI_IMAGES = YES LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks INFOPLIST_FILE = NetNewsWire/iOS/Resources/Info.plist +IPHONEOS_DEPLOYMENT_TARGET = 13.0 PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.NetNewsWire-Evergreen.iOS PRODUCT_NAME = $(TARGET_NAME) FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Frameworks/Vendor ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon + diff --git a/xcconfig/NetNewsWire_project_debug.xcconfig b/xcconfig/NetNewsWire_project_debug.xcconfig index f1adf871d..97b270b28 100644 --- a/xcconfig/NetNewsWire_project_debug.xcconfig +++ b/xcconfig/NetNewsWire_project_debug.xcconfig @@ -6,8 +6,8 @@ ENABLE_TESTABILITY = YES GCC_DYNAMIC_NO_PIC = NO GCC_OPTIMIZATION_LEVEL = 0 GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited) +MTL_ENABLE_DEBUG_INFO = YES OTHER_SWIFT_FLAGS = -DDEBUG SWIFT_OPTIMIZATION_LEVEL = -Onone SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG -MTL_ENABLE_DEBUG_INFO = YES diff --git a/xcconfig/NetNewsWire_project_release.xcconfig b/xcconfig/NetNewsWire_project_release.xcconfig index 3923eb781..df0701857 100644 --- a/xcconfig/NetNewsWire_project_release.xcconfig +++ b/xcconfig/NetNewsWire_project_release.xcconfig @@ -2,7 +2,7 @@ DEBUG_INFORMATION_FORMAT = dwarf-with-dsym ENABLE_NS_ASSERTIONS = NO +MTL_ENABLE_DEBUG_INFO = NO OTHER_SWIFT_FLAGS = -DRELEASE SWIFT_OPTIMIZATION_LEVEL = -Owholemodule -MTL_ENABLE_DEBUG_INFO = NO diff --git a/xcconfig/NetNewsWire_target.xcconfig b/xcconfig/NetNewsWire_target.xcconfig index ba5cf39c7..1d8e62e04 100644 --- a/xcconfig/NetNewsWire_target.xcconfig +++ b/xcconfig/NetNewsWire_target.xcconfig @@ -12,7 +12,9 @@ PROVISIONING_PROFILE_SPECIFIER = // As an example, make a ../../SharedXcodeSettings/DeveloperSettings.xcconfig file and // give it the contents // -// CODE_SIGN_IDENTITY = Mac Developer +// CODE_SIGN_IDENTITY[sdk=macosx*] = Mac Developer +// CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer +// CODE_SIGN_IDENTITY[sdk=iphonesimulator*] = iPhone Developer // DEVELOPMENT_TEAM = // CODE_SIGN_STYLE = Automatic // PROVISIONING_PROFILE_SPECIFIER = @@ -29,10 +31,10 @@ PROVISIONING_PROFILE_SPECIFIER = #include? "../../SharedXcodeSettings/DeveloperSettings.xcconfig" ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon COMBINE_HIDPI_IMAGES = YES -LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Frameworks/Vendor INFOPLIST_FILE = NetNewsWire/Info.plist +LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.NetNewsWire-Evergreen PRODUCT_NAME = $(TARGET_NAME) -FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Frameworks/Vendor -ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon From 1116464096df6e428f689cd08cb48a641775cd1d Mon Sep 17 00:00:00 2001 From: Olof Hellman Date: Sun, 28 Jul 2019 14:59:38 -0700 Subject: [PATCH 3/5] rename xcconfig files --- NetNewsWire.xcodeproj/project.pbxproj | 24 +++++++++---------- .../xcschemes/NetNewsWire-iOS.xcscheme | 22 +++++++---------- ...fig => NetNewsWire_iOSapp_target.xcconfig} | 0 ...fig => NetNewsWire_macapp_target.xcconfig} | 0 4 files changed, 21 insertions(+), 25 deletions(-) rename xcconfig/{NetNewsWire_iOS_target.xcconfig => NetNewsWire_iOSapp_target.xcconfig} (100%) rename xcconfig/{NetNewsWire_target.xcconfig => NetNewsWire_macapp_target.xcconfig} (100%) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 157af866c..a0f85f435 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -669,7 +669,7 @@ 510D707F22B02A5F004E8F65 /* SettingsFeedbinAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsFeedbinAccountView.swift; sourceTree = ""; }; 510D708122B041CC004E8F65 /* SettingsAccountLabelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsAccountLabelView.swift; sourceTree = ""; }; 5110AB7722B7BD6200A94F76 /* AddView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddView.swift; sourceTree = ""; }; - 51121AA12265430A00BC0EC1 /* NetNewsWire_iOS_target.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = NetNewsWire_iOS_target.xcconfig; sourceTree = ""; }; + 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = NetNewsWire_iOSapp_target.xcconfig; sourceTree = ""; }; 51121B5A22661FEF00BC0EC1 /* AddContainerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddContainerViewController.swift; sourceTree = ""; }; 51126DA3225FDE2F00722696 /* RSImage-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RSImage-Extensions.swift"; sourceTree = ""; }; 5126EE96226CB48A00C22AFC /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = ""; }; @@ -931,7 +931,7 @@ D5907CDD2002F0BE005947E5 /* NetNewsWire_project_debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetNewsWire_project_debug.xcconfig; sourceTree = ""; }; D5907CDE2002F0BE005947E5 /* NetNewsWire_project.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetNewsWire_project.xcconfig; sourceTree = ""; }; D5907CDF2002F0F9005947E5 /* NetNewsWireTests_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetNewsWireTests_target.xcconfig; sourceTree = ""; }; - D5907CE02002F0FA005947E5 /* NetNewsWire_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetNewsWire_target.xcconfig; sourceTree = ""; }; + D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetNewsWire_macapp_target.xcconfig; sourceTree = ""; }; D5907D7E2004AC00005947E5 /* NSApplication+Scriptability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSApplication+Scriptability.swift"; sourceTree = ""; }; D5907D962004B7EB005947E5 /* Account+Scriptability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Account+Scriptability.swift"; sourceTree = ""; }; D5907DB12004BB37005947E5 /* ScriptingObjectContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScriptingObjectContainer.swift; sourceTree = ""; }; @@ -1846,9 +1846,9 @@ D5907CDD2002F0BE005947E5 /* NetNewsWire_project_debug.xcconfig */, D5907CDC2002F0BE005947E5 /* NetNewsWire_project_release.xcconfig */, D5907CDE2002F0BE005947E5 /* NetNewsWire_project.xcconfig */, - D5907CE02002F0FA005947E5 /* NetNewsWire_target.xcconfig */, + D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */, D5907CDF2002F0F9005947E5 /* NetNewsWireTests_target.xcconfig */, - 51121AA12265430A00BC0EC1 /* NetNewsWire_iOS_target.xcconfig */, + 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */, ); path = xcconfig; sourceTree = ""; @@ -1978,7 +1978,7 @@ ORGANIZATIONNAME = "Ranchero Software"; TargetAttributes = { 6581C73220CED60000F4AD34 = { - DevelopmentTeam = MV49DW5446; + DevelopmentTeam = M8L2WTLA8W; ProvisioningStyle = Automatic; }; 840D617B2029031C009BC708 = { @@ -2002,7 +2002,7 @@ }; 849C64701ED37A5D003D8FC0 = { CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = MV49DW5446; + DevelopmentTeam = M8L2WTLA8W; ProvisioningStyle = Automatic; TestTargetID = 849C645F1ED37A5D003D8FC0; }; @@ -2759,7 +2759,7 @@ /* Begin XCBuildConfiguration section */ 6581C74720CED60100F4AD34 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_target.xcconfig */; + baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_ENTITLEMENTS = Mac/SafariExtension/Subscribe_to_Feed.entitlements; @@ -2774,7 +2774,7 @@ }; 6581C74820CED60100F4AD34 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_target.xcconfig */; + baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_ENTITLEMENTS = Mac/SafariExtension/Subscribe_to_Feed.entitlements; @@ -2789,7 +2789,7 @@ }; 840D61A42029031E009BC708 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOS_target.xcconfig */; + baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -2816,7 +2816,7 @@ }; 840D61A52029031E009BC708 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOS_target.xcconfig */; + baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -2851,7 +2851,7 @@ }; 849C647B1ED37A5D003D8FC0 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_target.xcconfig */; + baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_ENTITLEMENTS = Mac/Resources/NetNewsWire.entitlements; @@ -2867,7 +2867,7 @@ }; 849C647C1ED37A5D003D8FC0 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_target.xcconfig */; + baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_ENTITLEMENTS = Mac/Resources/NetNewsWire.entitlements; diff --git a/NetNewsWire.xcodeproj/xcshareddata/xcschemes/NetNewsWire-iOS.xcscheme b/NetNewsWire.xcodeproj/xcshareddata/xcschemes/NetNewsWire-iOS.xcscheme index 00b189403..282b0c78e 100644 --- a/NetNewsWire.xcodeproj/xcshareddata/xcschemes/NetNewsWire-iOS.xcscheme +++ b/NetNewsWire.xcodeproj/xcshareddata/xcschemes/NetNewsWire-iOS.xcscheme @@ -27,6 +27,15 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + @@ -49,17 +58,6 @@ - - - - - - - - Date: Sun, 28 Jul 2019 15:24:57 -0700 Subject: [PATCH 4/5] CLean out build settings from project file --- NetNewsWire.xcodeproj/project.pbxproj | 83 ++----------------- xcconfig/NetNewsWireTests_target.xcconfig | 3 +- xcconfig/NetNewsWire_iOSapp_target.xcconfig | 11 ++- xcconfig/NetNewsWire_macapp_target.xcconfig | 13 +-- xcconfig/NetNewsWire_project_debug.xcconfig | 2 +- xcconfig/NetNewsWire_project_release.xcconfig | 4 +- ...etNewsWire_safariextension_target.xcconfig | 44 ++++++++++ 7 files changed, 74 insertions(+), 86 deletions(-) create mode 100644 xcconfig/NetNewsWire_safariextension_target.xcconfig diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index a0f85f435..65b5d4444 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -925,6 +925,7 @@ 84F9EAE4213660A100CF2DE4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 84FB9A2D1EDCD6B8003D53B9 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Vendor/Sparkle.framework; sourceTree = SOURCE_ROOT; }; 84FF69B01FC3793300DC198E /* FaviconURLFinder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaviconURLFinder.swift; sourceTree = ""; }; + D519E74722EE553300923F27 /* NetNewsWire_safariextension_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetNewsWire_safariextension_target.xcconfig; sourceTree = ""; }; D553737C20186C1F006D8857 /* Article+Scriptability.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Article+Scriptability.swift"; sourceTree = ""; }; D57BE6DF204CD35F00D11AAC /* NSScriptCommand+NetNewsWire.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSScriptCommand+NetNewsWire.swift"; sourceTree = ""; }; D5907CDC2002F0BE005947E5 /* NetNewsWire_project_release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetNewsWire_project_release.xcconfig; sourceTree = ""; }; @@ -1848,6 +1849,7 @@ D5907CDE2002F0BE005947E5 /* NetNewsWire_project.xcconfig */, D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */, D5907CDF2002F0F9005947E5 /* NetNewsWireTests_target.xcconfig */, + D519E74722EE553300923F27 /* NetNewsWire_safariextension_target.xcconfig */, 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */, ); path = xcconfig; @@ -1978,7 +1980,7 @@ ORGANIZATIONNAME = "Ranchero Software"; TargetAttributes = { 6581C73220CED60000F4AD34 = { - DevelopmentTeam = M8L2WTLA8W; + DevelopmentTeam = DY2XQRVWN9; ProvisioningStyle = Automatic; }; 840D617B2029031C009BC708 = { @@ -1993,6 +1995,7 @@ }; 849C645F1ED37A5D003D8FC0 = { CreatedOnToolsVersion = 8.2.1; + DevelopmentTeam = DY2XQRVWN9; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.HardenedRuntime = { @@ -2002,7 +2005,7 @@ }; 849C64701ED37A5D003D8FC0 = { CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = M8L2WTLA8W; + DevelopmentTeam = DY2XQRVWN9; ProvisioningStyle = Automatic; TestTargetID = 849C645F1ED37A5D003D8FC0; }; @@ -2759,31 +2762,15 @@ /* Begin XCBuildConfiguration section */ 6581C74720CED60100F4AD34 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */; + baseConfigurationReference = D519E74722EE553300923F27 /* NetNewsWire_safariextension_target.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_ENTITLEMENTS = Mac/SafariExtension/Subscribe_to_Feed.entitlements; - CODE_SIGN_IDENTITY = "-"; - INFOPLIST_FILE = Mac/SafariExtension/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.NetNewsWire-Evergreen.Subscribe-to-Feed"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; }; name = Debug; }; 6581C74820CED60100F4AD34 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */; + baseConfigurationReference = D519E74722EE553300923F27 /* NetNewsWire_safariextension_target.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_ENTITLEMENTS = Mac/SafariExtension/Subscribe_to_Feed.entitlements; - ENABLE_HARDENED_RUNTIME = YES; - INFOPLIST_FILE = Mac/SafariExtension/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.NetNewsWire-Evergreen.Subscribe-to-Feed"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; }; name = Release; }; @@ -2791,26 +2778,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */; buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Automatic; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = DY2XQRVWN9; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - IPHONEOS_DEPLOYMENT_TARGET = 12.2; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -2818,20 +2785,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 51121AA12265430A00BC0EC1 /* NetNewsWire_iOSapp_target.xcconfig */; buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = DY2XQRVWN9; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - IPHONEOS_DEPLOYMENT_TARGET = 12.2; - MTL_ENABLE_DEBUG_INFO = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; }; name = Release; }; @@ -2853,15 +2806,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_ENTITLEMENTS = Mac/Resources/NetNewsWire.entitlements; - CODE_SIGN_IDENTITY = "-"; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = Mac/Resources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.14.4; - PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.NetNewsWire-Evergreen"; - PRODUCT_NAME = NetNewsWire; }; name = Debug; }; @@ -2869,16 +2813,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D5907CE02002F0FA005947E5 /* NetNewsWire_macapp_target.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_ENTITLEMENTS = Mac/Resources/NetNewsWire.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; - DEVELOPMENT_TEAM = ""; - ENABLE_HARDENED_RUNTIME = YES; - INFOPLIST_FILE = Mac/Resources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.14.4; - PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.NetNewsWire-Evergreen"; - PRODUCT_NAME = NetNewsWire; }; name = Release; }; @@ -2886,8 +2820,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D5907CDF2002F0F9005947E5 /* NetNewsWireTests_target.xcconfig */; buildSettings = { - CODE_SIGN_IDENTITY = "-"; - PRODUCT_NAME = NetNewsWireTests; }; name = Debug; }; @@ -2895,7 +2827,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D5907CDF2002F0F9005947E5 /* NetNewsWireTests_target.xcconfig */; buildSettings = { - PRODUCT_NAME = NetNewsWireTests; }; name = Release; }; diff --git a/xcconfig/NetNewsWireTests_target.xcconfig b/xcconfig/NetNewsWireTests_target.xcconfig index d62f4e2a9..b5e519c75 100644 --- a/xcconfig/NetNewsWireTests_target.xcconfig +++ b/xcconfig/NetNewsWireTests_target.xcconfig @@ -1,4 +1,5 @@ DEVELOPMENT_TEAM = 9C84TZ7Q6Z +CODE_SIGN_IDENTITY = -; CODE_SIGN_STYLE = Automatic // See the notes in NetNewsWire_target.xcconfig on why the @@ -12,5 +13,5 @@ COMBINE_HIDPI_IMAGES = YES INFOPLIST_FILE = Tests/NetNewsWireTests/Info.plist LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.NetNewsWireTests -PRODUCT_NAME = $(TARGET_NAME) +PRODUCT_NAME = NetNewsWireTests TEST_HOST = $(BUILT_PRODUCTS_DIR)/NetNewsWire.app/Contents/MacOS/NetNewsWire diff --git a/xcconfig/NetNewsWire_iOSapp_target.xcconfig b/xcconfig/NetNewsWire_iOSapp_target.xcconfig index a931faac3..1e9bb253f 100644 --- a/xcconfig/NetNewsWire_iOSapp_target.xcconfig +++ b/xcconfig/NetNewsWire_iOSapp_target.xcconfig @@ -1,6 +1,6 @@ CODE_SIGN_IDENTITY = Developer ID Application -DEVELOPMENT_TEAM = M8L2WTLA8W -CODE_SIGN_STYLE = Manual +DEVELOPMENT_TEAM = DY2XQRVWN9 +CODE_SIGN_STYLE = Automatic PROVISIONING_PROFILE_SPECIFIER = // developers can locally override the Xcode settings for code signing @@ -32,11 +32,18 @@ PROVISIONING_PROFILE_SPECIFIER = ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon +CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; +CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + COMBINE_HIDPI_IMAGES = YES FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Frameworks/Vendor +GCC_C_LANGUAGE_STANDARD = gnu11; + IPHONEOS_DEPLOYMENT_TARGET = 13.0 LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks INFOPLIST_FILE = iOS/Resources/Info.plist PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.NetNewsWire-Evergreen.iOS PRODUCT_NAME = NetNewsWire SDKROOT = iphoneos; +TARGETED_DEVICE_FAMILY = 1,2 diff --git a/xcconfig/NetNewsWire_macapp_target.xcconfig b/xcconfig/NetNewsWire_macapp_target.xcconfig index 1d8e62e04..758816a6f 100644 --- a/xcconfig/NetNewsWire_macapp_target.xcconfig +++ b/xcconfig/NetNewsWire_macapp_target.xcconfig @@ -1,5 +1,6 @@ -CODE_SIGN_IDENTITY = Developer ID Application -DEVELOPMENT_TEAM = M8L2WTLA8W +CODE_SIGN_IDENTITY = Mac Developer +// CODE_SIGN_IDENTITY[debug] = - +DEVELOPMENT_TEAM = CODE_SIGN_STYLE = Manual PROVISIONING_PROFILE_SPECIFIER = @@ -30,11 +31,13 @@ PROVISIONING_PROFILE_SPECIFIER = #include? "../../SharedXcodeSettings/DeveloperSettings.xcconfig" -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon +CODE_SIGN_ENTITLEMENTS = Mac/Resources/NetNewsWire.entitlements COMBINE_HIDPI_IMAGES = YES FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Frameworks/Vendor -INFOPLIST_FILE = NetNewsWire/Info.plist +INFOPLIST_FILE = Mac/Resources/Info.plist LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks +MACOSX_DEPLOYMENT_TARGET = 10.14.4 PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.NetNewsWire-Evergreen -PRODUCT_NAME = $(TARGET_NAME) +PRODUCT_NAME = NetNewsWire diff --git a/xcconfig/NetNewsWire_project_debug.xcconfig b/xcconfig/NetNewsWire_project_debug.xcconfig index 97b270b28..bc5e7dc11 100644 --- a/xcconfig/NetNewsWire_project_debug.xcconfig +++ b/xcconfig/NetNewsWire_project_debug.xcconfig @@ -1,12 +1,12 @@ #include "./NetNewsWire_project.xcconfig" -ONLY_ACTIVE_ARCH = YES DEBUG_INFORMATION_FORMAT = dwarf ENABLE_TESTABILITY = YES GCC_DYNAMIC_NO_PIC = NO GCC_OPTIMIZATION_LEVEL = 0 GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited) MTL_ENABLE_DEBUG_INFO = YES +ONLY_ACTIVE_ARCH = YES OTHER_SWIFT_FLAGS = -DDEBUG SWIFT_OPTIMIZATION_LEVEL = -Onone SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG diff --git a/xcconfig/NetNewsWire_project_release.xcconfig b/xcconfig/NetNewsWire_project_release.xcconfig index df0701857..f4d9e6289 100644 --- a/xcconfig/NetNewsWire_project_release.xcconfig +++ b/xcconfig/NetNewsWire_project_release.xcconfig @@ -1,8 +1,10 @@ #include "./NetNewsWire_project.xcconfig" +COPY_PHASE_STRIP = NO DEBUG_INFORMATION_FORMAT = dwarf-with-dsym +ENABLE_HARDENED_RUNTIME = YES ENABLE_NS_ASSERTIONS = NO MTL_ENABLE_DEBUG_INFO = NO OTHER_SWIFT_FLAGS = -DRELEASE SWIFT_OPTIMIZATION_LEVEL = -Owholemodule - +VALIDATE_PRODUCT = YES diff --git a/xcconfig/NetNewsWire_safariextension_target.xcconfig b/xcconfig/NetNewsWire_safariextension_target.xcconfig new file mode 100644 index 000000000..ae90907a7 --- /dev/null +++ b/xcconfig/NetNewsWire_safariextension_target.xcconfig @@ -0,0 +1,44 @@ +CODE_SIGN_IDENTITY = Mac Developer +// CODE_SIGN_IDENTITY[debug] = - +DEVELOPMENT_TEAM = +CODE_SIGN_STYLE = Manual +PROVISIONING_PROFILE_SPECIFIER = + +// developers can locally override the Xcode settings for code signing +// by creating a DeveloperSettings.xcconfig file locally at the appropriate path +// This allows a pristine project to have code signing set up with the appropriate +// developer ID and certificates, and for dev to be able to have local settings +// without needing to check in anything into source control +// +// As an example, make a ../../SharedXcodeSettings/DeveloperSettings.xcconfig file and +// give it the contents +// +// CODE_SIGN_IDENTITY[sdk=macosx*] = Mac Developer +// CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer +// CODE_SIGN_IDENTITY[sdk=iphonesimulator*] = iPhone Developer +// DEVELOPMENT_TEAM = +// CODE_SIGN_STYLE = Automatic +// PROVISIONING_PROFILE_SPECIFIER = +// +// And you should be able to build without code signing errors and without modifying +// the NetNewsWire Xcode project. +// +// Example: if your NetNewsWire Xcode project file is at +// /Users/Shared/git/NetNewsWire/NetNewsWire.xcodeproj +// create your DeveloperSettings.xcconfig file at +// /Users/Shared/git/SharedXcodeSettings/DeveloperSettings.xcconfig +// + +#include? "../../SharedXcodeSettings/DeveloperSettings.xcconfig" + +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon +CODE_SIGN_ENTITLEMENTS = Mac/SafariExtension/Subscribe_to_Feed.entitlements +COMBINE_HIDPI_IMAGES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)/Frameworks/Vendor +INFOPLIST_FILE = Mac/SafariExtension/Info.plist +LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks +MACOSX_DEPLOYMENT_TARGET = 10.14.4 +PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.NetNewsWire-Evergreen.Subscribe-to-Feed +PRODUCT_NAME = $(TARGET_NAME) +SDKROOT = macosx From d7f0c26a82a2c639803943c41c92adaae2fc6b18 Mon Sep 17 00:00:00 2001 From: Olof Hellman Date: Sun, 28 Jul 2019 15:47:43 -0700 Subject: [PATCH 5/5] Integrate the 'VerifyNoBuildSettings' script --- NetNewsWire.xcodeproj/project.pbxproj | 29 +++++++-- buildscripts/VerifyNoBuildSettings.swift | 82 ++++++++++++++++++++++++ xcconfig/NetNewsWire_project.xcconfig | 7 +- 3 files changed, 109 insertions(+), 9 deletions(-) create mode 100755 buildscripts/VerifyNoBuildSettings.swift diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 65b5d4444..875033412 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -1927,10 +1927,11 @@ 849C645C1ED37A5D003D8FC0 /* Sources */, 849C645D1ED37A5D003D8FC0 /* Frameworks */, 849C645E1ED37A5D003D8FC0 /* Resources */, - 84C987A52000AC9E0066B150 /* ShellScript */, + 84C987A52000AC9E0066B150 /* Run Script: Automated build numbers */, 84B06F681ED37B9000F0B54B /* Embed Frameworks */, 6581C75720CED60100F4AD34 /* Embed App Extensions */, - 8423E3E3220158E700C3795B /* ShellScript */, + D519E77022EE5B4100923F27 /* Run Script: Verify No Build Settings */, + 8423E3E3220158E700C3795B /* Run Script: codesign release builds */, ); buildRules = ( ); @@ -2292,7 +2293,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 8423E3E3220158E700C3795B /* ShellScript */ = { + 8423E3E3220158E700C3795B /* Run Script: codesign release builds */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2301,6 +2302,7 @@ ); inputPaths = ( ); + name = "Run Script: codesign release builds"; outputFileListPaths = ( ); outputPaths = ( @@ -2309,19 +2311,38 @@ shellPath = /bin/sh; shellScript = "# See https://github.com/Watson1978/kotori/commit/ffe320f2e058828f0af294b65ed88dfd7baaabff\n\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\n codesign --verbose --force --deep -o runtime --sign \"Developer ID Application: Brent Simmons\" \"${CODESIGNING_FOLDER_PATH}/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/AutoUpdate.app\"\nfi\n"; }; - 84C987A52000AC9E0066B150 /* ShellScript */ = { + 84C987A52000AC9E0066B150 /* Run Script: Automated build numbers */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = "Run Script: Automated build numbers"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "# See https://blog.curtisherbert.com/automated-build-numbers/\n\ngit=`sh /etc/profile; which git`\nbranch_name=`$git symbolic-ref HEAD | sed -e 's,.*/\\\\(.*\\\\),\\\\1,'`\ngit_count=`$git rev-list $branch_name |wc -l | sed 's/^ *//;s/ *$//'`\nsimple_branch_name=`$git rev-parse --abbrev-ref HEAD`\n\nbuild_number=\"$git_count\"\nif [ $CONFIGURATION != \"Release\" ]; then\nbuild_number+=\"-$simple_branch_name\"\nfi\n\nplist=\"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\ndsym_plist=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$plist\"\nif [ -f \"$DSYM_INFO_PLIST\" ] ; then\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$dsym_plist\"\nfi\n"; }; + D519E77022EE5B4100923F27 /* Run Script: Verify No Build Settings */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Run Script: Verify No Build Settings"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "xcrun -sdk macosx swiftc -target x86_64-macosx10.11 buildscripts/VerifyNoBuildSettings.swift -o $CONFIGURATION_TEMP_DIR/VerifyNoBS\n$CONFIGURATION_TEMP_DIR/VerifyNoBS ${PROJECT_NAME}.xcodeproj/project.pbxproj\n"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/buildscripts/VerifyNoBuildSettings.swift b/buildscripts/VerifyNoBuildSettings.swift new file mode 100755 index 000000000..885e660ef --- /dev/null +++ b/buildscripts/VerifyNoBuildSettings.swift @@ -0,0 +1,82 @@ +#!/usr/bin/swift + +// This script is originally from github.com/olofhellman/VerifyNoBS +// The idea is that all build settings should be kept in .xcconfig files, +// rather than in the xcode pbxproj file inside an Xcode project bundle +// Having the script run as part of a regular build ensures that the project file +// doesn't accidentally accumulate build settings + +import Darwin +import Foundation + +func reportError(message: String) { + print("error message was \(message)") + let stderr = FileHandle.standardError + if let data = message.data(using: String.Encoding.utf8, allowLossyConversion: false) { + stderr.write(data) + } else { + print("there was an error. script \"VerifyNoBuildSettings\" could not convert error message to printable string") + } +} + +public enum ProcessXcodeprojResult { + case FoundBuildSettings([String]) + case Error(String) + case OK(String) +} + +public func processXcodeprojAt(url: URL) -> ProcessXcodeprojResult { + let startTime = Date() + guard let xcodeproj = try? String(contentsOf: url, encoding: String.Encoding.utf8) else { + return .Error("script \"VerifyNoBuildSettings\" failed making xcodeproj from url") + } + let lines = xcodeproj.components(separatedBy: CharacterSet.newlines) + print ("found \(lines.count) lines") + + var badLines: [String] = [] + var inBuildSettingsBlock = false + for nthLine in lines { + if inBuildSettingsBlock { + if let _ = nthLine.range(of:"\\u007d[:space:]*;", options: .regularExpression) { + inBuildSettingsBlock = false + } else if let _ = nthLine.range(of:"CODE_SIGN_IDENTITY") { + + } else { + badLines.append(nthLine) + } + } else { + if let _ = nthLine.range(of:"buildSettings[:space:]*=", options: .regularExpression) { + inBuildSettingsBlock = true + } + } + } + + let timeInterval = Date().timeIntervalSince(startTime) + print ("process took \(timeInterval) seconds") + if (badLines.count > 0) { + return .FoundBuildSettings(badLines) + } + return .OK(":-)") +} +print("Verifying no buildSettings...") + +let commandLineArgs = CommandLine.arguments +print("processArgs were \(commandLineArgs)") +let xcodeprojfilepath = commandLineArgs[1] +let myUrl = URL(fileURLWithPath:xcodeprojfilepath) +let result = processXcodeprojAt(url: myUrl) + +switch result { + case .Error(let str): + reportError (message: "error script \"VerifyNoBuildSettings\" encountered an error: \(str)") + exit(EXIT_FAILURE) + case .FoundBuildSettings(let badLines): + reportError (message: "script \"VerifyNoBuildSettings\" found build settings in the project file:") + for badLine in badLines { + reportError (message: " \(badLine)\n") + } + exit(EXIT_FAILURE) + case .OK: + print ("script \"VerifyNoBuildSettings\" verified the project contained no buildSettings") + exit(EXIT_SUCCESS) +} diff --git a/xcconfig/NetNewsWire_project.xcconfig b/xcconfig/NetNewsWire_project.xcconfig index c91ef3a68..fbb95fcf1 100644 --- a/xcconfig/NetNewsWire_project.xcconfig +++ b/xcconfig/NetNewsWire_project.xcconfig @@ -1,9 +1,6 @@ -// If a warning is commented out in this list, it is a candidate for uncommenting -// that we just aven't gotten to yet - ALWAYS_SEARCH_USER_PATHS = NO CLANG_ANALYZER_NONNULL = YES -// CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; +CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = gnu++0x CLANG_CXX_LIBRARY = libc++ CLANG_ENABLE_MODULES = YES @@ -28,7 +25,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR CLANG_WARN_RANGE_LOOP_ANALYSIS = YES CLANG_WARN_STRICT_PROTOTYPES = YES CLANG_WARN_SUSPICIOUS_MOVE = YES -// CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES COPY_PHASE_STRIP = NO ENABLE_STRICT_OBJC_MSGSEND = YES