diff --git a/SpotifyLyricsInMenubar.xcodeproj/project.pbxproj b/SpotifyLyricsInMenubar.xcodeproj/project.pbxproj index 7046346..147ad41 100644 --- a/SpotifyLyricsInMenubar.xcodeproj/project.pbxproj +++ b/SpotifyLyricsInMenubar.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 8F28FDC22AA25D2700439D8D /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = 8F28FDC12AA25D2700439D8D /* Sparkle */; }; 8F39ED8E2A78EB5900574203 /* lyricJsonStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F39ED8D2A78EB5900574203 /* lyricJsonStruct.swift */; }; 8F4F49522A7EC32D00097888 /* (null) in Sources */ = {isa = PBXBuildFile; }; 8F4F495D2A7FB3D400097888 /* SongObject+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F4F495B2A7FB3D400097888 /* SongObject+CoreDataClass.swift */; }; @@ -14,11 +15,14 @@ 8F6BD2952A8A61C9008BBF88 /* AmplitudeSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 8F6BD2942A8A61C9008BBF88 /* AmplitudeSwift */; }; 8F6BD2972A8A6278008BBF88 /* amplitudeKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F6BD2962A8A6278008BBF88 /* amplitudeKey.swift */; }; 8F6BD2992A8A6B7D008BBF88 /* viewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F6BD2982A8A6B7D008BBF88 /* viewModel.swift */; }; - 8FB953DE2A8D302C00929291 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = 8FB953DD2A8D302C00929291 /* Sparkle */; }; 8FC8E9492A704EEB00F69915 /* SpotifyLyricsInMenubarApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FC8E9482A704EEB00F69915 /* SpotifyLyricsInMenubarApp.swift */; }; 8FC8E94D2A704EED00F69915 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8FC8E94C2A704EED00F69915 /* Assets.xcassets */; }; 8FE454282A8916C30039EFA7 /* SpotifyScripting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FE454272A8916C30039EFA7 /* SpotifyScripting.swift */; }; 8FF59E2E2A798D2B00F0A382 /* Lyrics.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 8FF59E2C2A798D2B00F0A382 /* Lyrics.xcdatamodeld */; }; + 8FFA9F312AA1B1E600BAEC5C /* OnboardingWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FFA9F302AA1B1E600BAEC5C /* OnboardingWindow.swift */; }; + 8FFA9F342AA1B3CB00BAEC5C /* SDWebImageSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 8FFA9F332AA1B3CB00BAEC5C /* SDWebImageSwiftUI */; }; + 8FFA9F372AA1B63500BAEC5C /* spotifyPermissionMac.gif in Resources */ = {isa = PBXBuildFile; fileRef = 8FFA9F352AA1B63500BAEC5C /* spotifyPermissionMac.gif */; }; + 8FFA9F382AA1B63500BAEC5C /* crossfade.gif in Resources */ = {isa = PBXBuildFile; fileRef = 8FFA9F362AA1B63500BAEC5C /* crossfade.gif */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -34,6 +38,9 @@ 8FE454272A8916C30039EFA7 /* SpotifyScripting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotifyScripting.swift; sourceTree = ""; }; 8FE454292A891EBD0039EFA7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8FF59E2D2A798D2B00F0A382 /* Lyrics.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Lyrics.xcdatamodel; sourceTree = ""; }; + 8FFA9F302AA1B1E600BAEC5C /* OnboardingWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingWindow.swift; sourceTree = ""; }; + 8FFA9F352AA1B63500BAEC5C /* spotifyPermissionMac.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = spotifyPermissionMac.gif; sourceTree = ""; }; + 8FFA9F362AA1B63500BAEC5C /* crossfade.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = crossfade.gif; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -41,8 +48,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 8F28FDC22AA25D2700439D8D /* Sparkle in Frameworks */, + 8FFA9F342AA1B3CB00BAEC5C /* SDWebImageSwiftUI in Frameworks */, 8F6BD2952A8A61C9008BBF88 /* AmplitudeSwift in Frameworks */, - 8FB953DE2A8D302C00929291 /* Sparkle in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -60,6 +68,8 @@ isa = PBXGroup; children = ( 8F4F495B2A7FB3D400097888 /* SongObject+CoreDataClass.swift */, + 8FFA9F362AA1B63500BAEC5C /* crossfade.gif */, + 8FFA9F352AA1B63500BAEC5C /* spotifyPermissionMac.gif */, 8F4F495C2A7FB3D400097888 /* SongObject+CoreDataProperties.swift */, 8FC8E9472A704EEB00F69915 /* SpotifyLyricsInMenubar */, 8FC8E9462A704EEB00F69915 /* Products */, @@ -80,6 +90,7 @@ children = ( 8FE454292A891EBD0039EFA7 /* Info.plist */, 8FC8E9482A704EEB00F69915 /* SpotifyLyricsInMenubarApp.swift */, + 8FFA9F302AA1B1E600BAEC5C /* OnboardingWindow.swift */, 8F6BD2982A8A6B7D008BBF88 /* viewModel.swift */, 8F6BD2962A8A6278008BBF88 /* amplitudeKey.swift */, 8FF59E2C2A798D2B00F0A382 /* Lyrics.xcdatamodeld */, @@ -109,7 +120,8 @@ name = SpotifyLyricsInMenubar; packageProductDependencies = ( 8F6BD2942A8A61C9008BBF88 /* AmplitudeSwift */, - 8FB953DD2A8D302C00929291 /* Sparkle */, + 8FFA9F332AA1B3CB00BAEC5C /* SDWebImageSwiftUI */, + 8F28FDC12AA25D2700439D8D /* Sparkle */, ); productName = SpotifyLyricsInMenubar; productReference = 8FC8E9452A704EEB00F69915 /* SpotifyLyricsInMenubar.app */; @@ -141,7 +153,8 @@ mainGroup = 8FC8E93C2A704EEB00F69915; packageReferences = ( 8F6BD2932A8A61C8008BBF88 /* XCRemoteSwiftPackageReference "Amplitude-Swift" */, - 8FB953DC2A8D302C00929291 /* XCRemoteSwiftPackageReference "Sparkle" */, + 8FFA9F322AA1B3CB00BAEC5C /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */, + 8F28FDC02AA25D2700439D8D /* XCRemoteSwiftPackageReference "Sparkle" */, ); productRefGroup = 8FC8E9462A704EEB00F69915 /* Products */; projectDirPath = ""; @@ -157,7 +170,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8FFA9F372AA1B63500BAEC5C /* spotifyPermissionMac.gif in Resources */, 8FC8E94D2A704EED00F69915 /* Assets.xcassets in Resources */, + 8FFA9F382AA1B63500BAEC5C /* crossfade.gif in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -176,6 +191,7 @@ 8F6BD2992A8A6B7D008BBF88 /* viewModel.swift in Sources */, 8FC8E9492A704EEB00F69915 /* SpotifyLyricsInMenubarApp.swift in Sources */, 8FE454282A8916C30039EFA7 /* SpotifyScripting.swift in Sources */, + 8FFA9F312AA1B1E600BAEC5C /* OnboardingWindow.swift in Sources */, 8F4F495E2A7FB3D400097888 /* SongObject+CoreDataProperties.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -331,7 +347,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 0.95; + MARKETING_VERSION = 1; PRODUCT_BUNDLE_IDENTIFIER = com.aviwadhwa.SpotifyLyricsInMenubar; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -367,7 +383,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 0.95; + MARKETING_VERSION = 1; PRODUCT_BUNDLE_IDENTIFIER = com.aviwadhwa.SpotifyLyricsInMenubar; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -399,6 +415,14 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ + 8F28FDC02AA25D2700439D8D /* XCRemoteSwiftPackageReference "Sparkle" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/sparkle-project/Sparkle"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 2.4.2; + }; + }; 8F6BD2932A8A61C8008BBF88 /* XCRemoteSwiftPackageReference "Amplitude-Swift" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/amplitude/Amplitude-Swift"; @@ -407,26 +431,31 @@ kind = branch; }; }; - 8FB953DC2A8D302C00929291 /* XCRemoteSwiftPackageReference "Sparkle" */ = { + 8FFA9F322AA1B3CB00BAEC5C /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/sparkle-project/Sparkle"; + repositoryURL = "https://github.com/SDWebImage/SDWebImageSwiftUI.git"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.4.2; + branch = master; + kind = branch; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 8F28FDC12AA25D2700439D8D /* Sparkle */ = { + isa = XCSwiftPackageProductDependency; + package = 8F28FDC02AA25D2700439D8D /* XCRemoteSwiftPackageReference "Sparkle" */; + productName = Sparkle; + }; 8F6BD2942A8A61C9008BBF88 /* AmplitudeSwift */ = { isa = XCSwiftPackageProductDependency; package = 8F6BD2932A8A61C8008BBF88 /* XCRemoteSwiftPackageReference "Amplitude-Swift" */; productName = AmplitudeSwift; }; - 8FB953DD2A8D302C00929291 /* Sparkle */ = { + 8FFA9F332AA1B3CB00BAEC5C /* SDWebImageSwiftUI */ = { isa = XCSwiftPackageProductDependency; - package = 8FB953DC2A8D302C00929291 /* XCRemoteSwiftPackageReference "Sparkle" */; - productName = Sparkle; + package = 8FFA9F322AA1B3CB00BAEC5C /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */; + productName = SDWebImageSwiftUI; }; /* End XCSwiftPackageProductDependency section */ diff --git a/SpotifyLyricsInMenubar.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/SpotifyLyricsInMenubar.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index fd04691..d8e84c2 100644 --- a/SpotifyLyricsInMenubar.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/SpotifyLyricsInMenubar.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -8,6 +8,33 @@ "branch" : "main", "revision" : "903429a123aa039514720fbca9202275fccfb9fd" } + }, + { + "identity" : "sdwebimage", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImage.git", + "state" : { + "revision" : "633996a807442ec28df9d33b0f88ce57a0e2fdbf", + "version" : "5.17.0" + } + }, + { + "identity" : "sdwebimageswiftui", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImageSwiftUI.git", + "state" : { + "branch" : "master", + "revision" : "e837c37d45449fbd3b4745c10c5b5274e73edead" + } + }, + { + "identity" : "sparkle", + "kind" : "remoteSourceControl", + "location" : "https://github.com/sparkle-project/Sparkle", + "state" : { + "revision" : "87e4fcbac39912f9cdb9a9acf205cad60e1ca3bc", + "version" : "2.4.2" + } } ], "version" : 2 diff --git a/SpotifyLyricsInMenubar.xcodeproj/xcshareddata/xcschemes/SpotifyLyricsInMenubar.xcscheme b/SpotifyLyricsInMenubar.xcodeproj/xcshareddata/xcschemes/SpotifyLyricsInMenubar.xcscheme new file mode 100644 index 0000000..1f0fc1f --- /dev/null +++ b/SpotifyLyricsInMenubar.xcodeproj/xcshareddata/xcschemes/SpotifyLyricsInMenubar.xcscheme @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SpotifyLyricsInMenubar.xcodeproj/xcuserdata/aviwad.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/SpotifyLyricsInMenubar.xcodeproj/xcuserdata/aviwad.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index d4acc43..5a7a640 100644 --- a/SpotifyLyricsInMenubar.xcodeproj/xcuserdata/aviwad.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/SpotifyLyricsInMenubar.xcodeproj/xcuserdata/aviwad.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -70,17 +70,95 @@ + + + + + + + + + + + + + + diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Contents.json b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Contents.json index 4de72de..426d0c4 100644 --- a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,58 +1,61 @@ { "images" : [ { + "filename" : "Group 1-4-2.png", "idiom" : "mac", "scale" : "1x", "size" : "16x16" }, { - "filename" : "Untitled-2 1.png", + "filename" : "Group 1-4.png", "idiom" : "mac", "scale" : "2x", "size" : "16x16" }, { - "filename" : "Untitled-2.png", + "filename" : "Group 1-4 1.png", "idiom" : "mac", "scale" : "1x", "size" : "32x32" }, { - "filename" : "Frame 1-4.png", + "filename" : "Group 1-3.png", "idiom" : "mac", "scale" : "2x", "size" : "32x32" }, { - "filename" : "Frame 1-3.png", + "filename" : "Group 1-2.png", "idiom" : "mac", "scale" : "1x", "size" : "128x128" }, { - "filename" : "Frame 1-2 1.png", + "filename" : "Group 2.png", "idiom" : "mac", "scale" : "2x", "size" : "128x128" }, { - "filename" : "Frame 1-2.png", + "filename" : "Group 1.png", "idiom" : "mac", "scale" : "1x", "size" : "256x256" }, { - "filename" : "Frame 1.png", + "filename" : "Frame 1-12 1.png", "idiom" : "mac", "scale" : "2x", "size" : "256x256" }, { + "filename" : "Frame 1-12.png", "idiom" : "mac", "scale" : "1x", "size" : "512x512" }, { + "filename" : "Frame 1-15.png", "idiom" : "mac", "scale" : "2x", "size" : "512x512" diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-12 1.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-12 1.png new file mode 100644 index 0000000..306deba Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-12 1.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-12.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-12.png new file mode 100644 index 0000000..306deba Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-12.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-15.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-15.png new file mode 100644 index 0000000..8a01dc3 Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-15.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-2 1.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-2 1.png deleted file mode 100644 index f3a7dda..0000000 Binary files a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-2 1.png and /dev/null differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-2.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-2.png deleted file mode 100644 index f3a7dda..0000000 Binary files a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-2.png and /dev/null differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-3.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-3.png deleted file mode 100644 index 1367b0e..0000000 Binary files a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-3.png and /dev/null differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-4.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-4.png deleted file mode 100644 index 1e01490..0000000 Binary files a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1-4.png and /dev/null differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1.png deleted file mode 100644 index f9aea70..0000000 Binary files a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Frame 1.png and /dev/null differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-2.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-2.png new file mode 100644 index 0000000..e4f2a07 Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-2.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-3.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-3.png new file mode 100644 index 0000000..652f263 Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-3.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-4 1.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-4 1.png new file mode 100644 index 0000000..5907915 Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-4 1.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-4-2.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-4-2.png new file mode 100644 index 0000000..336a079 Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-4-2.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-4.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-4.png new file mode 100644 index 0000000..5907915 Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1-4.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1.png new file mode 100644 index 0000000..f43a7b5 Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 1.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 2.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 2.png new file mode 100644 index 0000000..f43a7b5 Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Group 2.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Untitled-2 1.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Untitled-2 1.png deleted file mode 100644 index fb406ae..0000000 Binary files a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Untitled-2 1.png and /dev/null differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Untitled-2.png b/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Untitled-2.png deleted file mode 100644 index fb406ae..0000000 Binary files a/SpotifyLyricsInMenubar/Assets.xcassets/AppIcon.appiconset/Untitled-2.png and /dev/null differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/checkAgain.imageset/Contents.json b/SpotifyLyricsInMenubar/Assets.xcassets/checkAgain.imageset/Contents.json new file mode 100644 index 0000000..2fe3d58 --- /dev/null +++ b/SpotifyLyricsInMenubar/Assets.xcassets/checkAgain.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "checkAgain.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/checkAgain.imageset/checkAgain.png b/SpotifyLyricsInMenubar/Assets.xcassets/checkAgain.imageset/checkAgain.png new file mode 100644 index 0000000..886b2a5 Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/checkAgain.imageset/checkAgain.png differ diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/hi.imageset/Contents.json b/SpotifyLyricsInMenubar/Assets.xcassets/hi.imageset/Contents.json new file mode 100644 index 0000000..5655031 --- /dev/null +++ b/SpotifyLyricsInMenubar/Assets.xcassets/hi.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Frame 1-12 1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SpotifyLyricsInMenubar/Assets.xcassets/hi.imageset/Frame 1-12 1.png b/SpotifyLyricsInMenubar/Assets.xcassets/hi.imageset/Frame 1-12 1.png new file mode 100644 index 0000000..306deba Binary files /dev/null and b/SpotifyLyricsInMenubar/Assets.xcassets/hi.imageset/Frame 1-12 1.png differ diff --git a/SpotifyLyricsInMenubar/OnboardingWindow.swift b/SpotifyLyricsInMenubar/OnboardingWindow.swift new file mode 100644 index 0000000..4b84a2b --- /dev/null +++ b/SpotifyLyricsInMenubar/OnboardingWindow.swift @@ -0,0 +1,186 @@ +// +// OnboardingWindow.swift +// SpotifyLyricsInMenubar +// +// Created by Avi Wadhwa on 01/09/23. +// + +import SwiftUI +import SDWebImageSwiftUI + +struct OnboardingWindow: View { + var body: some View { + NavigationStack { + VStack(alignment: .center, spacing: 16) { + Text("Welcome to Spotify Lyrics in Menubar! 🎉") + .font(.largeTitle) + + Text("Here's a few steps to quickly setup Spotify Lyrics in your Menubar.") + .font(.title) + + Image("hi") + .resizable() + .frame(width: 250, height: 250, alignment: .center) + + StepView(title: "Make sure Spotify is installed on your mac", description: "Please download the [official Spotify Desktop client](https://www.spotify.com/in-en/download/mac/)") + + NavigationLink("Next", destination: FirstView()) + .buttonStyle(.borderedProminent) + Text("Email me at [aviwad@gmail.com](mailto:aviwad@gmail.com) for any support") + .font(.callout) + .padding(.top, 10) + } + } + } +} + +struct FirstView: View { + @Environment(\.dismiss) var dismiss + var body: some View { + VStack(alignment: .leading, spacing: 16) { + StepView(title: "2. Make sure you give Automation permission", description: "We need this permission to read the current song from Spotify, so that we can play the correct lyrics! Watch the following gif to correctly give permission.") + + HStack { + Spacer() + AnimatedImage(name: "spotifyPermissionMac.gif") + .resizable() + .frame(width: 531, height: 450) + Spacer() + } + + HStack { + Button("Back") { + dismiss() + } + Button("Open Automation Panel", action: { + let url = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Automation")! + NSWorkspace.shared.open(url) + }) + Spacer() + NavigationLink("Next", destination: SecondView()) + .buttonStyle(.borderedProminent) + } + + } + .padding(.horizontal, 20) + .navigationBarBackButtonHidden(true) + } +} + +struct SecondView: View { + @Environment(\.dismiss) var dismiss + var body: some View { + VStack(alignment: .leading, spacing: 16) { + StepView(title: "3. Make sure you disable crossfades", description: "Because of a glitch within Spotify, crossfades make the lyrics appear out-of-sync on occasion.") + + HStack { + Spacer() + AnimatedImage(name: "crossfade.gif", bundle: .main) + .resizable() + .aspectRatio(contentMode: .fit) + .frame(height: 430) + Spacer() + } + + HStack { + Button("Back") { + dismiss() + } + Button("Open Spotify", action: { + let url = URL(string: "spotify:")! + NSWorkspace.shared.open(url) + }) + Spacer() + Button("Done") { + UserDefaults().set(true, forKey: "hasOnboarded") + //UserDefaults.standard.bool(forKey: "hasOnboarded") = true + NSApplication.shared.keyWindow?.close() + } + .buttonStyle(.borderedProminent) + } + + } + .padding(.horizontal, 20) + .navigationBarBackButtonHidden(true) + } +} + +//struct OnboardingWindow2: View { +// var body: some View { +// ScrollView { +// VStack(alignment: .leading, spacing: 16) { +// Group { +// Text("Welcome to Spotify Lyrics in Menubar! 🎉") +// .font(.largeTitle) +// +// Text("Here's a few steps to quickly setup Spotify Lyrics in your Menubar.") +// .font(.title) +// } +// +// Group { +// StepView(title: "1. Make sure Spotify is installed on your mac", description: "Please download the [official Spotify Desktop client](https://www.spotify.com/in-en/download/mac/)") +// +// } +// +// Group { +// StepView(title: "2. Make sure you give Automation permission", description: "We need this permission to read the current song from Spotify, so that we can play the correct lyrics! Watch the following gif to correctly give permission.") +// +// AnimatedImage(name: "spotifyPermissionMac.gif") +// // Image("spotifyPermissionMac") +// .resizable() +// //.aspectRatio(contentMode: .fit) +// .frame(width: 531, height: 450) +// .border(.black) +// +// Button("Open Automation Panel", action: { +// let url = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Automation")! +// NSWorkspace.shared.open(url) +// }) +// +// } +// +// Group { +// StepView(title: "3. Make sure you disable crossfades", description: "Because of a glitch within Spotify, crossfades make the lyrics appear slow on occasion. I've informed them. Till then, the solution is to disable crossfades. Watch the following gif to correctly give permission.") +// +// AnimatedImage(name: "crossfade.gif", bundle: .main) +// .resizable() +// .aspectRatio(contentMode: .fit) +// .frame(height: 600) +// +// Button("Open Spotify", action: { +// let url = URL(string: "spotify:")! +// NSWorkspace.shared.open(url) +// }) +// } +// +// Group { +// StepView(title: "4. Check for Lyrics again", description: "If you're sure the playing song has lyrics but for some reason they aren't showing up, click the Check for lyrics again button to retry a download.") +// +// Image("checkAgain") +// .resizable() +// .aspectRatio(contentMode: .fit) +// .frame(height: 200) +// } +//// +// StepView(title: "If all else fails, please shoot me an email", description: "I'd be more than happy to help you. Please email me at [aviwad@gmail.com](mailto:aviwad@gmail.com).") +// } +// .padding(20) +// } +// } +//} + +struct StepView: View { + var title: String + var description: String + + var body: some View { + VStack(alignment: .leading, spacing: 8) { + Text(title) + .font(.title2) + .bold() + + Text(.init(description)) + .font(.title3) + } + } +} diff --git a/SpotifyLyricsInMenubar/SpotifyLyricsInMenubarApp.swift b/SpotifyLyricsInMenubar/SpotifyLyricsInMenubarApp.swift index 369b0a1..52f44a8 100644 --- a/SpotifyLyricsInMenubar/SpotifyLyricsInMenubarApp.swift +++ b/SpotifyLyricsInMenubar/SpotifyLyricsInMenubarApp.swift @@ -11,6 +11,8 @@ import ServiceManagement struct SpotifyLyricsInMenubarApp: App { @StateObject var viewmodel = viewModel.shared @AppStorage("launchOnLogin") var launchOnLogin: Bool = false + @AppStorage("hasOnboarded") var hasOnboarded: Bool = false + @Environment(\.openWindow) var openWindow var body: some Scene { MenuBarExtra(content: { Text(songTitle) @@ -41,17 +43,27 @@ struct SpotifyLyricsInMenubarApp: App { } } Divider() - Button("Help / Install Guide (Easy 3 Steps)") { - NSWorkspace.shared.open(URL(string: "https://aviwadhwa.com/SpotifyLyricsInMenubar")!) + Button("Help / Install Guide") { + NSApplication.shared.activate(ignoringOtherApps: true) + openWindow(id: "onboarding") }.keyboardShortcut("h") Button("Check for Updates…", action: {viewmodel.updaterController.checkForUpdates(nil)}) .disabled(!viewmodel.canCheckForUpdates) + .keyboardShortcut("u") Button("Quit") { NSApplication.shared.terminate(nil) }.keyboardShortcut("q") } , label: { Text(menuBarTitle) .onAppear { + guard hasOnboarded else { + NSApplication.shared.activate(ignoringOtherApps: true) + openWindow(id: "onboarding") + return + } + guard let isRunning = viewmodel.spotifyScript?.isRunning, isRunning else { + return + } print("Application just started. lets check whats playing") if viewmodel.spotifyScript?.playerState == .playing { viewmodel.isPlaying = true @@ -104,6 +116,10 @@ struct SpotifyLyricsInMenubarApp: App { } } }) + Window("Lyrics in Menubar: Onboarding", id: "onboarding") { // << here !! + OnboardingWindow().frame(minWidth: 700, maxWidth: 700, minHeight: 600, maxHeight: 600, alignment: .center) + .preferredColorScheme(.dark) + }.windowResizability(.contentSize) } var songTitle: String { @@ -114,12 +130,15 @@ struct SpotifyLyricsInMenubarApp: App { } var menuBarTitle: String { + guard hasOnboarded else { + return "Please Complete Onboarding Process (Click Help)" + } if viewmodel.isPlaying, let currentlyPlayingLyricsIndex = viewmodel.currentlyPlayingLyricsIndex { return viewmodel.currentlyPlayingLyrics[currentlyPlayingLyricsIndex].words.trunc(length: 50) } else if let currentlyPlayingName = viewmodel.currentlyPlayingName { return "Now \(viewmodel.isPlaying ? "Playing" : "Paused"): \(currentlyPlayingName.trunc(length: 50))" } - return "Nothing Playing (Open Spotify!)" + return "Nothing Playing on Spotify" } } diff --git a/crossfade.gif b/crossfade.gif new file mode 100644 index 0000000..83d767d Binary files /dev/null and b/crossfade.gif differ diff --git a/spotifyPermissionMac.gif b/spotifyPermissionMac.gif new file mode 100644 index 0000000..6af0ad3 Binary files /dev/null and b/spotifyPermissionMac.gif differ