Post

Replies

Boosts

Views

Activity

Reply to json array shows in debugger but can't parse
This is one of the items in your JSON data: "id":"8e8tcssu4u2hn7a71tkveahjhn8xghqcfkwf1bzvtrw5nu0b89w", "name":"Test name 0", "country":"Test country 0", "type":"Test type 0", "situation":"Test situation 0", "timestamp":"1546848000" If you're decoding into your NewsFeed struct then the JSON needs to match that struct. Here's your struct: var id: String // Yep, this is fine var name: String // Fine var country: String // Fine var type: String // Fine var overallrecsit: String // What's this? I'm expecting 'situation'... var dlastupd: String // What's this? `timestamp`, maybe? var doverallrecsit: String // No idea How can you expect to decode some JSON into a struct that doesn't match it?
Mar ’25
Reply to Future iPhone Innovations – Portless & Foldable iPhones
This is not the right place for your post. 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 employees chat about their upcoming designs. Apple will not respond to you, and by posting this publicly you've given up any monetary reward for your ideas.
Topic: Design SubTopic: General Tags:
Mar ’25
Reply to imessages glitching
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.
Topic: Community SubTopic: Apple Developers Tags:
Mar ’25
Reply to Strange behavior when pushing UIViewController
Does this happen when you long press something else? Your code for the currencyWrapper doesn't really affect the vc you're trying to view. You're just using it as the thing that you long press to display the vc. So... Check if it happens on something else, but in the meantime, you should show us the relevant code for CountryViewController as that's the code that's being executed.
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’25
Reply to Using `@ObservedObject` in a function
var abc: Int = 5 // abc is 5. Yay! abc is 5! var globalData: GlobalData... = ? // What is globalData going to be? globalData is nothing, null, nada. Since globalData is 'nothing' you cannot access the currentCourse or nextCourse attributes of that object, because it doesn't have those attributes in it yet. You need to initialise the variable before you do something with it.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’25
Reply to Overview of steps to create new app from existing one
I honestly wouldn't copy an existing project. You need to change so many things that it's easier to just start a new project and copy over any code or assets you want to re-use. it's also a great opportunity to re-structure and refactor your project to make it more modern or maintainable. I recently tried to create a new app from an existing one as they shared similar code and structure, but I ended up trashing it because I kept getting errors that files didn't exist, etc.
Mar ’25
Reply to Apple Cross-Platform UI Strategy
Are you just looking for documentation, or are you going to write some code? If documentation, just have a read through https://developer.apple.com/documentation/ to get an idea of how it's all structured. You'll probably answer some of your questions just in the first few pages.
Topic: UI Frameworks SubTopic: General
Mar ’25