Search results for

“xcode github”

96,032 results found

Post

Replies

Boosts

Views

Activity

Reply to macOS main.swift and Main actor-isolated conformance cannot be used in nonisolated context
I got this working as following: Using Xcode 26.4, I created a new project from the macOS > App template, choosing Storyboard for the UI. I removed @main from AppDelegate. I added a main.swift file like so: import Cocoa func main() { let delegate = AppDelegate() _ = NSApplication.shared NSApp.delegate = delegate NSApp.run() } main() The difference is that I put the code into a main() function. That function name isn’t special — you could just as easily call it foo() — but it’s important that the code not be at the top level. Top-level code is weird in Swift (-: Having said that, I recommend against doing this. Rather, just call NSApplicationMain. Note that the doc you referenced says “which is functionally similar to”, not “is implement as”. The actual implementation of NSApplicationMain is very different, and by not calling it you’re taking yourself far off the beaten path. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Programming Languages SubTopic: Swift Tags:
2w
ITMS-90429: Invalid Swift Support on libswiftCompatibilitySpan.dylib after update to Xcode 26.4.1
Hello, after updating to Xcode 26.4.1, our app is rejected on App Store Connect because of the following error: ITMS-90429: Invalid Swift Support - The files libswiftCompatibilitySpan.dylib aren’t at the expected location /Payload/AlbusAir.app/Frameworks. Move the file to the expected location, rebuild your app using the current public (GM) version of Xcode, and resubmit it. We did not change anything to the code, we didn't update any dependency. As far as I'm aware, we don't use Spans in Swift. I even tried copying the dylib myself in the app in a Xcode build phase and it still doesn't work. Can someone help? Thanks !
7
0
244
2w
Xcode 26 Is a Productivity Killer: Removes Option To Open Files in New Window Tab
FB19249805 Main: The option to open files in New Window Tab doesn't appear anywhere in either Preferences or the contextual menu on clicking the files in the project (unlike previous Xcode versions). Only the option to open in New Tab is available (which is useless). This BREAKS EXISTING WORKFLOWS that have been established through years for countless developers. I can only see the option to open in New Tab, which breaks all existing workflows and habits. This results in an astonishing blow to productivity. Dear Xcode team: Please restore this option immediately! Additional details: Several years ago (I've been using Xcode since version 2), Xcode renamed the normal tabs into Window Tabs and introduced new Tabs. The new Tabs proved to be a useless and counterproductive option for the following reasons: -They cannot be used in Behaviors. (Only Window Tabs can be, and many workflows have been built around this.) -It takes much longer to load a file into a Tab than into a Windo
0
0
126
2w
visionOS: AVFoundation cannot deliver simultaneous video from two external (UVC) cameras; no public USB fallback exists
Area: visionOS 26.4 · AVFoundation · AVCapture · External/UVC video Classification: Suggestion / API Enhancement Request (also: Incorrect/Missing Documentation) Device / OS: Apple Vision Pro, visionOS 26.x. Xcode 26.4.1, XROS26.4.sdk. Summary On visionOS, a third-party app cannot display two UVC USB cameras (connected through a powered USB-C hub) at the same time. Every AVFoundation path that would enable this on iPadOS is either unavailable or fails at runtime on visionOS, and there is no public non-AVFoundation fallback (no IOUSBHost, no DriverKit, no usable CoreMediaIO, no MFi path for generic UVC devices). This is a real capability gap relative to iPadOS and macOS, and Camo Studio on iPadOS (App Store ID 6450313385) demonstrates the two-camera USB-hub use case is legitimate and valuable for spatial-video/hybrid-capture workflows on Vision Pro. Steps to reproduce Connect a powered USB-C hub to Apple Vision Pro with two UVC webcams attached. Build a visionOS app that uses AVCaptureDevice.D
1
0
1.1k
2w
Complications Unavailable on iOS When Adding Custom Watch Face (App Store Build), But Works Fine on watchOS & in TestFlight​
Hi Apple Developer Community, I’m encountering an issue with complications (复杂功能) in my Apple Watch app after releasing it to the App Store. Here’s the scenario: During development and TestFlight testing, complications work correctly. Users can add the custom watch face from the iPhone and all complications display properly. After releasing to the App Store, when users try to add the same custom watch face from their iPhone, they see the error: “Complications Unavailable” (复杂功能不可用). However, if users add the watch face directly from their Apple Watch, complications load and work normally. Environment Details: watchOS: 26.3 iOS: 26.3.1 Xcode: 26.2 Distribution: App Store (release build) What I’ve tried so far: Verified that the complication data source is properly configured in the WatchKit extension. Confirmed that the app’s bundle ID and App Groups are consistent across debug and release configurations. Ensured that the complication entitlements and privacy permissions are declared in both iOS and w
1
0
36
2w
Xcode 26.4.1: Another blow to productivity: the update resets all windows and tabs
FB22576466 Another update - another blow to developers' productivity from the Xcode team, and more time wasted. Xcode 26.4.1 reset all windows and tabs in all projects. All carefully set up window tabs in multiple projects, as well as the ones that were previously open, are gone. Developers now have to set them up manually again. Ok there's nothing that can be done in 26.4.1 already; the damage has already been done. But dear Xcode development team... just DON'T. DO. THIS. AGAIN. Please! Tanks.
0
0
46
2w
Previews crash after making change to Swift Package version
Previews seemed to be working okay. However, I wanted to test out some changes inside of a package that I'm working on for work, but in a lighter project since in our main project (where I have the package pulled in locally for now) is just too big to have the previews render in a decent amount of time. So, I opened a small project that was already importing that package and was set to 'Up to Next Major', but I switched that to 'branch' and added my branch. This is the second time I've done that and it causes Xcode to freak out in terms of the previews. This is the code I have: import SwiftUI extension EnvironmentValues { @Entry var trailingDescriptionColorToken: Color = .secondary } extension View { func updateTrailingDescriptionColor(to colorToken: Color, when trigger: Bool) -> some View { environment(.trailingDescriptionColorToken, trigger ? colorToken : .secondary) } } // MARK: - ListItemDescription public struct ListItemDescription: View { @Environment(.trailingDescriptionColorToken) var trai
0
0
26
2w
Reply to RN IOS APP & WatchOS Companion
If you are building an iOS app with a companion watchOS app, the watchOS app bundle has to be embedded in a certain location in the iOS app bundle. Xcode takes care all that if you manage the apps as two targets in one single project. Putting the apps to separate repositories can't achieve that, unless you'd have a post build script to do all the trick, which will add unnecessary complexity to your build process. So yes, I'd strongly recommend that you keep your iOS app and its companion watchOS app in one single Xcode project. Best, —— Ziqiao Chen  Worldwide Developer Relations.
2w
Reply to MTL4FXTemporalDenoisedScaler initialization
Thank you for testing that. Since supportsMetal4FX(_:) returns true on your iPhone 15 Pro but makeTemporalDenoisedScaler(device:compiler:) crashes, this is a framework bug — the capability check reports support, but initialization fails. Please file a feedback report at https://feedbackassistant.apple.com and attach your sample project from GitHub. The crash in AGXG16XFamilyHeap points to an internal GPU driver issue that engineering will need to investigate. Post the feedback number here so we can track it. In the meantime, use the non-Metal 4 path as a workaround: let scaler = descriptor.makeTemporalDenoisedScaler(device: device) This avoids the crash and still gives you temporal denoised upscaling, without the Metal 4 command buffer integration.
Topic: Graphics & Games SubTopic: Metal Tags:
2w
Reply to segmented picker style causes runtime warning
Thanks so much for this very interesting post. I used the latest beta of Xcode and I do not see this warning with Version 26.5 beta 2. I believe, but haven’t seen this before, maybe a known issue in SwiftUI on macOS. It occurs because of how SwiftUI bridges AppKit's NSSegmentedControl to the .segmented picker style. That's why changing it to .automatic does not provide you this warning. But please do try the latest beta. Let me know if you can try that Xcode Version. Albert
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
2w
segmented picker style causes runtime warning
On OSX, using a segmented picker style causes the following warning to be emitted (when a different selection is made) : Publishing changes from within view updates is not allowed, this will cause undefined behavior. The warning is not emitted using the 'Preview Canvas' only when running the app. Changing the picker style to automatic also fixes it, but the segmented style is used extensively. Tested using XCode 26.4.1 on MacOS 26.3.1 --- view --- import SwiftUI internal import Combine enum Mode : String { case one, two, three } class MyObject : ObservableObject { @Published var mode : Mode = .one } struct ContentView: View { @StateObject var obj = MyObject() var body: some View { VStack { Picker(Mode,selection: $obj.mode) { Text(One).tag(Mode.one) Text(Two).tag(Mode.two) Text(Three).tag(Mode.three) } .pickerStyle(.segmented) } .padding() } } #Preview { ContentView() } --- app --- import SwiftUI @main struct SwiftUIBugApp: App { var body: some Scene { WindowGroup { ContentView() } } }
6
0
70
2w
Module dependency error
Hi everyone, yesterday i installed some package in my ios app , but i had a lot of problems to compile , due to reset my branch and get started from 0. My project have pods with firebase, lottie, instana and truskit but now, when a i try to run my project, xcode show Unable to resolve module dependency into LOTTIE, INSTANA, TRUSKIT, FIREBASE . I visited a lot of forums and websites, and i tried the followings steps: Pod deintegrate pod repoupdate pod install Clean build folder Delete derived data but isnot working. Also,I reinstalled xcode , 2 versions , i reclone my repository and the issue persist. Sorry, my english is basic only
0
0
45
2w
Reply to SwiftUI bottom bar triggers UIKitToolbar hierarchy fault and constraint errors
import SwiftUI struct ContentView: View { var body: some View { NavigationStack { Text(XX) .toolbar { ToolbarItem(placement: .bottomBar) { Text(YY) } } } } } Here is an even simpler ContentView that demonstrates the same error. This occurs for both iOS 26.4 and iPadOS 26.4 The output generated in the Xcode console is: 'UIKitToolbar' as a subview of UIHostingController.view is not supported and may result in a broken view hierarchy. Add your view above UIHostingController.view in a common superview or insert it into your SwiftUI content in a UIViewRepresentable instead.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
2w
Reply to macOS main.swift and Main actor-isolated conformance cannot be used in nonisolated context
I got this working as following: Using Xcode 26.4, I created a new project from the macOS > App template, choosing Storyboard for the UI. I removed @main from AppDelegate. I added a main.swift file like so: import Cocoa func main() { let delegate = AppDelegate() _ = NSApplication.shared NSApp.delegate = delegate NSApp.run() } main() The difference is that I put the code into a main() function. That function name isn’t special — you could just as easily call it foo() — but it’s important that the code not be at the top level. Top-level code is weird in Swift (-: Having said that, I recommend against doing this. Rather, just call NSApplicationMain. Note that the doc you referenced says “which is functionally similar to”, not “is implement as”. The actual implementation of NSApplicationMain is very different, and by not calling it you’re taking yourself far off the beaten path. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
2w
Reply to Xcode 26 beta 5 xcodebuild crash
Fixed by PR: https://github.com/swiftlang/swift-build/pull/997 It works now on Swift 6.3 / Xcode 26.4
Replies
Boosts
Views
Activity
2w
ITMS-90429: Invalid Swift Support on libswiftCompatibilitySpan.dylib after update to Xcode 26.4.1
Hello, after updating to Xcode 26.4.1, our app is rejected on App Store Connect because of the following error: ITMS-90429: Invalid Swift Support - The files libswiftCompatibilitySpan.dylib aren’t at the expected location /Payload/AlbusAir.app/Frameworks. Move the file to the expected location, rebuild your app using the current public (GM) version of Xcode, and resubmit it. We did not change anything to the code, we didn't update any dependency. As far as I'm aware, we don't use Spans in Swift. I even tried copying the dylib myself in the app in a Xcode build phase and it still doesn't work. Can someone help? Thanks !
Replies
7
Boosts
0
Views
244
Activity
2w
Xcode 26 Is a Productivity Killer: Removes Option To Open Files in New Window Tab
FB19249805 Main: The option to open files in New Window Tab doesn't appear anywhere in either Preferences or the contextual menu on clicking the files in the project (unlike previous Xcode versions). Only the option to open in New Tab is available (which is useless). This BREAKS EXISTING WORKFLOWS that have been established through years for countless developers. I can only see the option to open in New Tab, which breaks all existing workflows and habits. This results in an astonishing blow to productivity. Dear Xcode team: Please restore this option immediately! Additional details: Several years ago (I've been using Xcode since version 2), Xcode renamed the normal tabs into Window Tabs and introduced new Tabs. The new Tabs proved to be a useless and counterproductive option for the following reasons: -They cannot be used in Behaviors. (Only Window Tabs can be, and many workflows have been built around this.) -It takes much longer to load a file into a Tab than into a Windo
Replies
0
Boosts
0
Views
126
Activity
2w
visionOS: AVFoundation cannot deliver simultaneous video from two external (UVC) cameras; no public USB fallback exists
Area: visionOS 26.4 · AVFoundation · AVCapture · External/UVC video Classification: Suggestion / API Enhancement Request (also: Incorrect/Missing Documentation) Device / OS: Apple Vision Pro, visionOS 26.x. Xcode 26.4.1, XROS26.4.sdk. Summary On visionOS, a third-party app cannot display two UVC USB cameras (connected through a powered USB-C hub) at the same time. Every AVFoundation path that would enable this on iPadOS is either unavailable or fails at runtime on visionOS, and there is no public non-AVFoundation fallback (no IOUSBHost, no DriverKit, no usable CoreMediaIO, no MFi path for generic UVC devices). This is a real capability gap relative to iPadOS and macOS, and Camo Studio on iPadOS (App Store ID 6450313385) demonstrates the two-camera USB-hub use case is legitimate and valuable for spatial-video/hybrid-capture workflows on Vision Pro. Steps to reproduce Connect a powered USB-C hub to Apple Vision Pro with two UVC webcams attached. Build a visionOS app that uses AVCaptureDevice.D
Replies
1
Boosts
0
Views
1.1k
Activity
2w
Complications Unavailable on iOS When Adding Custom Watch Face (App Store Build), But Works Fine on watchOS & in TestFlight​
Hi Apple Developer Community, I’m encountering an issue with complications (复杂功能) in my Apple Watch app after releasing it to the App Store. Here’s the scenario: During development and TestFlight testing, complications work correctly. Users can add the custom watch face from the iPhone and all complications display properly. After releasing to the App Store, when users try to add the same custom watch face from their iPhone, they see the error: “Complications Unavailable” (复杂功能不可用). However, if users add the watch face directly from their Apple Watch, complications load and work normally. Environment Details: watchOS: 26.3 iOS: 26.3.1 Xcode: 26.2 Distribution: App Store (release build) What I’ve tried so far: Verified that the complication data source is properly configured in the WatchKit extension. Confirmed that the app’s bundle ID and App Groups are consistent across debug and release configurations. Ensured that the complication entitlements and privacy permissions are declared in both iOS and w
Replies
1
Boosts
0
Views
36
Activity
2w
Xcode 26.4.1: Another blow to productivity: the update resets all windows and tabs
FB22576466 Another update - another blow to developers' productivity from the Xcode team, and more time wasted. Xcode 26.4.1 reset all windows and tabs in all projects. All carefully set up window tabs in multiple projects, as well as the ones that were previously open, are gone. Developers now have to set them up manually again. Ok there's nothing that can be done in 26.4.1 already; the damage has already been done. But dear Xcode development team... just DON'T. DO. THIS. AGAIN. Please! Tanks.
Replies
0
Boosts
0
Views
46
Activity
2w
Previews crash after making change to Swift Package version
Previews seemed to be working okay. However, I wanted to test out some changes inside of a package that I'm working on for work, but in a lighter project since in our main project (where I have the package pulled in locally for now) is just too big to have the previews render in a decent amount of time. So, I opened a small project that was already importing that package and was set to 'Up to Next Major', but I switched that to 'branch' and added my branch. This is the second time I've done that and it causes Xcode to freak out in terms of the previews. This is the code I have: import SwiftUI extension EnvironmentValues { @Entry var trailingDescriptionColorToken: Color = .secondary } extension View { func updateTrailingDescriptionColor(to colorToken: Color, when trigger: Bool) -> some View { environment(.trailingDescriptionColorToken, trigger ? colorToken : .secondary) } } // MARK: - ListItemDescription public struct ListItemDescription: View { @Environment(.trailingDescriptionColorToken) var trai
Replies
0
Boosts
0
Views
26
Activity
2w
Reply to RN IOS APP & WatchOS Companion
If you are building an iOS app with a companion watchOS app, the watchOS app bundle has to be embedded in a certain location in the iOS app bundle. Xcode takes care all that if you manage the apps as two targets in one single project. Putting the apps to separate repositories can't achieve that, unless you'd have a post build script to do all the trick, which will add unnecessary complexity to your build process. So yes, I'd strongly recommend that you keep your iOS app and its companion watchOS app in one single Xcode project. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Replies
Boosts
Views
Activity
2w
Reply to MTL4FXTemporalDenoisedScaler initialization
Thank you for testing that. Since supportsMetal4FX(_:) returns true on your iPhone 15 Pro but makeTemporalDenoisedScaler(device:compiler:) crashes, this is a framework bug — the capability check reports support, but initialization fails. Please file a feedback report at https://feedbackassistant.apple.com and attach your sample project from GitHub. The crash in AGXG16XFamilyHeap points to an internal GPU driver issue that engineering will need to investigate. Post the feedback number here so we can track it. In the meantime, use the non-Metal 4 path as a workaround: let scaler = descriptor.makeTemporalDenoisedScaler(device: device) This avoids the crash and still gives you temporal denoised upscaling, without the Metal 4 command buffer integration.
Topic: Graphics & Games SubTopic: Metal Tags:
Replies
Boosts
Views
Activity
2w
Reply to segmented picker style causes runtime warning
I can't really run the beta, because I need to build for production. Did you verify that it occurs under the latest XCode production release?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
2w
Reply to segmented picker style causes runtime warning
Thanks so much for this very interesting post. I used the latest beta of Xcode and I do not see this warning with Version 26.5 beta 2. I believe, but haven’t seen this before, maybe a known issue in SwiftUI on macOS. It occurs because of how SwiftUI bridges AppKit's NSSegmentedControl to the .segmented picker style. That's why changing it to .automatic does not provide you this warning. But please do try the latest beta. Let me know if you can try that Xcode Version. Albert
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
2w
segmented picker style causes runtime warning
On OSX, using a segmented picker style causes the following warning to be emitted (when a different selection is made) : Publishing changes from within view updates is not allowed, this will cause undefined behavior. The warning is not emitted using the 'Preview Canvas' only when running the app. Changing the picker style to automatic also fixes it, but the segmented style is used extensively. Tested using XCode 26.4.1 on MacOS 26.3.1 --- view --- import SwiftUI internal import Combine enum Mode : String { case one, two, three } class MyObject : ObservableObject { @Published var mode : Mode = .one } struct ContentView: View { @StateObject var obj = MyObject() var body: some View { VStack { Picker(Mode,selection: $obj.mode) { Text(One).tag(Mode.one) Text(Two).tag(Mode.two) Text(Three).tag(Mode.three) } .pickerStyle(.segmented) } .padding() } } #Preview { ContentView() } --- app --- import SwiftUI @main struct SwiftUIBugApp: App { var body: some Scene { WindowGroup { ContentView() } } }
Replies
6
Boosts
0
Views
70
Activity
2w
Module dependency error
Hi everyone, yesterday i installed some package in my ios app , but i had a lot of problems to compile , due to reset my branch and get started from 0. My project have pods with firebase, lottie, instana and truskit but now, when a i try to run my project, xcode show Unable to resolve module dependency into LOTTIE, INSTANA, TRUSKIT, FIREBASE . I visited a lot of forums and websites, and i tried the followings steps: Pod deintegrate pod repoupdate pod install Clean build folder Delete derived data but isnot working. Also,I reinstalled xcode , 2 versions , i reclone my repository and the issue persist. Sorry, my english is basic only
Replies
0
Boosts
0
Views
45
Activity
2w
Reply to SwiftUI bottom bar triggers UIKitToolbar hierarchy fault and constraint errors
import SwiftUI struct ContentView: View { var body: some View { NavigationStack { Text(XX) .toolbar { ToolbarItem(placement: .bottomBar) { Text(YY) } } } } } Here is an even simpler ContentView that demonstrates the same error. This occurs for both iOS 26.4 and iPadOS 26.4 The output generated in the Xcode console is: 'UIKitToolbar' as a subview of UIHostingController.view is not supported and may result in a broken view hierarchy. Add your view above UIHostingController.view in a common superview or insert it into your SwiftUI content in a UIViewRepresentable instead.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
2w