Search results for

column

2,047 results found

Post

Replies

Boosts

Views

Activity

Fatal Error in Swift Playground
Fatal Error in Swift Playground Description I'm experiencing a catastrophic error when importing Package Dependency in any Swift Playgrounds that has icon or name that caused the whole Playground won't work anymore with error messages below. I'm current running macOS Sequoia 15.3 (24D60) and Swift Playgrounds 4.6.1. They're all up-to-date. Reproduction Open Swift Playgrounds and and create a new project. Import a package dependency https://github.com/simibac/ConfettiSwiftUI.git Rename the project and add an icon Then you should able the reproduce the problem. I strongly believed that this is a serious bug. You'll find that Assets in the left column are disappeared and appeared Assets.xcassets, you're unable to reveal the Dependency in the column like the reference picture above. The whole Playground is destroyed now and unable to work anymore.
2
0
456
Feb ’25
Correct way to label TextField inside Form in SwiftUI
Hello everyone. I'm building a simple Form in a Multiplatform App with SwiftUI. Originally I had something like this. import SwiftUI struct OnboardingForm: View { @State var firstName: String = @State var lastName: String = @State var email: String = @State var job: String = @State var role: String = var body: some View { Form { TextField(First Name, text: $firstName, prompt: Text(Required)) TextField(Last Name, text: $lastName, prompt: Text(Required)) TextField(Email, text: $email, prompt: Text(Required)) TextField(Job, text: $job, prompt: Text(Required)) TextField(Role, text: $role, prompt: Text(Required)) } } } #Preview { OnboardingForm() } In macOS it looks ok but then in iOS it looks like this: and it's impossible to know what each field is for if all the prompts are the same. I tried adding LabeledContent around each text field and that solves it for iOS but then on macOS it looks like this: The labels are shown twice and the columns are out of alignment. I think I could get around it by d
2
0
889
Feb ’25
Reply to libncftp v. macOS Native curl with Secure Transport APIs and Session Reuse
But, just to confirm, that means that can reproduce this with a server under your control, right? If so, that’s definitely a progress. Confirmed. A correlating factor seems to be those servers written against OpenSSL, possibly running on Linux. See below. OK. And cases 1 and 2 (curl with Secure Transport, and Fetch 5.8) work whereas case 3 (your libncftp code) fails, right? Confirmed. FTPS Server Secure Control-only Secure Control+Data test.rebex.net Custom .NET Implementation ✅ ✅ Microsoft FTP Service ✅ ❌ proftpd ✅ ❌ pureftpd ✅ ❌ vsftpd ✅ ❌ Until I added code to utilize SSLSetPeerID, Secure Control+Data was ❌ up and down that column. Adding code to work with SSLSetPeerID allowed the test.rebex.net Custom .NET Implementation to work on stop responding with 425: Cannot secure data connection - TLS session resumption required. on attempting to establish the secure data channel session.
Topic: Privacy & Security SubTopic: General Tags:
Feb ’25
SwiftData integration for coexistence with CoreData Error: Persistent truncated
When integrating SwiftData for an already existing app that uses CoreData as data management, I encounter errors. When building the ModelContainer for the first time, the following error appears: Error: Persistent History (184) has to be truncated due to the following entities being removed (all Entities except for the 2 where I defined a SwiftData Model) class SwiftDataManager: ObservableObject { static let shared = SwiftDataManager() private let persistenceManager = PersistenceManager.shared private init(){} lazy var modelContainer: ModelContainer = { do { let storeUrl = persistenceManager.storeURL() let schema = Schema([ HistoryIncident.self, HistoryEvent.self ]) let modelConfig = ModelConfiguration(url: storeUrl) return try ModelContainer(for: schema, configurations: [modelConfig]) } catch { fatalError(Could not create ModelContainer: (error)) } }() } @Model public class HistoryIncident { var missionNr: String? @Relationship(deleteRule: .cascade) var events: [HistoryEvent]? public init(){} } @Model class
1
0
615
Feb ’25
Reply to Correct way to label TextField inside Form in SwiftUI
I've never needed to do this, but I've had a quick look, and this seems reasonable: var body: some View { VStack(alignment: .leading) { Form { Text(First Name) TextField(, text: $firstName, prompt: Text(Required)) Text(Last Name) .padding(.top, 10) TextField(, text: $lastName, prompt: Text(Required)) Text(Email) .padding(.top, 10) TextField(, text: $email, prompt: Text(Required)) Text(Job) .padding(.top, 10) TextField(, text: $job, prompt: Text(Required)) Text(Role) .padding(.top, 10) TextField(, text: $role, prompt: Text(Required)) } .formStyle(.columns) .padding(.horizontal, 16) .padding(.vertical, 16) Spacer() } } The key is .formStyle(.columns).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’25
Create ML Trouble Loading CSV to Train Word Tagger With Commas in Training Data
I'm using Numbers to build a spreadsheet that I'm exporting as a CSV. I then import this file into Create ML to train a word tagger model. Everything has been working fine for all the models I've trained so far, but now I'm coming across a use case that has been breaking the import process: commas within the training data. This is a case that none of Apple's examples show. My project takes Navajo text that has been tokenized by syllables and labels the parts-of-speech. Case that works... Raw text: Naaltsoos yídéeshtah. Tokens column: Naal,tsoos, ,yí,déesh,tah,. Labels column: NObj,NObj,Space,Verb,Verb,VStem,Punct Case that breaks... Raw text: óola, béésh łigaii, tłʼoh naadą́ą́ʼ, wáin, akʼah, dóó á,shįįh Tokens column with tokenized text (commas quoted): óo,la,,, ,béésh, ,łi,gaii,,, ,tłʼoh, ,naa,dą́ą́ʼ,,, ,wáin,,, ,a,kʼah,,, ,dóó, ,á,shįįh (Create ML reports mismatched columns) Tokens column with tokenized text (commas escaped): óo,la,,, ,béésh, ,łi,gaii,,, ,tłʼoh,
6
0
759
Jan ’25
Reply to Embedding a NavigationSplitView inside a NavigationStack
NavigationSplitView and TabView are top level navigation containers and could have unexpected behaviors when they're not implemented as such. on iOS, a NavigationSplitView collapses all of its columns into a stack.So it's best practice to prefer using a split view in a regular — not a compact — environments. Please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here. If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?
Topic: UI Frameworks SubTopic: SwiftUI
Jan ’25
Reply to Multiple PushProviders Instantiated at one time
I’m not super familiar with app push providers, but there’s one thing I want to check up front. You wrote: [quote='773468021, dtanmasimo, /thread/773468, /profile/dtanmasimo'] I see logs for my push provider initializing but I don't see it de-initializing. [/quote] Are you sure they’re all from the same process? I’ve hit situations like this — with other NE provider types, mind you — where the process died and was restarted, but the logging didn’t make that obvious. I generally do all my logging with the system log (see Your Friend the System Log) which records the pid with each log entry. So, all I need to do to rule this out is to show that column in Console. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Jan ’25
Reply to 400 : bad gateway error when requesting analytics reports
Ok, so, after a bit of back and forth, here's where I stand : curl --location 'https://api.appstoreconnect.apple.com/v1/analyticsReportRequests' --header 'Content-Type: application/json' --header 'Authorization: Bearer [my_token]' --data '{ type: analyticsReportRequests, attributes: { accessType: ONGOING }, relationships: { app : { data : { type : apps, id : [my_appid] } } } }' I have changed up my request such that it now looks like this, and I've got a new issue : { errors: [ { id: [id], status: 422, code: ENTITY_UNPROCESSABLE, title: The request entity is not a valid request document object, detail: Unexpected or invalid value at 'type'., meta: { position: { row: 2, column: 22 } } } ] } Doesn't really feel like I've made any progress, but I'm now getting a 422 error response, and I really don't see any way out of this. Any help at all would be appreciated.
Jan ’25
Reply to Subscription Paywall Stuck on 'Loading Subscription': Works in Debug, Stuck in TestFlight/Production
Subscriptions are approved in App Store Connect. Do you mean that the status of your subscriptions is Approved in App Store Connect? For more information about status, see In-app purchase statuses. SubscriptionStoreView(productIDs: subscriptionsManager.products.map { $0.id }) Can you add logs to inspect the values of the product identifiers you are using in your app? Compare these values to the ProductID column of your in-app purchases in App Store Connect. Confirm the following: The country or region of the account currently logged on your device matches one of the countries or regions you selected for your in-app purchase in App Store Connect. In App Store Connect, the status of your Paid Apps Agreement is Active. In App Store Connect, the status of your banking and tax information is Active. For more information, see Manage banking information, Manage tax information, and View agreements status. If the status of your subscriptions is Approved in App Store Connect, they are available in App Store
Jan ’25
Reply to How to find the camera transform (or view matrix) in the world coordinate from a camera frame
Hi @hale_xie I did some prototyping over the weekend and came up with something that's close, but not perfect. Specifically, there's increasing misalignment as the angle between an object and the camera increases. I'd appreciate it if you file a feedback request to request an abstraction to simplify offline rendering with passthrough. Be sure to detail your use case. Now on to the solution which uses ProjectiveTransformCameraComponent instead of PerspectiveCamera. Here's a class to render a scene with passthrough. Construct it with the root entity you want to render. When CameraFrameProvider delivers an update, call render to obtain a UIImage of the scene. import SwiftUI import RealityKit import ARKit @MainActor final class EntityToImage { let renderer:RealityRenderer? let cameraEntity = Entity() init(root: Entity) { renderer = try? RealityRenderer() renderer?.entities.append(root) renderer?.entities.append(cameraEntity) } private func computeProjectionMatrix( intrinsics: simd_float3x3, extrinsics: simd_float
Topic: Spatial Computing SubTopic: ARKit Tags:
Jan ’25
Reply to Trying to better understand CGAffineTransform.... and need a bit of guidance.
Here are some tidbits about affine transforms on Apple platforms that I have collected over the years. I hope they are helpful for you. This might be overkill for your particular question (as it appears to have received some pretty good answers already), but I'm putting it on the forums in case it's useful to anyone else. Documentation Core Graphics affine transform is defined here: CGAffineTransform There is also a detailed discussion here: Quartz 2D Programming Guide: Transforms Core Animation includes a unit based coordinate system discussed here: Core Animation Programming Guide: Core Animation Basics Foundation also has an affine transform: Foundation: AffineTransform Accelerate also includes simd based affine transforms used with 3D coordinaes: Accelerate: Working with Matrices A technote about debugging coordinate space issues: TN3124: Debugging coordinate space issues Understanding affine transforms There are many interesting discussions of affine transforms and how to use them available elsewhere. I'
Topic: Graphics & Games SubTopic: General Tags:
Jan ’25
Finder File Previews lock files on SMB shares
I've developed a new Quicklook data-based preview extension for a custom file type that generates an image preview of the file. I previously used a Quick Look generator plug-in but support for it was deprecated and now removed in macOS Sequoia. My app opens files using a open(url.path, O_RDWR | O_NONBLOCK | O_EXLOCK) call. The locking flags are used to prevent other clients from writing the file if it's already open. I discovered that when Finder is showing the “large” file previews (such as when in column or gallery modes) from a SMB share, the open call fails with EWOULDBLOCK as if the file is locked. It does work just fine on local files. Opening with O_SHLOCK also has the issue. Surprisingly it does work just fine for previews that return Plain Text data instead of Image data. Using the lsof command, it seems like the Quicklook process has some kind of lock on the file. This is the output of the lsof command: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE QuickLook 48487 XXXX txt REG 1,15 12500061
8
0
716
Jan ’25
Reply to Need to know how to stop indentation
Here is what Apple said in reply to my bug report in June. Please know that there is a setting that controls this (which should be off by default). In Xcode > Settings > Text Editing > Editing, it’s called “Automatically reformat when completing code”. I don't know what controls this means. Does on mean add unwanted indentation and off mean do not add unwanted indentation? But regardless, I filed another report regarding this setting having no effect. Apple's reply: It only reformats code that’s wider than the specified column, and only if the code is made up of nested expressions (function calls, etc), that can be wrapped to new lines. In any case, my code never extends to the Reformat code at column location, as shown in my screen recordings. Every line jumps around. Mine go in the opposite direction from yours. But it's never where I want it. Obviously I don't understand the logic that Apple's using for these indentations. But it seems clear that there is only one coding style th
Jan ’25