Post

Replies

Boosts

Views

Activity

Reply to Task, onAppear, onDisappear modifiers run twice
I could not test on iOS 17 (my sample project crashes Xcode 15.3). Do you confirm it works there ? I see the same on iOS 18: DetailView initialized DetailView appeared DetailView task executed -->> button tapped DetailView disappeared DetailView appeared DetailView disappeared DetailView task executed This discussion may be interesting to read, even it did not let me understand what happens: https://fatbobman.com/en/posts/mastering_swiftui_task_modifier/
Topic: UI Frameworks SubTopic: SwiftUI
Oct ’24
Reply to Rejection from App Store Review
Welcome to the forum. There are multiple reasons for spam rejection. your app is too similar to another app or shares a lot of similar code with another app your app belongs to a category which is over crowded and thus rejected unless it has very specific and valuable features Could you show the complete rejection message and tell which category your app is ?
Oct ’24
Reply to Toolbar buttons in HStack merge with menu when .buttonStyle(…) is set
Reproduced the problem. All buttons are put behind the first in the HStack. Removing buttonStyle on the last button (whatever style) .buttonStyle(.borderedProminent) solves the problem. Or removing the menu also solves. Removing the Stack does NOT solve. So, HStack is not the problem. Bizarre. This fails as well. No Menu, one button without style ToolbarItem(placement: .bottomBar) { HStack { Button {} label: { Label("Foo", systemImage: "square") } .buttonStyle(.bordered) Button {} label: { Label("Bar", systemImage: "circle") } // .buttonStyle(.borderless) // Menu { // Button {} label: { Label("One", systemImage: "figure.arms.open") } // Button {} label: { Label("Two", systemImage: "figure.2.arms.open") } // } label: { Label("Baz", systemImage: "star") } Button {} label: { Label("Quux", systemImage: "triangle") } .buttonStyle(.borderedProminent) // Causes buttons to stack on one another } Restoring the style for the circle makes it work. So issue seems to be when one item has no style (which is the case of Menu) But if we remove style of a second item, it works. => Problem when 2 items in the toolbar have style and some other has not…
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to Guideline 5.2.3 - Legal - Intellectual Property - Audio/Video Downloading
Guideline is very clear: 5.2.3 Audio/Video Downloading: Apps should not facilitate illegal file sharing or include the ability to save, convert, or download media from third-party sources (e.g. Apple Music, YouTube, SoundCloud, Vimeo, etc.) without explicit authorization from those sources. Streaming of audio/video content may also violate Terms of Use, so be sure to check before your app accesses those services. Authorization must be provided upon request. For you to solve, you have to get the explicit authorisation from the platforms. Some apps also offer similar features. So, how were these apps published? Do you know if they got such authorisation ? In any case, the fact that other app with similar feature has passed the review, in compliance with guidelines or not, is never an argument. And those apps, if not in compliance, may be rejected at a future review.
Oct ’24
Reply to Don't do the 18.0 update
Read here: https://www.reddit.com/r/iOSBeta/comments/1di0gub/ios_18_db1_empty_calendar/ I powered off my phone and it fixed the problem! Hope that works for you as well. If not working, may have a look here: https://www.youtube.com/watch?v=h0VPocWXc9g
Oct ’24
Reply to iOS 18.1 issues
Welcome to the forum. Your question is not about app development. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com and provide as miuch information as possible on your iPhone configuration. You're not the only one experiencing issue, so multiple bug report may help speed up the correction.
Oct ’24
Reply to Ios 18.1 bug, fix asap
Welcome to the forum. Your question is not about app development. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com You wrote:  a screen randomly pops up which screen ? random or always the same ?
Oct ’24
Reply to iOS 18 calculator functions
Welcome to the forum. Your question is not about app development, it is about app usage. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com Don't forget to close the thread by marking the correct answer.
Oct ’24
Reply to Cannot convert value of type '[Lesson]' to expected argument type 'Binding<C>' and Generic parameter 'C' could not be inferred
Another thing. If you don't want to select from List but just display the current lesson, build other computed varsity, such as these: /* @State private */var currentLesson: String { // = "Przerwa" for lesson in testData { if lesson.startTime <= liveHourString && lesson.endTime >= liveHourString && lesson.dayOfWeek == liveWeekdayString { var components = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: todaysDate) let hhmm = lesson.startTime.split(separator: ":") components.hour = Int(hhmm[0]) components.minute = Int(hhmm[1]) return lesson.name } } return "" } /* @State private */var currentLessonStart : Date { // = Date() for lesson in testData { if lesson.startTime <= liveHourString && lesson.endTime >= liveHourString && lesson.dayOfWeek == liveWeekdayString { var components = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: todaysDate) let hhmm = lesson.startTime.split(separator: ":") components.hour = Int(hhmm[0]) components.minute = Int(hhmm[1]) return Calendar.current.date(from: components)! } } return Date() // If not found }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to Cannot convert value of type '[Lesson]' to expected argument type 'Binding<C>' and Generic parameter 'C' could not be inferred
You have other errors in your code. liveHourString is declared twice currentLessonStart not defined startTime is a String in testData, but should be a Date You should change currentLesson when you tap a lesson in List, not in the loop NavigationView { List(lessons) { lesson in if lesson.dayOfWeek == todaysDate.formatted(Date.FormatStyle().weekday(.wide)) { VStack(alignment: .leading){ Text(lesson.name) .onTapGesture { currentLesson = lesson.name currentLessonStart = lesson.startTime // Once you have defined a State variable for currentLessonStart as a Date var } You could also use computed var to initialise lessons: struct ContentView: View { // var lessons: [Lesson] = [] var liveHourString : String { todaysDate.formatted(date: .omitted, time: .shortened) } var liveWeekdayString : String { todaysDate.formatted(Date.FormatStyle().weekday(.wide)) } var lessons: [Lesson] { var listOfLessons : [Lesson] = [] for lesson in testData { if lesson.startTime <= liveHourString && lesson.endTime >= liveHourString && lesson.dayOfWeek == liveWeekdayString { // currentLesson = lesson.name // YOU Cannot change the State var here // currentLessonStart = lesson.startTime } listOfLessons.append(lesson) } return listOfLessons }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to Task, onAppear, onDisappear modifiers run twice
I could not test on iOS 17 (my sample project crashes Xcode 15.3). Do you confirm it works there ? I see the same on iOS 18: DetailView initialized DetailView appeared DetailView task executed -->> button tapped DetailView disappeared DetailView appeared DetailView disappeared DetailView task executed This discussion may be interesting to read, even it did not let me understand what happens: https://fatbobman.com/en/posts/mastering_swiftui_task_modifier/
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Oct ’24
Reply to Appstore Reject my crypto decentralized wallet app.
Crypto apps are very closely monitored on Appstore. So, you have to check every third party for evidence of evidence of "permissions, registrations, and/or licenses to distribute an app with exchange services." That may be pretty hard to get.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Rejection from App Store Review
Welcome to the forum. There are multiple reasons for spam rejection. your app is too similar to another app or shares a lot of similar code with another app your app belongs to a category which is over crowded and thus rejected unless it has very specific and valuable features Could you show the complete rejection message and tell which category your app is ?
Replies
Boosts
Views
Activity
Oct ’24
Reply to Is Xcode 16 a battery drainer?
How long is it since you installed Xcode ? Xcode may still be doing some tasks in the background to completely set up the environment. That mays last a couple of days.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Toolbar buttons in HStack merge with menu when .buttonStyle(…) is set
Reproduced the problem. All buttons are put behind the first in the HStack. Removing buttonStyle on the last button (whatever style) .buttonStyle(.borderedProminent) solves the problem. Or removing the menu also solves. Removing the Stack does NOT solve. So, HStack is not the problem. Bizarre. This fails as well. No Menu, one button without style ToolbarItem(placement: .bottomBar) { HStack { Button {} label: { Label("Foo", systemImage: "square") } .buttonStyle(.bordered) Button {} label: { Label("Bar", systemImage: "circle") } // .buttonStyle(.borderless) // Menu { // Button {} label: { Label("One", systemImage: "figure.arms.open") } // Button {} label: { Label("Two", systemImage: "figure.2.arms.open") } // } label: { Label("Baz", systemImage: "star") } Button {} label: { Label("Quux", systemImage: "triangle") } .buttonStyle(.borderedProminent) // Causes buttons to stack on one another } Restoring the style for the circle makes it work. So issue seems to be when one item has no style (which is the case of Menu) But if we remove style of a second item, it works. => Problem when 2 items in the toolbar have style and some other has not…
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Guideline 5.2.3 - Legal - Intellectual Property - Audio/Video Downloading
Guideline is very clear: 5.2.3 Audio/Video Downloading: Apps should not facilitate illegal file sharing or include the ability to save, convert, or download media from third-party sources (e.g. Apple Music, YouTube, SoundCloud, Vimeo, etc.) without explicit authorization from those sources. Streaming of audio/video content may also violate Terms of Use, so be sure to check before your app accesses those services. Authorization must be provided upon request. For you to solve, you have to get the explicit authorisation from the platforms. Some apps also offer similar features. So, how were these apps published? Do you know if they got such authorisation ? In any case, the fact that other app with similar feature has passed the review, in compliance with guidelines or not, is never an argument. And those apps, if not in compliance, may be rejected at a future review.
Replies
Boosts
Views
Activity
Oct ’24
Reply to English is missing from my languages on the App Store
You probably did it, but: Check that English appears in Bundle's Settings check that English is in InfoPlist
Replies
Boosts
Views
Activity
Oct ’24
Reply to Errors Building XCode Project
This appears to be an old problem. You may find some solution here: https://github.com/expo/eas-cli/issues/2111   PS: the maximum length on these forum posts is crazy small! You can attach a long text as file
Replies
Boosts
Views
Activity
Oct ’24
Reply to Don't do the 18.0 update
Read here: https://www.reddit.com/r/iOSBeta/comments/1di0gub/ios_18_db1_empty_calendar/ I powered off my phone and it fixed the problem! Hope that works for you as well. If not working, may have a look here: https://www.youtube.com/watch?v=h0VPocWXc9g
Replies
Boosts
Views
Activity
Oct ’24
Reply to iOS 18.1 issues
Welcome to the forum. Your question is not about app development. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com and provide as miuch information as possible on your iPhone configuration. You're not the only one experiencing issue, so multiple bug report may help speed up the correction.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Ios 18.1 bug, fix asap
Welcome to the forum. Your question is not about app development. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com You wrote:  a screen randomly pops up which screen ? random or always the same ?
Replies
Boosts
Views
Activity
Oct ’24
Reply to iOS 18 calculator functions
Welcome to the forum. Your question is not about app development, it is about app usage. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com Don't forget to close the thread by marking the correct answer.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Cannot convert value of type '[Lesson]' to expected argument type 'Binding<C>' and Generic parameter 'C' could not be inferred
Another thing. If you don't want to select from List but just display the current lesson, build other computed varsity, such as these: /* @State private */var currentLesson: String { // = "Przerwa" for lesson in testData { if lesson.startTime <= liveHourString && lesson.endTime >= liveHourString && lesson.dayOfWeek == liveWeekdayString { var components = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: todaysDate) let hhmm = lesson.startTime.split(separator: ":") components.hour = Int(hhmm[0]) components.minute = Int(hhmm[1]) return lesson.name } } return "" } /* @State private */var currentLessonStart : Date { // = Date() for lesson in testData { if lesson.startTime <= liveHourString && lesson.endTime >= liveHourString && lesson.dayOfWeek == liveWeekdayString { var components = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: todaysDate) let hhmm = lesson.startTime.split(separator: ":") components.hour = Int(hhmm[0]) components.minute = Int(hhmm[1]) return Calendar.current.date(from: components)! } } return Date() // If not found }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Cannot convert value of type '[Lesson]' to expected argument type 'Binding<C>' and Generic parameter 'C' could not be inferred
You have other errors in your code. liveHourString is declared twice currentLessonStart not defined startTime is a String in testData, but should be a Date You should change currentLesson when you tap a lesson in List, not in the loop NavigationView { List(lessons) { lesson in if lesson.dayOfWeek == todaysDate.formatted(Date.FormatStyle().weekday(.wide)) { VStack(alignment: .leading){ Text(lesson.name) .onTapGesture { currentLesson = lesson.name currentLessonStart = lesson.startTime // Once you have defined a State variable for currentLessonStart as a Date var } You could also use computed var to initialise lessons: struct ContentView: View { // var lessons: [Lesson] = [] var liveHourString : String { todaysDate.formatted(date: .omitted, time: .shortened) } var liveWeekdayString : String { todaysDate.formatted(Date.FormatStyle().weekday(.wide)) } var lessons: [Lesson] { var listOfLessons : [Lesson] = [] for lesson in testData { if lesson.startTime <= liveHourString && lesson.endTime >= liveHourString && lesson.dayOfWeek == liveWeekdayString { // currentLesson = lesson.name // YOU Cannot change the State var here // currentLessonStart = lesson.startTime } listOfLessons.append(lesson) } return listOfLessons }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Button icon in List to match style?
Problem is that buttons in List receive all the defaults style attributes of the List. Hence you have to set manually each style element. Or it may be easier to put the buttons in a ScrollView instead of List.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24