Post

Replies

Boosts

Views

Activity

Reply to Swift UI Missing argument for parameter in @main app call in List View
Welcome to the forum. The error message is very explicit. You have to pass a Project instance as a parameter, not the structure type itself. @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView(project: Project(name: "dummy", icon: "", isFavorite: true, color: .red, compoundscore: 0)) } // vs project: Project } } Another way is to initialise var project with a dummy instance. No more need to pass parameter in call. Note: when you post code, please use code formatter to make it readable. @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } // no more need for parameter is var is initialised in ContentView } } struct Project: Identifiable { var name: String var icon: String var isFavorite: Bool var color: Color let id = UUID() var compoundscore : Float static func CurrentProjects() -> [Project] { // name should start with lowercase return [Project(name: "Test Project", icon: "🍎", isFavorite: true, color: .red, compoundscore: 4.5), Project(name: "Swimming", icon: "🏊", isFavorite: false, color: .orange, compoundscore: 12.5), Project(name: "Archery", icon: "🏹", isFavorite: false, color: .yellow, compoundscore: 37.5) ] } } struct ProjectRow: View { let project: Project var body: some View { HStack { Text(project.icon) .font(.title) Text(project.name) Spacer() Image(systemName: project.isFavorite ? "heart.fill" : "heart") } } } struct ContentView: View { var CurrentProjectlist: [Project] = Project.CurrentProjects() var project: Project = Project(name: "dummy", icon: "", isFavorite: true, color: .red, compoundscore: 0). // Initial value to avoid having to pass parameter on call var body: some View { NavigationView { List { Section { if #available(iOS 17.0, *) { ForEach(CurrentProjectlist) { project in ProjectRow(project: project) } .listRowBackground( Capsule() .fill(Color(project.color)) .padding(.vertical, 2).padding(.horizontal, 20) ) .listRowSeparator(.hidden) .foregroundColor(.indigo) } else { // Fallback on earlier versions } } header: { Text("CI Projects") } .listRowBackground(Color.blue) .foregroundColor(.black) .listRowInsets(.init(top: 0, leading: 40, bottom: 0, trailing: 40)) .listRowBackground(Color.black) .listSectionSeparatorTint(.yellow) .headerProminence(.increased) .listRowInsets(EdgeInsets.init(top: 0, leading: 50, bottom: 0, trailing: 50)) } .scrollContentBackground(.hidden) .background( Image("cool background") .resizable() .scaledToFill() .clipped() .edgesIgnoringSafeArea(.all) .blur(radius: 3) .overlay(Color.red.opacity(0.2)) ) .environment(\.defaultMinListHeaderHeight, 20) .environment(\.defaultMinListRowHeight, 70) .navigationTitle("Navigator") } } } I tested and it works OK:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’25
Reply to Immediate crash of Apple Watch simulator when typing a key
Just filed a bug report: Jan 31, 2025 at 7:02 PM – FB16431872 Should be noted that no crash when building the same app, with same Xcode, but through iPhone iOS 17.4 instead of 18.x. Note: I reported a simulator issue (for iOS app with SwiftUI) that does only appear on iOS 18.2 simulators (no access to app settings from iPhone settings) : Dec 27, 2024 at 9:37 AM – FB16175635
Jan ’25
Reply to Impossible d'ouvrir un compte developper
Bienvenue sur le forum. Probablement une donnée incorrecte dans un des champs. A quelle étape ce message se produit il ? Pouvez vous poster une copie d'écran de la page où cela se produit (n'oubliez pas de masquer toute information personnelle) ? Vous pouvez aussi contacter le support. https://developer.apple.com/contact/topic/select Et sélectionner "Programme d'inscription".
Jan ’25
Reply to Xcode 16 and installing IOS apps
each time I install an app for testing. I understand you compile and build on the iPhone ? Same app or with different apps ? Did you update iOS recently ? Are they apps that were developed on an older version of Xcode ? Does the update complete (to 100%) ? I get the same message after updating either Xcode or iOS.
Jan ’25
Reply to Language Translation
What do you change precisely (in settings) to change language ? Could it be because the bluetooth message is a system one, not from your app. So it uses the iPhone language (English), not the app one (French) ?. It is bizarre to read "Establish secure connection" and then get a message in French. In the screenshot, what is the selected language ? French ? English ?
Topic: App & System Services SubTopic: General Tags:
Jan ’25
Reply to Problem with App Review
Did you add some comment for reviewer in the app submission, explaining what you say here: you know there are other dice rolling games, but this one is original and make extensive use of iOS capabilities to create a unique user experience with polished visuals, engaging mechanics, and a dynamic atmosphere. adding a short video to illustrate may help. Note however that rejection may just be due because this category of app is already overcrowded. In that case, hard to do anything, nevertheless, try to add those comments for a new submission. Good luck.
Jan ’25
Reply to Swift Student Challenge Playgrounds app in 3 min
Initially, my work was not intended for the Challenge but for the App Store. Yes, but that's a mistake. It would likely have your submission rejected or at least loose any chance to win. The challenge is just a challenge: show your inspiration, skills, quality of work and using iOS capabilities. Not to show a full blown app to try to promote it. So you have to reconsider what you submit. Can't you carve out a smaller app from the existing one ?
Jan ’25
Reply to Swift UI Missing argument for parameter in @main app call in List View
Welcome to the forum. The error message is very explicit. You have to pass a Project instance as a parameter, not the structure type itself. @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView(project: Project(name: "dummy", icon: "", isFavorite: true, color: .red, compoundscore: 0)) } // vs project: Project } } Another way is to initialise var project with a dummy instance. No more need to pass parameter in call. Note: when you post code, please use code formatter to make it readable. @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } // no more need for parameter is var is initialised in ContentView } } struct Project: Identifiable { var name: String var icon: String var isFavorite: Bool var color: Color let id = UUID() var compoundscore : Float static func CurrentProjects() -> [Project] { // name should start with lowercase return [Project(name: "Test Project", icon: "🍎", isFavorite: true, color: .red, compoundscore: 4.5), Project(name: "Swimming", icon: "🏊", isFavorite: false, color: .orange, compoundscore: 12.5), Project(name: "Archery", icon: "🏹", isFavorite: false, color: .yellow, compoundscore: 37.5) ] } } struct ProjectRow: View { let project: Project var body: some View { HStack { Text(project.icon) .font(.title) Text(project.name) Spacer() Image(systemName: project.isFavorite ? "heart.fill" : "heart") } } } struct ContentView: View { var CurrentProjectlist: [Project] = Project.CurrentProjects() var project: Project = Project(name: "dummy", icon: "", isFavorite: true, color: .red, compoundscore: 0). // Initial value to avoid having to pass parameter on call var body: some View { NavigationView { List { Section { if #available(iOS 17.0, *) { ForEach(CurrentProjectlist) { project in ProjectRow(project: project) } .listRowBackground( Capsule() .fill(Color(project.color)) .padding(.vertical, 2).padding(.horizontal, 20) ) .listRowSeparator(.hidden) .foregroundColor(.indigo) } else { // Fallback on earlier versions } } header: { Text("CI Projects") } .listRowBackground(Color.blue) .foregroundColor(.black) .listRowInsets(.init(top: 0, leading: 40, bottom: 0, trailing: 40)) .listRowBackground(Color.black) .listSectionSeparatorTint(.yellow) .headerProminence(.increased) .listRowInsets(EdgeInsets.init(top: 0, leading: 50, bottom: 0, trailing: 50)) } .scrollContentBackground(.hidden) .background( Image("cool background") .resizable() .scaledToFill() .clipped() .edgesIgnoringSafeArea(.all) .blur(radius: 3) .overlay(Color.red.opacity(0.2)) ) .environment(\.defaultMinListHeaderHeight, 20) .environment(\.defaultMinListRowHeight, 70) .navigationTitle("Navigator") } } } I tested and it works OK:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to The Swift Programming Language Book
That's not presented as a book, but you have all the doc for Swift 6 here in swift.org: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/
Replies
Boosts
Views
Activity
Feb ’25
Reply to Immediate crash of Apple Watch simulator when typing a key
Just filed a bug report: Jan 31, 2025 at 7:02 PM – FB16431872 Should be noted that no crash when building the same app, with same Xcode, but through iPhone iOS 17.4 instead of 18.x. Note: I reported a simulator issue (for iOS app with SwiftUI) that does only appear on iOS 18.2 simulators (no access to app settings from iPhone settings) : Dec 27, 2024 at 9:37 AM – FB16175635
Replies
Boosts
Views
Activity
Jan ’25
Reply to I've been trying to enroll for a month
Welcome to the forum.   submitted my enrollment through the Apple Developer app Did you try to unroll from the website, not the app ?
Replies
Boosts
Views
Activity
Jan ’25
Reply to Xcode 16.2 crashes while resolving dependencies
You should file a FB bug report (maybe you did already, then you should post the FB number).
Replies
Boosts
Views
Activity
Jan ’25
Reply to Impossible d'ouvrir un compte developper
Bienvenue sur le forum. Probablement une donnée incorrecte dans un des champs. A quelle étape ce message se produit il ? Pouvez vous poster une copie d'écran de la page où cela se produit (n'oubliez pas de masquer toute information personnelle) ? Vous pouvez aussi contacter le support. https://developer.apple.com/contact/topic/select Et sélectionner "Programme d'inscription".
Replies
Boosts
Views
Activity
Jan ’25
Reply to Eligibility Query for Swift Student Challenge
That may be a bit subtle difference, if you work in a development team (they say developer, not code writer). But you may try to ask directly the question to support (contact us): https://developer.apple.com/contact/. Events category.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Unable to Add For Review
In appStoreConnect, select the app, then select General / App info. The categories are in General information.   You must choose abuts Sure it says abuts ?
Replies
Boosts
Views
Activity
Jan ’25
Reply to Xcode 16 and installing IOS apps
each time I install an app for testing. I understand you compile and build on the iPhone ? Same app or with different apps ? Did you update iOS recently ? Are they apps that were developed on an older version of Xcode ? Does the update complete (to 100%) ? I get the same message after updating either Xcode or iOS.
Replies
Boosts
Views
Activity
Jan ’25
Reply to Eligibility Query for Swift Student Challenge
It seems to be incompatible with the very first eligibility requirement: To be eligible for the Challenge, you can not be employed full time as a developer Get details here: https://developer.apple.com/swift-student-challenge/eligibility/
Replies
Boosts
Views
Activity
Jan ’25
Reply to Language Translation
What do you change precisely (in settings) to change language ? Could it be because the bluetooth message is a system one, not from your app. So it uses the iPhone language (English), not the app one (French) ?. It is bizarre to read "Establish secure connection" and then get a message in French. In the screenshot, what is the selected language ? French ? English ?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Problem with App Review
Did you add some comment for reviewer in the app submission, explaining what you say here: you know there are other dice rolling games, but this one is original and make extensive use of iOS capabilities to create a unique user experience with polished visuals, engaging mechanics, and a dynamic atmosphere. adding a short video to illustrate may help. Note however that rejection may just be due because this category of app is already overcrowded. In that case, hard to do anything, nevertheless, try to add those comments for a new submission. Good luck.
Replies
Boosts
Views
Activity
Jan ’25
Reply to `Text` (Label) text color issue during app resuming from suspended (changes from black to light or vice versa, depending on current appearance mode).
Could you post the full code of the view ?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jan ’25
Reply to Swift Student Challenge Playgrounds app in 3 min
Initially, my work was not intended for the Challenge but for the App Store. Yes, but that's a mistake. It would likely have your submission rejected or at least loose any chance to win. The challenge is just a challenge: show your inspiration, skills, quality of work and using iOS capabilities. Not to show a full blown app to try to promote it. So you have to reconsider what you submit. Can't you carve out a smaller app from the existing one ?
Replies
Boosts
Views
Activity
Jan ’25
Reply to Tired of Manual Resizing for App Store Screenshots? PixelPrep Automates It!
Please note that forum is not for app promotion.
Replies
Boosts
Views
Activity
Jan ’25