Post

Replies

Boosts

Views

Created

Cannot find 'atomic_flag' in scope in Xcode 26
Hi, In Xcode 16.4, the atomic_flag() method can be used, but in Xcode 26.0, it is not available. An error message saying Cannot find 'atomic_flag' in scope is displayed. This can be reproduced simply by trying to use atomic_flag() in a newly created empty project. Thank you. Xcode: Version 26.0 beta 4 (17A5285i), macOS: 15.5(24F74) import SwiftUI struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() .task { _ = atomic_flag() } } }
1
1
161
Jul ’25
How to test against non-iOS17 SDKs with Xcode15 series command line tools?
Hello. I would like to perform UnitTest using the xcodebuild command in Xcode15 series, but it does not work. Specifically, I want to run the test on an iPhone 14 with iOS 16.4 simulator environment, but for some reason it fails due to a certificate mismatch. For some reason I don't want to test on iOS17, so I specify iOS16.4. The following is a pseudo-command to run the test. Thank you! xcodebuild -workspace AppWorkspace.xcworkspace -scheme App -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" -configuration TestConfiguration test
1
0
762
Sep ’23
Unable to preview SwiftUI targeting framework
Hi, Using an Apple silicon mac, I am unable to preview the SwiftUI targeting the framework in a project with EXCLUDED_ARCHS[sdk=iphonesimulator*] set to arm64. Sample project The following log seems to indicate that the x86_64 binary was built according to the build settings, but what was actually needed was the arm64 binary. I would like to know if anyone knows how to solve this problem. Thanks. PotentialCrashError: Update failed XCPreviewAgent may have crashed. Check ~/Library/Logs/DiagnosticReports for any crash logs from your application. ================================== |  RemoteHumanReadableError |   |  LoadingError: failed to load library at path "/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents": Optional(dlopen(/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents, 0x0000): tried: '/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents' (errno=2), '/Users/me/Library/Developer/Xcode/DerivedData/SwiftUIQuestionSample-bqvuazkgqqnpkbdvedgtbpnnzgnw/Build/Intermediates.noindex/Previews/UIComponents/Products/Debug-iphonesimulator/UIComponents.framework/UIComponents' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/UIComponents.framework/UIComponents' (errno=2)) |   |  ================================== |   |  |  MessageSendFailure: Message send failure for <ServiceMessage 3: update>
0
0
863
Jan ’23
LazyVGrid does not render as expected when animated.
Hello. When the LazyVGrid display area is expanded by hiding the View while animating it, the additional View is drawn without animation. Below is a sample code. When the orange color is hidden by pressing a button, the blue and green colors that appear from the bottom of the screen are drawn without animation. This phenomenon does not occur in Canvas. It occurs in the simulator. Is there any way to avoid this phenomenon? Thanks. import SwiftUI struct PlaygroundView: View {   @State var isOrangeHidden = false   let columns = [     GridItem(.fixed(100), spacing: 16),     GridItem(.fixed(100), spacing: 16)   ]       var body: some View {     ScrollView {       Button {         isOrangeHidden.toggle()       } label: {         Text("toggle isOrangeHidden")       }               VStack {         Color.red           .frame(height: 100)         if !isOrangeHidden {           Color.orange             .frame(height: 100)         }       }               LazyVGrid(columns: columns) {         ForEach(0..<100, id: \.self) { index in           if index % 4 == 0 || index % 4 == 3 {             Color.green               .frame(height: 100)           } else {             Color.blue               .frame(height: 100)           }         }       }     }     .padding()     .animation(.easeInOut(duration: 0.2), value: isOrangeHidden)   } } struct PlaygroundView_Previews: PreviewProvider {   static var previews: some View {     PlaygroundView()   } }
0
0
1.1k
Aug ’22