I’ve submitted the following feedback:
FB13820942 (List Outline View Not Using Accent Color on Disclosure Caret for visionOS)
I’d appreciate help on this to see if I’m doing something wrong or indeed it’s the way visionOS currently works and it’s a suggested feedback.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
When I do an archive build of my app against visionOS, the archive listing in the Organizer show the archive entry as iOS. So I have one archive build for iOS with a certain build number and another archive build for visionOS with another build number (incremented by 1) They are both listed in The Organizer but they both have iOS info. I’ve submitted them both separately to TestFlight and I’m about to try to test it on visionOS. Shouldn’t the visionOS archive build that I submit to TestFlight indicate something about visionOS instead of iOS?
Topic:
App Store Distribution & Marketing
SubTopic:
TestFlight
Tags:
iOS
Xcode
Organizer Window
visionOS
I'm taking my iOS/iPadOS app and converting it so it runs on visionOS. I’m trying to compile my app, build it, for both visionOS and iOS. When I try to build for an iPhone and iPad simulator, I get the following error:
 Building for 'iphonesimulator', but realitytool only supports [xros, xrsimulator]
I’m thinking I might need to do a # if conditional compilation statement for visionOS so iOS doesn’t try to build lines of code but I can’t for this particular error find out for which file or code I need to do the conditional compilation. Anyone know how to get rid of this error? 
Topic:
Spatial Computing
SubTopic:
Reality Composer Pro
Tags:
Vision
Reality Composer Pro
visionOS
iPad and iOS apps on visionOS
What is the Amend toggle used for in the new Xcode 15 beta, Source Control Navigator, Changes view?
Since NavigationView is now deprecated, I’m trying to update my code to use NavigationStack instead. However, I found that when using NavigationStack, section headers within an overall List view no longer have the collapsing triangle functionality. This used to work for NavigationView, List view, Section headers. Am I missing something? Is there a way to get back the section header collapse triangle within an overall List view when encapsulating within a NavigationStack?
I don’t have a fundamental background in Computer Science or Computing Engineering. I want to learn more about how to do code debugging, but within the bounds of how Xcode provides various debugging panes. I’ve seen a number of WWDC session videos about Xcode and debugging. However I really need to learn more about the fundamentals of using Xcode panes like the stack trace pane, the variables pane, and the debugging console. I would greatly appreciate any advice on tutorials, videos, WWDC sessions, etc. that go to the basic levels of what these panes show, how to interpret the content, and how to interact with the information in various Xcode debugging-related panes.
Thank you.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Xcode Sanitizers and Runtime Issues
Xcode
Debugging
LLDB
I want to add Core Data/CloudKit data persistence to my app. Currently my app only uses local on device @AppStorage. Looking for best approach to bring in @FetchRequest functionality for my views, and tie my model data into Core Data and CloudKit.
In my app currently (without Core Data) my content view has an instance of my view model (separate file) accessed using an Environment Object. I use local @AppStorage persistence. See below for my Current app architecture:
In my lab this week, i got suggestions that I can modify my app structure to incorporate Core Data + CloudKit. Would the following structure work?:
How can I update/save a Property Change for Child Item from a Hierarchical List View of Items
See the following app screens:
Content View Screen:
Content View with hierarchical list children rows disclosed:
Parent Row Detail View:
Child Row Detail View:
Referencing the above views, here are the steps I do and the resulting problem I’m trying to solve:
Launch the app.
From the Functions (Content View) presented at launch, see that there is one item listed in a list view (1.0 Move Vessel)
Click the yellow (my app accent color) disclosure arrow at the right of the list item.
Two subordinate child list rows appear under the parent list item, 1.1 Move Position and 1.2 Hold Position.
When I tap the parent item (1.0 Move Vessel) in the hierarchy list, I'm successfully able to navigate to a detail view for that tapped item.
Edit the description of the 1.0 Move Vessel item (defaults to test) of the tapped item properties in the detail view using a TextEditor view.
Click yellow Save button at top left of detail view. The app navigates back to the parent Functions (Content View).
Click on the parent 1.0 Move Vessel row again.
See that description was successfully saved and now displayed from the change made in Step 5 and 6.
Repeat steps 5 through 8 again for 1.1 Move Position list row.
See that the edit/change made to the description was not saved and the default test1 description is displayed instead (not what is wanted).
Repeat steps 5 through 8 again for 1.2 Hold Position list row.
See that the edit/change made to the description was not saved and the default test2 description is displayed instead (not what is wanted).
I think I may have a problem in my save code logic and I'm trying to investigate.
Here are the swift files for the Detail View, the View Model, and the Model (I’ve not included the content view code because that code is working ok with the detail view. Again, I think the problem is in my save button and function call code for updating the view model. NOTE: sorry that I can’t seem to figure out how to get all the code for a file contiguous in the code view. I seem to have some closing braces that don’t appear in the code view. I think you can still follow the code.
FunctionDetailView.swift
struct FunctionDetailView: View {
@State var vesselFunction: VesselFunction
@State var vesselFunctionDescription: String
@Environment(\.presentationMode) var presentationMode
@EnvironmentObject var functionViewModel : FunctionViewModel
var body: some View {
NavigationView {
Form {
Text("Enter description below")
TextEditor(text: $vesselFunctionDescription)
.frame(height: 200)
.toolbar {
Button {
//print(vesselFunction)
vesselFunction.funcDescription = vesselFunctionDescription
//print(vesselFunction)
functionViewModel.updateVesselFunction(vesselFunction: vesselFunction)
//print(vesselFunction)
presentationMode.wrappedValue.dismiss()
} label: {
Text("Save")
}
}
}
.padding()
.navigationTitle(vesselFunction.name)
.navigationBarTitleDisplayMode(.inline)
}
}
}
struct FunctionDetailView_Previews: PreviewProvider {
static var previews: some View {
FunctionDetailView(vesselFunction: VesselFunction(id: UUID(), name: "x.x Verb Noun", funcDescription: "Description", children: nil), vesselFunctionDescription: "placeholder")
.environmentObject(FunctionViewModel())
.preferredColorScheme(.dark)
}
}
FunctionViewModel.swift
@MainActor class FunctionViewModel: ObservableObject {
@Published private(set) var decomp : [VesselFunction] = [
VesselFunction(id: UUID(), name: "1.0 Move Vessel", funcDescription: "test", children: [
VesselFunction(id: UUID(), name: "1.1 Move Position", funcDescription: "test1", children: nil),
VesselFunction(id: UUID(), name: "1.2 Hold Position", funcDescription: "test2", children: nil)
])
]
func updateVesselFunction(vesselFunction: VesselFunction) {
//
// if let index = decomp.firstIndex(where: { //(existingVesselFunction) -> Bool in
// return existingVesselFunction.id == vesselFunction.id
// }) {
//run this code
// }
// cleaner version of above
if let index = decomp.firstIndex(where: { $0.id == vesselFunction.id }) {
decomp[index] = vesselFunction.updateCompletion()
}
// else {
// for item in decomp {
// if item.children != nil {
// if let index = item.children?.firstIndex(where: { $0.id == vesselFunction.id }) {
// item.children![index] = vesselFunction.updateCompletion()
// }
// }
// }
// }
}
}
FunctionModel.swift
struct VesselFunction: Identifiable {
let id : UUID
let name : String
var funcDescription : String
var children : [VesselFunction]?
init(id: UUID, name: String, funcDescription: String, children: [VesselFunction]?) {
self.id = id
self.name = name
self.funcDescription = funcDescription
self.children = children
}
func updateCompletion() -> VesselFunction {
return VesselFunction(id: id, name: name, funcDescription: funcDescription, children: children)
}
}
As you can see from the else and for-in loop code commented out at the bottom of the FunctionViewModel code, I was trying to see if I needed to do something like this code to access the children VesselFunction array entries of the decomp published property. With the if let index code that is not commented out, the save function works but only for the top-level decomp array VesselFunction elements, not the nested children arrays elements.
Any help would be appreciated so all decomp array elements, both parent and nested children, can be updated when the TextEditor field is changed and the Save button is pressed in the FunctionDetailView. NOTE: I am only showing a 1 level deep nested array of children for the decomp property. I actually want to have multiple (at least 3) level of children arrays, so if you have any ideas how to make an updateVesselFunction function work for multiple children array elements, I would appreciate it.
Wondering if I could get benefits from using Xcode Cloud if I'm just a solo, hobbyist Developer? I don't need to collaborate with others on my code, but maybe the built in workflow and tie in with App Store Connect and TestFlight might be worth looking into. I'd appreciate any thoughts from the Apple team.
I want to be able to have my iOS app use SF symbols and store them in my Entity attribute in my Core Data model. I’m guessing I need to use the binary data attribute type because SF symbols are displayed using an Image view. I’m looking for a way to take an SF symbol from a SwiftUI view and store it in the Core Data Model. I also want to be able to retrieve that stored entity attribute from my Core Data model and display it in any SwiftUI views I might choose.
How can I do this?
Can I store AR objects/assets in Core Data? How do I load Core Data model entity/attributes with the AR data? How to retrieve for display in a SwiftUI view?
I’m practicing with creating a multiplatform App (could just as well be an iOS app) using the boilerplate code generated by Xcode when Core Data and CloudKit check boxes are selected upon project creation. Xcode generates a persistence.swift file with the Core Data stack code and uses the @FetchRequest property wrapper in the ContentView.swift file. However, I’d like to move some of the more “view model” or non-UI boilerplate code out of ContentView and into a more MVVM-like view model class file so that I keep the ContentView focused on my UI. I would like to continue using the provided persistence.swift file as my Core Data manager content.
Can I still use the power of @FetchRequest in the ContentView (I think it has to remain in my content view), while moving the other boilerplate code Xcode generated out of ContentView to a new view model class file? For example, I’m talking about the automatically generated code for addItem() and deleteItem().
In other words, can I use both the @FetchRequest approach for accessing my entity model while also making my code fit a more MVVM architecture?
The ‘Keep your complications up-to-date‘ WWDC20 session video used a kite flying app that was a WatchKit extension app. I’m planning on building a new 100% SwiftUI watch only (independent) app for watchOS 7 using Xcode 12 Beta and I’m wondering how I do complication updates in that case without the watch kit extension APIs used in the video session.