Skip to content

Commit 88f5f6b

Browse files
committed
Improve UI and Refactor Weather App Code
• Updated ContentView.swift to adjust layout, reduce bottom padding, and fix text styling. • Changed locationName display to uppercase with .textCase(.uppercase). • Reduced bottom padding and set fixed max height in weatherInfoView to align content and prevent shifting. • Refined height calculation to make layout more compact. • Modified AppDelegate.swift for better code organization: • Extracted setup functions (setupStatusItem, setupPopoverContent, and bindWeatherUpdates) for clarity. • Improved readability and consistency with multiline formatting in function parameters. • Updated WeatherManager.swift: • Changed checkLocationAuthorization method from private to internal for accessibility. • Added showLocationSettingsAlert to notify users to enable location permissions in System Preferences. • Adjusted fetchWeatherAt method for cleaner code. • Revised Info.plist: • Added descriptions for NSLocationUsageDescription and NSLocationAlwaysUsageDescription to clarify location permissions for users. • Temporarily removed LSUIElement and LSBackgroundOnly for testing visibility.
1 parent 88a877d commit 88f5f6b

File tree

5 files changed

+182
-147
lines changed

5 files changed

+182
-147
lines changed

Moti/Moti.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,8 @@
444444
"@executable_path/../Frameworks",
445445
);
446446
MACOSX_DEPLOYMENT_TARGET = 14.0;
447-
MARKETING_VERSION = 1.0.2;
448-
PRODUCT_BUNDLE_IDENTIFIER = com.peterdsp.moti;
447+
MARKETING_VERSION = 1.0.3;
448+
PRODUCT_BUNDLE_IDENTIFIER = dev.peterdsp.moti;
449449
PRODUCT_NAME = "$(TARGET_NAME)";
450450
SWIFT_EMIT_LOC_STRINGS = YES;
451451
SWIFT_VERSION = 5.0;
@@ -477,8 +477,8 @@
477477
"@executable_path/../Frameworks",
478478
);
479479
MACOSX_DEPLOYMENT_TARGET = 14.0;
480-
MARKETING_VERSION = 1.0.2;
481-
PRODUCT_BUNDLE_IDENTIFIER = com.peterdsp.moti;
480+
MARKETING_VERSION = 1.0.3;
481+
PRODUCT_BUNDLE_IDENTIFIER = dev.peterdsp.moti;
482482
PRODUCT_NAME = "$(TARGET_NAME)";
483483
SWIFT_EMIT_LOC_STRINGS = YES;
484484
SWIFT_VERSION = 5.0;

Moti/Moti/Info.plist

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@
99
<key>CFBundleName</key>
1010
<string>Tempethéra</string>
1111
<key>CFBundleVersion</key>
12-
<string>1.0.0</string>
13-
<key>LSUIElement</key>
12+
<string>1.0.3</string>
13+
14+
<!-- Remove LSUIElement and LSBackgroundOnly for testing -->
15+
<!-- <key>LSUIElement</key>
1416
<string>1</string>
15-
<key>NSLocationWhenInUseUsageDescription</key>
17+
<key>LSBackgroundOnly</key>
18+
<string>1</string> -->
19+
20+
<!-- Add NSLocationUsageDescription -->
21+
<key>NSLocationUsageDescription</key>
1622
<string>Tempethéra requires access to your location to provide accurate weather information.</string>
17-
<key>NSLocationAlwaysUsageDescription</key>
18-
<string>Tempethéra requires access to your location even when the app is in the background.</string>
23+
1924
<key>NSAppTransportSecurity</key>
2025
<dict>
2126
<key>NSExceptionDomains</key>
@@ -31,9 +36,5 @@
3136
</dict>
3237
</dict>
3338
</dict>
34-
<key>LSUIElement</key>
35-
<string>1</string>
36-
<key>LSBackgroundOnly</key>
37-
<string>1</string>
3839
</dict>
3940
</plist>

0 commit comments

Comments
 (0)