Search results for

Swift 6

49,189 results found

Post

Replies

Boosts

Views

Activity

Reply to v1/appPriceSchedules 409
The format suggested by Nobitahuang seems true. From the documentation example, it only seems needed on some ids. Specifically, for ids of type inAppPurchasePrices https://developer.apple.com/documentation/appstoreconnectapi/managing-in-app-purchases#Update-in-app-purchase-prices ... manualPrices: { data: [ { type: inAppPurchasePrices, id: ${prices-id} }, .... included: [ { type: inAppPurchasePrices, id: ${prices-id}, Adding the id inside the ${} literal works in Swift string interpolation ${(inAppPurchasePricesId)}
9h
How to stop navigation items from moving into an overflow menu
One screen in my app uses a navigation bar with some buttons added to the titleView and some buttons added as a customView of a single rightBarButtonItem. In iOS 26 (beta 9), if I switch to the home screen and back again, the titleView and rightBarButtonItem disappear and an overflow button (three dots) appears instead. Nothing happens when I click the overflow button. Here's a screen capture: https://youtu.be/tthRnMz98kA This also happens when I switch to another app, when I rotate the device or when I resize the app window. In all cases, there is enough room to show all the buttons, but they still disappear. I overrode the viewWillTransition function in my view controller and logged when that runs. I can see that if I switch to the home screen and back again before that runs (within one or two seconds), there's no problem. But once that runs, the navigation bar items disappear and the overflow button appears. I have not done anything to set up the overflow button and don't have any need to use it. The docum
Topic: UI Frameworks SubTopic: UIKit
1
0
85
10h
Reply to Upload Symbols Failed on Xcode 16
I get the same error. I'm not using any third party frameworks or static libraries. I have my project set to include DWARF with dSYM in the build and debugger. This is a MacOS C/Objective C XCode project. With some Swift. Most of the discussion about this for iOS projects. When I verify or upload my App I just ignore this. Is this OK? Is this an Apple bug?
14h
NFC innovation
Existing smartphones store multiple NFC card information. When the NFC antenna of the phone is close to the card reader, it is usually necessary to open the APP to select NFC card information or default to one card information to be transmitted to the card reader. It is not possible to quickly select or switch cards among multiple cards. For example, after using the NFC function to swipe the subway card, the phone needs to open the car access control and community access control again. It is necessary to open the mobile NFC card information management APP to select the community access control card and then swipe the mobile NFC access control, which causes inconvenience. (现有的智能手机存储多个 NFC 卡信息。当手机的NFC天线靠近读卡器时,通常需要打开APP选择NFC卡信息或默认一个卡信息传输到读卡器。无法在多张卡之间快速选择或切换卡。例如,使用NFC功能刷完地铁卡后,手机需要重新打开车内门禁和小区门禁。需要打开手机NFC卡信息管理APP选择社区门禁卡,然后刷手机NFC门禁,造成不便。) Divide the smartphone screen into multiple areas, and users can freely define corresponding NFC information for each area. When the screen is turned off and not unlocked, select NF
Topic: Design SubTopic: General
1
0
103
18h
Interactive Widget with SwiftData Not Triggering iCloud Sync
Hello everyone, I'm developing an app for iOS 18 using SwiftData, with iCloud synchronization enabled. My app also includes an interactive widget that allows users to mark tasks as complete, similar to Apple's Reminders widget. I'm facing a specific issue with how iCloud sync is triggered when changes are made from the widget. My Setup: Xcode 16 Swift 6 / iOS 18 SwiftData with iCloud Sync enabled. An interactive widget using App Intents to modify the SwiftData model. What's working correctly: App to Widget (Same Device): If I mark a task as complete in the main app, the widget on the same device updates instantly. Widget to App (Same Device): If I mark a task as complete using the interactive widget, the main app on the same device reflects this change immediately. App to App (Across Devices): If I make a change in the app on my iPhone, it syncs correctly via iCloud and appears in the app on my iPad. The Problem: The synchronization issue occurs specifically when an action is initiated from the widge
0
0
53
18h
Reply to Helper app is sandboxed (entitlement + runtime check), but `URLsForDirectory:` returns user home (`/Users//`) instead of container path — why?
How are you starting this helper process? Via NSTask (Process in Swift)? Or posix_spawn? Or something else? Does the helper have its own bundle structure. So, something like this: MyApp.app/ Contents/ Info.plist MacOS/ MyApp MyHelper.app/ Contents/ Info.plist MacOS/ MyHelper Or is it a standalone executable, like this: MyApp.app/ Contents/ Info.plist MacOS/ MyApp MyHelper Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
22h
CloudKit Query on Custom Indexed Field fails with misleading "createdBy is not queryable" error
Hello everyone, I am experiencing a persistent authentication error when querying a custom user profile record, and the error message seems to be a red herring. My Setup: I have a custom CKRecord type called ColaboradorProfile. When a new user signs up, I create this record and store their hashed password, salt, nickname, and a custom field called loginIdentifier (which is just their lowercase username). In the CloudKit Dashboard, I have manually added an index for loginIdentifier and set it to Queryable and Searchable. I have deployed this schema to Production. The Problem: During login, I run an async function to find the user's profile using this indexed loginIdentifier. Here is the relevant authentication code: func autenticar() async { // ... setup code (isLoading, etc.) let lowercasedUsername = username.lowercased() // My predicate ONLY filters on 'loginIdentifier' let predicate = NSPredicate(format: loginIdentifier == %@, lowercasedUsername) let query = CKQuery(recordType: ColaboradorProfile, predicate
0
0
104
1d
Xcode 26.0 beta 7 - AI - Create files? Client (Xcode) timing out?
I didn't check this out specifically on earlier betas, but AI is allowed to create new .swift files, yes? I'm only seeing proposals to create files (as opposed to code which it can change automatically), and the CREATE FILE button to the right of any proposed file creation does nothing. Next I'll mention running local models, but file creation does not seem to happen for neither ChatGPT nor any local model. Also I'm experimenting with LM Studio and it is reporting my client is timing out. So I guess Xcode is not waiting long enough for a response? The local models are slow, yes. But is there a setting for the AI timeout value? I told the LLM Every 1 minute send me an update so I know you are still working so my client does not time out which seems to have no visible effect, it hasn't timed out yet, but I don't visibly see that message.
1
0
152
1d
Building a bidirectional, infinitely scrolling list using ScrollView - challenges and potential solutions
I have been banging my head against this problem for a bit now. I am trying to build a bidirectional, infinitely scrolling list that implements these core requirements: Loads data up/down on the fly as the user scrolls Preserves scroll velocity as the list is updated Restores the scroll to the exact visual location after data has changed Ensures no flicker when restoring scroll position - the user cannot know the list has updated and should continue scrolling as normal Because LazyVStack does not play well with animations, I am opting to go with VStack and am implementing my own sliding window for data. This means that data can be removed as well as added, and a simple application of a height delta is not enough when restoring position. So far I have tried many things: Relying on ScrollPosition - simply does not work by itself as described (swift UI trying to keep the position stable with ID's) Relying on ScrollPosition.scrollTo - only kind of works with ID, no way to restore position with pixel perf
2
0
193
1d
Foundation Models framework dyld symbol errors after macOS 26 Beta 2 - LanguageModelSession constructor missing
Foundation Models framework worked perfectly on macOS 26 Beta 2, but starting from Beta 3 and continuing through Beta 6 (latest), I get dyld symbol errors even with the exact code from Apple's documentation. Environment: macOS 26.0 Beta 6 (25A5351b) Xcode 26 Beta 6 M4 Max MacBook Pro Apple Intelligence enabled and downloaded Error Details: dyld[Process]: Symbol not found: _$s16FoundationModels20LanguageModelSessionC5model10guardrails5tools12instructionsAcA06SystemcD0C_AC10GuardrailsVSayAA4Tool_pGAA12InstructionsVSgtcfC Referenced from: /path/to/app.debug.dylib Expected in: /System/Library/Frameworks/FoundationModels.framework/Versions/A/FoundationModels Code Used (Exact from Documentation): import FoundationModels // This worked on Beta 2, crashes on Beta 3+ let model = SystemLanguageModel.default let session = LanguageModelSession(model: model) let response = try await session.respond(to: Hello) What I've Verified: FoundationModels.framework exists in /System/Library/Frameworks/ Fr
1
0
374
2d
Reply to Screen layout positioning in Swift
something went wrong with formatting the code in your post, so it is a difficult to reproduce. I'm not sure what you're trying to get at here - you can wrap the two check boxes in an HStack, they will then appear side by side HStack { Toggle(isOn: $isCheckedOption900) { Text(9:00am) } .toggleStyle(CheckboxToggleStyle()) Toggle(isOn: $isCheckedOption930) { Text(9:30am) } } Please, when you post code, say for which platform (your code doesn't work on iOS). If you have check boxes for every half hour from 9am till 6:30pm, they're probably not going to fit across one screen anyway, if you don't want a fixed-size window, maybe you want to think about using some other container.
Topic: UI Frameworks SubTopic: SwiftUI
3d