Overview

Post

Replies

Boosts

Views

Activity

UICollectionView drop delegate not called with multiple items
I'm working on implementing drag and drop to rearrange items in my UICollectionView. The issue I'm running into is that my drop delegate's collectionView(_, performDropWith:) method isn't getting called when the drag has multiple items. With single item drags, it works fine. What would cause it to break with multiple items? I've replicated it in a basic sample app. Below is the drop delegate. class CollectionDropDelegate: NSObject, UICollectionViewDropDelegate { let controller: MainViewController init(controller: MainViewController) { self.controller = controller } func collectionView(_ collectionView: UICollectionView, canHandle session: any UIDropSession) -> Bool { session.localDragSession != nil } func collectionView(_ collectionView: UICollectionView, dropSessionDidUpdate session: any UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UICollectionViewDropProposal { if session.localDragSession != nil { .init(operation: .move, intent: .insertAtDestinationIndexPath) } else { .init(operation: .cancel) } } func collectionView(_ collectionView: UICollectionView, performDropWith coordinator: any UICollectionViewDropCoordinator) { let destinationPath = coordinator.destinationIndexPath ?? IndexPath(item: 0, section: controller.items.count) for item in coordinator.items { guard let draggedItem = item.dragItem.localObject as? NumberItem, let currentIndex = controller.items.firstIndex(of: draggedItem) else { continue } controller.items.remove(at: currentIndex) controller.items.insert(draggedItem, at: destinationPath.item) coordinator.drop(item.dragItem, toItemAt: destinationPath) collectionView.moveItem(at: IndexPath(item: currentIndex, section: 0), to: destinationPath) } } }
Topic: UI Frameworks SubTopic: UIKit
2
0
82
4w
Incorrect padding in TextField with .rightToLeft layout direction
When a TextField is set to a rightToLeft layout, it gets strange and unnecessary padding on the left side. This pushes the text away from the edge. This issue doesn't occur in the leftToRight layout, where the text aligns correctly. Does anyone know how to get rid of this extra padding? Environment: Xcode version: 26.0.1 Device: iPhone 13 iOS version: 26.0 Code: struct ContentView: View { @State var textInput: String = "" var body: some View { VStack { Text("rightToLeft") TextField("placeholder", text: $textInput) .background(Color.red) .environment(\.layoutDirection, .rightToLeft) Text("leftToRight") TextField("placeholder", text: $textInput) .background(Color.red) .environment(\.layoutDirection, .leftToRight) } .padding() } }
1
1
185
4w
HealthKit in React Native + Expo Dev Client: no authorization prompt (and no data)
Hi everyone, I’m building a health app with React Native using Expo Dev Client on a real iPhone. I need to read Apple Health (HealthKit) data, but the authorization sheet never appears—so the app never gets permissions and all queries return nothing. What I’ve already done Enabled HealthKit capability for the iOS target. Added NSHealthShareUsageDescription and NSHealthUpdateUsageDescription to Info.plist. Using a custom dev build (not Expo Go). Tested fresh installs (deleted the app), rebooted device, and checked Settings → Privacy & Security → Health/Motion & Fitness. Tried both packages: react-native-health and @kingstinct/react-native-healthkit. Same behavior: no permission dialog at first use. Ask Is there a known reason why the HealthKit permission sheet would not show on modern iOS when called from a React Native bridge (with Expo Dev Client)? Are there any extra entitlements, signing, or config-plugin steps required beyond HealthKit capability + Info.plist? If you’re successfully fetching Apple Health data from React Native on recent iOS, could you share the exact steps that made the permission sheet appear and data flow (Expo config/plugin used, Xcode capability setup, profile/team settings, build type, bundle ID nuances, any Health app reset steps, etc.)? This would help me and others hitting the same “authorized call but no prompt/no data” issue. Thank you!
1
0
80
4w
DriverKit DEXT Logs Only Once, Subsequent Logs Are Lost Despite Normal Functionality
Hello everyone, I've encountered a very strange and persistent logging issue with my DriverKit DEXT and would appreciate any insights from the community. [Problem Summary] My DriverKit DEXT, along with its companion Swift app, is functionally working perfectly. I can repeatedly call methods in the DEXT from the app (e.g., a Ping-Pong test and a StaticProcessInbandTask call) and receive the correct response every time. However, the os_log messages within my IOUserClient subclass are only successfully recorded for the very first set of interactions. After that, all subsequent logs are completely missing. What's even stranger is that all successfully recorded logs are attributed to the kernel: process, even for purely user-space methods like ExternalMethod. [Development Environment] macOS: 15.7.1 Xcode: 16.4 Hardware: MacBook Pro M1 DEXT Logging Macro (Log.h): #include <os/log.h> #define Log(fmt, ...) \ do { \ os_log(OS_LOG_DEFAULT, "[%{public}s] " fmt, __FUNCTION__, ##__VA_ARGS__); \ } while (0) [Steps to Reproduce & Observed Behavior] The DEXT is successfully loaded via the companion app. I click the "Ping-Pong" button, then the "Process InBand" button in the app. The app's UI log correctly shows that the request was sent and a successful response was received from the DEXT. I repeat step 2 multiple times. Each interaction works flawlessly from the app's perspective. I then use the log show command to export the logs from this period, for example: log show --last 5m | grep "com.accusys.Acxxx.driver" > dext_logs.txt Observed Result (Log Content): In the dext_logs.txt file, I can only see the logs from the very first Ping-Pong and the very first Process InBand call. All subsequent, successful operations leave no trace in the logs. kernel: (com.accusys.Acxxx.driver.dext) [ExternalMethod] // { --- kernel: (com.accusys.Acxxx.driver.dext) [ExternalMethod] // --- } kernel: (com.accusys.Acxxx.driver.dext) [StaticPingPong] // { --- kernel: (com.accusys.Acxxx.driver.dext) [StaticPingPong] // --- } kernel: (com.accusys.Acxxx.driver.dext) [ExternalMethod] // { --- kernel: (com.accusys.Acxxx.driver.dext) [ExternalMethod] // --- } kernel: (com.accusys.Acxxx.driver.dext) [StaticProcessInbandTask] // { --- kernel: (com.accusys.Acxxx.driver.dext) [StaticProcessInbandTask] // --- } <--- END OF FILE (No new logs appear after this point) ---> [Core Questions] Why are logs in IOUserClient subclass only recorded once? Given the DEXT is clearly still running and processing requests, why would os_log calls only succeed in writing to the system log database on the first interaction? Why are all logs attributed to the kernel? Why would logs from 100% user-space code like ExternalMethod and StaticPingPong be attributed to the kernel process? [Solutions Attempted That Did Not Work] I have verified with ps aux that the DEXT process (com.accusys.Acxxx.driver) is running continuously in the background and has not crashed. Attempted to force-restart the logging service with sudo killall logd, but the issue persists. Performed the most thorough reset possible using systemextensionsctl reset followed by a full reboot, then reinstalled the DEXT. The issue remains exactly the same. Thank you for any possible help or suggestions Best, Charles
3
0
131
4w
Are SVG assets faster than PNG when rendered or not?
I recently was thinking about which is the best format to use for my little icons in the app, and was considering the performance of PNG versus SVG . I know that PNG decoders are hardware accelerated and parallelized, and the rendering is as simple as placing the pixels on the screen. On the other hand, SVG requires computation to determine the placement of pixels based on mathematical equations. Considering this, my current assumption is that PNG is faster to render than SVG. However, if SVG is also hardware-accelerated, it could alter the situation, although this may not be the case.
3
0
2.2k
4w
Siri Shortcut extension build cycle
I developed a XCode project using Flutter (v. 3.35.6). The application basically has a IntentExtension to handle intents donation and the related business logic. We decided to go with ShortcutExtension in place of AppIntents because it fits with our app's use case (where basically we need to dynamically donate/remove intents). We have an issue building the project, and it is due to the presence of the IntentExtension .appex file in the Build Phases --> Embed Foundation Extensions. If we remove it , the project builds however the IntentHandling is not invoked in the Shortcuts app. Build issue: Generated error in the console: Cycle inside Runner; building could produce unreliable results. Cycle details: → Target 'Runner' has copy command from '/Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/ShortcutsExtension.appex' to '/Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/Runner.app/PlugIns/ShortcutsExtension.appex' ○ That command depends on command in Target 'Runner': script phase “[CP] Copy Pods Resources” ○ That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks” ○ That command depends on command in Target 'Runner': script phase “FlutterFire: "flutterfire upload-crashlytics-symbols"” ○ That command depends on command in Target 'Runner': script phase “FlutterFire: "flutterfire bundle-service-file"” ○ That command depends on command in Target 'Runner': script phase “Thin Binary” ○ Target 'Runner' has process command with output '/Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/Runner.app/Info.plist' ○ Target 'Runner' has copy command from '/Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/ShortcutsExtension.appex' to '/Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/Runner.app/PlugIns/ShortcutsExtension.appex' Raw dependency cycle trace: target: -> node: -> command: -> node: /Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Intermediates.noindex/Runner.build/Release-quality-iphoneos/Runner.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata -> command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release-quality:ExtractAppIntentsMetadata -> node: -> command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase10-copy-files -> node: <Copy /Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/Runner.app/PlugIns/ShortcutsExtension.appex> -> CYCLE POINT -> command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release-quality:Copy /Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/Runner.app/PlugIns/ShortcutsExtension.appex /Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/ShortcutsExtension.appex -> node: -> command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase9--cp--copy-pods-resources -> node: /Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/Runner.app/GoogleMapsResources.bundle -> command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release-quality:PhaseScriptExecution [CP] Copy Pods Resources /Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Intermediates.noindex/Runner.build/Release-quality-iphoneos/Runner.build/Script-B728693F1F2684724A065652.sh -> node: -> command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase8--cp--embed-pods-frameworks -> node: /Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Products/Release-quality-iphoneos/Runner.app/Frameworks/Alamofire.framework -> command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Release-quality:PhaseScriptExecution [CP] Embed Pods Frameworks /Users/federico.gatti/Documents/comfort-mobile-app/apps/comfort/ios/DerivedData/Runner/Build/Intermediates.noindex/Runner.build/Release-quality-iphoneos/Runner.build/Script-1A1449CD6436E619E61D3E0D.sh -> node: -> command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase7-flutterfire---flutterfire-upload-crashlytics-symbols- -> node: <execute-shell-script-18c1723432283e0cc55f10a6dcfd9e024008e7f13be1da4979f78de280354094-target-Runner-18c1723432283e
1
0
49
4w
Web inspector only works with HTTPS contexts in iOS simulator
Up until some point relatively recently, I have been able to use Safari's web inspector to connect to the iOS simulator in order to debug our web application in development at http://localhost:8088. Now, the web inspector still OPENS, but it opens in a broken state. The context is available to select from Safari's "Develop" menu: Develop > "iPhone 16 Pro (Simulator)" > "localhost - login". It appears under the Safari heading if I have navigated to the web app in the browser, or under the Expo heading if I am accessing it through the webview in our React Native wrapper app. When I select it, the web inspector window does appear. However, once it opens, the Elements pane is empty, the Console pane is empty, expressions entered into the console are not evaluated, there's no content in Sources, Network, Storage, etc. Important notes: This broken state happens at http://localhost:8088 as well as http://127.0.0.1:8088, and it seems that the insecure context is the issue. The web inspector DOES work for HTTPS sites. If I navigate to, e.g., https://example.com in the simulator and connect the web inspector, everything works fine. The web inspector also works fine in Safari on macOS (OUTSIDE the simulator) when accessing non-HTTPS sites. It's only a problem for non-HTTPS sites when connecting to the simulator. A coworker has the same problem, so it is not isolated to my machine. I would enable TLS locally as a workaround, but this web app is very complex, and I know from experience that it is very difficult for various reasons to set it up properly for our project in development, and it will take significant non-trivial work to do so. So... Why is this happening? Is this expected behavior? Is there a way that I can debug my site on localhost without HTTPS?
1
0
129
4w
Unable to debug with console.log in Safari on iOS 16.4 Simulator.
I'm working on a regular website, in which I'm trying to debug using the (MacOS) Safari Development tools. Since updating my Simulator to iOS 16.4, console.log is no longer displayed in the Console. Even when executing it directly in the console (console.log('test');), it's not printed. Now, I've read that this is a feature for debugging in-app browser content (https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps/) but can't find the regular web workaround here. TL;DR: No longer see console.log in iOS 16.4 Safari when debugging from my Mac. Thanks in advance for your suggestions!
3
6
4.0k
4w
422 error "Beta contract is missing" Testflight
I'm currently experiencing the same problem that many have had with error 422 "Beta contract is missing." I read that I should contact Apple support, but when I try to access the support page and log in with my credentials, the page doesn't load and I can't generate a ticket to resolve this problem. I get the message "There was an error processing your request. Please try again later." And when I inspect with Safari it shows me this information: "errors" : [ { "id" : "9be0314c-3bd5-4143-a625-602322d7156e", "status" : "422", "code" : "ENTITY_UNPROCESSABLE.BETA_CONTRACT_MISSING", "title" : "Beta contract is missing for the app.", "detail" : "Beta Contract is missing." } ] This is when I want to share the most recent build of my app with external groups through Testflight, but additionally, when my internal testers try to access it through Testflight app, it shows the error "The requested app is not available or doesn't exist." Could someone tell me what process I should follow or where I can correctly generate the ticket for my error? Since the Apple support page does not load. Thanks!
1
4
709
4w
WorkoutKit WorkoutScheduler sync Broken with iOS 18.2 beta
WorkoutKit WorkoutScheduler seems broken with the first beta of iOS 18.2. I have tested using my app from Xcode and the one that is on the App Store (and working properly on other devices), and it's not working with this new beta of iOS. They appears in WorkoutScheduler.shared.scheduledWorkouts, but not on the watch. I even tried with other apps that do the same with Manual add to Apple Watch with SwiftUI workoutPreview work. Xcode 16.0 iOS 18.2 Beta 1 WatchOS 11.1
29
6
1.9k
4w
New Need Help On Distributing My App
I hate to be the new guy but this is our first venture into distributing an app through Apple. Our app will be finished by the end of the year but I've heard you can get pre approval but I'm not really sure where to turn to so I can get the process started either for that or full approval when it's done. Can anyone help point me in the right direction? Thank you.
2
0
134
4w
Issues Observed with App Clip Behavior and URL Handling
Hi Apple Team, We’ve noticed a couple of issues with launching default App Clip in safari and would appreciate your guidance. App Clip Popup Timing: When launching the App Clip using default URL, we sometimes see the small App Clip popup appear before the App Clip banner is displayed. Ideally, the banner should appear first. Cached URL Handling: In certain cases, the App Clip appears to be using a cached URL instead of the most recent one. For example, when we invoke two different App Clip URLs with unique parameters, the App Clip sometimes launches using the previous URL’s data instead of the new one. This behavior is inconsistent and makes it difficult to ensure users are directed to the correct experience each time. Could you please help us understand whether this is expected behavior or if there are any known issues or recommended solutions? Thank you for your time and support. Example
0
1
158
4w
List View Drag&Drop Support on iOS
Hi there, Upon using List View for tabular information showcase on both iOS and iPadOS, I have come to realize that the drag and drop support works only for iPadOS but not iOS. Although it is possible to workaround this by using a ScrollView wrapping around a LazyVStack instead, the editing mode along with left-wipe to delete feature would be missing. Not to mention that this workaround only supports single item rather than multiple items. Therefore, I am here to ask if the drag and drop will come to support devices running iOS, and if so, when will this feature ship. If not, will LazyVStack/LazyHStack support native editing mode. Thank you for your time.
1
2
349
4w
Screen Time App Extensions Capabilities
I am building a screen time management app. It has the main app target, and then three extensions - those are the four targets in Xcode. The three extensions are: Shield Device Activity Monitor Device Activity Report Extension I requested "Family Controls (Distribution)" capability from Apple for the main app target / bundle ID, and it got approved. Do I need it for the extensions too? Because previously I had "Family Controls (Development)" for the extensions...
1
0
165
4w
Unable to provision target
I have added an in-app purchase function into my app, and have enabled in-app purchase profile in developer portal(it's on by default and is marked gray in developer portal, I don't know if that's how it supposed to look like). I have issued the agreements and tried signing the app both manually and automatically, but neither of that worked. App can be built successfully in simulator but does not show the simulation window, but cannot build on real device or archive. Errors: Missing com.apple.developer.in-app-purchase, com.apple.developer.in-app-purchase.non-consumable, and com.apple.developer.in-app-purchase.subscription entitlements. Automatic signing failed Xcode failed to provision this target.
1
0
115
4w
How to test Declared Age Range functionality
How can experimentation and testing calling the AgeRangeService.shared.requestAgeRange() functionality be recreated easily? The very first time I ran this the OS popped up a dialog, however it won't do so again, even after the app is deleted and the device re-started. If one navigates to Settings/User/Personal Information/Age Range for Apps/Apps that have requested your age range appear here. Then the names of apps appear here even after the app has been deleted. Therefore how can it be removed from this section? Erasing and resetting the phone will presumably reset things back to a state such that the dialog can be presented again. But doing that and having to wait for that to complete each development or test run is impractical. Is there an alternative?
1
1
170
4w
'tabViewBottomAccessory' leaves an empty container when conditionally hidden
We use SwiftUI's .tabViewBottomAccessory in our iOS apps for displaying an Audio MiniPlayer View (like in the Apple Music App). TabView(selection: $viewModel.selectedTab) { // Tabs here } .tabViewBottomAccessory { if viewModel.showAudioMiniPlayer { MiniPlayerView() } } The Problem This code works perfectly on iOS 26.0. When 'viewModel.showAudioMiniPlayer' is 'false', the accessory is completely hidden. However, on iOS 26.1 (23B5059e), when 'viewModel.showAudioMiniPlayer' is 'false', the MiniPlayerView disappears, but an empty container remains, leaving a blank space above the tab bar. Is this a known Bug in iOS 26.1 and are there any effective workarounds or should I just wait until Apple fixed it?
Topic: Design SubTopic: General
3
6
1.7k
4w