I'm currently writing a macro which outputs Swift Testing code: // Macro code ... @MainActor @SnapshotSuite struct MySuite { func makeView() -> some View { Text(a view) } } which expands to... // Expanded macro code ... @MainActor @Suite struct _GeneratedSnapshotSuite { @MainActor @Test(.tags(.snapshots)) func assertSnapshotMakeView() async throws { let generator = SnapshotGenerator( testName: makeView, traits: [ .theme(.all), .sizes(devices: .iPhoneX, fitting: .widthAndHeight), .record(false), ], configuration: .none, makeValue: { MySuite().makeView() }, fileID: #fileID, filePath: #filePath, line: 108, column: 5 ) await __assertSnapshot(generator: generator) } } In short, this macro creates snapshot tests from a function. This all works but I'm finding a couple of limitations, potentially with how Macros are expanded in Swift. Xcode diamonds are not visible The snapshots tag isn't discovered There are a couple of things worth noting though: The suites and tests are discovered in Xcode's Test Navi
Search results for
column
2,047 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Could be useful for someone, here's an example of script for Numbers to manipulate the content, cells and rows with placeholders: set newList to {} repeat with anItem in theList set newList to {anItem} & newList end repeat return newList end reverseList on replaceText(theText, searchString, replacementString) set AppleScript's text item delimiters to searchString set textItems to text items of theText set AppleScript's text item delimiters to replacementString set newText to textItems as text set AppleScript's text item delimiters to return newText end replaceText tell application Numbers tell document TestNum repeat with s in sheets tell s repeat with t in tables -- Create a static list of row indices set totalRows to count of rows of t set rowIndices to {} repeat with i from 1 to totalRows copy i to end of rowIndices end repeat set revIndices to my reverseList(rowIndices) repeat with iRef in revIndices set rowNum to iRef as integer -- Directly use row rowNum of t to access the row set numCells to count
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
Nowadays the metal shading language specification states that it's possible, but still it doesn't specify the order, section 2.3.2 Matrix Constructors says: Since Metal 2, a matrix of type T with n columns and m rows > can also be constructed from n * m scalars of type T. The following examples are legal constructors: float2x2(float, float, float, float); float3x2(float, float, float, float, float, float); I'm too lazy to bounce data to the shader and back just to check, but I'd appreciate if anybody who knows would answer to the initial question, and even better would make a clarification in that document BTW the document: https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf
Topic:
Graphics & Games
SubTopic:
General
Tags:
UPDATE : I was able to narrow down my metadata errors vaslty. The only error that sustains is as follows. Package Summary: 1 package(s) were not uploaded because they had problems: /Users/isseyyohannes/Desktop/ALGORA_Performance.itmsp - Error Messages: ERROR ITMS-3000: Line 16 column 15: element versions not allowed here; expected the element end-tag or element metadata_token at XPath /package/versions ERROR ITMS-3000: Package null failed schema validation. [2025-02-20 12:23:44 EST] DBG-X: Returning 1 This is the structure of my metadata file. GL5BCCW69X GL5BCCW69X ALGORA_Performance.pkg ALGORA Performance Trading made easy. This app is optimized for macOS trading. Any insight on to what I may be doing wrong in my metadata.xml file would be appreciated. Thank you. Note : md5 was hidden on purpose.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
I am attempting to upload an application to the app store. The selected method was using Transporter through terminal commands. In this sense, I keep receiving a metadata error which is as follows : Command (Assume values are filled in) /usr/local/itms/bin/iTMSTransporter -m upload -u MY_EMAIL -p YOUR_APP_SPECIFIC_PASSWORD -f /Users/isseyyohannes/Desktop/ALGORA_Performance.itmsp --asc-provider GL5BCCW69X -v detailed I receive the following error Package Summary: 1 package(s) were not uploaded because they had problems: /Users/isseyyohannes/Desktop/ALGORA_Performance.itmsp - Error Messages: ERROR ITMS-3000: Line 9 column 25: element data_file incomplete; missing required elements checksum and size at XPath /package/software_assets/asset/data_file ERROR ITMS-3000: Line 12 column 24: element software_metadata not allowed here; expected the element end-tag or element metadata_token at XPath /package/software_metadata ERROR ITMS-3000: Line 13 column 19: element software not allowed h
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
App Store Connect
App Submission
I reported this bug one year ago in https://developer.apple.com/forums/thread/746406, but as it is not been fixed yet, I'm going to try by opening this new incident report. iOS is not working for the Unicode Variation Selector-15 (U+FE0E) for all the characters. Can you please apply that variation selector to all your Unicode characters? I) Steps to reproduce the issue: navigate in safari to the page https://eurovot.com/vs.htm II) Expected result: as the 1st column of characters have the Variation Selector-15 (U+FE0E) applied, and the 2nd column have the Variation Selector-16 (U+FE0F) applied, the first column should always display text characters (in orange) and the second column emoji characters. III) Error result: some characters are working fine in the 1st column and displayed as text (in orange colour), but some other aren't displayed as text, they wrongly displayed as emojis instead.
Topic:
Safari & Web
SubTopic:
General
My app is a Safari extension. When trying to validate the app, I get the following error: App sandbox not enabled. The following executables must include the com.apple.security.app-sandbox entitlement with a Boolean value of true in the entitlements property list: [( app.rango.Rango.pkg/Payload/Rango for Safari.app/Contents/MacOS/Rango for Safari )] Refer to App Sandbox page at https://developer.apple.com/documentation/security/app_sandbox for more information on sandboxing your app. I don't know why this is happening. I have app sandbox enabled in both the app and the extension target. I have both entitlement files. When executing codesign -d --entitlements :- /path/to/binary I get the following: com.apple.security.app-sandboxcom.apple.security.files.user-selected.read-onlycom.apple.security.get-task-allowcom.apple.security.network.client If I check on Activity Monitor, on the sandbox column it shows true. I have no idea why I keep getting this error when all indicates that the app is actually sandb
Hi @NahtanMak I was able to achieve a similar effect using shader graph. I adjust each pixel's opacity based on its distance from the center of the image. I used texture coordinates to calculate that distance. Here's how to setup the graph: Add an Image node. Connect its Out to the color property on an UnlitSurface. Add a TextureCoordinates node. Connect its Out to the In of a Remap node. For both columns of the Remap node, change:Out Low to -1 and Out High to 1. Drag its Out to the In of Magnitude node. Drag the Out of the Magnitude node to a new Remap node. Set Out Low to 1 and Out High to 0. Drag the Out to Opacity on the UnlitSurface you created in the first step. Note: you can change the In Low property on the Remap node you created in the previous step to control when the gradient begins. If you set it to 0 the gradient will start in the center of the image. If you set it to 0.5 the gradient will start 50% from the center of the image. If you set it to 1, there will be no gradient. Please accep
Topic:
Spatial Computing
SubTopic:
General
Tags:
Thank you. I decided to keep trying at it - as my code base was a little too much to simplify in order to share it. I couldn't solve it no matter what I did at a granular level. BUT, when I simply removed my measuringLayoutManager and had all code use a single layoutManager, the problems went away. Something in the text system really did not like it when I had more than one layout manager laying out the same text storage, even though I ensured that that second layout manager used a separate set of text containers, and even though those text containers were not tied to any views, nor ever passed as objects/references. Merely having a second layout manager assigned to the text storage, doing layout passes into its own containers in order to calculate sizes seemed to be the source of the problem. I simplified and am using a single layout manager now. My calculated sizes are the same as they were when calculated by my second measuringLayoutManager. So there was nothing wrong with the calculations there. But I no
Topic:
UI Frameworks
SubTopic:
AppKit
Tags:
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
I am using ARKit with RealityKit to scan objects using LiDAR on iOS. I can generate an OBJ file from ARMeshAnchors, but I am missing the texture export (JPG + MTL). What I Have So Far: Successfully capturing mesh using ARMeshAnchor. Converting mesh into MDLAsset and exporting .obj. I need help generating the .jpg texture and linking it to the .mtl file. private func exportScannedObject() { guard let camera = arView.session.currentFrame?.camera else { return } func convertToAsset(meshAnchors: [ARMeshAnchor]) -> MDLAsset? { guard let device = MTLCreateSystemDefaultDevice() else {return nil} let asset = MDLAsset() for anchor in meshAnchors { let mdlMesh = anchor.geometry.toMDLMesh(device: device, camera: camera, modelMatrix: anchor.transform) // Apply a gray material to the mesh let material = MDLMaterial(name: GrayMaterial, scatteringFunction: MDLScatteringFunction()) material.setProperty(MDLMaterialProperty(name: baseColor, semantic: .baseColor, float3: SIMD3(0.5, 0.5, 0.5))) // Gray color if let submeshes
can't see what the problem is .. Im getting the error: Type '()' cannot conform to 'View' struct CalendarView: View { @StateObject private var viewModel = CalendarViewModel() @State private var selectedDate: CalendarDate? @State private var showModal = false var body: some View { VStack { Text(Calendar App) .font(.largeTitle) .padding() GridStack(rows: 5, columns: 7) { row, col in let index = row * 7 + col if index < viewModel.calendarDates.count { let calendarDate = viewModel.calendarDates[index] Text((Calendar.current.component(.day, from: calendarDate.date))) .frame(width: 40, height: 40) .background(calendarDate.isSelected ? Color.blue : Color.clear) .cornerRadius(10) .foregroundColor(calendarDate.isSelected ? Color.white : Color.black) .onLongPressGesture { selectedDate = calendarDate showModal = true } } } } .background(Color.gray) .sheet(isPresented: $showModal) { if let date = selectedDate { DateSelectionModal(selectedDate: date) } } } } struct GridStack: View { let rows: Int let columns
Topic:
UI Frameworks
SubTopic:
SwiftUI
How? I cannot see how to read the width and I cannot see how to set width? I can fix the width but then the user cannot resize the columns. Are there any way to achieve this with any other components in SwiftUI?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
[quote='774113021, maxpe, /thread/774113, /profile/maxpe'] On affected devices, the “Swap Used” column shows very low values (a few MB). [/quote] Where are you seeing this Swap Used column? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic:
App & System Services
SubTopic:
Networking
Tags:
I have a macOS app made with SwiftUI where I want to show a list of data in a tabular fashion. SwiftUI Table seems to be the only built-in component that can do this. I would like to let the user size the columns and have their widths restored when the app is relaunched. I can find no documentation on how to do this and it does not seem to be saved and restored automatically. I can find no way to listen for changes in the column widths when the user resizes and no way to set the size from code. For a macOS app it seems that the only way to set the width of a column is to use e.g. .width(min: 200, max: 200). This in effect disables resizing of the column. It seems that idealSize is totally ignored on macOS. Any suggestions?