Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

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
782
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
SwiftUI - Drag gesture blocks scroll gesture only on iPhone 11
I'm pretty new to Swift and SwiftUI. I'm making my first app for sorting a gallery with some extra features. I was using my own iPhone for testing and just started testing my app on other Apple products. Everything works fine on iPad Air M1, iPhone 15 Pro, iPhone 15 Pro Max, iPhone 13, iPhone XS (Simulator), and iPhone 11 Pro (Simulator). However, when I tried to show my app to a family member with an iPhone 11, I came across an issue. Issue Description: My app takes all photos from iPhone's native gallery, then you can sort it by some spesific filters and delete pictures. It just looks like the native gallery. (I can add photos later if needed) You can just scroll the gallery by swiping up and down. You can press the select button and start selecting pictures to delete. I recently added a drag-to-select-multiple-pictures feature. This makes it feel more like the native iOS experience, eliminating the need to tap each picture individually. However, on the iPhone 11, the moment you open the app, you can't scro
1
0
838
Jan ’25
Driving NavigationSplitView with something other than List?
Is it possible to drive NavigationSplitView navigation with a view in sidebar (left column) that is not a List? All examples that I have seen from this year only contain List in sidebar. I ask this because I would like to have a more complex layout in sidebar (or first view on iOS) that contains a mix of elements, some of them non-interactive and not targeting navigation. Here’s what I would like to do: import SwiftUI struct Thing: Identifiable, Hashable { let id: UUID let name: String } struct ContentView: View { let things: [Thing] @State private var selectedThingId: UUID? var body: some View { NavigationSplitView { ScrollView(.vertical) { VStack { ForEach(things) { thing in Button(Thing: (thing.name) ( selectedThingId == thing.id ? selected : )) { selectedThingId = thing.id } } SomeOtherViewHere() Button(Navigate to something else) { selectedThingId = someSpecificId } } } } detail: { // ZStack is workaround for known SDK bug ZStack { if let selectedThingId { Text(There is a thing ID: (selectedThi
13
0
7.0k
Apr ’23
VStack Alignment Issue
Hi Apple developer, I'm totally new in the development world using SwiftUI with just a little experience of Flutter. Currently I'm struggling with the combination of VStack and the alignment of the sub views. I'm using a LazyVGrid with multiple Rectangles and overlays inside. The overlay contains a VStack with a leading alignment. And here is the problem. I framed them with a border to visualize the limits of these views. But it seams, that the leading alignment is not working properly. There is a large gap on the left side of the Image() and Text() views and I don't know why. I'm very happy for any advice. Here is my code of this view. Thanks a lot! import SwiftUI import SwiftData extension UIScreen { static let screenWidth: CGFloat = UIScreen.main.bounds.size.width static let screenHeight: CGFloat = UIScreen.main.bounds.size.height static let screenSize: CGSize = UIScreen.main.bounds.size } struct TestView: View { let constants: Constants = Constants() let columnCount: Int = 2 let gridSpacing: CGFloat = 10
Topic: UI Frameworks SubTopic: SwiftUI
1
0
383
Jan ’25
iPadOS 18 TabView conflicts with NavigationSplitView
If you use the new TabView in conjunction with .tabViewStyle(.sidebarAdaptable) and have a NavigationSplitView in the tabs, the result is a very confusing user experience. When the TabView is displayed as tabs, there are two sidebar buttons. The left one closes/opens the sidebar of the view of the selected tab. The sidebar button of the Top-TabView closes/opens the sidebar for customizing the tabbar. However, this sidebar overlays the sidebar of the selected tab. To be able to use the underlying sidebar again, the user must actively close the TabView sidebar again (turn it into the top tabbar) Has anyone found ways to improve this behavior, or is this wrong by design? My expected behavior would be: If you use the new TabView with .tabViewStyle(.sidebarAdaptable) and have a two column NavigationSplitView in a tab, it automatically becomes a three column view when the top tabbar becomes a sidebar. import SwiftUI struct ContentView: View { var body: some View { TabView { Tab(Home, systemImage:
5
0
1.4k
Aug ’24
SwiftUI - Drag gesture blocks scroll gesture only on iPhone 11
I'm pretty new to Swift and SwiftUI. I'm making my first app for sorting a gallery with some extra features. I was using my own iPhone for testing and just started testing my app on other Apple products. Everything works fine on iPad Air M1, iPhone 15 Pro, iPhone 15 Pro Max, iPhone 13, iPhone XS (Simulator), and iPhone 11 Pro (Simulator). However, when I tried to show my app to a family member with an iPhone 11, I came across an issue. Issue Description: My app takes all photos from iPhone's native gallery, then you can sort it by some spesific filters and delete pictures. It just looks like the native gallery. (I can add photos later if needed) You can just scroll the gallery by swiping up and down. You can press the select button and start selecting pictures to delete. I recently added a drag-to-select-multiple-pictures feature. This makes it feel more like the native iOS experience, eliminating the need to tap each picture individually. However, on the iPhone 11, the moment you open the app, you can't scro
2
0
358
Jan ’25
Reply to SwiftUI Gestures prevent scrolling with iOS 18
I also have a similar issue. I'm pretty new to swift so there might be some messy code private var mediaGridView: some View { ScrollView { RefreshControl(coordinateSpace: .named(refresh)) { //some code here } LazyVGrid(columns: gridColumns) { //some code here } .padding(.horizontal, 2) .coordinateSpace(name: grid) .onPreferenceChange(ItemBoundsPreferenceKey.self) { //some code here } .gesture( DragGesture(minimumDistance: 0) .onChanged { gesture in if isSelectionMode { let location = gesture.location if !isDragging { startDragging(at: location, in: itemBounds) } updateSelection(at: location, in: itemBounds) } } .onEnded { _ in endDragging() } ) } .coordinateSpace(name: refresh) } First I catched the issue on an iPhone 11 test device. iPhone 11 on simulator with ios 18 also have this problem while 17.5 simulator won't. If I change .gesture() to .simultaneousGesture() vertical scrolling starts to work again but now scroll also works while dragging my finger so everything on the screen starts to dance.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’25
CoreData + CloudKit
I am having problems when I first loads the app. The time it takes for the Items to be sync from my CloudKit to my local CoreData is too long. Code I have the model below defined by my CoreData. public extension Item { @nonobjc class func fetchRequest() -> NSFetchRequest { NSFetchRequest(entityName: Item) } @NSManaged var createdAt: Date? @NSManaged var id: UUID? @NSManaged var image: Data? @NSManaged var usdz: Data? @NSManaged var characteristics: NSSet? @NSManaged var parent: SomeParent? } image and usdz columns are both marked as BinaryData and Attribute Allows External Storage is also selected. I made a Few tests loading the data when the app is downloaded for the first time. I am loading on my view using the below code: @FetchRequest( sortDescriptors: [NSSortDescriptor(keyPath: Item.createdAt, ascending: true)] ) private var items: FetchedResults var body: some View { VStack { ScrollView(.vertical, showsIndicators: false) { LazyVGrid(columns: columns, spacing: 40) { ForEach(
1
0
932
Jan ’25
NavigationSplitView detail view not updating
I have a NavigationSplitView with all three columns, and NavigationLinks in the sidebar to present different Lists for the content column. When a list item is selected in the content view, I want to present a view in the detail view. Since different detail views should be presented for different content views, I represent state like this (some details omitted for space): // Which detail view to show in the third column enum DetailViewKind: Equatable { case blank case localEnv(RegistryEntry) case package(SearchResult) } // Which link in the sidebar was tapped enum SidebarMenuItem: Int, Hashable, CaseIterable { case home case localEnvs case remoteEnvs case packageSearch } // Binds to a DetailViewKind, defines the activate SidebarMenuItem struct SidebarView: View { @State private var selectedMenuItem: SidebarMenuItem? @Binding var selectedDetailView: DetailViewKind var body: some View { VStack(alignment: .leading, spacing: 32) { SidebarHeaderView() Divider() // Creates the navigationLi
Topic: UI Frameworks SubTopic: SwiftUI
1
0
462
Jan ’25