Posts

Sort by:
Post not yet marked as solved
0 Replies
13 Views
I was executing some code from Incorporating real-world surroundings in an immersive experience func processReconstructionUpdates() async { for await update in sceneReconstruction.anchorUpdates { let meshAnchor = update.anchor guard let shape = try? await ShapeResource.generateStaticMesh(from: meshAnchor) else { continue } switch update.event { case .added: let entity = ModelEntity() entity.transform = Transform(matrix: meshAnchor.originFromAnchorTransform) entity.collision = CollisionComponent(shapes: [shape], isStatic: true) entity.components.set(InputTargetComponent()) entity.physicsBody = PhysicsBodyComponent(mode: .static) meshEntities[meshAnchor.id] = entity contentEntity.addChild(entity) case .updated: guard let entity = meshEntities[meshAnchor.id] else { continue } entity.transform = Transform(matrix: meshAnchor.originFromAnchorTransform) entity.collision?.shapes = [shape] case .removed: meshEntities[meshAnchor.id]?.removeFromParent() meshEntities.removeValue(forKey: meshAnchor.id) } } } I would like to toggle the Occlusion mesh available on the dev tools below, but programmatically. I would like to have a button, that would activate and deactivate that. I was checking .showSceneUnderstanding but it does not seem to work in visionOS. I get the following error 'ARView' is unavailable in visionOS when I try what is available Visualizing and Interacting with a Reconstructed Scene
Posted
by
Post not yet marked as solved
0 Replies
15 Views
I am trying to load an auxiliary window from an AppKit bundle that loads a NSViewController from a storyboard. This NSViewController displays a MKMapView. I want to avoid supporting multiple windows from my Catalyst app so I do not want to load this window via a SceneDelegate, and that is why I have chosen to go the AppKit bundle route. If I load a similar view controller which contains a single label, then all works as expected. However, if I try to load a view controller with the MKMapView, I get the following error after crashing: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MKMapView nsli_piercingToken]: unrecognized selector sent to instance 0x15410f600' DropBox link to sample app with buttons on a view to select either the "Map View" (crashing) or the "Label View" (working): https://www.dropbox.com/scl/fi/q9daurhzqvil9o2ry6k1t/CatalystMap.zip?rlkey=yjbqfn6uxfrfh1jgsdavagta7&dl=0
Posted
by
Post not yet marked as solved
0 Replies
20 Views
Summary Hello Apple Developers, I've made a custom UITableViewCell that includes a UITextField and UILabel. When I run the simulation the UITableViewCells pop up with the UILabel and the UITextField, but the UITextField isn't clickable so the user can't enter information. Please help me figure out the problem. Thank You! Sampson What I want: What I have: Screenshot Details: As you can see when I tap on the cell the UITextField isn't selected. I even added placeholder text to the UITextField to see if I am selecting the UITextField and the keyboard just isn't popping up, but still nothing. Relevant Code: UHTextField import UIKit class UHTextField: UITextField { override init(frame: CGRect) { super.init(frame: frame) configure() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } convenience init(placeholder: String) { self.init(frame: .zero) self.placeholder = placeholder } private func configure() { translatesAutoresizingMaskIntoConstraints = false borderStyle = .none textColor = .label tintColor = .blue textAlignment = .left font = UIFont.preferredFont(forTextStyle: .body) adjustsFontSizeToFitWidth = true minimumFontSize = 12 backgroundColor = .tertiarySystemBackground autocorrectionType = .no } } UHTableTextFieldCell import UIKit class UHTableTextFieldCell: UITableViewCell, UITextFieldDelegate { static let reuseID = "TextFieldCell" let titleLabel = UHTitleLabel(textAlignment: .center, fontSize: 16, textColor: .label) let tableTextField = UHTextField() override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) configure() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } func set(title: String) { titleLabel.text = title tableTextField.placeholder = "Enter " + title } private func configure() { addSubviews(titleLabel, tableTextField) let padding: CGFloat = 12 NSLayoutConstraint.activate([ titleLabel.centerYAnchor.constraint(equalTo: centerYAnchor), titleLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: padding), titleLabel.heightAnchor.constraint(equalToConstant: 20), titleLabel.widthAnchor.constraint(equalToConstant: 80), tableTextField.centerYAnchor.constraint(equalTo: centerYAnchor), tableTextField.leadingAnchor.constraint(equalTo: titleLabel.trailingAnchor, constant: 24), tableTextField.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -padding), tableTextField.heightAnchor.constraint(equalToConstant: 20) ]) } } LoginViewController class LoginViewController: UIViewController, UITextFieldDelegate { let tableView = UITableView() let loginTableTitle = ["Username", "Password"] override func viewDidLoad() { super.viewDidLoad() configureTableView() updateUI() createDismissKeyboardTapGesture() } func createDismissKeyboardTapGesture() { // create the tap gesture recognizer let tap = UITapGestureRecognizer(target: self.view, action: #selector(UIView.endEditing)) // add it to the view (Could also add this to an image or anything) view.addGestureRecognizer(tap) } func configureTableView() { view.addSubview(tableView) tableView.layer.borderWidth = 1 tableView.layer.borderColor = UIColor.systemBackground.cgColor tableView.layer.cornerRadius = 10 tableView.clipsToBounds = true tableView.rowHeight = 44 tableView.delegate = self tableView.dataSource = self tableView.translatesAutoresizingMaskIntoConstraints = false tableView.removeExcessCells() NSLayoutConstraint.activate([ tableView.topAnchor.constraint(equalTo: loginTitleLabel.bottomAnchor, constant: padding), tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding), tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -padding), tableView.heightAnchor.constraint(equalToConstant: 88) ]) tableView.register(UHTableTextFieldCell.self, forCellReuseIdentifier: UHTableTextFieldCell.reuseID) } func updateUI() { DispatchQueue.main.async { self.tableView.reloadData() self.view.bringSubviewToFront(self.tableView) } } } extension LoginViewController: UITableViewDelegate, UITableViewDataSource{ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 2 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: UHTableTextFieldCell.reuseID, for: indexPath) as! UHTableTextFieldCell let titles = loginTableTitle[indexPath.row] cell.set(title: titles) cell.titleLabel.font = UIFont.systemFont(ofSize: 16, weight: .bold) cell.tableTextField.delegate = self return cell } } Again thank you all so much for your help. If you need more clarification on this let me know.
Posted
by
Post not yet marked as solved
0 Replies
41 Views
I am developing a File Provider Extension on Mac. I am confused about how the extendedAttributes property works. The property never seems to be populated with any extended attributes. I've tried setting some custom extended attributes on my documents in testing, but they are never populated in the itemTemplates that are produced in the extension. The dictionary that would hold the extended attributes always is empty. I began to think that it only supported Mac-created attributes such as com.apple.quarantine. I then tried importing some files that are 'quarantined' with this appropriate extended attribute but still have not seen this data appear in my extension either. Any clarity here with what I should be expecting or what I should try would be helpful.
Posted
by
Post not yet marked as solved
0 Replies
26 Views
Dear all, I'm building an app leveraging SwiftData and I have the following two classes: Stagione: import SwiftData @Model class Stagione { @Attribute(.unique) var idStagione: String var categoriaStagione: String var miaSquadra: String @Relationship(deleteRule: .cascade) var rosa: [Rosa]? @Relationship(deleteRule: .cascade) var squadra: [Squadre]? @Relationship(deleteRule: .cascade) var partita: [CalendarioPartite]? init(idStagione: String, categoriaStagione: String, miaSquadra: String) { self.idStagione = idStagione self.categoriaStagione = categoriaStagione self.miaSquadra = miaSquadra } } Squadre: import SwiftData @Model class Squadre { var squadraCampionato: String var stagione: Stagione? init(squadraCampionato: String) { self.squadraCampionato = squadraCampionato } } Now, I have a view in which I'm calling a sheet to insert some Squadre: // Presenta il foglio per aggiungere una nuova partita GroupBox(label: Text("Dettagli Partita").font(.headline).padding()) { VStack { HStack { Text("Giornata:") TextField("Giornata", text: $idGiornata) .frame(width: 30) .textFieldStyle(RoundedBorderTextFieldStyle()) .padding() } DatePicker("Data Partita:", selection: $dataPartita, displayedComponents: .date) .padding() HStack { Text("Squadra Casa:") .frame(width: 150) TextField("Squadra Casa", text: $squadraCasa) .textFieldStyle(RoundedBorderTextFieldStyle()) .padding() TextField("Gol Casa", text: $golCasa) .textFieldStyle(RoundedBorderTextFieldStyle()) .padding() } HStack { Text("Squadra Trasferta:") .frame(width: 150) TextField("Squadra Trasferta", text: $squadraTrasferta) .textFieldStyle(RoundedBorderTextFieldStyle()) .padding() TextField("Gol Trasferta", text: $golTrasferta) .textFieldStyle(RoundedBorderTextFieldStyle()) .padding() } HStack { Button("Salva") { if let partitaSelezionata = partitaSelezionata { // Se è stata selezionata una partita, aggiorna i suoi dati if let index = partite.firstIndex(where: { $0.id == partitaSelezionata.id }) { partite[index].idGiornata = Int(idGiornata) ?? 0 partite[index].dataPartita = dataPartita partite[index].squadraCasa = squadraCasa partite[index].golCasa = Int(golCasa) ?? 0 partite[index].squadraTrasferta = squadraTrasferta partite[index].golTrasferta = Int(golTrasferta) ?? 0 } } else { // Altrimenti, aggiungi una nuova partita aggiungiPartita(stagione: stagione) } // Chiudi il foglio di presentazione mostraAggiungiPartita = false // Resetta il campo di input idGiornata = "" dataPartita = Date() squadraCasa = "" golCasa = "" squadraTrasferta = "" golTrasferta = "" } .buttonStyle(.borderedProminent) .disabled(idGiornata.isEmpty || squadraCasa.isEmpty || squadraTrasferta.isEmpty || golCasa.isEmpty || golTrasferta.isEmpty) // Bottone Chiudi Button("Chiudi") { mostraAggiungiPartita = false } .buttonStyle(.borderedProminent) } } .padding() } } I'd like to insert a autocomplete function in the textfields "Squadra Casa" and "Squadra Trasferta", based on the list of Squadre contained in the class "Squadre" and filtered for a specific Stagione. Has anybody of you made something similar? Do you have any suggestions or code example which I can use? Thanks, A.
Posted
by
Post not yet marked as solved
0 Replies
48 Views
I just bought a Vision Pro to build and run my app on it, but I'm encountering this error from Xcode: Developer Mode is enabled. Computer is paired. Device is paired, and it's connected to my Mac via the Developer Strap. In the "VPN & Device Management" setting it says to navigate to, there is no "Developer App certificate". Others have suggested clearing the ModuleCache in DerivedData, but that's also been fruitless. I've cleaned the build multiple times, and restarted both devices, and Xcode. I have no idea what else I can possibly do to resolve this. Does anyone have any other ideas?
Posted
by
Post not yet marked as solved
0 Replies
15 Views
Good afternoon, I'd like to get detailed information about the price usage of the Apple Map in my app in IOS (Swiftui for Iphone and Ipad). I'd like to establish a future price for the app subscription and to do that I need to obtain the precise prices for opening the map, consulting Map items, creating routes, the price of each consulting, and any other price that is related to the map usage process. I have been searching for this information and it has not been easy to find answers. I appreciate it if I could get the information. Best regards, Marcello Lima
Posted
by
Post not yet marked as solved
0 Replies
14 Views
Running Sonoma 14.4.1 and XCode 15.3 I'm unable to verify an app update. This app runs fine under Sonoma and the project has been verified many times before for earlier systems, but the new XCode crashes every time during the verification step. Of course this is stopping any further app updates. Is this known to anyone else? I've submitted the crash reports.
Post not yet marked as solved
0 Replies
43 Views
Hello. How to write this command correctly on a Macbook, in the script editor, so that I can click the "Run script" button and the script will give the result: if there is no folder, then report that there is no folder, if there is a folder, then report that the folder exists. do shell script "test -d 'Users/user/Desktop/New folder'" Now, if the folder exists, an empty string ("") is returned, if the folder does not exist, the script editor reports that an error has occurred. In general, my task is to write a script that checks the existence of a folder.
Posted
by
Post not yet marked as solved
0 Replies
20 Views
Hi all, I am working on macOS 14.4.1 and I am having an issue with the Desktop Spaces feature. Calling defaults read com.apple.spaces.plist gives me a list of all current spaces, which reports the existence of a phantom Space that cannot be seen nor interacted with. The ID of that Space leads me to the following: which shows that space 23 is associated with the Dashboard feature, that does not exist in Sonoma! I have tried to: restart the computer, forcefully disable the dashboard with defaults write com.apple.dashboard mcx-disabled -boolean YES killall Dock Neither attempt erased the phantom Space, which creates conflicts in my setup. I have tried completely disabling Widgets in the Preferences, closing all apps, deleting every space (including the "current" one, by creating a new one to substitute it) and restarting the Mac. After this, the id of the dashboard space changed: but it is still there. I do not know which step changed its id, because to my knowledge the com.apple.spaces.plist file takes a while to be updated (https://apple.stackexchange.com/questions/388449). But no hints on how to erase it. The specific issues I am having are that this phantom space prevents any software that reads the Spaces state, to save it, from working correctly (e.g. DisplayMaid, Workspaces). In particular, I am now developing a Hammerspoon (https://www.hammerspoon.org/) module to do just that, to set it precisely to my liking: https://github.com/tplobo/restore-spaces. Listing the spaces to cycle through them always reports this phantom space, and since it cannot be identified as the "non-existing" one (up until the time it breaks one of the Lua commands that manage spaces), I am unable to exclude it somehow to continue development. Is there a command to restart the Spaces feature, to completely erase all spaces and check if this removes this phantom Space? Otherwise, any alternative suggestions? I have already posted this in the standard forum, but no luck there. Thank you,
Posted
by
Post not yet marked as solved
0 Replies
43 Views
Users have reported unusually high data usage with my app. So to investigate I have profiled in instruments. My app as expected in using minimal data. However in instruments I see an "Unknown" process. Which sends around 1mb of data every 2 seconds. Can anyone explain what unknown process is? Sorry my question is vague but I'm at the beginning of understanding the instruments outputs so your help is so very much appreciated.
Posted
by
Post not yet marked as solved
0 Replies
110 Views
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
Posted
by
Post not yet marked as solved
0 Replies
13 Views
I get warnings from Visual Studio saying that in order to run cross platform MAUI applications I need to reduce the xCode version to 14.3. The emulator appears but the app can't be interacted with, using the latest versions of both VS and XC. So I've decided to try downloading the earlier version of xCode, but there seem to be no active Apple sponsored links and I'm wary of trying an alternate website. All links suggest https://developer.apple.com/downloads/ but this redirects to https://developer.apple.com/account From the account page there is a download https://developer.apple.com/download/ but this only holds OS operating systems. The xCode page: https://developer.apple.com/xcode/ only has 15 available. https://developer.apple.com/xcode/resources/ which says it has a download for earlier versions of software, only points me back to the account page and we're back to square one. So someone please let me know if I'm insane or the 14 is too deprecated to download and VS is no longer compatible.
Posted
by
Post not yet marked as solved
0 Replies
19 Views
I'm trying to control the LOD of textures for an app for vision pro, With the default image node in composer pro the UV's are correct but the LOD is not what I want, I would like to have control over it. I see there is a node called "RealityKitTexture2DLOD" but as soon as I try to use that one the UV's are all messed up. Am I missing something ? Do we need to do something specific to use this node ? I tried to use the nodes "Place 2D" and "UsdTransform2d" but could not get the texture to align Any help appreciated
Posted
by
gl5
Post not yet marked as solved
0 Replies
50 Views
There is some new UI in Xcode for upgrading OS versions. I clicked the new Get button at the top of the screen. It went and got the new iOS 17.4. Great, but it is just sitting there. After much floundering around, I eventually found the UI that has the Install button. Clicked it. Nothing happens. I have restarted Xcode several times, went looking for an Xcode update, no joy. My development is now dead for two days. Really not happy.
Posted
by
Post marked as solved
1 Replies
56 Views
I keep receiving this message : Your payment authorisation failed on card •••8090. Please verify your information and try again, or try another payment method. The problem is that i went already through with my bank and they confirmed nothing is wrong with my bank account they even checked with the Visa team and they confirmed nothing wrong. The bank adviser informed me that no payment was even attempted. I went through the phone with Apple customer support and she couldn't find anything wrong either we tried to pay from my iphone then from my Macbook but i keep getting this error As i have 3 different bank accounts i have tried to pay with 3 different visa debit cards but i get the same error so i believe its not the bank but Apple. Anyone in the same boat ?
Posted
by
Post not yet marked as solved
0 Replies
15 Views
Hi, Using iOS 17.2 trying to build an ios app with Content Filter Network extension. My problem is that when I build it on a device and go to Settings --> VNP & Device Management the Content Filter with my identifier is showing BUT is shows invalid. Appname is Privacy Monitor and Extension name is Social Filter Control Here is is my code `// // PrivacyMonitorApp.swift import SwiftUI @main struct PrivacyMonitorApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate var body: some Scene { WindowGroup { ContentView() } } } import NetworkExtension class AppDelegate: UIResponder, UIApplicationDelegate { static private(set) var instance: AppDelegate! = nil func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { configureNetworkFilter() return true } func configureNetworkFilter() { let manager = NEFilterManager.shared() manager.loadFromPreferences { error in if let error = error { print("Error loading preferences: \(error.localizedDescription)") return } // Assume configuration is absent or needs update if manager.providerConfiguration == nil { let newConfiguration = NEFilterProviderConfiguration() newConfiguration.filterBrowsers = true newConfiguration.filterSockets = true // newConfiguration.vendorConfiguration = ["someKey": "someValue"] manager.providerConfiguration = newConfiguration } manager.saveToPreferences { error in if let error = error { print("Error saving preferences: \(error.localizedDescription)") } else { print("Filter is configured, prompt user to enable it in Settings.") } } } } } Next the FilterManager.swift `import NetworkExtension class FilterManager { static let shared = FilterManager() init() { NEFilterManager.shared().loadFromPreferences { error in if let error = error { print("Failed to load filter preferences: \(error.localizedDescription)") return } print("Filter preferences loaded successfully.") self.setupAndSaveFilterConfiguration() } } private func setupAndSaveFilterConfiguration() { let filterManager = NEFilterManager.shared() let configuration = NEFilterProviderConfiguration() configuration.username = "MyConfiguration" configuration.organization = "SealdApps" configuration.filterBrowsers = true configuration.filterSockets = true filterManager.providerConfiguration = configuration filterManager.saveToPreferences { error in if let error = error { print("Failed to save filter preferences: \(error.localizedDescription)") } else { print("Filter configuration saved successfully. Please enable the filter in Settings.") } } } } Next The PrivacyMonitor.entitlements ` The Network Extension capabilties are on and this is the SocialFilterControl `import NetworkExtension class FilterControlProvider: NEFilterControlProvider { override func startFilter(completionHandler: @escaping (Error?) -> Void) { // Initialize the filter, setup any necessary resources print("Filter started.") completionHandler(nil) } override func stopFilter(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) { // Clean up filter resources print("Filter stopped.") completionHandler() } override func handleNewFlow(_ flow: NEFilterFlow, completionHandler: @escaping (NEFilterControlVerdict) -> Void) { // Determine if the flow should be dropped or allowed, potentially downloading new rules if required if let browserFlow = flow as? NEFilterBrowserFlow, let url = browserFlow.url, let hostname = browserFlow.url?.host { print("Handling new browser flow for URL: \(url.absoluteString)") if shouldBlockDomain(hostname) { print("Blocking access to \(hostname)") completionHandler(.drop(withUpdateRules: false)) // No rule update needed immediately } else { completionHandler(.allow(withUpdateRules: false)) } } else { // Allow other types of flows, or add additional handling for other protocols completionHandler(.allow(withUpdateRules: false)) } } // Example function to determine if a domain should be blocked private func shouldBlockDomain(_ domain: String) -> Bool { // Add logic here to check the domain against a list of blocked domains let blockedDomains = ["google.com", "nu.nl"] return blockedDomains.contains(where: domain.lowercased().contains) } } And it's info.plist ` and the entitlements file ` In Xcode using automatically manage signing and both targets have the same Team Please explain the missing part
Posted
by
Post not yet marked as solved
0 Replies
14 Views
The past two week I made two payments already of 99USD and I received email immediately that within 2 business workimg day. You will notify me when the iteams are ready, its more than two days with no reply from Apple regarding the account. Not sure what do to anymore, as I have already done this twice already. Thanks, Gaone
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all