Found the change in the system and was able to set new setting to allow app to run
Post
Replies
Boosts
Views
Activity
Apple appears to be unable to fix this problem closing the feedback investigation!
I thought the Notebook Xcode was working but it is not true. This is the first time in over 50 years I have not been happy with Apple products but with no fix in site I am frustrated with Apple's poor and slow response. Right now Xcode stinks!!!!!
My MacBook Pro also has my use of Xcode broken! In over 50 years Xcode has never crashed. Now it does on all devices
I have it loaded on. I runs for 5 to 10 minutes then crashes! I believe this is an Xcode bug!
Is Desktop MacOS the list items and all moved over leaving space for scroll bar and not in iOS and top items are covered with scroll bar data.
New wrinkle, when I added the Model and ViewModel to handle the data the problems went away with the iPads. All iPads work fine after that update. The only difference in these is the safe area cut out on the phones. Also the iPad OS has been introduced to the systems. Also the phone sims keep changing as more cards are selected over time as if areas are interacting/overlapping. Non of it was failing until version 13.
In my studying the issue I have seen the results change with time. Some times long time. The real issue may be the speed of the simulator on my development system. I have seen sometimes with enough time it actually gets correct. This has only happened since my system upgraded to version 13. It happens on my Mac Pro late 2013 - 64K. It also happens on my MacBook Pro 15 in 2018 - 16K.
The size here is not what it was on my edit screen before submit. If the edit screen should change the size with submit.
Here is one of my Simulator views. I must have mis represented the left and right since you only showing the good side of the screen.
After many tries I finally got my iPad Air gen 4 to initialize. This always seems to take reboots of all devices involved many times. And many cleans and rebuilds. The error messages do not give much help since they are too non specific. The code does work better on my hardware so the Goode generation appears to be fine. The size used for the iPad Air was 150 so the screen was as full as possible and no problems as in the simulator were seen.
This size is for the iPhone 12 Mini. That really show the problem
I solved the problem with much better modifier as below.
DocumentViewer(inventory: sample)
.preferredColorScheme(.light)
The new swiftUI Table will make it even easer by
incorporating the headers since making them outside
the List is what caused the original problem.
Another example struct preview with both light and black previews. The HStack in this view is all white not allowing the which i to be a header Name and Category. It is not in the list to prevent it from scrolling with long lists to he a header always visible. It works in the full on a device but can not be seen in ContentView but at the start no document is yet loaded so I use the Struct previews to see them with actually data examples. but dark view does not display correctly for the separate struct previews.
//
// DocumemtViewer.swift
// DocumentPicker
//
// Created by Jack Reigh on 3/23/21.
//
// Last Updated 5/5/21
import SwiftUI
struct DocumentViewer: View {
var inventory: [inventoryEntry]
@State private var showSheet1 = false
@State private var showSheet2 = false
@State var itemId: UUID? = nil
var body: some View {
VStack {
HStack{
Text("Name").padding(2)
.frame(width: 250, height: 40,alignment: .top)
Spacer()
.frame(width: 4, height: 40, alignment: .top).background(Color.orange)
.padding(.horizontal, 0 )
Text("Category").padding(2)
.frame(width: 200, height: 40,alignment: .top)
}
.padding(.horizontal, 0) //7 yes
.frame(width: 468, height: 40,alignment: .leading)
.overlay(RoundedRectangle(cornerRadius: 8.0).stroke(Color.orange, lineWidth: 5)).padding(5)
List {
ForEach(inventory, id: .self.id){ item in // 6
InventoryLineView(inventory: inventory, itemIn: item).frame(alignment: .center)
.frame(width: 483, height: 88, alignment: .center)//.background(Color.orange)
} // ForEach
.environment(.defaultMinListRowHeight, 0 ) // spacing between rows in list
.environment(.defaultMinListHeaderHeight, 0 ) // spacing between rows in list
.navigationTitle("Inventory File View")
}.environment(.defaultMinListRowHeight, 88) // List End
.frame(width: 510, height: length - 180, alignment: .bottom)//5
}.frame(height: length - 118,alignment: .bottom)
// Outer Border of Inventory VStack
.overlay(RoundedRectangle(cornerRadius: 8.0).stroke(Color.blue, lineWidth: 5)).padding(5)
}
}
struct DocumentViewer_Previews: PreviewProvider {
static var data = InventoryModel()
static var previews: some View {
let sample = data.setSampleInventory()
DocumentViewer(inventory: sample)
DocumentViewer(inventory: sample).environment(.colorScheme , .dark)
}
}
Since is is a document based app not all is visible ins the ContentView_Previews so I am looking at previews in the other struct files. Here is an example where the preview will not show dark mode correctly where I am trying to see preview of both dark and light previews of this struct. The dark mode is completer white with not text but the other is shown with text visible.
//
// InventoryLineView.swift
// InventoryApp
//
// Created by Jack Reigh on 12/12/20.
//
// Last Updated 4/14/21
import SwiftUI
struct InventoryLineView: View {
var inventory: [inventoryEntry]
@State private var showSheet3 = false
@State var itemIn: inventoryEntry // 6
var body: some View {
HStack {
Text("(itemIn.name)")
.lineLimit(4).padding(.horizontal)
.frame(width: 250, height: 88,alignment: .leading)
.onTapGesture{ print("Tap (itemIn)"); showSheet3 = true }.sheet(isPresented: $showSheet3) {
EditItemView(showSheet: $showSheet3, itemIn: $itemIn)} // 6
Spacer()
.frame(width: 4, height: 88, alignment: .leading).background(Color.orange)
Text("(itemIn.catagory)").lineLimit(4).padding(.horizontal)
.frame(width: 200, height: 88,alignment: .leading)
}
.frame(width: 468, height: 88, alignment: .leading)
.overlay(RoundedRectangle(cornerRadius: 8.0).stroke(Color.green, lineWidth: 5))//.padding(.horizontal, 0)
}
}
struct InventoryLineView_Previews: PreviewProvider {
static var data = InventoryModel()
static var previews: some View {
let inventory = data.setSampleInventory()
let item: inventoryEntry = data.setEntry()
InventoryLineView(inventory: inventory, itemIn: item)
InventoryLineView(inventory: inventory, itemIn: item).environment(.colorScheme , .dark)
}
}
Now I see with further investigation it appears the Spacer the .frame around text and maybe all spacing dded to HStacks do not conform to Dark Mode using prerview.