Post

Replies

Boosts

Views

Activity

Reply to SF Symbol
I've had a look and can't find it either, but it might not be an SF Symbol at all. It may just be an icon they've created. If you want to create it yourself, start with circle.dotted, fill in one side of the circle, and add a semicircle.
Topic: Design SubTopic: General Tags:
May ’24
Reply to Swift: Can I change views without clicking on a link.
Okay, why do you need a NavigationStack? What's the layout of your app? I have an app that does this check in the main scene: var body: some Scene { WindowGroup { if(UIDevice.current.userInterfaceIdiom == .pad) { TabletView() } else { PhoneView() } } So, if the device in use is an iPad, the TabletView is shown. Otherwise, the PhoneView is shown. You can tailor this for your own needs. For example, if you want to do this in your ContentView you could use something like this: struct ContentView: View { var body: some View { #if os(iOS) IOSView() #elseif os(OSX) OSXView() #else FallbackView() #endif } } Note that I've removed your myOS var altogether since you don't need it if you do the above.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to MACMAIL V10 is considered as an absolute nightmare - need to find a way to revert mail client to V3 in all future updates
Two things here: These are the Developer Forums where third-party developers get together to figure out issues in their code, or to ask how to implement something. While there are one or two actual Apple employees here, they're not here to handle product issues like yours. Secondly, please don't put random tags on your posts. Your 'complaint' has nothing to do with Foundation or APFs, and when others search for those tags they'll get your unrelated post. Please think about what you're doing before you do it. Try the Apple Support Forums instead. Thanks.
Topic: App & System Services SubTopic: Hardware Tags:
May ’24
Reply to Question about textfield
I'd be wary of comparing objects in that manner. I think maybe TextField has a tag property? You could set A's tag to 0, B's to 1 etc. then check in the function for the value of textfield's tag. Might work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to Why can't I get text to appear at top of view.
It looks like your Spacer() should be inside the VStack, after the Text. You're currently telling SwiftUI to display a background image, then on top of that (because of the ZStack), display Text inside a VStack, but your Text is the only thing in the VStack so it just sits there in the centre. Then you're saying have a Spacer(), but this is inside the ZStack so it isn't pushing the Text up, it's just layered on top of the VStack. The way to fix it is to put the Spacer() in the VStack. You can see this clearly if you change your Spacer() to something like: Rectangle() .fill(Color.green) .frame(width: 100, height: 50) Let's see what it does in the different formats: ZStack { VStack { Text("What would you like to do?") .font(.title) .fontWeight(.bold) } .padding() // -- Outside of the VStack, as you currently have it: Rectangle() .fill(Color.green) .frame(width: 100, height: 50) // Spacer() } So, here, your Spacer() (the Rectangle()) is where your current Spacer() is, and it produces this: Now, moving the Spacer/Rectangle inside the VStack: ZStack { VStack { Text("What would you like to do?") .font(.title) .fontWeight(.bold) // -- Inside the VStack: Rectangle() .fill(Color.green) .frame(width: 100, height: 50) // Spacer() } .padding() } And it looks like this: So, using a Spacer() inside the VStack does this:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to Mapkit SwiftUI iOS17
The error is telling you that there is no such form of Map that matches what you've entered. If you remove showsUserLocation: true it works, because that form of Map() is valid. If you want to show the user's location you need to use UserAnnotation(), i.e.; Map(position: $mapPosition, interactionModes: .all) { UserAnnotation() // <<-- Use this ForEach(features) { feature in Marker(coordinate: feature.coordinate) { FeatureAnnotation(feature: feature) } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to Is it possible to change bundle id of Watch kit app?
I have a fully Swift & SwiftUI-based app with the following targets: Main app = com.abc.appname Watch app = com.abc.appname.watchkitapp So I'm not sure why your "Apps are not connected unless I changed it to com.x.watchkitapp -> com.x.watch". Are you sure you've only tried to change the one bundle id? Have a look through all your targets' Build Settings and make sure everything is in order there. Xcode's settings and how to get everything to link together is sometimes akin to magic. I had massive issues with IntentsExtensions until Apple moved to AppIntents.
Topic: App & System Services SubTopic: General Tags:
May ’24
Reply to SF Symbol
I've had a look and can't find it either, but it might not be an SF Symbol at all. It may just be an icon they've created. If you want to create it yourself, start with circle.dotted, fill in one side of the circle, and add a semicircle.
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Swift: Can I change views without clicking on a link.
Okay, why do you need a NavigationStack? What's the layout of your app? I have an app that does this check in the main scene: var body: some Scene { WindowGroup { if(UIDevice.current.userInterfaceIdiom == .pad) { TabletView() } else { PhoneView() } } So, if the device in use is an iPad, the TabletView is shown. Otherwise, the PhoneView is shown. You can tailor this for your own needs. For example, if you want to do this in your ContentView you could use something like this: struct ContentView: View { var body: some View { #if os(iOS) IOSView() #elseif os(OSX) OSXView() #else FallbackView() #endif } } Note that I've removed your myOS var altogether since you don't need it if you do the above.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to How can I disable Camera Reaction Effects on macOS
Then this is more of a bug than anything we can do here to help you. Raise a Feedback report.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to "Multiple Commands Produce Info.plist" error in Xcode 15
Are you actually entering $(SRCROOT)/Main Project Group/Info.plist? If so, that's wrong. The parentheses should be curly braces, i.e.: ${SRCROOT}/Main Project Group/Info.plist.
Replies
Boosts
Views
Activity
May ’24
Reply to MACMAIL V10 is considered as an absolute nightmare - need to find a way to revert mail client to V3 in all future updates
Two things here: These are the Developer Forums where third-party developers get together to figure out issues in their code, or to ask how to implement something. While there are one or two actual Apple employees here, they're not here to handle product issues like yours. Secondly, please don't put random tags on your posts. Your 'complaint' has nothing to do with Foundation or APFs, and when others search for those tags they'll get your unrelated post. Please think about what you're doing before you do it. Try the Apple Support Forums instead. Thanks.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Clarification Needed on Rejection of Astrology App While Similar Apps Are Approved
No. These are the Developer Forums where developers get together to figure out how to fix a bug in their code, or ask how to do something. We aren't the App Review team; we're just normal third-party developers like you. Have you thought about releasing your app again?
Replies
Boosts
Views
Activity
May ’24
Reply to SwiftUI How can dertine what device I am running
UIDevice.current.userInterfaceIdiom == .pad means an iPad, .phone means an iPhone. You can use UIDevice.current.systemName to get the operating system in use. See here.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to How can I disable Camera Reaction Effects on macOS
Does this page help you? The second paragraph tells you how to turn them on or off.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Question about textfield
I'd be wary of comparing objects in that manner. I think maybe TextField has a tag property? You could set A's tag to 0, B's to 1 etc. then check in the function for the value of textfield's tag. Might work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to What does EXC_CRASH (SIGILL) mean?
SIGILL is a signal Illegal instruction (it's there in the crash). To me, it looks like there's some issue with your data store. I would debug it and maybe print out the location of your data store, and see whether it's accessible.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Why can't I get text to appear at top of view.
It looks like your Spacer() should be inside the VStack, after the Text. You're currently telling SwiftUI to display a background image, then on top of that (because of the ZStack), display Text inside a VStack, but your Text is the only thing in the VStack so it just sits there in the centre. Then you're saying have a Spacer(), but this is inside the ZStack so it isn't pushing the Text up, it's just layered on top of the VStack. The way to fix it is to put the Spacer() in the VStack. You can see this clearly if you change your Spacer() to something like: Rectangle() .fill(Color.green) .frame(width: 100, height: 50) Let's see what it does in the different formats: ZStack { VStack { Text("What would you like to do?") .font(.title) .fontWeight(.bold) } .padding() // -- Outside of the VStack, as you currently have it: Rectangle() .fill(Color.green) .frame(width: 100, height: 50) // Spacer() } So, here, your Spacer() (the Rectangle()) is where your current Spacer() is, and it produces this: Now, moving the Spacer/Rectangle inside the VStack: ZStack { VStack { Text("What would you like to do?") .font(.title) .fontWeight(.bold) // -- Inside the VStack: Rectangle() .fill(Color.green) .frame(width: 100, height: 50) // Spacer() } .padding() } And it looks like this: So, using a Spacer() inside the VStack does this:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Mapkit SwiftUI iOS17
The error is telling you that there is no such form of Map that matches what you've entered. If you remove showsUserLocation: true it works, because that form of Map() is valid. If you want to show the user's location you need to use UserAnnotation(), i.e.; Map(position: $mapPosition, interactionModes: .all) { UserAnnotation() // <<-- Use this ForEach(features) { feature in Marker(coordinate: feature.coordinate) { FeatureAnnotation(feature: feature) } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Is it possible to change bundle id of Watch kit app?
I have a fully Swift & SwiftUI-based app with the following targets: Main app = com.abc.appname Watch app = com.abc.appname.watchkitapp So I'm not sure why your "Apps are not connected unless I changed it to com.x.watchkitapp -> com.x.watch". Are you sure you've only tried to change the one bundle id? Have a look through all your targets' Build Settings and make sure everything is in order there. Xcode's settings and how to get everything to link together is sometimes akin to magic. I had massive issues with IntentsExtensions until Apple moved to AppIntents.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Accessibility Hint When There are Multiple Actions
Do you really want to hide features behind multiple taps? You've already said the hints are there to show "valuable information", so hiding it seems the wrong thing to do. What are the three things that your one button does? Wouldn't it make more sense to have three buttons, or a menu with those three options?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Xcode15 crash reloadItems - Invalid update: invalid number of items in section
Not really possible to figure this out without any code.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’24