Overview

Post

Replies

Boosts

Views

Activity

How to Move and Rotate WindowGroup with Code in Xcode
当我进入混合空间时,出现一个模型,但模型后面有一个 windowGroup,无法完全查看。如果我想点击进入 mix 空间,我需要使用代码将 windowGroup 移动到另一个位置,而不是手动移动 ![](“https://developer.apple.com/forums/content/attachment/0471ead0-4c74-43a7-9ecc-12e67e81cec6” “title=WechatIMG31.jpg;宽度=915;高度=777”)
0
0
3
31m
I uploaded the app to TestFlight, but the new version doesn’t appear in the TestFlight app.
Hello, I uploaded a new build to TestFlight, and it has been about an hour since the processing was completed. However, the update is still not showing up in the TestFlight app. From my experience, the update usually appears within 10 to 30 minutes, but this time it is taking unusually long. I’m wondering if anyone else has experienced a similar issue and found a solution. Any advice or guidance would be greatly appreciated. Thank you!
0
0
3
42m
How to implement a CoreML model into an iOS app properly?
I am working on a lung cancer scanning app in for iOS with a CoreML model and when I test my app on a physical device, the model results in the same prediction 100% of the time. I even changed the names around and still resulted in the same case. I have listed my labels in cases and when its just stuck on the same case (case 1) My code is below: https://github.com/ShivenKhurana1/Detect-to-Protect-App/blob/main/DetectToProtect/SecondView.swift I couldn't add the code as it was too long so I hope github link is fine!
0
0
4
3h
Xcode App Crashing after Initial Launch
I'm quite new to Xcode development, and I've been having an issue test-running my app. When I run the app on my iPhone from my Mac, the app launches properly and works initially. However, when I close the app fully and try to reopen it, it keeps crashing. This occurs whether I test on a physical device or an iPhone simulator. Somehow, this issue does not occur when the app is run on Profile mode. I would appreciate any pointers to debug this.
0
0
8
3h
TabView Alignment Issue Inside a Popover on iPadOS
I've encountered an issue when using TabView inside a Popover on iPadOS, and I wanted to see if anyone else has run into this or if there's a known workaround before I file a bug report. Issue: When placing a TabView inside a Popover on iPadOS, the tab bar is not center-aligned correctly if the popover’s arrow appears on either the leading or trailing edge. It seems that the centering calculation for the TabView includes the width of the arrow itself. If the popover arrow is on the left, the tabs inside the TabView are pushed to the left. If the popover arrow is on the right, the tabs shift toward the right. This suggests that SwiftUI is incorporating the popover arrow’s width into the alignment calculation, which results in the misalignment. Questions: Has anyone else encountered this behavior? Is there a known workaround to ensure proper centering? If this is indeed a bug, should I file a report through Feedback Assistant? Any insights would be greatly appreciated!
0
0
4
3h
ForEach with binding seems to be broken in iOS 18.3.1 and iOS 18.4
Super easy to reproduce. Swiping to delete on the last remaining item in the list causes an index out of bounds exception. If you have 2 items in your list, it will only happen when you delete the last remaining item. From my testing, this issue occurs on 18.3.1 and onward (the RC it happens). I didn't test 18.3.0 so it might happen there as well. The only workarounds I have found is to add a delay before calling my delete function: OR to comment out the Toggle. So it seems as though iOS 18.3.x added a race condition in the way the ForEach accesses the values in its binding. Another thing to note, this also happens with .swipeActions, EditMode, etc... any of the built in ways to delete an item from a list. import SwiftUI struct ContentView: View { @StateObject var viewModel = ContentViewModel() var body: some View { List { ForEach($viewModel.items) { $item in HStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text($item.text.wrappedValue) Spacer() Toggle(String(""), isOn: $item.isActive) .labelsHidden() } } .onDelete(perform: delete) } } func delete(at offsets: IndexSet) { // uncomment task to make code not crash // Task { viewModel.deleteItem(at: offsets) // } } } struct MyItem: Identifiable { var id: UUID = UUID() var text: String var isActive: Bool } class ContentViewModel: ObservableObject { @Published var items: [MyItem] = [MyItem(text: "Hello, world!", isActive: false)] func deleteItem(at offset: IndexSet) { items.remove(atOffsets: offset) } }
0
1
23
3h
Can't build onto iPhone 16e with XCode 16.1
I'm trying to debug on my iPhone 16e and I'm running into this error: Error mounting image: 0xe800010f (kAMDMobileImageMounterPersonalizedBundleMissingVariantError: The bundle image is missing the requested variant for this device.) Since all of my other devices are working fine, I assume this is due to outdated XCode, which is something I see mentioned in other threads. What is the specific XCode version needed to build onto the 16e and is there any workaround for XCode 16.1? Thanks!
2
0
29
6h
Push Notification don't wake up my app
Hi everyone, We're experiencing an issue with our Flutter app that uses PushKit, CallKit, and Janus for handling VoIP calls. Everything works fine when the app is in the foreground, but when the app is in the background or completely closed (terminated state), the behavior is inconsistent: Sometimes, incoming calls are received as expected. Other times, the app does nothing, and the call is not delivered at all. Upon checking the console logs, we noticed that our app is being canceled (terminated by the system), which seems to be the reason why calls are not coming through. This happens randomly, making it difficult to reproduce consistently. Additional Details: The app is configured to handle VoIP notifications correctly. We are using PushKit to wake up the app and trigger CallKit for the incoming call UI. When the app is active, calls are handled correctly via Janus WebRTC signaling. We have verified that background modes for VoIP are enabled in the Info.plist. We suspect that iOS may be aggressively killing the app in the background, preventing incoming call notifications from reaching it. Questions: Has anyone experienced similar behavior with PushKit + CallKit on recent iOS versions? Could iOS be terminating the app due to background execution policies? Are there recommended best practices to ensure reliable delivery of VoIP notifications when the app is closed? Any insights or suggestions would be greatly appreciated! Thanks! Addional Information: this is the cancellation information at console: Received incoming message on topic hiperme.app at priority 10 por omisión 17:10:18.462084-0300 dasd CANCELED: com.apple.pushLaunch.hiperme.app:E8BACD at priority 10
0
0
11
6h
URLSession is broken in iOS 18.4 RC Simulator
I'm seeing fully reproducible issues with URLSession on iOS 18.4 RC Simulator running from Xcode 16.3 RC. URLSession seems to get into a broken state after a second app run. The following sample succeeds in fetching the JSON on first app run but when the app is closed and ran again it fails with one of these errors: Error: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." Error: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." I'm wondering if this something related to my OS setup or is this due to internal URLSession changes in iOS 18.4. Already submitted as FB17006003. Sample code attached below: import SwiftUI @main struct NetworkIssue18_4App: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { @State private var message: String = "" var body: some View { VStack { Text(message) Button("Try Again") { Task { await fetch() } } } .task { await fetch() } } private func fetch() async { message = "Loading..." let url = URL(string: "https://poetrydb.org/title/Ozymandias/lines.json")! let session = URLSession.shared do { let response = try await session.data(from: url) print("Response: \(response)") message = "Success, data length: \(response.0.count)" } catch { print("Error: \(error)") message = "Error: \(error.localizedDescription)" } } }
1
1
36
8h
Mail server connection problem.
Hello, i am currently running iOS 18.4 Public Beta (22E5232a) on an iPhone 16 Pro and i have problems with getting emails in the native mail app. i cannot receive any email from some of my email addresses. there is an “account error“ message that says: “Cannot get mail, The connection to the server failed.” When i enter my password again in settings it works for 1-2 days then stop working. On my iPhone X running iOS 16.7.10 it works perfectly. Only bugs on my iPhone 16 Pro.
2
0
16
8h
Sandbox Testing Issue: 'Submit for Review' Button Missing for Subscription IAPSubmit
Hello Developers! I am trying to run a test In-App Purchase (IAP) for a renewable subscription product in the sandbox environment. I have set up everything required for sandbox testing, but it’s unclear whether the subscription product needs to be pre-approved by Apple for testing. If approval is required, I have already added the necessary metadata, but the status still shows "Ready for Submit." Additionally, when I save the page, a "Submit for Review" button briefly appears for a fraction of a second on the subscription page before disappearing. Is this button missing, or is there a known issue with this process? This is my first time running this test, and I would appreciate any pointers or suggestions. Thanks!
0
0
13
8h
[Suggestion] SwiftUI convenience environment navigation functions
I've been thinking a lot about how navigation and presentation are managed in SwiftUI, and I wanted to propose an idea for a more streamlined approach using environment values. Right now, handling navigation can feel fragmented — especially when juggling default NavigationStack, modals, and tab selections. What if SwiftUI provided a set of convenience environment values for these common actions? Tabs @Environment(\.selectedTab) var selectedTab @Environment(\.selectTab) var selectTab selectedTab: Read the current tab index selectTab(index: Int): Programmatically switch tabs Stack Navigation @Environment(\.stackCount) var stackCount @Environment(\.push) var push @Environment(\.pop) var pop @Environment(\.popToRoot) var popToRoot stackCount: Read how many views are in the navigation stack push(destination: View): Push a new view onto the stack pop(last: Int = 1): Pop the last views popToRoot(): Return to the root view Modals @Environment(\.sheet) var sheet @Environment(\.fullScreenCover) var fullScreenCover @Environment(\.popover) var popover @Environment(\.dismissModal) var dismissModal sheet(view: View): Present a sheet fullScreenCover(view: View): Present a full-screen cover popover(view: View): Show a popover dismissModal(): Dismiss any presented modal Alerts & Dialogs @Environment(\.alert) var alert @Environment(\.confirmationDialog) var confirmationDialog @Environment(\.openAppSettings) var openAppSettings alert(title: String, message: String): Show an alert confirmationDialog(title: String, actions: [Button]): Show a confirmation dialog openAppSettings(): Directly open the app’s settings Why? Clean syntax: This keeps navigation code clean and centralized. Consistency: Environment values already manage other app-level concerns (color scheme, locale, etc.). Why not navigation too? Reusability: This approach is easy to adapt across different view hierarchies. Example @main struct App: App { var body: some Scene { WindowGroup { TabView { NavigationStack { ProductList() } .tabItem { ... } NavigationStack { OrderList() } .tabItem { ... } } } } } struct ProductList: View { @Environment(\.push) var push @State var products: [Product] = [] var body: some View { List(protucts) { product in Button { push(destination: ProductDetails(product: product)) } } label: { ... } } .task { ... } } } struct ProductDetails: View { ... }
3
0
18
8h