Skip to content

Commit

Permalink
macOS: disable App terminate when window is closed
Browse files Browse the repository at this point in the history
change bundle identifier of all apps to org.mulot.beattime...
  • Loading branch information
mulot committed May 31, 2021
1 parent e013261 commit 46937f0
Show file tree
Hide file tree
Showing 41 changed files with 115 additions and 61 deletions.
92 changes: 64 additions & 28 deletions BeatTime.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
94416FAF265FE42B00A23369 /* BeatTImeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94BEB1BE2646D9C500A5D811 /* BeatTImeView.swift */; };
94416FB0265FE43C00A23369 /* UIViewDraw.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94BEB1CB2646DBEB00A5D811 /* UIViewDraw.swift */; };
94416FB1265FE44700A23369 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94BEB20E2646E92E00A5D811 /* Colors.swift */; };
94416FB226659EBD00A23369 /* BeatTimeWatchOS WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 947C562D264814E9007E6B4A /* BeatTimeWatchOS WatchKit App.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
94447B05264AAD7500A062CF /* BeatTimeWatchOS WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 947C5639264814F0007E6B4A /* BeatTimeWatchOS WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
945F06B826543E1700391A7D /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9476F3272639D65A006FBF66 /* WidgetKit.framework */; };
945F06B926543E1700391A7D /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9476F3292639D65A006FBF66 /* SwiftUI.framework */; };
Expand Down Expand Up @@ -71,6 +72,13 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
94416FB326659EBD00A23369 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 94DA1E7D2634757300F83E86 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 947C562C264814E9007E6B4A;
remoteInfo = "BeatTimeWatchOS WatchKit App";
};
94447B06264AAD7500A062CF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 94DA1E7D2634757300F83E86 /* Project object */;
Expand Down Expand Up @@ -102,6 +110,17 @@
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
94416FB526659EBD00A23369 /* Embed Watch Content */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$(CONTENTS_FOLDER_PATH)/Watch";
dstSubfolderSpec = 16;
files = (
94416FB226659EBD00A23369 /* BeatTimeWatchOS WatchKit App.app in Embed Watch Content */,
);
name = "Embed Watch Content";
runOnlyForDeploymentPostprocessing = 0;
};
94447B08264AAD7500A062CF /* Embed App Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -561,11 +580,13 @@
94BEB1B72646D9C500A5D811 /* Frameworks */,
94BEB1B82646D9C500A5D811 /* Resources */,
945F06C326543E1D00391A7D /* Embed App Extensions */,
94416FB526659EBD00A23369 /* Embed Watch Content */,
);
buildRules = (
);
dependencies = (
945F06C126543E1D00391A7D /* PBXTargetDependency */,
94416FB426659EBD00A23369 /* PBXTargetDependency */,
);
name = BeatTimeiOS;
productName = BeatClockiOS;
Expand Down Expand Up @@ -844,6 +865,11 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
94416FB426659EBD00A23369 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 947C562C264814E9007E6B4A /* BeatTimeWatchOS WatchKit App */;
targetProxy = 94416FB326659EBD00A23369 /* PBXContainerItemProxy */;
};
94447B07264AAD7500A062CF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 947C5638264814F0007E6B4A /* BeatTimeWatchOS WatchKit Extension */;
Expand Down Expand Up @@ -896,7 +922,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.3;
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeMenuBar;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.BeatTimeMenuBar;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
Expand All @@ -920,7 +946,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.3;
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeMenuBar;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.BeatTimeMenuBar;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
Expand All @@ -932,6 +958,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = VNLK894MAE;
INFOPLIST_FILE = "$(SRCROOT)/Widget iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
Expand All @@ -940,7 +967,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeiOS.BeatTimeWidgetiOS;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.BeatTimeWidgetiOS;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
Expand All @@ -955,6 +982,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = VNLK894MAE;
INFOPLIST_FILE = "$(SRCROOT)/Widget iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
Expand All @@ -963,7 +991,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeiOS.BeatTimeWidgetiOS;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.BeatTimeWidgetiOS;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
Expand All @@ -979,7 +1007,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
CODE_SIGN_ENTITLEMENTS = Widget/BeatTimeWidget.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = VNLK894MAE;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -990,7 +1018,8 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.3;
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTime.BeatTimeWidget;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.BeatTimeWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
Expand All @@ -1003,7 +1032,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
CODE_SIGN_ENTITLEMENTS = Widget/BeatTimeWidget.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = VNLK894MAE;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -1014,7 +1043,8 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.3;
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTime.BeatTimeWidget;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.BeatTimeWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
Expand All @@ -1026,6 +1056,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"WatchOS WatchKit Extension/Preview Content\"";
DEVELOPMENT_TEAM = VNLK894MAE;
ENABLE_PREVIEWS = YES;
Expand All @@ -1035,7 +1066,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeWatchOS.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -1050,6 +1081,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"WatchOS WatchKit Extension/Preview Content\"";
DEVELOPMENT_TEAM = VNLK894MAE;
ENABLE_PREVIEWS = YES;
Expand All @@ -1059,7 +1091,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeWatchOS.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -1076,10 +1108,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = VNLK894MAE;
IBSC_MODULE = BeatTimeWatchOS_WatchKit_Extension;
INFOPLIST_FILE = "$(SRCROOT)/WatchOS WatchKit App/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeWatchOS.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -1095,10 +1128,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = VNLK894MAE;
IBSC_MODULE = BeatTimeWatchOS_WatchKit_Extension;
INFOPLIST_FILE = "$(SRCROOT)/WatchOS WatchKit App/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeWatchOS.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -1113,10 +1147,10 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = VNLK894MAE;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeWatchOS;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime;
PRODUCT_NAME = BeatTime;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
Expand All @@ -1127,10 +1161,10 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = VNLK894MAE;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeWatchOS;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime;
PRODUCT_NAME = BeatTime;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
Expand All @@ -1145,6 +1179,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"iOS/Preview Content\"";
DEVELOPMENT_TEAM = VNLK894MAE;
ENABLE_PREVIEWS = YES;
Expand All @@ -1154,7 +1189,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeiOS;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
Expand All @@ -1169,6 +1204,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"iOS/Preview Content\"";
DEVELOPMENT_TEAM = VNLK894MAE;
ENABLE_PREVIEWS = YES;
Expand All @@ -1178,7 +1214,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeiOS;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
Expand All @@ -1201,7 +1237,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeTvOS;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
Expand All @@ -1224,7 +1260,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTimeTvOS;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -1355,8 +1391,8 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = BeatTime/BeatTime.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/MacOS/BeatTime.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = VNLK894MAE;
Expand All @@ -1367,8 +1403,8 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 0.1;
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTime;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
Expand All @@ -1380,8 +1416,8 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = BeatTime/BeatTime.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/MacOS/BeatTime.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = VNLK894MAE;
Expand All @@ -1392,8 +1428,8 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 0.1;
PRODUCT_BUNDLE_IDENTIFIER = mulot.org.BeatTime;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.mulot.beattime;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<key>BeatTimeMenuBar.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
<integer>6</integer>
</dict>
<key>BeatTimeTvOS.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
<integer>8</integer>
</dict>
<key>BeatTimeWatchOS WatchKit App (Complication).xcscheme_^#shared#^_</key>
<dict>
Expand All @@ -42,12 +42,12 @@
<key>BeatTimeWidgetExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>6</integer>
<integer>7</integer>
</dict>
<key>BeatTimeWidgetiOSExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
<integer>5</integer>
</dict>
<key>BeatTimeiOS.xcscheme_^#shared#^_</key>
<dict>
Expand Down
2 changes: 2 additions & 0 deletions BeatTimeMenuBar/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
</dict>
Expand Down
4 changes: 2 additions & 2 deletions MacOS/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ class AppDelegate: NSObject, NSWindowDelegate, NSApplicationDelegate {

func windowWillClose(_ notification: Notification)
{
NSApp.terminate(self)
//NSApp.terminate(self)
}

func applicationDidFinishLaunching(_ aNotification: Notification) {
NSApp.hide(nil)
NSApp.hide(self)
beat = BeatTime()
//beat.isCentiBeat = true
beatsWindow.stringValue = "@\(beat.beats(centiBeats: isCentiBeats))"
Expand Down
2 changes: 1 addition & 1 deletion MacOS/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="390" width="389" height="251"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1080"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="900"/>
<value key="minSize" type="size" width="250" height="200"/>
<view key="contentView" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="199" height="66"/>
Expand Down
Loading

0 comments on commit 46937f0

Please sign in to comment.