Post

Replies

Boosts

Views

Activity

Reply to iOS 18.4 beta 4 tipkit crash
Might be your code. Show us the code that's crashing and we'll see if we can help. If you think it's definitely a bug, then you should raise it in the normal way at https://feedbackassistant.apple.com/ You can post the FB number here if you like.
Topic: UI Frameworks SubTopic: General Tags:
Mar ’25
Reply to Genmoji not working
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.
Mar ’25
Reply to How to use core spotlight ?
How would you know it never gets triggered? You aren't printing anything to the console. Anyway, in my apps I have the WindowGroup set up like this: var body: some Scene { WindowGroup { PhoneView() .environment(modelData) } } And then, in the PhoneView() I have this: var body: some View { ZStack { // Whatever... } .onContinueUserActivity(CSSearchableItemActionType, perform: handleSpotlight) // blah blah blah... } private func handleSpotlight(userActivity: NSUserActivity) { guard let uniqueIdentifier = userActivity.userInfo?[CSSearchableItemActivityIdentifier] as? String else { return } // Handle the activity... }
Mar ’25
Reply to Safari extension doesn't load
Is this an iOS app with a Safari extension, or just a Safari extension? I know that, in an iOS app, you have to build the iOS app so the extension is included, and then build and run the extension. If it's just a Safari extension, then I'm afraid I don't know.
Topic: Safari & Web SubTopic: General Tags:
Mar ’25
Reply to What is best practice for the app's image format & is there a maximun /minimum number of items the app can contains
You might have to rephrase your question, as I'm not entirely sure what you're asking. If you want to know about app icons you can get all the required info here: https://developer.apple.com/design/human-interface-guidelines/app-icons If you're talking about images in general, you can use anything as long as the code can read it, but I stick with PNG and JPG formats. As for there being a minimum number of 'items', do you mean images? Why does it matter? The minimum would be zero, and the maximum would whatever memory your app uses and file sizes. It's not really an easily-answerable question. Perhaps, if you refine your question you might get a better, more relevant answer.
Topic: Design SubTopic: General
Mar ’25
Reply to 5 day project 😏😏
Sorry, why are you posting this here? These forums are for developers who need help with their code. If you have an issue with your code, provide that code, and ask us for help. If you're just showing off a project, then it's lovely that you're coding, but it's also not appropriate for these forums.
Mar ’25
Reply to json array shows in debugger but can't parse (corrected question)
That's because your JSON is an array. Look: [ <--- BEGIN ARRAY { "id": "8e8tcssu4u2hn7a71tkveahjhn8xghqcfkwf1bzvtrw5nu0b89w", "name": "Test name 0", "country": "Test country 0", "type": "Test type 0", "situation": "Test situation 0", "timestamp": "1546848000" }, { "id": "z69718a1a5z2y5czkwrhr1u37h7h768v05qr3pf1h4r4yrt5a68", "name": "Test name 1", "country": "Test country 1", "type": "Test type 1", "situation": "Test situation 1", "timestamp": "1741351615" }, { "id": "fh974sv586nhyysbhg5nak444968h7hgcgh6yw0usbvcz9b0h69", "name": "Test name 2", "country": "Test country 2", "type": "Test type 2", "situation": "Test situation 2", "timestamp": "1741351603" }, { "id": "347272052385993", "name": "Test name 3", "country": "Test country 3", "type": "Test type 3", "situation": "Test situation 3", "timestamp": "1741351557" } ] <--- END ARRAY You should use something like this: struct NewsFeed: Codable { let id, name, country, type: String let situation, timestamp: String } typealias TheFeed = [NewsFeed] Or, you could consider how I do this in my own app: { "balance": { "current": 342.15, "saver": 1813.32 }, "date": "202503", "data": [ { "date": "20250313", "items": [ { "address": "1 High Street", "time": "13:52", "cost": 6.25 } ] }, { "date": "20250305", "items": [ { "address": "10 The Avenue", "time": "13:19", "cost": 6.99 }, { "address": "25 Main Street", "time": "07:21", "cost": 3.75 }, { "address": "50 The Street", "time": "07:16", "cost": 20.8 } ] } ] } That JSON conforms to these structs: struct Month: Codable { let balance: Balance let date: String let data: [LineItem] } struct LineItem: Codable { let date: String let items: [Details] } struct Details: Codable { let address: String? let time: String let cost: Double } struct Balance: Codable { let current: Double let saver: Double } I decode the data into the Month struct because a Month contains a balance of type Balance, a date String and an array of LineItems. Each LineItem contains a date String and an array of Details. Each Details contains an address String optional, a time String, and a cost Double. I don't have a root array; I have a root Month so I have curly braces.
Mar ’25
Reply to Blocking app quit
It is a terrible user experience to stop someone from quitting an app, and you should not do this. Just write your app as though someone who wants to use it is going to leave it running. If I installed your app, launched it, and then couldn't quit it, it would be immediately moved to the trash, and I'd likely never use anything you ever developed in future.
Topic: UI Frameworks SubTopic: General Tags:
Mar ’25