Post

Replies

Boosts

Views

Activity

Reply to passing data from view one to seven
Have a look at notifications. If you want to send "apple" from VC1 to VC6 you would 'post' the notification in VC1, and VC6 would be notified because it's registered to receive such notifications. For example, in VC1: import UserNotifications let kNotificationValue: String = "notificationValue" // ... Various methods etc., then, post the notification: NotificationCenter.default.post(name: .sendApple, object: nil, userInfo: [kNotificationValue : "apple"]) // blah, blah, blah // Set up notifications names here so you don't introduce typos extension Notification.Name { static let sendApple = Notification.Name("sendApple") } You make VC6 receive the notification like this: // In your view's .onAppear method: .onAppear { NotificationCenter.default.addObserver(forName: ..sendApple, object: nil, queue: nil) { notification in guard let value = notification.userInfo?[kNotificationValue] as? String else { return } print(value) } } Note that multiple VCs can be setup as observers of the notification, and VCs can observe multiple notifications (just add a new name to the extension).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to Automatic Switching
What are you talking about? Do you think "Internet" == "Wi-Fi"? Get the terms right. Now, what's your actual issue? And what could us third-party developers on these forums do to help you? And please, bear in mind that we are not Apple's actual employees, so you may actually be tilting at windmills here.
Topic: App & System Services SubTopic: Hardware Tags:
Apr ’24
Reply to I hosed Xcode's Platforms list, what now?
Delete all the platforms that you're trying to get. In other words, right-click the "visionOS 1.0 Simulator" at the bottom of the list, choose "Delete..." You should then be able to click "Get" on the "visionOS 1.0" item that's greyed-out. Repeat this for everything, and you should be up and running. FYI, don't ever unmount them in Disk Utility either, as that causes them to be unavailable, too.
May ’24
Reply to How to disable screen capture or avoid screenshot taking programmatically in iOS
I have a banking app that just recently implemented something similar. It shows a black screen when you take a screenshot. That app was reviewed and released, so it seems it's okay for a banking app given that you could be exposing account numbers etc. otherwise. For your app, though, I'm not sure. Do you have information on the screen that a user shouldn't be allowed to save in a screenshot?
May ’24
Reply to Xcode upgrade to iOS won't install
Show us a screenshot of the Platforms tab in your Xcode Settings. For me, I removed every simulator runtime except the shortest named ones, i.e. I removed "iOS 17.4 beta 2 Simulator" and left "iOS 17.4 Simulator" alone. Then I clicked on the "Get" button by the remaining items, and it worked.
May ’24
Reply to macbook software update failing and i am going insane
Two things: These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual developers chat about stuff. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums.. It wasn't an "idiotic design" to have USB-C slots on your device. Either get a USB-C to USB-A adapter, or get a USB-C stick. Booting from such a stick is likely the right way to fix your issue.
May ’24