This is clearly not something that you should post on the DEVELOPER FORUMS.
Why are people so awful at using the internet these days?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
You've asked us to help you determine why your app has crashed but you've given us no information at all. How do you think we might help you with zero information?!
"My car is broken. Fix it."
Ask the App Review team for the crash log, and you should be able to see why it crashed.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. These forums are NOT where Apple's actual developers chat about stuff.
Your question is more of a product support one, so I'd suggest you ask it over at the [Apple Support Forums].(https://discussions.apple.com/) Thanks.
Topic:
App & System Services
SubTopic:
Hardware
Tags:
Well, that's a bit passive-aggressive. Maybe those who looked at your post couldn't help? Is that their fault? Maybe it's your fault for not asking a question properly, or not formatting your code properly (exactly like you've just done here)?
Stop being a child. Ask a proper question, and add code within the code formatting block - like most other people seem capable of doing - and maybe people will be able to help.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Is it because you're setting self.selectionString = nil, and nil isn't really something that can be shown in the detail part of the split view?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Which line is line 20? You've not used the code formatting tools properly so I can't see which line is line 20.
Also, you say it's not working "quite right" in the preview. Doesn't that kind of suggest that there's an issue with your code?
Seriously, we can't help you if you don't give us the right information.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
This isn't the place for your particular question.
It looks like you have an issue with Microsoft's software, not Apple's software.
Also, PLEASE don't use random tags for your question. What does this have to do with "Debugging"? What does it have to do with "Forums Feedback"?
This isn't the place for your question. Please use the Apple Support Forums for your product issue, or contact Microsoft where the software issue seems to be.
Topic:
App & System Services
SubTopic:
Hardware
Tags:
I think you only get this error when you're trying to preview, say, an iOS Home Screen widget but your active scheme is for something else, like a watchOS target.
If you're previewing something in an iOS target, make sure to select the scheme that builds the iOS target.
If you're trying to preview a watchOS target, select the watchOS scheme, etc.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
What happens if you rename RedColor to HorseBatteryStapleColor?
If the horse colour doesn't error, it's probably because UIColor.redColor is an actual thing and you're trying to overwrite it, but UIColor.horseBatteryStapleColor isn't a UIColor object so Xcode looks in your asset catalog.
Just rename your colours to something more descriptive such as RedColor --> BadColor and GreenColor --> GoodColor.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
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.
But in the meantime, if an object is certified for use on the Find My network, then yes, it acts like any other Find My device.
Topic:
App & System Services
SubTopic:
Networking
Tags:
I think part of the issue is that your "Hide TECO" switch says it hides TECO projects, but your Bool variable is called showTecoOnly. I've simplified it a bit, and avoided name clashes. See if this works for you; I've added some test data at the top and it seems to work for me:
import SwiftUI
var projects = [
Project(name: "Project1, isTeco = false, isFavorite = false", isTeco: false, isFavorite: false),
Project(name: "Project2, isTeco = true, isFavorite = false", isTeco: true, isFavorite: false),
Project(name: "Project3, isTeco = true, isFavorite = true", isTeco: true, isFavorite: true),
Project(name: "Project4, isTeco = false, isFavorite = true", isTeco: false, isFavorite: true)
]
struct ProjectList: View {
@State private var hideTeco = false
@State private var showFavorite = false
var body: some View {
let filteredProjects: [Project] =
if(hideTeco && showFavorite) {
// If TECO and favorite are active then I would only see favourite and not TECO projects
projects.filter { project in
!project.isTeco && project.isFavorite
}
} else if(!hideTeco && showFavorite) {
// If TECO is not active but favourite is active then it will show all favourite projects
projects.filter { project in
project.isFavorite
}
} else if(hideTeco && !showFavorite) {
// If TECO is active it will show all projects which are not TECO regardless if they are favorite
projects.filter { project in
!project.isTeco
}
} else {
[]
}
NavigationSplitView {
List {
Toggle(isOn: $hideTeco) {
Text("Hide TECO")
}
Toggle(isOn: $showFavorite) {
Text("Show Favorite")
}
ForEach(filteredProjects) { project in
NavigationLink {
ProjectDetail(project: project)
} label: {
ProjectRow(project: project)
}
}
}
.navigationTitle("PROJECTS")
} detail: {
Text("Select a project")
}
}
}
#Preview {
ProjectList()
}
struct Project: Identifiable {
var id: UUID = UUID()
var name: String
var isTeco: Bool
var isFavorite: Bool
}
struct ProjectDetail: View {
var project: Project
var body: some View {
Text("ProjectDetail: \(project.name)")
}
}
struct ProjectRow: View {
var project: Project
var body: some View {
Text(project.name)
}
}
Topic:
Programming Languages
SubTopic:
Swift
Tags:
What version of Xcode? Does your code have errors?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
We can't help you here. We don't know what code crashed because you haven't told us anything near the amount of info we need.
Did you get a crash report from Apple? You need to debug your code. Look for anything that could crash on launch, and ensure it's bulletproof.
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
Raise a bug report. I've tried it with the example that Xcode provides, and it does the same thing in both the preview and on a physical device.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Well, two things:
A deprecation means it will be removed in a future version of iOS. You can still use it now and ignore that warning; or
Implement the new method instead. Use the information here: https://developer.apple.com/documentation/swiftui/migrating-to-new-navigation-types
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: