update project configuration as per compiler recommendations

This commit is contained in:
Paul Plant 2023-09-23 10:59:31 +02:00
parent 644c5a685a
commit 64cfae2e23
6 changed files with 37 additions and 155 deletions

View File

@ -9,10 +9,11 @@
import WatchKit
import ClockKit
class ExtensionDelegate: NSObject, WKExtensionDelegate {
@main
class ExtensionDelegate: NSObject, WKApplicationDelegate {
static func shared() -> ExtensionDelegate {
return WKExtension.shared().extensionDelegate
return WKApplication.shared().extensionDelegate
}
func applicationDidFinishLaunching() {
@ -61,7 +62,7 @@ class ExtensionDelegate: NSObject, WKExtensionDelegate {
}
}
fileprivate extension WKExtension {
fileprivate extension WKApplication {
var extensionDelegate: ExtensionDelegate! {
return delegate as? ExtensionDelegate
}

View File

@ -13,7 +13,6 @@
470824D3297484B500C52317 /* SwiftCharts in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 470824D1297484B500C52317 /* SwiftCharts */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
470B618A270C448000561E56 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 470B6188270C448000561E56 /* Interface.storyboard */; };
470B618C270C448100561E56 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 470B618B270C448100561E56 /* Assets.xcassets */; };
470B6192270C448100561E56 /* Watch App WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 470B6191270C448100561E56 /* Watch App WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
470B6197270C448100561E56 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 470B6196270C448100561E56 /* InterfaceController.swift */; };
470B6199270C448100561E56 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 470B6198270C448100561E56 /* ExtensionDelegate.swift */; };
470B619B270C448100561E56 /* ComplicationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 470B619A270C448100561E56 /* ComplicationController.swift */; };
@ -294,7 +293,7 @@
F870D3D325126A49008967B0 /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F870D3D225126A49008967B0 /* NotificationCenter.framework */; };
F870D3D625126A49008967B0 /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F870D3D525126A49008967B0 /* TodayViewController.swift */; };
F870D3D925126A49008967B0 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F870D3D725126A49008967B0 /* MainInterface.storyboard */; };
F870D3DD25126A49008967B0 /* xDrip4iOS Widget.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = F870D3D125126A49008967B0 /* xDrip4iOS Widget.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
F870D3DD25126A49008967B0 /* xDrip4iOS Widget.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = F870D3D125126A49008967B0 /* xDrip4iOS Widget.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
F870D3EA25129C43008967B0 /* Glucose+GlucoseKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = F870D3E925129C43008967B0 /* Glucose+GlucoseKit.swift */; };
F870D3EC25129FC2008967B0 /* XDripClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = F870D3EB25129FC2008967B0 /* XDripClient.swift */; };
F870D3EE2513B786008967B0 /* Trace.swift in Sources */ = {isa = PBXBuildFile; fileRef = F870D3ED2513B786008967B0 /* Trace.swift */; };
@ -564,13 +563,6 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
470B6193270C448100561E56 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8AC425221ADEBD60078C348 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 470B6190270C448100561E56;
remoteInfo = "Watch App WatchKit Extension";
};
470B619F270C448200561E56 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8AC425221ADEBD60078C348 /* Project object */;
@ -610,26 +602,15 @@
name = "Embed Watch Content";
runOnlyForDeploymentPostprocessing = 0;
};
470B61A5270C448200561E56 /* Embed App Extensions */ = {
F870D3DE25126A49008967B0 /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
470B6192270C448100561E56 /* Watch App WatchKit Extension.appex in Embed App Extensions */,
F870D3DD25126A49008967B0 /* xDrip4iOS Widget.appex in Embed Foundation Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
F870D3DE25126A49008967B0 /* Embed App Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
F870D3DD25126A49008967B0 /* xDrip4iOS Widget.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
@ -709,7 +690,6 @@
470B6186270C448000561E56 /* xDrip4iO5.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = xDrip4iO5.app; sourceTree = BUILT_PRODUCTS_DIR; };
470B6189270C448000561E56 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = "<group>"; };
470B618B270C448100561E56 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
470B6191270C448100561E56 /* Watch App WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Watch App WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
470B6196270C448100561E56 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = "<group>"; };
470B6198270C448100561E56 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = "<group>"; };
470B619A270C448100561E56 /* ComplicationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComplicationController.swift; sourceTree = "<group>"; };
@ -1607,13 +1587,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
470B618E270C448100561E56 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F870D3CE25126A49008967B0 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -2298,7 +2271,6 @@
F8AC425A21ADEBD60078C348 /* xdrip.app */,
F870D3D125126A49008967B0 /* xDrip4iOS Widget.appex */,
470B6186270C448000561E56 /* xDrip4iO5.app */,
470B6191270C448100561E56 /* Watch App WatchKit Extension.appex */,
);
name = Products;
sourceTree = "<group>";
@ -3207,35 +3179,17 @@
buildConfigurationList = 470B61A9270C448200561E56 /* Build configuration list for PBXNativeTarget "Watch App" */;
buildPhases = (
470B6184270C448000561E56 /* Resources */,
470B61A5270C448200561E56 /* Embed App Extensions */,
2F95F647D357FD5C1665313D /* Frameworks */,
470B618D270C448100561E56 /* Sources */,
);
buildRules = (
);
dependencies = (
470B6194270C448100561E56 /* PBXTargetDependency */,
);
name = "Watch App";
productName = "Watch App";
productReference = 470B6186270C448000561E56 /* xDrip4iO5.app */;
productType = "com.apple.product-type.application.watchapp2";
};
470B6190270C448100561E56 /* Watch App WatchKit Extension */ = {
isa = PBXNativeTarget;
buildConfigurationList = 470B61A8270C448200561E56 /* Build configuration list for PBXNativeTarget "Watch App WatchKit Extension" */;
buildPhases = (
470B618D270C448100561E56 /* Sources */,
470B618E270C448100561E56 /* Frameworks */,
470B618F270C448100561E56 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Watch App WatchKit Extension";
productName = "Watch App WatchKit Extension";
productReference = 470B6191270C448100561E56 /* Watch App WatchKit Extension.appex */;
productType = "com.apple.product-type.watchkit2-extension";
productType = "com.apple.product-type.application";
};
F870D3D025126A49008967B0 /* xDrip4iOS Widget */ = {
isa = PBXNativeTarget;
@ -3261,7 +3215,7 @@
F8AC425621ADEBD60078C348 /* Sources */,
F8AC425721ADEBD60078C348 /* Frameworks */,
F8AC425821ADEBD60078C348 /* Resources */,
F870D3DE25126A49008967B0 /* Embed App Extensions */,
F870D3DE25126A49008967B0 /* Embed Foundation Extensions */,
470B61A2270C448200561E56 /* Embed Watch Content */,
470824D4297484B500C52317 /* Embed Frameworks */,
);
@ -3288,17 +3242,15 @@
F8AC425221ADEBD60078C348 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
DefaultBuildSystemTypeForWorkspace = Original;
LastSwiftUpdateCheck = 1310;
LastUpgradeCheck = 1310;
LastUpgradeCheck = 1500;
ORGANIZATIONNAME = "Johan Degraeve";
TargetAttributes = {
470B6185270C448000561E56 = {
CreatedOnToolsVersion = 13.0;
};
470B6190270C448100561E56 = {
CreatedOnToolsVersion = 13.0;
};
F870D3D025126A49008967B0 = {
CreatedOnToolsVersion = 11.7;
};
@ -3355,7 +3307,6 @@
F8AC425921ADEBD60078C348 /* xdrip */,
F870D3D025126A49008967B0 /* xDrip4iOS Widget */,
470B6185270C448000561E56 /* Watch App */,
470B6190270C448100561E56 /* Watch App WatchKit Extension */,
);
};
/* End PBXProject section */
@ -3366,15 +3317,8 @@
buildActionMask = 2147483647;
files = (
470B618C270C448100561E56 /* Assets.xcassets in Resources */,
470B618A270C448000561E56 /* Interface.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
470B618F270C448100561E56 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
470B619D270C448200561E56 /* Assets.xcassets in Resources */,
470B618A270C448000561E56 /* Interface.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -3958,11 +3902,6 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
470B6194270C448100561E56 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 470B6190270C448100561E56 /* Watch App WatchKit Extension */;
targetProxy = 470B6193270C448100561E56 /* PBXContainerItemProxy */;
};
470B61A0270C448200561E56 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 470B6185270C448000561E56 /* Watch App */;
@ -4606,6 +4545,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_IDENTITY = "$(XDRIP_CODE_SIGN_IDENTITY_DEBUG)";
@ -4613,9 +4553,14 @@
CURRENT_PROJECT_VERSION = "$(CURRENT_PROJECT_VERSION)";
DEVELOPMENT_TEAM = "$(XDRIP_DEVELOPMENT_TEAM)";
GENERATE_INFOPLIST_FILE = YES;
IBSC_MODULE = Watch_App_WatchKit_Extension;
INFOPLIST_KEY_CLKComplicationPrincipalClass = "$(PRODUCT_MODULE_NAME).ComplicationController";
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Johan Degraeve. All rights reserved.";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = "$(MAIN_APP_BUNDLE_IDENTIFIER)";
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = com.92C77A2942.xdripswift;
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MAIN_APP_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER)";
MARKETING_VERSION = "$(XDRIP_MARKETING_VERSION)";
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).watchkitapp";
@ -4634,6 +4579,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_IDENTITY = "$(XDRIP_CODE_SIGN_IDENTITY_RELEASE)";
@ -4641,9 +4587,14 @@
CURRENT_PROJECT_VERSION = "$(CURRENT_PROJECT_VERSION)";
DEVELOPMENT_TEAM = "$(XDRIP_DEVELOPMENT_TEAM)";
GENERATE_INFOPLIST_FILE = YES;
IBSC_MODULE = Watch_App_WatchKit_Extension;
INFOPLIST_KEY_CLKComplicationPrincipalClass = "$(PRODUCT_MODULE_NAME).ComplicationController";
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Johan Degraeve. All rights reserved.";
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = "$(MAIN_APP_BUNDLE_IDENTIFIER)";
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = com.92C77A2942.xdripswift;
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MAIN_APP_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER)";
MARKETING_VERSION = "$(XDRIP_MARKETING_VERSION)";
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).watchkitapp";
@ -4657,70 +4608,6 @@
};
name = Release;
};
470B61A6270C448200561E56 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(CURRENT_PROJECT_VERSION)";
DEVELOPMENT_TEAM = "$(XDRIP_DEVELOPMENT_TEAM)";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Watch App WatchKit Extension/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = xDrip4iO5;
INFOPLIST_KEY_CLKComplicationPrincipalClass = "$(PRODUCT_MODULE_NAME).ComplicationController";
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Johan Degraeve. All rights reserved.";
INFOPLIST_KEY_WKExtensionDelegateClassName = Watch_App_WatchKit_Extension.ExtensionDelegate;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MAIN_APP_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER)";
MARKETING_VERSION = "$(XDRIP_MARKETING_VERSION)";
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).watchkitapp.watchkitextension";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
};
name = Debug;
};
470B61A7270C448200561E56 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(CURRENT_PROJECT_VERSION)";
DEVELOPMENT_TEAM = "$(XDRIP_DEVELOPMENT_TEAM)";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Watch App WatchKit Extension/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = xDrip4iO5;
INFOPLIST_KEY_CLKComplicationPrincipalClass = "$(PRODUCT_MODULE_NAME).ComplicationController";
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Johan Degraeve. All rights reserved.";
INFOPLIST_KEY_WKExtensionDelegateClassName = Watch_App_WatchKit_Extension.ExtensionDelegate;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MAIN_APP_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER)";
MARKETING_VERSION = "$(XDRIP_MARKETING_VERSION)";
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).watchkitapp.watchkitextension";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
};
name = Release;
};
F870D3DF25126A49008967B0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -4811,6 +4698,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@ -4878,6 +4766,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@ -4956,15 +4845,6 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
470B61A8270C448200561E56 /* Build configuration list for PBXNativeTarget "Watch App WatchKit Extension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
470B61A6270C448200561E56 /* Debug */,
470B61A7270C448200561E56 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
470B61A9270C448200561E56 /* Build configuration list for PBXNativeTarget "Watch App" */ = {
isa = XCConfigurationList;
buildConfigurations = (

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1310"
LastUpgradeVersion = "1500"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1310"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1310"
LastUpgradeVersion = "1500"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
@ -74,6 +74,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1310"
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"