mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 06:49:12 +00:00
improved app icon getting - now gets the actual app icon
This commit is contained in:
@@ -12,6 +12,6 @@ TEAM_ID = 8JGND254B7
|
|||||||
BUNDLE_ID = com.neon443.NearFuture
|
BUNDLE_ID = com.neon443.NearFuture
|
||||||
BUNDLE_ID_WIDGETS = com.neon443.NearFuture.widgets
|
BUNDLE_ID_WIDGETS = com.neon443.NearFuture.widgets
|
||||||
GROUP_ID = group.NearFuture
|
GROUP_ID = group.NearFuture
|
||||||
VERSION = 3.3.0
|
VERSION = 3.3.1
|
||||||
NAME = Near Future
|
NAME = Near Future
|
||||||
BUILD_NUMBER = 0
|
BUILD_NUMBER = 0
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
A9111B1B2DCA549600D4F793 /* NearFutureIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = A9111B1A2DCA549600D4F793 /* NearFutureIcon.png */; };
|
||||||
|
A9111B1C2DCA549600D4F793 /* NearFutureIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = A9111B1A2DCA549600D4F793 /* NearFutureIcon.png */; };
|
||||||
A920C2882D24011400E4F9B1 /* NearFutureApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C2872D24011400E4F9B1 /* NearFutureApp.swift */; };
|
A920C2882D24011400E4F9B1 /* NearFutureApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C2872D24011400E4F9B1 /* NearFutureApp.swift */; };
|
||||||
A920C28C2D24011400E4F9B1 /* Item.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C28B2D24011400E4F9B1 /* Item.swift */; };
|
A920C28C2D24011400E4F9B1 /* Item.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C28B2D24011400E4F9B1 /* Item.swift */; };
|
||||||
A920C28E2D24011A00E4F9B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A920C28D2D24011A00E4F9B1 /* Assets.xcassets */; };
|
A920C28E2D24011A00E4F9B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A920C28D2D24011A00E4F9B1 /* Assets.xcassets */; };
|
||||||
@@ -67,6 +69,7 @@
|
|||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
A90FDE222DC0D4310012790C /* Config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = "<group>"; };
|
A90FDE222DC0D4310012790C /* Config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = "<group>"; };
|
||||||
|
A9111B1A2DCA549600D4F793 /* NearFutureIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = NearFutureIcon.png; path = NearFuture/Assets.xcassets/AppIcon.appiconset/NearFutureIcon.png; sourceTree = SOURCE_ROOT; };
|
||||||
A920C2842D24011400E4F9B1 /* NearFuture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NearFuture.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
A920C2842D24011400E4F9B1 /* NearFuture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NearFuture.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
A920C2872D24011400E4F9B1 /* NearFutureApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NearFutureApp.swift; sourceTree = "<group>"; };
|
A920C2872D24011400E4F9B1 /* NearFutureApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NearFutureApp.swift; sourceTree = "<group>"; };
|
||||||
A920C28B2D24011400E4F9B1 /* Item.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Item.swift; sourceTree = "<group>"; };
|
A920C28B2D24011400E4F9B1 /* Item.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Item.swift; sourceTree = "<group>"; };
|
||||||
@@ -135,10 +138,19 @@
|
|||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
|
A9111B192DCA548800D4F793 /* Resources */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
A9111B1A2DCA549600D4F793 /* NearFutureIcon.png */,
|
||||||
|
);
|
||||||
|
path = Resources;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
A920C27B2D24011300E4F9B1 = {
|
A920C27B2D24011300E4F9B1 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
A90FDE222DC0D4310012790C /* Config.xcconfig */,
|
A90FDE222DC0D4310012790C /* Config.xcconfig */,
|
||||||
|
A9111B192DCA548800D4F793 /* Resources */,
|
||||||
A920C2862D24011400E4F9B1 /* NearFuture */,
|
A920C2862D24011400E4F9B1 /* NearFuture */,
|
||||||
A979F6082D270AF00094C0B3 /* NearFutureWidgets */,
|
A979F6082D270AF00094C0B3 /* NearFutureWidgets */,
|
||||||
A980FC382D93FB2B006A778F /* NearFutureTests */,
|
A980FC382D93FB2B006A778F /* NearFutureTests */,
|
||||||
@@ -341,6 +353,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
A920C2922D24011A00E4F9B1 /* Preview Assets.xcassets in Resources */,
|
A920C2922D24011A00E4F9B1 /* Preview Assets.xcassets in Resources */,
|
||||||
|
A9111B1C2DCA549600D4F793 /* NearFutureIcon.png in Resources */,
|
||||||
A920C28E2D24011A00E4F9B1 /* Assets.xcassets in Resources */,
|
A920C28E2D24011A00E4F9B1 /* Assets.xcassets in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -350,6 +363,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
A979F6102D270AF90094C0B3 /* Assets.xcassets in Resources */,
|
A979F6102D270AF90094C0B3 /* Assets.xcassets in Resources */,
|
||||||
|
A9111B1B2DCA549600D4F793 /* NearFutureIcon.png in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -582,10 +596,10 @@
|
|||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID)";
|
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID)";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
REGISTER_APP_GROUPS = NO;
|
REGISTER_APP_GROUPS = YES;
|
||||||
SDKROOT = auto;
|
SDKROOT = auto;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = YES;
|
||||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
|
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
|
||||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES;
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
@@ -630,10 +644,10 @@
|
|||||||
OTHER_LDFLAGS = "";
|
OTHER_LDFLAGS = "";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID)";
|
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID)";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
REGISTER_APP_GROUPS = NO;
|
REGISTER_APP_GROUPS = YES;
|
||||||
SDKROOT = auto;
|
SDKROOT = auto;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = YES;
|
||||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
|
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
|
||||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES;
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
@@ -662,6 +676,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 14;
|
||||||
MARKETING_VERSION = "$(VERSION)";
|
MARKETING_VERSION = "$(VERSION)";
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"-Xlinker",
|
"-Xlinker",
|
||||||
@@ -669,10 +684,11 @@
|
|||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_WIDGETS)";
|
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_WIDGETS)";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
REGISTER_APP_GROUPS = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = YES;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
@@ -700,13 +716,15 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 14;
|
||||||
MARKETING_VERSION = "$(VERSION)";
|
MARKETING_VERSION = "$(VERSION)";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_WIDGETS)";
|
PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID_WIDGETS)";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
REGISTER_APP_GROUPS = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = YES;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
|||||||
@@ -104,7 +104,6 @@
|
|||||||
savedToolIdentifier = ""
|
savedToolIdentifier = ""
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
debugDocumentVersioning = "YES"
|
debugDocumentVersioning = "YES"
|
||||||
askForAppToLaunch = "Yes"
|
|
||||||
launchAutomaticallySubstyle = "2">
|
launchAutomaticallySubstyle = "2">
|
||||||
<BuildableProductRunnable
|
<BuildableProductRunnable
|
||||||
runnableDebuggingMode = "0">
|
runnableDebuggingMode = "0">
|
||||||
|
|||||||
@@ -130,13 +130,11 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
Section("About") {
|
Section("About") {
|
||||||
VStack {
|
VStack {
|
||||||
if let image = UIImage(named: getAppIcon()) {
|
Image(uiImage: #imageLiteral(resourceName: "NearFutureIcon.png"))
|
||||||
Image(uiImage: image)
|
.resizable()
|
||||||
.resizable()
|
.scaledToFit()
|
||||||
.scaledToFit()
|
.frame(width: 100)
|
||||||
.frame(width: 100)
|
.clipShape(RoundedRectangle(cornerRadius: 25))
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 25))
|
|
||||||
}
|
|
||||||
Text("Near Future")
|
Text("Near Future")
|
||||||
.bold()
|
.bold()
|
||||||
.monospaced()
|
.monospaced()
|
||||||
@@ -168,17 +166,6 @@ struct SettingsView: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getAppIcon() -> String {
|
|
||||||
let bundle = Bundle.main
|
|
||||||
guard let icons = bundle.object(forInfoDictionaryKey: "CFBundleIcons") as? [String: Any],
|
|
||||||
let primaryIcon = icons["CFBundlePrimaryIcon"] as? [String: Any],
|
|
||||||
let iconFiles = primaryIcon["CFBundleIconFiles"] as? [String],
|
|
||||||
let iconFileName = iconFiles.last else {
|
|
||||||
fatalError("hell na where ur icon")
|
|
||||||
}
|
|
||||||
return iconFileName
|
|
||||||
}
|
|
||||||
|
|
||||||
func getVersion() -> String {
|
func getVersion() -> String {
|
||||||
guard let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] else {
|
guard let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] else {
|
||||||
fatalError("no bundle id wtf lol")
|
fatalError("no bundle id wtf lol")
|
||||||
|
|||||||
@@ -5,76 +5,76 @@
|
|||||||
// Created by Nihaal Sharma on 02/01/2025.
|
// Created by Nihaal Sharma on 02/01/2025.
|
||||||
//
|
//
|
||||||
|
|
||||||
import ActivityKit
|
//import ActivityKit
|
||||||
import WidgetKit
|
import WidgetKit
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct NearFutureWidgetsAttributes: ActivityAttributes {
|
//struct NearFutureWidgetsAttributes: ActivityAttributes {
|
||||||
public struct ContentState: Codable, Hashable {
|
// public struct ContentState: Codable, Hashable {
|
||||||
// Dynamic stateful properties about your activity go here!
|
// // Dynamic stateful properties about your activity go here!
|
||||||
var emoji: String
|
// var emoji: String
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
// // Fixed non-changing properties about your activity go here!
|
||||||
|
// var name: String
|
||||||
|
//}
|
||||||
|
|
||||||
// Fixed non-changing properties about your activity go here!
|
//struct NearFutureWidgetsLiveActivity: Widget {
|
||||||
var name: String
|
// var body: some WidgetConfiguration {
|
||||||
}
|
// ActivityConfiguration(for: NearFutureWidgetsAttributes.self) { context in
|
||||||
|
// // Lock screen/banner UI goes here
|
||||||
|
// VStack {
|
||||||
|
// Text("Hello \(context.state.emoji)")
|
||||||
|
// }
|
||||||
|
// .activityBackgroundTint(Color.cyan)
|
||||||
|
// .activitySystemActionForegroundColor(Color.black)
|
||||||
|
//
|
||||||
|
// } dynamicIsland: { context in
|
||||||
|
// DynamicIsland {
|
||||||
|
// // Expanded UI goes here. Compose the expanded UI through
|
||||||
|
// // various regions, like leading/trailing/center/bottom
|
||||||
|
// DynamicIslandExpandedRegion(.leading) {
|
||||||
|
// Text("Leading")
|
||||||
|
// }
|
||||||
|
// DynamicIslandExpandedRegion(.trailing) {
|
||||||
|
// Text("Trailing")
|
||||||
|
// }
|
||||||
|
// DynamicIslandExpandedRegion(.bottom) {
|
||||||
|
// Text("Bottom \(context.state.emoji)")
|
||||||
|
// // more content
|
||||||
|
// }
|
||||||
|
// } compactLeading: {
|
||||||
|
// Text("L")
|
||||||
|
// } compactTrailing: {
|
||||||
|
// Text("T \(context.state.emoji)")
|
||||||
|
// } minimal: {
|
||||||
|
// Text(context.state.emoji)
|
||||||
|
// }
|
||||||
|
// .widgetURL(URL(string: "http://www.apple.com"))
|
||||||
|
// .keylineTint(Color.red)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//extension NearFutureWidgetsAttributes {
|
||||||
|
// fileprivate static var preview: NearFutureWidgetsAttributes {
|
||||||
|
// NearFutureWidgetsAttributes(name: "World")
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
struct NearFutureWidgetsLiveActivity: Widget {
|
//extension NearFutureWidgetsAttributes.ContentState {
|
||||||
var body: some WidgetConfiguration {
|
// fileprivate static var smiley: NearFutureWidgetsAttributes.ContentState {
|
||||||
ActivityConfiguration(for: NearFutureWidgetsAttributes.self) { context in
|
// NearFutureWidgetsAttributes.ContentState(emoji: "😀")
|
||||||
// Lock screen/banner UI goes here
|
// }
|
||||||
VStack {
|
//
|
||||||
Text("Hello \(context.state.emoji)")
|
// fileprivate static var starEyes: NearFutureWidgetsAttributes.ContentState {
|
||||||
}
|
// NearFutureWidgetsAttributes.ContentState(emoji: "🤩")
|
||||||
.activityBackgroundTint(Color.cyan)
|
// }
|
||||||
.activitySystemActionForegroundColor(Color.black)
|
//}
|
||||||
|
//
|
||||||
} dynamicIsland: { context in
|
//#Preview("Notification", as: .content, using: NearFutureWidgetsAttributes.preview) {
|
||||||
DynamicIsland {
|
// NearFutureWidgetsLiveActivity()
|
||||||
// Expanded UI goes here. Compose the expanded UI through
|
//} contentStates: {
|
||||||
// various regions, like leading/trailing/center/bottom
|
// NearFutureWidgetsAttributes.ContentState.smiley
|
||||||
DynamicIslandExpandedRegion(.leading) {
|
// NearFutureWidgetsAttributes.ContentState.starEyes
|
||||||
Text("Leading")
|
//}
|
||||||
}
|
|
||||||
DynamicIslandExpandedRegion(.trailing) {
|
|
||||||
Text("Trailing")
|
|
||||||
}
|
|
||||||
DynamicIslandExpandedRegion(.bottom) {
|
|
||||||
Text("Bottom \(context.state.emoji)")
|
|
||||||
// more content
|
|
||||||
}
|
|
||||||
} compactLeading: {
|
|
||||||
Text("L")
|
|
||||||
} compactTrailing: {
|
|
||||||
Text("T \(context.state.emoji)")
|
|
||||||
} minimal: {
|
|
||||||
Text(context.state.emoji)
|
|
||||||
}
|
|
||||||
.widgetURL(URL(string: "http://www.apple.com"))
|
|
||||||
.keylineTint(Color.red)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension NearFutureWidgetsAttributes {
|
|
||||||
fileprivate static var preview: NearFutureWidgetsAttributes {
|
|
||||||
NearFutureWidgetsAttributes(name: "World")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension NearFutureWidgetsAttributes.ContentState {
|
|
||||||
fileprivate static var smiley: NearFutureWidgetsAttributes.ContentState {
|
|
||||||
NearFutureWidgetsAttributes.ContentState(emoji: "😀")
|
|
||||||
}
|
|
||||||
|
|
||||||
fileprivate static var starEyes: NearFutureWidgetsAttributes.ContentState {
|
|
||||||
NearFutureWidgetsAttributes.ContentState(emoji: "🤩")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Preview("Notification", as: .content, using: NearFutureWidgetsAttributes.preview) {
|
|
||||||
NearFutureWidgetsLiveActivity()
|
|
||||||
} contentStates: {
|
|
||||||
NearFutureWidgetsAttributes.ContentState.smiley
|
|
||||||
NearFutureWidgetsAttributes.ContentState.starEyes
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user