Explore the core architecture of the operating system, including the kernel, memory management, and process scheduling.

Post

Replies

Boosts

Views

Activity

Vision Pro OS file location
I would like to know what is the global path of the Vision Pro file system. For instance, if I put a file called example.pdf inside "On My Apple Vision Pro" what would be the global path for that file? "On My Apple Vision Pro/user_name/example.pdf" or "/example.pdf" or "/username/example.pdf" and so on. I tried to search about it but I didn't found no official source about it. Thanks in advance!
1
0
63
20h
CoreBluetooth Advertising and Scanning Issue in iOS 18/iPadOS 18 Beta 3
Hello, Has anyone encountered issues with CoreBluetooth advertising and scanning between iOS 18/iPadOS 18 Beta 3 ? I'm want to know this is a bug or an intended change in behavior. Issue Summary: Central device on iOS 18/iPadOS 18 Beta 3 (foreground) and Peripheral device on iOS 17.5.1 (background) fail to communicate via BLE advertising. The reverse setup or using non-iOS 18 devices works as expected. Detailed Description: I am developing an iOS/iPadOS application using CoreBluetooth for advertising and scanning. Here are the specifics of my setup: The application uses a fixed BLE service UUID, and scanning is performed with the specified service UUID. Background Modes Uses Bluetooth LE accessories and Acts as a Bluetooth LE accessory are enabled to allow advertising and scanning even when the app is in the background. When the Central device is running iOS 18/iPadOS 18 Beta 3 and the app is in the foreground scanning, and the Peripheral device is running iOS 17.5.1 with the app in the background advertising, the Central device cannot receive the advertisements from the Peripheral device. ( CBCentralManagerDelegate.centralManager(_:didDiscover:advertisementData:rssi:) don't work.) In the reverse scenario (Central on iOS 17.5.1 in the foreground scanning, and Peripheral on iOS 18/iPadOS 18 Beta 3 in the background advertising), the advertisements are received correctly. Additionally, advertisements are received correctly in cases where both devices are not on iOS 18/iPadOS 18. I am wondering if anyone else has encountered this issue or if there is any information available regarding whether this is a bug or an intended behavior change in iOS 18/iPadOS 18. Thank you.
0
0
54
7h
Connect a Mac and a Watch via Core Bluetooth
Hello! I currently have a pair of apps that can connect a Mac and an iPhone and communicate to each other. I've been trying to do the same between a Mac and a Watch. In my current implementation, the Mac is the central and the iPhone is a peripheral. But according to some internet search, it seems that Watch can only be the central. Is this true, and still the case now, please? If so, can I use the Watch as the central and the Mac as a peripheral? Thank you!
0
0
45
8h
PTChannelManager setAccessoryButtonEventsEnabled documentation?
I would like to know more about how I can use a bluetooth PTT device with the "Push to Talk" framework on iOS. I've enabled the setAccessoryButtonEventsEnabled on the PTChannelManager, but I am unable to get it to transmit when I press the PTT button on the device. Is there documentation that explains any additional steps I need to do in order to use a bluetooth PTT device with an iPhone using the Push to Talk framework? Our application works fine when interacting through the software UI. I'm testing with a PrymeMax PTT device. This is the user guide: https://www.pryme.com/files/manuals/MANUAL-BTH-550-MAX.pdf There are a lot of generic devices like this one that I would like to support. Can somebody provide more information on how this is accomplished? I would also like to support it with iOS versions older than iOS 17 if possible.
1
0
49
1d
Sequoia Group Container for Mac Catalyst Apps
Prior to Sequoia, Mac Catalyst Apps worked fine when using group folders that started with group. They now get an alert that the Mac Catalyst app is trying to access data from other applications. This may also impact some SwiftUI developers. According to this the documentation for the App Group Entitlements entitlement, on macOS we should begin use the Team Identifier instead of group. Should Mac Catalyst follow the macOS or iOS rules for com.apple.security.application-groups? If they should need to follow the macOS rules now, that creates several issues for developers. We would now need separate build targets to pick up the different Entitlements files. More distressing is that we would need to do some kind of migration process to get our files to the new location. There wouldn't be a transparent way to do so where the user wasn't warned about the application accessing files that don't belong to it. Any clarification on what Mac Catalyst developers should be doing to prepare for Sequoia would be greatly appreciated.
7
2
206
1w
Inquiry Regarding File Scan Permissions for Anti-Malware Feature Implementation
We need to scan newly created or modified files for malware. To achieve this, we added a plist file in the /Library/LaunchDaemons directory and intended to use a daemon process to perform the scans. However, we have encountered an issue where the daemon process cannot access files within Home subfolders such as ~/Downloads/ and ~/Documents/. When running the process as a user, it fails to scan some files due to lack of read permissions. Conversely, when running the process as root, it cannot scan files in the Home subfolders due to privacy restrictions. Could you please advise on the best approach to achieve this configuration?
3
0
109
6d
Is one step folder creation possible in Finder ?
I need to disallow folder renaming on my NSFileProviderReplicatedExtension extension as my foreign API system changes the asset id when a folder gets renamed and I can't retrieve or compute the new ID. For this reason I disable .allowsRenaming on folders for this volume but the Finder will still trigger the two step create "untitled folder" / rename when creating new folders. I can see that existing folders can't be renamed on the volume so the capability seems properly managed by my extension. Is there a way to prevent the creation of the "untitled folder" folder when creating new folders in Finder on a folder with renaming disabled ?
1
0
114
1w
Document and data size in ios
We want to give the user the ability to clear "document and data". We first try to calculate the size by summing the size of all the files in that directory FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first. But after calculating the size, we see that the size of the "document and data" that the user sees in the storage is larger than the size of our cache in ios 17. But in earlier versions 16, 15, etc. this directory is not taken into account when calculating the size . Which directories are counted in ios 17? And what directories are taken into account in an earlier version of iOS?
1
0
135
1w
URL links to default Apps
So I find that I am able to fire up Safari on my phone and I can type the following to get to the relative app: weather:// -> Weather App maps:// -> Maps App wallet:// -> Wallet App music:// -> Music App message:// -> Mail App messages:// -> Messages App Does anyone know a quick link like the ones above for Apple's Translate app? I would love to be able to easily open it via a link.
3
0
111
1w
Issue while accessing file from another PC on local network using document picker with SMB.
We are trying to access and copy some files [e.g., video file] from another PC on local network using SMB protocol. We found some third party libraries like AMSMB2 for this. But we want to try to use Apple inbuilt features like File management mentioned in - https://developer.apple.com/videos/play/wwdc2019/719/ We could able to select file from SMB server using document picker in app manually. Also we got its url in debug which gets generated under "Shared" section in files app. The URL I get from document picker is -> /private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/asd0QUsers/testuser/iOS/SMB_ShareFolder Now we want to avoid manual selection of file to user. We want directly open "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/asd0QUsers/testuser/iOS/SMB_ShareFolder" path as soon as document picker opens. So that user can directly select file. But it is not working. It opens normal files app and all folders. Getting below error - Access Shared URL directly using documentPicker "Error - CFURLResourceIsReachable failed because it was passed a URL which has no scheme" Sharing the code which I tried to open this shared folder directly : let url = URL (string: "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/asd0QUsers/TestUser/iOS/SMB_ShareFolder") let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [UTType.folder]) documentPicker.delegate = self documentPicker.allowsMultipleSelection = false documentPicker.modalPresentationStyle = .custom documentPicker.definesPresentationContext = true documentPicker.directoryURL = url! documentPicker.transitioningDelegate = customTransitioningDelegate present(documentPicker, animated: true, completion: nil) I get error in console - CFURLResourceIsReachable failed because it was passed a URL which has no scheme 2024-07-05 17:49:38.501059+0530 VideoImportPOC[1327:336989] [DocumentManager] revealDocumentAtURL encountered an error: Error Domain=NSCocoaErrorDomain Code=262 "The file couldn’t be opened because the specified URL type isn’t supported." Can you please provide inputs if it is possible access files directly in this way? or any other suggestions. like 1 What’s New in File Management and Quick Look - WWDC19 - Videos - Apple Developer Your iOS app can now access files stored on external devices via USB and SMB. Understand best practices for creating a document-based app...
1
0
137
5d
Sonoma slow on USB Mac Port.
Hi everyone, I have a Macbook Air M1 and the Mac runs fine. For work needs, I need to use the new Sonoma operating system on an external drive. Now here are the problems. The operating system is installed correctly so I don't think that could be the problem. It happens that if I attach the external disk to the Belkin HUB, the new operating system starts without problems, if instead I try to attach the SSD to the Macbook Air USB ports, the operating system does not start, so I am forced to use Sonoma only with the hub attached. I thought it could reset the PRAM or the SMC but from the Apple forum, it seems that Macbooks with M1 processors, have neither PRAM nor SMC. Is there anything I can do ? Thank you all, Vincent
2
1
581
Jul ’23
Issue while accessing file from another PC on local network using document picker with SMB.
We are trying to access and copy some files [e.g., video file] from another PC on local network using SMB protocol. We found some third party libraries like AMSMB2 for this.  But we want to try to use Apple inbuilt features like File management mentioned in - https://developer.apple.com/videos/play/wwdc2019/719/ We could able to select file from SMB server using document picker in app manually. Also we got its url in debug which gets generated under "Shared" section in files app. The URL I get from document picker is -> /private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/asd0QUsers/testuser/iOS/SMB_ShareFolder Now we want to avoid manual selection of file to user.We want directly open "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/asd0QUsers/testuser/iOS/SMB_ShareFolder" path as soon as document picker opens. So that user can directly select file. But it is not working. It opens normal files app and all folders. Getting below error -  Access Shared URL directly using documentPicker "Error - CFURLResourceIsReachable failed because it was passed a URL which has no scheme" Sharing the code which I tried to open this shared folder directly :  let url = URL (string: "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/asd0QUsers/Pranjali/iOS/SMB_ShareFolder")  let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [UTType.folder])     documentPicker.delegate = self     documentPicker.allowsMultipleSelection = false     documentPicker.modalPresentationStyle = .custom     documentPicker.definesPresentationContext = true     documentPicker.directoryURL = url!       documentPicker.transitioningDelegate = customTransitioningDelegate    present(documentPicker, animated: true, completion: nil) I get error in console - CFURLResourceIsReachable failed because it was passed a URL which has no scheme 2024-07-05 17:49:38.501059+0530 VideoImportPOC[1327:336989] [DocumentManager] revealDocumentAtURL encountered an error: Error Domain=NSCocoaErrorDomain Code=262 "The file couldn’t be opened because the specified URL type isn’t supported." Can you please provide inputs if it is possible to access files directly in this way? or any other suggestions.
1
0
94
3d
Updating System files
I guess this is appropriate here since Big Sur is still in development Yesterday I created a new APFS partition with macOS Big Sur. I usually edit some files in /System/Library files to tweak my home setup to my liking, including some display settings. However the steps I usually take to be able to edit these files no longer work. These steps were: Boot the Mac in recovery mode and go to the terminal, Here I disable SIP using csrutil disable, Reboot back in to Recovery Mode, open the terminal again Remount the disk with write permissions using mount -uw / Make the edits However step 4 no longer seems to work on Big Sur as I am getting an error: mount_apfs: volume could not be mounted: Permission denied mount: / failed with 66 Is there another way to mount the file system with write permissions?
3
0
3.7k
Jun ’20
QLPreviewController Blinks on Previewing Some PDF files
QLPreview keeps blinking and stops previewing the file when opening some high-resolution PDF files with heavy content. This can only be simulated in a real device built in xcode simulators cant simulate the issue. Tested in Xcode Version 15.4 (15F31d) and iPadOS Version 17.5.1. Following is My Sample code : import UIKit import QuickLook class ViewController: UIViewController { var currentViewFilePath = "" let preview = QLPreviewController() override func viewDidLoad() { super.viewDidLoad() self.setupQLPreview() loaddata() // Do any additional setup after loading the view. } func loaddata(){ if let fileURL = Bundle.main.url(forResource: "CD28048D", withExtension: "pdf") { self.currentViewFilePath = fileURL.relativePath self.preview.reloadData() // Use the fileURL here print("File URL: \(fileURL)") } else { print("File not found") } } } extension ViewController:QLPreviewControllerDelegate,QLPreviewControllerDataSource{ func setupQLPreview(){ preview.delegate = self preview.dataSource = self self.view.addSubview(preview.view) let previewhight = (UIScreen.main.bounds.height - ((self.navigationController?.navigationBar.frame.height ?? 0))) preview.view.translatesAutoresizingMaskIntoConstraints = false preview.view.topAnchor.constraint(equalTo: self.view.topAnchor).isActive = true preview.view.leftAnchor.constraint(equalTo: self.view.leftAnchor,constant: 4).isActive = true preview.view.rightAnchor.constraint(equalTo: self.view.rightAnchor,constant: -4).isActive = true preview.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor,constant: 4).isActive = true preview.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor,constant: -4).isActive = true preview.view.widthAnchor.constraint(equalToConstant: self.view.frame.width-8).isActive = true preview.view.heightAnchor.constraint(equalToConstant: previewhight-4).isActive = true preview.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true preview.navigationController?.isNavigationBarHidden = true self.addChild(preview) preview.didMove(toParent: self) } func numberOfPreviewItems(in controller: QLPreviewController) -> Int { if self.currentViewFilePath.isEmpty || self.currentViewFilePath == ""{ return 0 }else{ return 1 } } func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem { let fileUrl = URL(fileURLWithPath: self.currentViewFilePath) return fileUrl as QLPreviewItem } } while running the above code Xcode debugger prints following errors: View service did terminate with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted} #Remote Preview collection viewServiceDidTerminateWithError: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted} #Remote [u 0AA9D4C5-BBA1-56F6-8FFF-F5F56B99399A:m (null)] [com.apple.quicklook.extension.previewUI(1.0)] Connection to plugin invalidated while in use.
0
0
65
3d
Write in /System folder on macOS Sonoma
Hello, I know this is not a good practice but i want to make a test. I would like to write a file into /System folder on macOS Sonoma. I have tried to reboot in recovery mode. I have disabled SIP. But i can't write into /System. This folder is mounted as read only. How can i write into this folder ? I know there is a kind of checksum mechanism to check if something has been modified in /System folder and i want to see what happens if this checksum does not match. Thanks
3
1
1.2k
Dec ’23
Virtual serial ports
Hello, I want to add virtual serial ports to a macOS VM (host = Sonoma, guest = Sonoma). Here is what I tried so far: option 1 I create a VZVirtioConsoleDeviceConfiguration and I add a port to it, with a VZFileHandleSerialPortAttachment connected to two pipes: let consoleDeviceConfiguration = VZVirtioConsoleDeviceConfiguration() let guestPort = VZVirtioConsolePortConfiguration() guestPort.isConsole = false guestPort.name = "myserialport" let guestToHostPipe = Pipe() let hostToGuestPipe = Pipe() guestPort.attachment = VZFileHandleSerialPortAttachment( fileHandleForReading: hostToGuestPipe.fileHandleForReading, fileHandleForWriting: guestToHostPipe.fileHandleForWriting ) consoleDeviceConfiguration.ports[0] = guestPort // config is my VZVirtualMachineConfiguration config.consoleDevices = [consoleDeviceConfiguration] Then after the VZVirtualMachine is instantiated, I get the runtime VZVirtioConsoleDevice for my device and I set my service as its delegate. In the guest system, the device is created with the expected name (/dev/cu.myserialport) When I open it (e.g. screen /dev/cu.myserialport 9600), the consoleDevice(_:,didOpen:) delegate method is called as expected. Then I start sending data to hostToGuestPipe.fileHandleForWriting, but I get nothing in my guest system. option 2 Instead of using config.consoleDevices, I add a VZVirtioConsoleDeviceSerialPortConfiguration to config.serialPorts and I use the same scheme as above with a VZFileHandleSerialPortAttachment and two pipes. It works, but: I can't find a way to rename the devices (/dev/cu.virtio, /dev/cu.virtio1, etc) I can't detect when the endpoint is opened/closed. Am I missing something?
3
0
136
1w
App version is not showing up in crash reports
Facing crashes with a deamon that I'm working with has info.plist embedded within it. It also has CFBundleVersion, CFBundleShortVersionString properties with the appropriate values. But somehow the macOS is not picking up the version while generating crash reports. Crash reports just shows ??? in the version field. Here is info plist within the binary, I'm using macOS Monterey 12.2.1
4
0
342
Aug ’23