Post

Replies

Boosts

Views

Activity

Reply to Store SwiftUI Color in SwiftData
I store Strings, and have no issue. Try this function and extension, and confirm that they encode and decode your colours correctly: func colorToHex(_ colour: Color) -> String { guard let components: [CGFloat] = colour.cgColor?.components else { return "#FFFFFFFF" } if(components.count == 2) { return String(format: "#%02lX%02lX%02lX", lroundf(Float(components[0]) * 255.0), lroundf(Float(components[0]) * 255.0), lroundf(Float(components[0]) * 255.0)) } return String(format: "#%02lX%02lX%02lX%02lX", lroundf(Float(components[0]) * 255.0), lroundf(Float(components[1]) * 255.0), lroundf(Float(components[2]) * 255.0), lroundf(Float(components[3]) * 255.0)) } extension UIColor { public convenience init?(fromHex: String) { if(!fromHex.hasPrefix("#")) { return nil; } let r, g, b, a: CGFloat let start = fromHex.index(fromHex.startIndex, offsetBy: 1) let hexColor = String(fromHex[start...]) if(hexColor.count == 8) { let scanner = Scanner(string: hexColor) var hexNumber: UInt64 = 0 if(scanner.scanHexInt64(&hexNumber)) { r = CGFloat((hexNumber & 0xff000000) >> 24) / 255 g = CGFloat((hexNumber & 0x00ff0000) >> 16) / 255 b = CGFloat((hexNumber & 0x0000ff00) >> 8) / 255 a = CGFloat(hexNumber & 0x000000ff) / 255 self.init(red: r, green: g, blue: b, alpha: a) return } } return nil; } } Note, the extension is on UIColor, but it's trivial to convert to Color.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’24
Reply to iOS 18 videos corrupt
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.
Nov ’24
Reply to IOS18
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. This isn't the place for your product issues. The fact that you randomly picked a couple of tags for your post, which obviously have nothing to do with your issue, should've suggested you were in the wrong place. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Nov ’24
Reply to Update for whatsapp or possible
WhatsApp is nothing to do with Apple. And you are in the wrong place, again. If you have suggestions, raise them in the appropriate place. This is NOT the appropriate place. Your first point is rubbish, anyway. If WhatsApp loses your messages, then that's WhatsApp's fault, and not something Apple can fix. Second point: Why should Apple make it easy for third-party messaging apps to backup chats easier? It's up to them to do their job, not Apple. Honestly, I can't go on. You're in the wrong place, and your post seems like it was written by some mad AI engine.
Topic: Community SubTopic: Apple Developers Tags:
Nov ’24
Reply to Update for MESSAGES
These are the Developer Forums, where developers of third-party 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 new features. If you have a suggestion, you should raise it at: https://www.apple.com/feedback/
Topic: Community SubTopic: Apple Developers Tags:
Nov ’24
Reply to can't install cocoaPods
We can't help you because you've given us the bare minimum of information. This is like saying, "A bit of my car is broken", but not telling us what bit is broken. What macOS version are you on? How are you installing CocoaPods, etc.?
Topic: UI Frameworks SubTopic: SwiftUI
Nov ’24
Reply to iPhone 16 photo app bug
So, this seems like an issue with Viber, then? You should talk to the Viber developers, not us.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Store SwiftUI Color in SwiftData
I store Strings, and have no issue. Try this function and extension, and confirm that they encode and decode your colours correctly: func colorToHex(_ colour: Color) -> String { guard let components: [CGFloat] = colour.cgColor?.components else { return "#FFFFFFFF" } if(components.count == 2) { return String(format: "#%02lX%02lX%02lX", lroundf(Float(components[0]) * 255.0), lroundf(Float(components[0]) * 255.0), lroundf(Float(components[0]) * 255.0)) } return String(format: "#%02lX%02lX%02lX%02lX", lroundf(Float(components[0]) * 255.0), lroundf(Float(components[1]) * 255.0), lroundf(Float(components[2]) * 255.0), lroundf(Float(components[3]) * 255.0)) } extension UIColor { public convenience init?(fromHex: String) { if(!fromHex.hasPrefix("#")) { return nil; } let r, g, b, a: CGFloat let start = fromHex.index(fromHex.startIndex, offsetBy: 1) let hexColor = String(fromHex[start...]) if(hexColor.count == 8) { let scanner = Scanner(string: hexColor) var hexNumber: UInt64 = 0 if(scanner.scanHexInt64(&hexNumber)) { r = CGFloat((hexNumber & 0xff000000) >> 24) / 255 g = CGFloat((hexNumber & 0x00ff0000) >> 16) / 255 b = CGFloat((hexNumber & 0x0000ff00) >> 8) / 255 a = CGFloat(hexNumber & 0x000000ff) / 255 self.init(red: r, green: g, blue: b, alpha: a) return } } return nil; } } Note, the extension is on UIColor, but it's trivial to convert to Color.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Game wont run.
You need to get in touch with the game developer, not random third-party developers who use these forums.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to iOS 18 videos corrupt
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
Nov ’24
Reply to IOS18
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. This isn't the place for your product issues. The fact that you randomly picked a couple of tags for your post, which obviously have nothing to do with your issue, should've suggested you were in the wrong place. 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
Nov ’24
Reply to Seamless Wi-Fi Connection Between Camera and iOS Device for File Transfer
I think you need to just write the app and implement those requirements yourself. Anything we suggest to you is simply going to be along the lines of: Search for and connect to the camera's Wi-Fi. Transfer files.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Major update
Please stop it with these posts.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Update for whatsapp or possible
WhatsApp is nothing to do with Apple. And you are in the wrong place, again. If you have suggestions, raise them in the appropriate place. This is NOT the appropriate place. Your first point is rubbish, anyway. If WhatsApp loses your messages, then that's WhatsApp's fault, and not something Apple can fix. Second point: Why should Apple make it easy for third-party messaging apps to backup chats easier? It's up to them to do their job, not Apple. Honestly, I can't go on. You're in the wrong place, and your post seems like it was written by some mad AI engine.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Update for MESSAGES
These are the Developer Forums, where developers of third-party 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 new features. If you have a suggestion, you should raise it at: https://www.apple.com/feedback/
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Please give me invitation code for test flight
Why do you think posting on these Developer Forums is going to help? These forums are for developers of third-party software for Apple's platforms. WE ARE NOT THE DEVELOPERS OF MINECRAFT. Contact Minecraft, not us.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to Screen flickering issue on Apple TV 4k
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
Nov ’24
Reply to Code
What code are you after?
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to My image creation request is taking forever.
You're in a QUEUE. Just wait.
Replies
Boosts
Views
Activity
Nov ’24
Reply to can't install cocoaPods
We can't help you because you've given us the bare minimum of information. This is like saying, "A bit of my car is broken", but not telling us what bit is broken. What macOS version are you on? How are you installing CocoaPods, etc.?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Nov ’24
Reply to Genmoji app issues
iOS version? What device is this on? Maybe you should raise a bug in the usual way... You need to raise each issue you find separately at https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can link to them.
Replies
Boosts
Views
Activity
Nov ’24