Search results for

column

2,070 results found

Post

Replies

Boosts

Views

Activity

Apple Search Ads Reports API - Invalid Request JSON
I'm trying to call https://api.searchads.apple.com/api/v5/reports/campaigns but getting the following response: {data:null,pagination:null,error:{errors:[{messageCode:INVALID_JSON_REQUEST,message:This is an invalid json. The request can not be parsed,field:Line#:1 Column#:13}]}} I've used all suggested options for request parameters from documentation, e.g. { startTime: 2024-04-08, endTime: 2024-04-09, selector: { orderBy: [ { field: countryOrRegion, sortOrder: ASCENDING } ], conditions: [ { field: countriesOrRegions, operator: CONTAINS_ANY, values: [ US, GB ] }, { field: countryOrRegion, operator: IN, values: [ US ] } ], pagination: { offset: 0, limit: 1000 } }, groupBy: [ countryOrRegion ], timeZone: UTC, returnRecordsWithNoMetrics: true, returnRowTotals: true, returnGrandTotals: true } What's the proper way to call this API?
1
0
597
Oct ’24
NavigationStack within NavigationSplitView's detail column clears the path when disappearing
I'd like to persist the path on a sidebar selection, so when user comes back to the sidebar selection, they land where they were before. Unexpectedly, the path gets cleared when sidebarSelection is changed from the NavigationStack that uses the path to something else. Is this an intended behavior? How to workaround it? Using TabView is one way, but TabView has its own problems, so I'm wondering if there's a solution within NavigationSplitView first. Here is a minimal reproduce of the issue: struct Home2: View { private enum SidebarSelection: CaseIterable, Identifiable { var id: Self { self } case files, tags } @State private var sidebarSelection: SidebarSelection? = .files @State private var path: [Int] = [] var body: some View { NavigationSplitView { List(SidebarSelection.allCases, selection: $sidebarSelection) { selection in switch selection { case .files: Label(Files, image: custom.square.stack) case .tags: Label(Tags, systemImage: grid) } } } detail: { switch sidebarSelection { case .files: NavigationStac
4
0
142
May ’25
LazyVGrid (embedded in a List) does not resize automatically when content increases and layout changes
I have a List in a sidebar style which contains a LazyVGrid and a Section with a simple list contents. Every thing works well except when content increases and layout changes (from two columns to one column) for the LazyVGrid with editMode changing to .active ... LazyVGrid does not expand/resize when the content increases (the increased content gets clipped)...but does when user expands/folds on the section below :(. However LazyVGrid resizes to show the entire content when the content shrinks with editMode reverting to .inactive Note: If I replace the List with a ScrollView...lazyVGrid resizes perfectly when content increases in editMode = .active....but then I would lose all the Sidebar and List characteristics for the Section below :( Also, looks like .onMove is not supported in LazyVGrids Any pointers to solve the LazyVGrid (embedded in a List) not resizing or expanding when content increases ... will be deeply appreciated. var body: some View { List { LazyVGrid(columns: editMod
1
0
1.7k
May ’25
Collection view with self-sizing cells with SwiftUI content
I am trying to make a collection view with self-sizing cells that adapt to SwiftUI content. My test platform is macOS, but it should work on iOS all the same. I chose macOS because on macOS, you can resize the window and cause more interesting scenarios with that. My layout intent is fairly simple: a one-column collection view with cells with SwiftUI content, where the collection view cells should adapt to the height of their SwiftUI content. I got it working almost correctly. The one scenario that I don’t have working is window resizing. When the window resizes, the layout and cells should adapt to the content and change their heights. I feel that I am missing something fairly basic. How do I change this project so that the layout works correctly when I change the macOS window width? Example project and video of the behavior: https://gist.github.com/jaanus/66e3d863941ba645c88220b8a22970e1
Topic: UI Frameworks SubTopic: AppKit
1
0
370
Apr ’25
Xcode Build Failure
Hi, I don't understand why Xcode fails to build my app when following logic was uncommented as part of ternary operator (as highlighted in attachment). Can somebody help me please ?? Thx. ... : shelterViewModel.getShelter(row: row, column: column).productId == ... ? Color.yellow ...
6
0
294
Apr ’25
Reply to No screenshot files in XCResult files using Xcode 16.1
Alright I'm back and I figured it out. Here my findings as it relates to my use case of trying to get screenshots I have saved as PNG attachments during UI tests: The .xcresult bundle uses a custom storage format for attachments and other test artifacts Within the result bundle's Data subdirectory, Image data (and presumably other attachment data) is stored in files whose names appear to be base64 encoded keys prefixed with data. These files are compressed using zstd. You can confirm this by running the file command on them. Direct decompression of these files using zstd reveals PNG image data. Hurray! As mentioned before, the filenames which are prefixed with data contain base64-encoded identifiers. The database.sqlite3 database which is present in the result bundle contains a table called Attachments which has rows for each attachment. Those rows have columns with the filename you provided the attachment in your test, as well as the encoded key which is appended to data to form the filename. Those
Apr ’25
Reply to Xcode Build Failure
@darkpaw: I have included snippet of my code below as reference. The 'width' parameter can be changed later ... However, same error would still show up: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions ... struct ViewShelter: View { // TH: helps safely update UI. @State private var rowEven: Bool = true @State private var pathBlocked: Bool = true @State private var borderColorBackEnd: Color = Color.black @State private var borderColorBackEndOperation: Color = Color.black var body: some View { VStack (alignment: .leading){ ForEach(0...(ViewConstants.TARGET_STRING_BACK_0_DIMENSION-1), id:.self) { row in if let row_x = shelterViewModel.getShelter(row: row) as [RecommendationEntity]? { if let row_x_count = row_x.count as Int? { if row_x_count > 0 { let row_x_columns = Array(0...row_x_count-1) GeometryReader { geometry in HStack(alignment: .center) { ForEach(row_x_columns, id:.self){ column in self.rowEven = (row%2==0)
Apr ’25
Reply to Xcode Build Failure
May be because image is upside down 😉 When you post a message, make it easy to use: image in correct orientation complete code so that one can test, in text, not only screenshot full error message Seems it is a problem to type check shelterViewModel.getShelter (row: row, column: column).productId == ViewConstants.LAYOUT_DUMMY_ what is productId type ? How are ViewConstants defined ? What is .LAYOUT_DUMMY_ ? Which type ? If it is not exactly the same as productId, then the error. Note: tests as shelterViewModel.getShelterOperationFormat() != true may be written !shelterViewModel.getShelterOperationFormat()
Apr ’25
Reply to Xcode Build Failure
The error: The compiler is unable to type-check the expression in real-time generally means you're trying to do too many things in one place, and you should break it down a little. Firstly, to make it more readable, I'd put brackets around each ternary expression, for example: (row %2 == 0 ? Color.blue : Color.orange) so you can see which bits are enclosed. Then I'd split it out like this, creating a let for the various bits so they're individually evaluated prior to the larger expression. Also, I'd indent the code so it's more readable, putting the positive on the first line, and the negative on the next line, indented: let borderColor1 = (row %2 == 0 ? Color.blue : Color.orange) let borderColor2 = (shelterViewModel.getShelter(row: row, column: column).productId = ViewConstants.LAYOUT_DUMMY_ID ? Color.yellow : Color.green) .border( (shelterViewModel.getShelter0perationFormat() ? borderColor1 : (locationViewModel.getLocation(row: row, column: column) ? Color.red : borderCol
Apr ’25
NSLayoutManager returning inconsistent values for a glyph's text container and its line fragment rect
TLDR: NSLayoutManager's textContainer(forGlyphAt:effectiveRange:) and lineFragmentRect(forGlyphRange:effectiveRange:) are returning inconsistent results. Context: I'm developing a word processing app that paginates from an NSTextStorage using NSLayoutManager. My app uses a text attribute (.columnType) to paginate sub-ranges of the text at a time, ensuring that each columnRange gets a container (or series of containers across page breaks) to fit. This is to support both multi-column and standard full-page-width content. After any user edit, I update pagination data in my Paginator model class. I calcuate frames/sizes for the views/containers, along with what superview they belong to (page). The UI updates accordingly. In order to determine whether the columnRange has overflowed from a container due to a page break OR whether the range of text hasn't overflowed its container and is actually using less space than available and should be sized down, I call both: layoutManager.textContainer(forGlyphAt: la
2
0
477
Apr ’25
WebView some of fonts became too small on ios 18.4 and on latest safari
Below is the sample css code where I render a web page in my webview screens fonts became too small after 18.4 and its so hard to read when I launch my app . Any workarounds to address this issue .sg-labels-canvas { font-size: 15px; display: flex; flex-direction: column; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, sans-serif; font-style: normal; }
Topic: Design SubTopic: General
1
0
99
Apr ’25
Zspeedaccuracy question
Hello everyone, I'm doing some work on validating some data to do with the zpseed functionality around corelocations, i've read up on the speedaccuracy field but the wording doesn't make sense to me. It says if its a positive number it is plus or minus the value in the zspeed column so would this be for example zspeed of 35 mps with an accuracy of 3 mps would it be 32 mps 38 mps or is it a range? so would it be anywhere between 32-38 mps. Or is it just plus or minus the 3mps and if this is the case how would it be worked out if its plus or minus when all the numbers will be a positive numbers as any negative numbers are deemed inaccurate ?
1
0
76
Apr ’25
Reply to Xcode 16.3, an error is occurring in the String Catalog.
You are right that this situation can occur when migrating a .stringsdict to a .xcstrings. Specifically, the migrator only populates substitution argument numbers when they were previously explicitly-specified in the specifier. For example, if the original .stringsdict format string contained %1$#@VARIABLE@ instead of %#@VARIABLE@, the argNum would have been automatically set upon migration. The migrator does this as a safeguard to ensure that the built .stringsdict behaves identically at runtime to the original .stringsdict with regard to implicit argument numbers (which have complex rules at runtime). The String Catalog Editor does indeed hide the argument number and format specifier columns from the variable inspector when they are missing in the file. As you mentioned, editing the JSON or re-creating the string (or deleting it and letting it be extracted again) can get you out of this conundrum. I see that you filed a Feedback report about this. Thank you! That will help us evaluate whether we sh
Apr ’25
ScrollView triggers (almost) endless View redrawing.
I am developing a MacOS app with a vertically oriented ScrollView. Inside that View I use a LazyVStack. In the LazyVStack I have a column of images. I want the images to occupy as much of the LazyVStack width as possible so I created a frame for the VStack with a maxWidth: .infinity. When the user grabs the edge of the window and drags it to reduce the window width, the Views of the window adjust themselves to fit the reduced space. This includes reducing the width of the images. I maintain a fixed aspect ratio for the images, so the height of the images is reduced too. My problem arises when the width of the images (and height) reduces to the point where the scroll bar is no longer needed because all of the images fit within the height of the ScrollView, and the ScrollView removes the scroll bar. That triggers a redraw of the images, with a slightly bigger size because the width used by the scroll bar is now available. When the the images get bigger they don't all fit within the height of the Scroll
1
0
290
Apr ’25
App Store Connect API discrepancies
In the Apple Summary Sales Report using App Store Connect API, you can get a daily count of downloads and re-downloads by using the 1F and 3F values in the Product Type Identifier column. You can then cross check the download numbers against the downloads reported in the Analytics section of App Store Connect. When looking at a month of data, the first time download numbers seem to line up exactly (1F in the API versus First-Time Downloads in Appstore Store Connect). There is a discrepancy though between reported re-downloads. The total units for 3F does not line up with the Redownloads numbers reported in the Analytics section of App Store Connect. The 3F redownloads from the API appear to be 60% higher for a month compared to the App Store Connect reporting interface. What could be going on here? Is there some type of de-duplication process run on the App Store Connect web report data that is not run on the data coming out of the App Store Connect API? Any insight would be greatly appreciated.
1
0
127
Apr ’25