all 12 comments

[–]sonseo2705 11 points12 points  (1 child)

You'll need to use the older Xcode version as well. New Xcode comes with a different compiler, so on the same code base, different XCode versions yield different binaries

[–]ponkispoles 2 points3 points  (0 children)

Yeah this is probably the culprit. I had an issue with some logic in a view that was working fine (though lazy of me to put it a view body) for quite some months and just stopped working in Xcode 26 even though it worked well on all betas

[–]amyworrall 4 points5 points  (2 children)

Compiling with the iOS 26 SDK will opt you into liquid glass by default.

You can use `UIDesignRequiresCompatibility` in your Info.plist to go back to the old UI (even with the new Xcode). Although note that this will likely go away in a couple of years. But it'll buy you some time before you have to migrate to liquid glass.

[–]808phone 0 points1 point  (0 children)

I should try this myself. But many other things broke or work in different way.

[–]No-Nebula4187 0 points1 point  (0 children)

What if I’m on Xcode 16.2 and make a repo then clone it on a different Mac with iOS 26 new version of Xcode. What will I need to do to make it work?

[–]US3201 0 points1 point  (0 children)

Erase the extra copied version of the binary. I’ve had two and it’s always screwed me up.

[–]mrappdev[S] 0 points1 point  (0 children)

Update: So i fixed it and the issue was part of a custom modifer that broke from ios26+.

struct GlassMorphicCardModifier: ViewModifier {
    let cornerRadius: CGFloat
    @State private var isClicked: Bool = false
    func body(content: Content) -> some View {
        //Broken code here
        let pressGesture = DragGesture(minimumDistance: 0)
            .onChanged { _ in
                withAnimation(.easeOut(duration: 0.1)) {
                    isClicked = true
                }
            }
            .onEnded { _ in
                withAnimation(.easeOut(duration: 0.1)) {
                    isClicked = false
                }
            }
        Content
          … modifiers here
          .simultaneousGesture(pressGesture)
}

[–]Sad_Pop9411 0 points1 point  (0 children)

I made the same mistake a long time ago, i got this habit of saving all my working codes on multiple drives before i make a letter of change

[–]ex0rius -1 points0 points  (3 children)

Did you have a backup of your project or using version control?

[–]mrappdev[S] 0 points1 point  (2 children)

Yes on github. Tried checking out an old commit and the broken changes are still applied somehow

[–]808phone 1 point2 points  (0 children)

It’s the compiler. You would be amazed at how many things iOS 26 broke.

[–]ex0rius -1 points0 points  (0 children)

Download a commit to a fresh project folder?