Post

Replies

Boosts

Views

Activity

iPadOS version 16.4
I updated my iPad today to version 16.4 and now when I try to transfer my app from Xcode to the iPad I get the following error: "Failed to prepare the device for development. This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your Mac and device in order to correctly detect compatibility." My Xcode version is Version 14.2 (14C18). Does anyone know how I can resolve this. I was able to transfer the app earlier today before I updated the iPad version.
1
0
274
Mar ’23
Problem archiving a project
I have an Xcode 14.2 project that compiles and runs without error on the simulators and my testing devices but when I try to archive the project I get the following error message: None of the input catalogs contained a matching stickers icon set or app icon set named "AppIcon". Does anyone know what might be causing me this error? In my Assets I can see an asset called AppIcon that contains the 1024x1024 icon for my app.
0
0
232
Mar ’23
How to set zIndex inside VStack and HStack
I'm trying to display overlapping images and when one image is selected and moved it is brought to the front by setting .zIndex. The code works fine when the images are just in one ZStack or just in one HStack but when the two are nested it doesn't work. Does anyone know what code changes are required to make this function the way I want it to? enum DragState {   case good   case bad } struct MyObject: View {   @State var dragAmount = CGSize.zero   @State var dragState = DragState.bad       var myImage: Image = Image("myImage")   var onChanged: ((CGPoint, MyObject) -> DragState)?   var body: some View {     myImage     .resizable()     .frame(width: 100, height: 150)     .offset(dragAmount)     .zIndex(dragAmount == .zero ? 0 : 1)     .gesture(       DragGesture(coordinateSpace: .global)         .onChanged {           self.dragAmount = CGSize(width: $0.translation.width, height: $0.translation.height)           self.dragState = self.onChanged?($0.location, self) ?? .bad         }         .onEnded {           _ in           self.dragAmount = .zero         })   } } struct ContentView: View {   @State private var cardFrames = [CGRect](repeating: .zero, count: 7)   var body: some View {     var i = 0     VStack (alignment: .trailing, spacing: -85) {       ForEach(0..<3) { row in         HStack {           ForEach(row..<3) { col in             MyObject()               .allowsHitTesting(true)               .overlay(                 GeometryReader { geo in                 Color.clear                   .onAppear {                     self.cardFrames[i] = geo.frame(in: .global)                 i = i + 1                   }                 }               )           }         }       }     }   }       func moved(p1:CGPoint, object: MyObject) -> DragState {      return .good   } }
4
0
631
Feb ’23