Post

Replies

Boosts

Views

Activity

Reply to WidgetKit with Intent on iOS 17
Update: I worked it out, I needed to add my intent to 'Supported Intents' in my app target config. I am now facing the following problem: The widget is showing placeholder coloured boxes when placed on the home screen. It shows fine in the preview before adding to Home Screen. I think this is because the AppIntentTimelineProvider is looking for timeline(), whereas a static widget (TimelineProvider) and iOS are looking for getTimeline(). If I change timeline() to getTimeline(), it says it doesn’t conform. placeholder() is the same in both providers, which is why it shows fine before adding to home screen I can provide screenshots, but it doesn't let me upload them
Nov ’23
Reply to How do I stop 'The compiler is unable to type-check this expression in reasonable time'
I have moved quite a chunk of code to a new Swift file called rocketView, it got rid of the original error, but now I get the error Cannot convert value of type '(inout [Rocket]) -> ()' to expected argument type '([Rocket]) -> ()' on line 45... my code is attached. (Line 45 is the line between }.onAppear { and }.listStyle... my code - https://developer.apple.com/forums/content/attachment/88bd6562-5c10-4e8b-a1dd-e479d3ef1df0
Jan ’21
Reply to How do I stop 'The compiler is unable to type-check this expression in reasonable time'
OOPer's method worked! Apart from the fact that I display it all in a tabview, it now doesn't display correctly... Screenshots can be found in this iCloud folder - https://www.icloud.com/iclouddrive/0ykn1UAHPLZnwM77yl8RoClmw#Apple_Dev_Forum, with the names incorrect display for the wrong display of my app, and correct display for how it should look... Edit: fixed it, it was me being silly. Thanks OOPer for the help! Edit #2: Each time a modal shows up, it adds a new tab to my TabView, it never used to do this... How do I stop that?
Jan ’21
Reply to How to get single object JSON API in SwiftUI
I tried using referenced links, but the forums wouldn’t allow them, so I just put them in plain text... I haven’t attempted editing my old code the gets a multi-object array, as I don’t know where to start. My code is attached My code - https://developer.apple.com/forums/content/attachment/7bb685f8-8fac-4a7d-a9bb-a2ed0f55be7d
Mar ’21
Reply to How do I stop 'The compiler is unable to type-check this expression in reasonable time'
I moved the group from body > tab view > group > ZStack > NavigationView > VStack > List > ForEach > Button > HStack to its own View, but now I get more errors... The view looks like: var bodyGroup: some View {         Group {             Text(launch.name)                 .font(.system(size: 23))                 .frame(maxWidth: .infinity, alignment: .leading)                 .fixedSize(horizontal: false, vertical: true)             Text(Date(timeIntervalSince1970: launch.date_unix).getFormattedDate(format: "dd/MM/yyyy HH:mm:ss"))                 .font(.system(size: 11.5))                 .foregroundColor(Color.gray)                 .frame(maxWidth: .infinity, alignment: .leading)                 .fixedSize(horizontal: false, vertical: true)             Spacer()         }     } The errors are The same original error Cannot find 'launch' in scope (line 5) Cannot find 'launch' in scope (line 13) I never used to get these errors before I moved it to the view...
Jan ’21