commit bb46d556812161b611a236dd54a93dddb3f33694 Author: Claire Date: Thu Sep 22 16:44:32 2022 -0700 Initial Commit diff --git a/LunaMac.xcodeproj/project.pbxproj b/LunaMac.xcodeproj/project.pbxproj new file mode 100644 index 0000000..48e3626 --- /dev/null +++ b/LunaMac.xcodeproj/project.pbxproj @@ -0,0 +1,330 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 7ECD0D7C28DD2A4100B90958 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ECD0D7B28DD2A4100B90958 /* AppDelegate.swift */; }; + 7ECD0D7E28DD2A4100B90958 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ECD0D7D28DD2A4100B90958 /* ViewController.swift */; }; + 7ECD0D8028DD2A4200B90958 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7ECD0D7F28DD2A4200B90958 /* Assets.xcassets */; }; + 7ECD0D8328DD2A4200B90958 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7ECD0D8128DD2A4200B90958 /* Main.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 7ECD0D7828DD2A4100B90958 /* LunaMac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LunaMac.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7ECD0D7B28DD2A4100B90958 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7ECD0D7D28DD2A4100B90958 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 7ECD0D7F28DD2A4200B90958 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7ECD0D8228DD2A4200B90958 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 7ECD0D8428DD2A4200B90958 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7ECD0D8528DD2A4200B90958 /* LunaMac.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LunaMac.entitlements; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7ECD0D7528DD2A4100B90958 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7ECD0D6F28DD2A4100B90958 = { + isa = PBXGroup; + children = ( + 7ECD0D7A28DD2A4100B90958 /* LunaMac */, + 7ECD0D7928DD2A4100B90958 /* Products */, + ); + sourceTree = ""; + }; + 7ECD0D7928DD2A4100B90958 /* Products */ = { + isa = PBXGroup; + children = ( + 7ECD0D7828DD2A4100B90958 /* LunaMac.app */, + ); + name = Products; + sourceTree = ""; + }; + 7ECD0D7A28DD2A4100B90958 /* LunaMac */ = { + isa = PBXGroup; + children = ( + 7ECD0D7B28DD2A4100B90958 /* AppDelegate.swift */, + 7ECD0D7D28DD2A4100B90958 /* ViewController.swift */, + 7ECD0D7F28DD2A4200B90958 /* Assets.xcassets */, + 7ECD0D8128DD2A4200B90958 /* Main.storyboard */, + 7ECD0D8428DD2A4200B90958 /* Info.plist */, + 7ECD0D8528DD2A4200B90958 /* LunaMac.entitlements */, + ); + path = LunaMac; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7ECD0D7728DD2A4100B90958 /* LunaMac */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7ECD0D8828DD2A4200B90958 /* Build configuration list for PBXNativeTarget "LunaMac" */; + buildPhases = ( + 7ECD0D7428DD2A4100B90958 /* Sources */, + 7ECD0D7528DD2A4100B90958 /* Frameworks */, + 7ECD0D7628DD2A4100B90958 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LunaMac; + productName = LunaMac; + productReference = 7ECD0D7828DD2A4100B90958 /* LunaMac.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7ECD0D7028DD2A4100B90958 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1030; + LastUpgradeCheck = 1030; + ORGANIZATIONNAME = "A Better Geek"; + TargetAttributes = { + 7ECD0D7728DD2A4100B90958 = { + CreatedOnToolsVersion = 10.3; + }; + }; + }; + buildConfigurationList = 7ECD0D7328DD2A4100B90958 /* Build configuration list for PBXProject "LunaMac" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7ECD0D6F28DD2A4100B90958; + productRefGroup = 7ECD0D7928DD2A4100B90958 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7ECD0D7728DD2A4100B90958 /* LunaMac */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7ECD0D7628DD2A4100B90958 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7ECD0D8028DD2A4200B90958 /* Assets.xcassets in Resources */, + 7ECD0D8328DD2A4200B90958 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7ECD0D7428DD2A4100B90958 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7ECD0D7E28DD2A4100B90958 /* ViewController.swift in Sources */, + 7ECD0D7C28DD2A4100B90958 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 7ECD0D8128DD2A4200B90958 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7ECD0D8228DD2A4200B90958 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7ECD0D8628DD2A4200B90958 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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 = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + 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; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 7ECD0D8728DD2A4200B90958 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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 = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + 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; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 7ECD0D8928DD2A4200B90958 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = LunaMac/LunaMac.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = LunaMac/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = abg.LunaMac; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 7ECD0D8A28DD2A4200B90958 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = LunaMac/LunaMac.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = LunaMac/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = abg.LunaMac; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7ECD0D7328DD2A4100B90958 /* Build configuration list for PBXProject "LunaMac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7ECD0D8628DD2A4200B90958 /* Debug */, + 7ECD0D8728DD2A4200B90958 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7ECD0D8828DD2A4200B90958 /* Build configuration list for PBXNativeTarget "LunaMac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7ECD0D8928DD2A4200B90958 /* Debug */, + 7ECD0D8A28DD2A4200B90958 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7ECD0D7028DD2A4100B90958 /* Project object */; +} diff --git a/LunaMac.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/LunaMac.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..88a3abe --- /dev/null +++ b/LunaMac.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/LunaMac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/LunaMac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/LunaMac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/LunaMac.xcodeproj/xcuserdata/claire.xcuserdatad/xcschemes/xcschememanagement.plist b/LunaMac.xcodeproj/xcuserdata/claire.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..7cbe569 --- /dev/null +++ b/LunaMac.xcodeproj/xcuserdata/claire.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + LunaMac.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/LunaMac/AppDelegate.swift b/LunaMac/AppDelegate.swift new file mode 100644 index 0000000..e2b7f68 --- /dev/null +++ b/LunaMac/AppDelegate.swift @@ -0,0 +1,193 @@ +// +// AppDelegate.swift +// LunaMac +// +// Created by Claire Davis on 9/21/22. +// Copyright © 2022 A Better Geek. All rights reserved. +// + +import Cocoa +import Foundation +import CoreFoundation + +@NSApplicationMain +class AppDelegate: NSObject, NSApplicationDelegate { + + // make sure applet stays in memory + var statusBarItem: NSStatusItem? + + // static array of possible lunar values + let phaseArray:[String:[String:NSString]] = [ + "new" : [ + "nice" : "New Moon", + "start" : "0", + "end" : "1", + "icon" : "🌑" + ], + "waxc" : [ + "nice" : "Waxing Crescent", + "start" : "1", + "end" : "6.38264692644", + "icon" : "🌒" + ], + "firstq" : [ + "nice" : "First Quarter", + "start" : "6.38264692644", + "end" : "8.38264692644", + "icon" : "🌓" + ], + "waxg" : [ + "nice" : "Waxing Gibbous", + "start" : "8.38264692644", + "end" : "13.76529385288", + "icon" : "🌔" + ], + "full" : [ + "nice" : "Full Moon", + "start" : "13.76529385288", + "end" : "15.76529385288", + "icon" : "🌕" + ], + "wang" : [ + "nice" : "Waning Gibbous", + "start" : "15.76529385288", + "end" : "21.14794077932", + "icon" : "🌖" + ], + "lastq" : [ + "nice" : "Last Quarter", + "start" : "21.14794077932", + "end" : "23.14794077932", + "icon" : "🌗" + ], + "wanc" : [ + "nice" : "Waning Crescent", + "start" : "23.14794077932", + "end" : "28.53058770576", + "icon" : "🌘" + ], + "new2" : [ + "nice" : "New Moon", + "start" : "28.53058770576", + "end" : "29.53058770576", + "icon" : "🌑" + ], + "default" : [ + "nice" : "Failed to calculate.", + "icon" : "🌙" + ] + ] + + func applicationDidFinishLaunching(_ aNotification: Notification) { + updateIcon() + } + + @objc func buildMenu(key: String = "default") { + // get system-wide menu bar + let statusBar = NSStatusBar.system + + // set icon size to square + statusBarItem = statusBar.statusItem(withLength: NSStatusItem.squareLength) + + // set icon using emoji + statusBarItem?.button?.title = phaseArray[key]?["icon"] as String? ?? "🌙" + + // create a menu for the icon + let statusBarMenu = NSMenu(title: "LunaMac Menu") + + // add the menu to the menu bar icon + statusBarItem?.menu = statusBarMenu + + let topTxt = phaseArray["default"]?["nice"] as String? ?? "" + + // add menu items to the menu + if (!topTxt.isEmpty) { + statusBarMenu.addItem( + withTitle: phaseArray[key]?["nice"] as String? ?? topTxt, + action: nil, + keyEquivalent: "" + ) + } + + statusBarMenu.addItem( + withTitle: "Update moon phase", + action: #selector(AppDelegate.updateIcon), + keyEquivalent: "" + ) + + statusBarMenu.addItem( + withTitle: "Quit LunaMac", + action: #selector(AppDelegate.quitApp), + keyEquivalent: "" + ) + } + + // update menu bar icon + @objc func updateIcon() { + // current system time in UTC + let sysDate = Date() + // get baseline date + // let baseDateStr = "2000-01-06 18:14:00 +0000" + + // create date object from baseDate + // date components + var bdc = DateComponents() + bdc.year = 2000 + bdc.month = 1 + bdc.day = 6 + bdc.hour = 18 + bdc.minute = 14 + // create date object + let ucal = Calendar(identifier: .gregorian) + let baseDate = ucal.date(from: bdc) + + // days in a lunar cycle + let lunarDays = 29.53058770576 + // seconds in a lunar cycle + let lunarSecs = lunarDays * (24 * 60 * 60) + + // calculate seconds between sysDate and baseDate + // if baseDate is nil, default to current system time + let totalSecs = sysDate.timeIntervalSince(baseDate ?? Date()) + + if (totalSecs.sign != .minus) { + // a positive number is valid + // % calculates seconds of current cycle + let currSecs = totalSecs.truncatingRemainder(dividingBy: lunarSecs) + let currFrac = currSecs / lunarSecs + let currDays = currFrac * lunarDays + + var newArr = [String:[String:NSString]]() + + newArr = phaseArray.filter{findPhase(key: $0.key, val: $0.value, start: $0.value["start"]?.doubleValue ?? 0, end: $0.value["end"]?.doubleValue ?? 0, curr: currDays)} + + // we want newArr[0].value which is [String:NSString] + let theKey = newArr.first!.key + buildMenu(key: theKey) + } else { + // if dateDiff is negative, something went wrong. + buildMenu() + } + } + + @objc func findPhase(key: String, val: [String:NSString], start: Double, end: Double, curr: Double) -> Bool { + + if ((curr >= start) && (curr <= end)) { + return true + } else { + return false + } + } + + // quit application + @objc func quitApp() { + NSApp.terminate(self) + } + + func applicationWillTerminate(_ aNotification: Notification) { + // Insert code here to tear down your application + } + + +} + diff --git a/LunaMac/Assets.xcassets/AppIcon.appiconset/Contents.json b/LunaMac/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/LunaMac/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LunaMac/Assets.xcassets/Contents.json b/LunaMac/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/LunaMac/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LunaMac/Base.lproj/Main.storyboard b/LunaMac/Base.lproj/Main.storyboard new file mode 100644 index 0000000..bcff967 --- /dev/null +++ b/LunaMac/Base.lproj/Main.storyboard @@ -0,0 +1,717 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LunaMac/Info.plist b/LunaMac/Info.plist new file mode 100644 index 0000000..9435f99 --- /dev/null +++ b/LunaMac/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2022 A Better Geek. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + + diff --git a/LunaMac/LunaMac.entitlements b/LunaMac/LunaMac.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/LunaMac/LunaMac.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/LunaMac/ViewController.swift b/LunaMac/ViewController.swift new file mode 100644 index 0000000..babfee2 --- /dev/null +++ b/LunaMac/ViewController.swift @@ -0,0 +1,27 @@ +// +// ViewController.swift +// LunaMac +// +// Created by Claire Davis on 9/22/22. +// Copyright © 2022 A Better Geek. All rights reserved. +// + +import Cocoa + +class ViewController: NSViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + override var representedObject: Any? { + didSet { + // Update the view, if already loaded. + } + } + + +} +