Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

Errors reported by content of WKWebView (via window.onerror) are censored to "Script error.""
Script error. We've decided to implement certain highly-dynamic content in out iOS codebase using web technologies, here's what we're doing: We download a zip file containing html, javascript, and images. We unzip the archive, construct a WKWebView, and load the content using webView.loadFileURL(indexHtmlUrl, allowingReadAccessTo: parentDirectory) This works fine, but we'd also like to be notified on any rendering errors that might be raised, so we can fix them. let errorHandlerScriptString = (function() { var oldLog = console.log; console.log = function(message) { window.webkit.messageHandlers.consoleLog.postMessage(message); oldLog.apply(console, arguments); } })(); // don't even allow asking for location permissions navigator.geolocation.getCurrentPosition = function(success, error, options) { error({ PERMISSION_DENIED: 1, code: 1 }); }; window.onerror = (msg, url, line, column, error) => { const message = { message: msg, url: url, line: line, column: column, error: JSON.stri
Topic: Safari & Web SubTopic: General Tags:
2
0
636
Nov ’24
UndoManager with SwiftData Not Registering Single Undo Actions Properly in macOS Sonoma 14.x
I am encountering an issue with the UndoManager functionality in a SwiftUI application that integrates SwiftData for persistence. This issue occurs specifically in macOS 14 (Sonoma) but works as expected on macOS 15 (Sequoia). The focused test app I have prepared for demonstration allows users to create ParentItem objects, and for each ParentItem, users can add multiple ChildItem objects. The undo functionality (via Cmd+Z) is not working as expected in Sonoma. When I try to undo a ChildItem addition, the UndoManager does not revert just the last ChildItem added, but instead removes all ChildItems that were added in that session. Expected Behavior On macOS 14 (Sonoma), I expect the UndoManager to undo only the most recent transaction (in this case, a single ChildItem insert), similar to how it functions on macOS 15 (Sequoia). Each ChildItem insertion should be treated as a separate undoable action. Current Behavior In macOS Sonoma, pressing Cmd+Z undoes the entire list of ChildItems added to a ParentItem in th
2
0
1.2k
Nov ’24
RoomPlan: Use the transform and dimensions to generate 4 corner points
I'm trying to use data returned from the RoomCaptureSession delegate to draw four corners of a door in SceneKit. The CapturedRoom.Surface class has Dimensions and Transform members. I was told in the WWDC 2022 RoomPlan Slack lounge: You can use transform and dimensions parameters to draw lines. The 4 corners can be inferred from those 2 parameters: the first column of the transform is the right vector, and second is the up vector. The fourth column is the position of the wall/door/opening/window/object Combining those unit vectors with the dimensions vector will give you the corners. So I think this is a basic vector question. I'm not sure what is meant by Combining those unit vectors with the dimensions vector. I've tried a few things, but I'm not sure how to go about this.
5
0
2.5k
Nov ’22
Reply to Mac Issue with Developer ID certificate and Sign in with Apple capability
Sign in with Apple is not supported in Developer ID apps. The go-to reference for this stuff is Developer Account Help > Reference > Supported capabilities (macOS). Note that Sign in with Apple is not available in the Developer ID column. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Nov ’24
Payment not completed error
I am using a sandbox account, and I set United States in the region column (Settings>General>Language & Region>Region to US). I added test cards like (American Express and Visa) and the cards added successfully. But I am trying to pay then I get an error like Payment Not Completed. Note: I am trying from India. Please let me know what exactly i am doing mistake here Following code i am using. function onApplePayButtonClicked() { if (!ApplePaySession) { return; } // Define ApplePayPaymentRequest const request = { countryCode: US, currencyCode: USD, merchantCapabilities: [ supports3DS ], supportedNetworks: [ visa, masterCard, amex, discover ], total: { label: Demo (Card is not charged.), type: final, amount: 1.99 } }; // Create ApplePaySession const session = new ApplePaySession(3, request); session.onvalidatemerchant = event => { // Call your own server to request a new merchant session. var merchantSession = merchantValidation(event.validationURL); session.completeMerchantValidation(m
1
0
1.1k
Oct ’24
Problem When Create a Response to a Customer Review on Apple Store Connect API
Hi, I'm trying to create a response for a review through the Apple Store Connect API, but I receive the following error message when sending the body following this documentation: https://developer.apple.com/documentation/appstoreconnectapi/create_or_update_a_response_to_a_customer_review cURL Request --header 'Authorization: {{MY_BEARER_TOKEN}}' --header 'Content-Type: application/json' --data '{ attributes: { responseBody: {{MY_RESPONSE}} }, relationships: { review: { data: { id: {{REVIEW_ID}}, type: customerReviews } } }, type: customerReviewResponses }' *I changed the cURL to not display real data, but they are filled in my request. Error message: errors: [ { id: 5575b9ef-9005-4db2-9a89-123b1aaa9355, status: 422, code: ENTITY_UNPROCESSABLE, title: The request entity is not a valid request document object, detail: Unexpected or invalid value at 'attributes'., meta: { position: { row: 2, column: 20 } } } ] } Can you help me put together the body correctly if that's the case of the error?
2
0
905
Oct ’24
Reply to Error I can't seem to fix
You haven't posted enough context. If you click on the Report navigator icon (the rightmost icon at the top of the left column in Xcode, which looks like a hierarchical list), you can see the full build log, which should help you to fix errors like these. With what you've posted, we can't see the name of the first missing file. The second missing file may be missing because the first is missing, and that in turn may be due to something reported only as a warning in the detailed build log.
Oct ’24
SwiftUI Form (Grouped) with Table
Hi everyone, I’m having an issue with a SwiftUI Table inside a Form in a macOS app. When the Form style is set to .grouped, the Table does not resize to the full width of the Form or Sheet. However, when I switch to a .plain style, it resizes correctly. Here’s a simplified version of my code: Section(header: Text(Header)) { Table(data) { TableColumn(Column 1, value: .col1) TableColumn(Column 2, value: .col2) // Add more columns as needed } .frame(height: 100) } } .formStyle(.grouped) // Issue occurs only with this style Has anyone else experienced this? Any workarounds or suggestions would be greatly appreciated! Thanks!
3
0
790
Sep ’24
Reply to macos menu bar color picker not working properly
First of all, thank you for your response. Since I have just started with SwiftUI, please don't mind my beginner mistakes regarding the color selection. I have shared all my codes import SwiftUI import AppKit struct RenkSecimi: View { @Binding var renk1: Color @Binding var renk2: Color @ObservedObject var short : TimerModel @State private var renkGoster = false var body: some View { Form { VStack(alignment: .center, spacing: 20) { HStack(alignment: .center) { ColorPicker(Color 1,selection: $renk2) .padding() .background(.gray) .clipShape(RoundedRectangle(cornerRadius: 10)) .shadow(radius: 2) .onTapGesture { renkGoster.toggle() } ColorPicker(Color 2, selection: $renk1) .padding() .background(.gray) .clipShape(RoundedRectangle(cornerRadius: 10)) .shadow(radius: 2) .onTapGesture { renkGoster.toggle() } } VStack(spacing: 10){ Picker(Short Break, selection: $short.shortBreakDuration) { ForEach(5...11, id: .self) { i in Text((i) Dk).tag(i * 60) } .onChange(of: short.shortBreakDuration) { oldValue, newValue in short
Oct ’24
How can I get a tab-bar styled ornament on the trailing edge of a view controller?
I've got a UIKit app with a collapsible trailing-edge child view controller, implemented sort of like UISplitViewController but it's got a bunch of custom behavior - moving to the bottom edge in portrait orientation, etc. It exposes a couple of different app functions via a UITabBar on the bottom edge on iOS. When I run the app on visionOS, that tab bar transforms to a leading-edge ornament. This would be great, but that means it tries to overlap the trailing-edge content of its parent view controller, which isn't ideal. Is there a way to get the tab bar to lay out on the trailling edge of the child view controller? Or can I create a custom ornament that has the same auto-expand behavior as the tab bar, where it shows a vertical column of icons that expands to show titles when you're gazing at it?
1
0
499
Oct ’24
Text-shadow + column-count adds unexpected whitespace at beginning of second column
Howdy! On Safari, when using the column-count CSS property to split text into multiple columns, I've noticed that when applying a text-shadow, there is an unexpected whitespace created above all subsequent columns. I've put together a codepen demonstrating the issue and its reproducibility on Safari (using latest as of this posting: Version 17.6 (19618.3.11.11.5)) Codepen: https://codepen.io/cubepresser/pen/ExqvzjL Expected behavior: Actual: I tested this on the latest versions of Chrome, Firefox and Edge. This bug does not occur. Expected behavior is that there should not be an extra line added to the beginning of the second column, third column, etc. Here's some code if that codepen link doesn't work: HTML: 0000000000111111111122222222223333333333 CSS: #example { font-family: monospace; max-width: 20ch; column-count: 2; column-gap: 0; word-break: break-all; line-break: anywhere; text-shadow: 0 0 4px black; }
1
0
793
Oct ’24
Reply to text context with column-count value is 2 and text-shadow' blur is greater then 0, the second column will be bring down
Howdy! This bug still occurs on Safari. I've put together a codepen demonstrating the issue and its reproducibility on Safari (using latest as of this posting: Version 17.6 (19618.3.11.11.5)) Codepen: https://codepen.io/cubepresser/pen/ExqvzjL I tested this on the latest versions of Chrome, Firefox and Edge. This bug does not occur. Expected behavior is that there should not be an extra line added to the beginning of the second column, third column, etc. Here's some code if that codepen link doesn't work: HTML: 0000000000111111111122222222223333333333 CSS: #example { font-family: monospace; max-width: 20ch; column-count: 2; column-gap: 0; word-break: break-all; line-break: anywhere; text-shadow: 0 0 4px black; }
Topic: Safari & Web SubTopic: General Tags:
Oct ’24
text context with column-count value is 2 and text-shadow' blur is greater then 0, the second column will be bring down
HelloI have a problem when I use text-shadow and coumnt-count style on a span element,When I set text-shadow' blur value greater then 0 and column-count greater then 1, then you will see the second column ( also the third column) will bring down some distance, but it's not happen on Windows Chrome, Mac Chrome, etc, It's looks like only safari has this bug.Following is a online demo of this bug:link: http://jsrun.net/arfKp/editI'm looking forword for any response of this.ThanksYulong
2
0
599
Jun ’20
Reply to How SwiftUI Table sorting work with multiple KeyPathComparator ?
@cp-divyesh-v I would recommend you review Building a Great Mac App with SwiftUI sample code. It has an example that walks you through how you should create sortable columns. However here's an example : struct Plant: Identifiable { var id = UUID() var variety: String var daysToMaturity: Int var datePlanted: Date var harvestDate: Date var lastWateredOn: Date var favorite: Bool } @Observable class DetailManager { var sortOrder: [KeyPathComparator] = [ .init(.daysToMaturity, order: SortOrder.reverse), .init(.variety, order: SortOrder.reverse) ] var data = [ Plant(variety: Tomato, daysToMaturity: 80, datePlanted: Date(), harvestDate: Date(), lastWateredOn: Date(), favorite: true), Plant(variety: Carrot, daysToMaturity: 60, datePlanted: Date(), harvestDate: Date(), lastWateredOn: Date(), favorite: false), Plant(variety: Pepper, daysToMaturity: 90, datePlanted: Date(), harvestDate: Date(), lastWateredOn: Date(), favorite: false) ] var plants: [Plant] { data.sorted(using: sortOrder) } } struct GardenDetailT
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24