Post

Replies

Boosts

Views

Activity

Reply to App crash!!!
You should contact Meta, i.e. the people who develop WhatsApp. These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. We are not Meta, we are just random members of the public who write apps for Apple's platforms.
Topic: Community SubTopic: Apple Developers Tags:
Jan ’25
Reply to Skadnetwork
You were literally told to report this via the Feedback Assistant, but you chose to post it to the Developer Forums? Please post it here instead: https://feedbackassistant.apple.com/ and remove all the irrelevant cruft that looks like it was a reply in an email.
Jan ’25
Reply to macOS dark mode while window is in background
Isn't there a method in the app delegate in which you should set this up, so trait change or something? Then fire off a notification to make the change? Also, I think you can shorten and simplify this code a little (written in a text editor and may not be 100% correct): NSAppearance *appearance = NSApp.mainWindow.effectiveAppearance; NSAppearanceName basicAppearance = [appearance bestMatchFromAppearancesWithNames:@[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]]; if([basicAppearance isEqualToString:NSAppearanceNameDarkAqua]){ theme = "Adwaita:dark"; dark_mode = TRUE; } switch(appearance.name) { case NSAppearanceNameDarkAqua: case NSAppearanceNameVibrantDark: theme = "Adwaita:dark"; dark_mode = TRUE; break; case NSAppearanceNameAccessibilityHighContrastAqua: theme = "HighContrast"; break; case NSAppearanceNameAccessibilityHighContrastDarkAqua: case NSAppearanceNameAccessibilityHighContrastVibrantDark: theme = "HighContrast:dark"; dark_mode = TRUE; break; default: theme = "???"; }
Topic: UI Frameworks SubTopic: AppKit Tags:
Jan ’25
Reply to VStack Alignment Issue
I think you're misunderstanding what the alignment parameter does in a VStack. It aligns the subviews in the stack, not the stack itself. Here's a visual example: import SwiftUI struct ContentView: View { var body: some View { VStack(alignment: .leading) { Image(systemName: "arrow.2.circlepath") .colorInvert() .font(.system(size: 30)) .border(Color.yellow) Text("alignment: .leading") .font(.system(size: 20)) .foregroundStyle(Color.white) .border(Color.yellow) } .frame(maxWidth: .infinity) .background(Color.black) VStack(alignment: .trailing) { Image(systemName: "arrow.2.circlepath") .colorInvert() .font(.system(size: 30)) .border(Color.yellow) Text("alignment: .trailing") .font(.system(size: 20)) .foregroundStyle(Color.white) .border(Color.yellow) } .frame(maxWidth: .infinity) .background(Color.green) HStack { VStack(alignment: .leading) { Image(systemName: "arrow.2.circlepath") .colorInvert() .font(.system(size: 30)) .border(Color.yellow) Text("alignment: .leading in an HStack") .font(.system(size: 20)) .foregroundStyle(Color.white) .border(Color.yellow) } Spacer() // <<-- Remove this line and see the difference } .frame(maxWidth: .infinity) .background(Color.blue) } } #Preview { ContentView() } In the blue section, where I've said to remove the line with the Spacer() this is to show you the effect of using an HStack, which is what I think you want. The HStack simply lines up views horizontally, and when you add in a Spacer() it pushes the content along, so this pushes the text to the left: |SOME TEXT HERE<---Spacer()--->| This pushes the text to the right: |<---Spacer()--->SOME TEXT HERE| and this spreads it out: |SOME<---Spacer()--->TEXT<---Spacer()--->HERE|
Topic: UI Frameworks SubTopic: SwiftUI
Jan ’25
Reply to App crash!!!
You should contact Meta, i.e. the people who develop WhatsApp. These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. We are not Meta, we are just random members of the public who write apps for Apple's platforms.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Skadnetwork
You were literally told to report this via the Feedback Assistant, but you chose to post it to the Developer Forums? Please post it here instead: https://feedbackassistant.apple.com/ and remove all the irrelevant cruft that looks like it was a reply in an email.
Replies
Boosts
Views
Activity
Jan ’25
Reply to macOS dark mode while window is in background
Isn't there a method in the app delegate in which you should set this up, so trait change or something? Then fire off a notification to make the change? Also, I think you can shorten and simplify this code a little (written in a text editor and may not be 100% correct): NSAppearance *appearance = NSApp.mainWindow.effectiveAppearance; NSAppearanceName basicAppearance = [appearance bestMatchFromAppearancesWithNames:@[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]]; if([basicAppearance isEqualToString:NSAppearanceNameDarkAqua]){ theme = "Adwaita:dark"; dark_mode = TRUE; } switch(appearance.name) { case NSAppearanceNameDarkAqua: case NSAppearanceNameVibrantDark: theme = "Adwaita:dark"; dark_mode = TRUE; break; case NSAppearanceNameAccessibilityHighContrastAqua: theme = "HighContrast"; break; case NSAppearanceNameAccessibilityHighContrastDarkAqua: case NSAppearanceNameAccessibilityHighContrastVibrantDark: theme = "HighContrast:dark"; dark_mode = TRUE; break; default: theme = "???"; }
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to VStack Alignment Issue
I think you're misunderstanding what the alignment parameter does in a VStack. It aligns the subviews in the stack, not the stack itself. Here's a visual example: import SwiftUI struct ContentView: View { var body: some View { VStack(alignment: .leading) { Image(systemName: "arrow.2.circlepath") .colorInvert() .font(.system(size: 30)) .border(Color.yellow) Text("alignment: .leading") .font(.system(size: 20)) .foregroundStyle(Color.white) .border(Color.yellow) } .frame(maxWidth: .infinity) .background(Color.black) VStack(alignment: .trailing) { Image(systemName: "arrow.2.circlepath") .colorInvert() .font(.system(size: 30)) .border(Color.yellow) Text("alignment: .trailing") .font(.system(size: 20)) .foregroundStyle(Color.white) .border(Color.yellow) } .frame(maxWidth: .infinity) .background(Color.green) HStack { VStack(alignment: .leading) { Image(systemName: "arrow.2.circlepath") .colorInvert() .font(.system(size: 30)) .border(Color.yellow) Text("alignment: .leading in an HStack") .font(.system(size: 20)) .foregroundStyle(Color.white) .border(Color.yellow) } Spacer() // <<-- Remove this line and see the difference } .frame(maxWidth: .infinity) .background(Color.blue) } } #Preview { ContentView() } In the blue section, where I've said to remove the line with the Spacer() this is to show you the effect of using an HStack, which is what I think you want. The HStack simply lines up views horizontally, and when you add in a Spacer() it pushes the content along, so this pushes the text to the left: |SOME TEXT HERE<---Spacer()--->| This pushes the text to the right: |<---Spacer()--->SOME TEXT HERE| and this spreads it out: |SOME<---Spacer()--->TEXT<---Spacer()--->HERE|
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jan ’25
Reply to imessage group chat confusion
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Replies
Boosts
Views
Activity
Jan ’25