XCODE 13.0 is the worst delivery I have received from Apple (Bad Bugs)

The Simulator does not execute the code the last version 12 worked. I will not prepare my device the last version of 12 did. The code below worked on the simulator and real iPad Air 4th gen. 1.) I can not even get the iPad Air connected with nothing running on the iPad. 2.) The simulators can not run the CardView correctly. When going from isFaceUp true to false the back ground to not complete refresh in the simulator or active preview. The right top card works but it begins not the refresh the top of the card as it goes left on the screen and get worse when the cards on that are further down the screen. The Cards refresh less and less of the top of the card as it gets lower on the screen on the left half of the screen. Boarder shows properly but red does not completely always fill when completely when isFaceUp goes false for every card. The ones on the top left work but as you go down and left less of the top of the card fills in the "RoundedRectangle(cornerRadius: 20.0)" I guess the "LazyVGrid(columns: [GridItem(.adaptive(minimum: 68))])" fails to work properly. Do not plan to upgrade the iPad Air since I do not trust Apple code now!

//

//  ContentView.swift

//  Memorize

//

//  Created by Reigh Jack on 8/19/21.

//  using CS193P Spring 2021

//

import SwiftUI

struct ContentView: View {

    var emojis = ["🚲", "🚂", "🚁", "🚜", "🚕" ,"🏎", "🚖", "🚐", "🚒", "✈️", "🚀", "⛵️", "🛸", "🛶", "🚌", "🏍", "🛺", "🚠", "🛵", "🚗", "🚚", "🚇", "🛻", "🚝"]

    @State var emojiCount = 20

    var body: some View {

        VStack{

            ScrollView {

                LazyVGrid(columns: [GridItem(.adaptive(minimum: 68))]) {

                    ForEach(emojis[0..<emojiCount], id: .self ) { emoji in

                        CardView(content: emoji)

                            .aspectRatio( 2/3, contentMode: .fit)

                    }

                }

            }

            .foregroundColor(.red)

        }

        .padding(.horizontal)

    }

}

struct CardView: View {

    var content: String

    @State var isFaceUp: Bool = false

    

    var body: some View {

        ZStack{

            let shape = RoundedRectangle(cornerRadius: 20.0)

            if isFaceUp {

                shape.fill().foregroundColor(.white)

                shape.strokeBorder(lineWidth: 3)

                Text(content).font(.largeTitle)

            } else {

                shape.fill()

            }

        }

        .onTapGesture { isFaceUp = !isFaceUp }

    }

}

struct ContentView_Previews: PreviewProvider {

    static var previews: some View {

        ContentView()

            .preferredColorScheme(.dark)

        ContentView()

            .preferredColorScheme(.light)

  }

}

This size is for the iPhone 12 Mini. That really show the problem

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.

It would be better to format your post in a form that is more readable : use code formatter for the code, don't use oversized fonts (yelling at Apple does not help in anyway) and use the appropriate tags (here SwiftUI would be more relevant than Swift only).    I understand you have solved your problem, which is the most important. Please note also it is good practice to close the threads when issue is solved or question answered. Have a good day.

Xcode certainly has bugs, but your code has too. And you should correct it first:

                    ForEach(emojis[0..<emojiCount], id: .self ) { emoji in

cannot compile. Should be:

                    ForEach(emojis[0..<emojiCount], id: \.self ) { emoji in

Now, looking at your points:

The Simulator does not execute the code the last version 12 worked.

I did run (after correcting the error in your code) in Xcode 13 with iPhone 12 ProMax iOS 15.0 simulator. What is your configuration ?

I will not prepare my device the last version of 12 did. The code below worked on the simulator and real iPad Air 4th gen. 1.) I can not even get the iPad Air connected with nothing running on the iPad. 2.) The simulators can not run the CardView correctly.

They run for me (as much as I tested)

When going from isFaceUp true to false the back ground to not complete refresh in the simulator or active preview. The right top card works but it begins not the refresh the top of the card as it goes left on the screen and get worse when the cards on that are further down the screen. The Cards refresh less and less of the top of the card as it gets lower on the screen on the left half of the screen.

I do not experience this (3 screenshots to illustrate):

  • before turning on flying saucer

  • after turning on

  • after turning off again

Boarder shows properly but red does not completely always fill when completely when isFaceUp goes false for every card. The ones on the top left work but as you go down and left less of the top of the card fills in the "RoundedRectangle(cornerRadius: 20.0)" I guess the "LazyVGrid(columns: [GridItem(.adaptive(minimum: 68))])" fails to work properly.

The screen shot do not seem to confirm this.

Do not plan to upgrade the iPad Air since I do not trust Apple code now!

Or your own code. 😉

Good continuation though.

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.

I tested again, with Xcode 13, iOS 15.0 on simulator.

With iPhone 12 Pro Max (5 items per row). With iPhone 12 pro (4 items per res, as what you showed I guess.

I could not reproduce your issue, in any case. Even after flipping cards several times.

So, could you:

  • detail exactly the use case to get the problem
  • post the exact code you run

The size here is not what it was on my edit screen before submit. If the edit screen should change the size with submit.

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.

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.

XCODE 13.0 is the worst delivery I have received from Apple (Bad Bugs)
 
 
Q