Search results for

Swift 6

49,201 results found

Post

Replies

Boosts

Views

Activity

iOS 26 didRegisterForRemoteNotificationsWithDeviceToken is not being called
We have an app in Swift that uses push notifications. It has a deployment target of iOS 15.0 I originally audited our app for iOS 26 by building it with Xcode 26 beta 3. At that point, all was well. Our implementation of application:didRegisterForRemoteNotificationsWithDeviceToken was called. But when rebuilding the app with beta 4, 5 and now 6, that function is no longer being called. I created a simple test case by creating a default iOS app project, then performing these additional steps: Set bundle ID to our app's ID Add the Push Notifications capability Add in application:didRegisterForRemoteNotificationsWithDeviceToken: with a print(HERE) just to set a breakpoint. Added the following code inside application:didFinishLaunchingWithOptions: along with setting a breakpoint on the registerForRemoteNotifications line: UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .alert, .sound]) { granted, _ in DispatchQueue.main.async { UIApplication.shared.registerForRemoteNoti
4
0
190
3w
Reply to iOS 18 CoreFoundation crash in __CFRunLoopServiceMachPort (EXC_BREAKPOINT SIGTRAP)
You’re using a third-party crash reporter and it’s undermining your ability to debug this issue. This is not uncommon. I discuss this in way too much detail in Implementing Your Own Crash Reporter. My advice is that you remove your third-party crash reporter and then wait for new Apple crash reports to arrive. To illustrate the sorts of problems I’m talking about here, let me pull apart that second crash report, starting with this: Exception Type: EXC_CRASH (SIGSEGV) Exception Codes: 0x0000000000000000, 0x0000000000000000 Triggered by Thread: 0 This shows that your process crashed due to a memory access exception. That it, it was running some code that accessed an invalid memory location. Let’s look at the backtrace of the crashing thread: Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib … mach_msg2_trap + 8 (:-1) 1 libsystem_kernel.dylib … mach_msg2_internal + 76 (mach_msg.c:201) 2 libsystem_kernel.dylib … mach_msg_overwrite + 428 (mach_msg.c:0) 3 libsystem_kernel.dylib … mach_msg + 24 (mach_msg.c:3
Topic: App & System Services SubTopic: General Tags:
2w
UISlider valueChanged has uninitialized UIEvent
This issue was in the first iOS 26 beta and it still there with Xcode 26 beta 6 (17A5305f). Feedback is FB18581605 and contains sample project to reproduce the issue. I assign a target and action to a UISlider for the UIControl.Event.valueChanged value: addTarget(self, action: #selector(sliderValueDidChange), for: .valueChanged) Here’s the function. @objc func sliderValueDidChange(_ sender: UISlider, event: UIEvent) { print(event) } When printing the event value, there is a crash. When checking the event value with lldb, it appears uninitialized.
Topic: UI Frameworks SubTopic: UIKit Tags:
7
0
265
2w
App name not localized
Now using Xcode 26 beta 6, and iOS/iPadOS 26 beta 7 - and I found the codes do not compiled with localized name. Since I have been buidling the codes since beta 1, the app might have localized name in the past. Even Localizable file is there with proper translation. I have however, started to build icon using Icon Composer (before that was not). I have also tried to add in CFBundleDisplayName and CFBundleName in Localizable file, and same (English is shown). What have I done wrong or forget to do?
1
0
53
2w
Reply to UISlider valueChanged has uninitialized UIEvent
@DTS Engineer unfortunately yes. I reproduced with Xcode 26 beta 6 (17A5305f) and an iPad running iOS 26 beta 7 (23A5326a). The following code will produce the runtime exception. slider.addTarget( self, action: #selector(sliderValueDidChange(_:for:)), for: .valueChanged ) // ... @objc func sliderValueDidChange(_ sender: UISlider, for event: UIEvent) { print(event) } whereas changing the event parameter type to UIControl.Event doesn't produce it: @objc func sliderValueDidChange(_ sender: UISlider, for event: UIControl.Event) { print(event) } Do note that changing the action method body to @objc func sliderValueDidChange(_ sender: UISlider, for event: UIEvent) { print(Event: (event)) } has always been working fine, but that is because the String interpolation treats the event value as nil I believe (by printing an empty String).
Topic: UI Frameworks SubTopic: UIKit Tags:
2w
Reply to iOS 26 Beta breaks scroll/gesture in SwiftUI chat (worked in iOS 18): Simultaneous gestures & ScrollViewReader issues
I can confirm the same issue on iOS 26 beta 6. We have been using simultaneousGesture() as a workaround for the well-known bug, which is the same one BAR115 mentioned earlier. However, this workaround appears to be broken as well. At the moment, it seems there is no reliable way to use buttons inside sheets. This is just ridiculous.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
2w
Reply to The App's expiry date earlier than the expiry date of Provisioning Profile
The provisioning profile we are using is for in-house development. We understand that normally the in-house provisioning profiles expire after a year. However, after we rebuild and redistribute our app, the new in-house provisioning profile's expiration date cannot be updated. We tried to rebuild and redistribute the app in Jul 2025 and Aug 2025. The in-house provisioning profile expiration date still keeps on 6 May 2026, which is less than a year. Is there any other way to clear the cache (?) or update the expiration date of the in-house provisioning profiles?
Topic: Business & Education SubTopic: General Tags:
2w
[iOS 26 Beta] BGTaskScheduler.supportedResources incorrectly reports no GPU support for BGContinuedProcessingTask on capable hardware
Testing Environment: iOS: 26.0 Beta 7 Xcode: Beta 6 Description: We are implementing the new BGContinuedProcessingTask API introduced in iOS 26. We have followed the official documentation and WWDC session guidance to configure our project. The Background Modes (processing) and Background GPU Access capabilities have been added in Xcode. The com.apple.developer.background-tasks.continued-processing.gpu entitlement is present and set to in the .entitlements file. The provisioning profile details viewed within Xcode explicitly show that the Background GPU Access capability and the corresponding entitlement are included. Despite this correct configuration, when running the app on supported hardware (iPhone 16 Pro), a call to BGTaskScheduler.supportedResources.contains(.gpu) consistently returns false. This prevents us from setting request.requiredResources = .gpu. As a result, when the BGContinuedProcessingTask starts without the GPU resource flag, our internal Metal-based exporter attempts to access th
3
0
106
3w
Debugging updateAppShortcutParameters not adding shortcuts to Shortcuts App
So I'm developing an ios application which should be showing shortcuts, but its not. I'm not sure how to debug why the functionality isnt working. Believe I'm correctly calling AppShortcutsProvider's updateAppShortcutParameters, but I dont see any errors in the console showing me a problem. And in fact, I made a simplified just swift version that works before I tried to integrate it into a more complex project. But now I'm at a loss as to what is going wrong or what debug tools I can use to figure it out. Any help would be appreciated. When building my project I see: 025-08-18 14:07:49.371 appintentsmetadataprocessor[57506:35387547] Starting appintentsmetadataprocessor export 2025-08-18 14:07:49.414 appintentsmetadataprocessor[57506:35387547] Writing Metadata.appintents 2025-08-18 14:07:49.414 appintentsmetadataprocessor[57506:35387547] Metadata root: /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework
2
0
69
3w
ELEMENT_TYPE_OF_SET_VIOLATES_HASHABLE_REQUIREMENTS
Is this possible while inserting a String into Set Crashed: com.apple.root.user-initiated-qos.cooperative 0 libswiftCore.dylib 0xf4c0 _assertionFailure(_:_:flags:) + 136 1 libswiftCore.dylib 0x17f484 ELEMENT_TYPE_OF_SET_VIOLATES_HASHABLE_REQUIREMENTS(_:) + 3792 2 MyEatApp 0x44f6e8 specialized _NativeSet.insertNew(_:at:isUnique:) + 4333926120 (<compiler-generated>:4333926120) 3 MyEatApp 0x44eaec specialized Set._Variant.insert(_:) + 4333923052 (<compiler-generated>:4333923052) 4 MyEatApp 0x479f7c HomeViewModel.hanldeAnnouncementCard(from:) + 293 (HomeViewModel+PersonalizedOffer.swift:293) 5 libswift_Concurrency.dylib 0x5c134 swift::runJobInEstablishedExecutorContext(swift::Job*) + 292 6 libswift_Concurrency.dylib 0x5d5c8 swift_job_runImpl(swift::Job*, swift::SerialExecutorRef) + 156 7 libdispatch.dylib 0x13db0 _dispatch_root_queue_drain + 364 8 libdispatch.dylib 0x1454c _dispatch_worker_thread2 + 156 9 libsystem_pthread.dylib 0x9d0 _pthread_wqthread + 23
6
0
300
3w