fix update api

This commit is contained in:
leminlimez committed 2025-08-29 17:29:48 -04:00
1 parent 454c63d2ca
commit e288b1f2e7
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -272,7 +272,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7; CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\"";
DEVELOPMENT_TEAM = 2P4CP47H76; DEVELOPMENT_TEAM = 2P4CP47H76;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
@@ -304,7 +304,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 7; CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"Pocket Poster/Preview Content\"";
DEVELOPMENT_TEAM = 2P4CP47H76; DEVELOPMENT_TEAM = 2P4CP47H76;
ENABLE_PREVIEWS = YES; ENABLE_PREVIEWS = YES;
+1 -1
View File
@@ -33,7 +33,7 @@ struct Pocket_PosterApp: App {
// check for update // check for update
if !checkedForUpdate { if !checkedForUpdate {
checkedForUpdate = true checkedForUpdate = true
if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String, let url = URL(string: "https://api.github.com/leminlimez/Pocket-Poster/releases/latest") { if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String, let url = URL(string: "https://api.github.com/repos/leminlimez/Pocket-Poster/releases/latest") {
let task = URLSession.shared.dataTask(with: url) {(data, response, error) in let task = URLSession.shared.dataTask(with: url) {(data, response, error) in
guard let data = data else { return } guard let data = data else { return }