I'm building an app in Apple Virtualization but I can no longer generate images after updating to macOS Sequoia. It's a simple function that will create thumbnails in either HEIF or JPEG, but neither work now.
I get these warnings every time:
CGImageProviderGetContentHeadroom: Bad headroom value 0.000000 for SDR, returning 1.0
NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed
IOServiceMatchingfailed for: AppleM2ScalerParavirtDriver <<<< VTParavirtualization >>>> VTParavirtualizationReplyClerkWaitForReply signalled err=-19092 (kVTParavirtualizationTimeoutErr) (timeout waiting for pending reply) at VTParavirtualization. c: 3804
writeImageAtIndex:1077: *** CMPhotoCompressionSessionAddImage: err = unknown error [-19092] (codec: 'hvc1')
The operation couldn't be completed. (CINonLocalizedDescriptionKey error 3.)
Will this be resolved in Xcode 16 or macOS Sequoia?
Core OS
RSS for tagExplore the core architecture of the operating system, including the kernel, memory management, and process scheduling.
Post
Replies
Boosts
Views
Activity
We want to use HCE or Wallet to use the iPhone on NFC readers that start EV chargers. They use the same tech as transit systems (MiFare and ISO 14443-4), but the backend systems only use the NFC UID for verification.
Is it possible to use HCE (CardSession) or Wallet (Transit card) to transmit a static UID?
If so, could our use-case go under either In-store purchase, loyalty programme, or transit? Or are those categories very rigid as to their use case?
The new EEU regulation seems to open up this a bit.
Hi,
I am currently working on a mobile application for iOS that involves communication with a Bluetooth peripheral device, specifically a smart analog watch. I have some questions regarding the feasibility of certain aspects of the architecture and would appreciate your guidance.
Project Overview:
Functionality:
The application connects to a Bluetooth peripheral (the analog smartwatch) and utilizes the Apple Notification Center Service (ANCS) to broadcast notifications to the peripheral.
Notification Flow:
When a notification arrives on the iPhone, and if the peripheral is connected via Bluetooth, ANCS broadcasts the notification to the peripheral.
The peripheral sends the notification back to the mobile application via Bluetooth.
The mobile application then sends a request to a server, which uses AI to determine if the notification needs to be displayed on the watch.
If the server validates the notification, the mobile app triggers a vibration on the watch to indicate the notification.
Current Status:
I can receive notifications from my watch to the mobile application via Bluetooth when the app is in the foreground.
Questions:
I need this notification handling to work in the background or killed mode. My ideal solution involves a background service that, upon receiving a notification from the mobile app, sends a request to the server and, based on the server's response, sends a valid notification back to the watch via Bluetooth.
Is it possible to implement such functionality in iOS? Specifically:
Can an iOS application receive and handle Bluetooth notifications in the background or when the app is terminated?
What are the best practices or recommended approaches for maintaining Bluetooth communication in background or killed mode?
Are there any specific APIs or frameworks that can facilitate this kind of background operation?
Thanks
That's pretty much it -- I can increase memory, file descriptor, etc., but can I increase the number of threads?
(I've got a case where, in an error condition, my threads block [still trying to figure out why] and new ones are still being generated, until I hit a limit of 512 threads.)
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.
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!
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!
When developing a feature, we use GRPC for communication, and the phone needs to use cellular for external network access, as well as local WiFi access (WiFi cannot access the external network).
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.
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.
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.
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...
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?
Hi there, I have just recently had a go at trying to build an app using unreal engine. After much difficulty of finally getting the app to sign, build and deploy I am having issues with the app crashing immediately after opening it.
I have had a look at the crash log to find it including EXC_BAD_ACCESS (SIGSEGV) which I've come to understand means it may be accessing a value that doesn't exist. I was unable to understand or figure out any of the rest of it to find any clues on how to solve my issue.
If anyone could point me in the right direction as to why the app is crashing, it would be greatly appreciated.
crash log
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?
I'm working on creating a tiny app that copies a random sampling of files from a source folder to a destination folder: https://github.com/belovachap/Select-Random-Files-Mac
I choose folders in my user's Documents folder, am able to get the random sampling of files but then run into permission errors when trying to copy to the destination folder.
I've tried adding a call to startAccessingSecurityScopedResource on the destination URL but it doesn't seem to help.
Is this having the same problems on anyone else's computer??
Hello, we are currently developing a VPN application. Recently, we have encountered several cases where the Network Extension process terminates unexpectedly. We cannot find any related crash logs on the device, but we can find system SystemMemoryReset logs. The timestamps in these logs closely match (with millisecond accuracy) the times when our VPN process terminated unexpectedly. We have a few questions:
1.How is the SystemMemoryReset event generated, and can this event be avoided?
2.When a SystemMemoryReset occurs, can it cause our VPN background process to be killed or the system to reboot?
3.If the background process can be killed, what conditions need to be met for this to happen, and what methods can we use to prevent the VPN background process from being killed?
4.Based on these logs, does our application have any related issues (the process name is CorplinkTunnel)? Do you have any suggestions for modifications?
SystemMemoryReset-2024-06-25-232108.log
SystemMemoryReset-2024-06-29-025353.log
SystemMemoryReset-2024-07-01-024655.log
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 ?
Hi All,
I am currently working on piece of code which when I go for a Snaky scan I given me below error.
"Unsanitized input from a URL handled via "*File name" flows into moveItem, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to write to arbitrary files."
sample code:
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool
{
hadClickOnUrl=true
openUrl = url
passwordProtetedFilePath = nil
ptxData = nil
//------------------------------New Code
var file:NSString = url.path as NSString
var guid = getGuidByFilePath(filepath: file as String)
let fileName = FileManager.default.displayName(atPath: file as String)
let isGuidAvailabe = DBManager.sharedInstance.iSGuidAlreadyAvilable(guid: guid, fileName: fileName)
if(!isGuidAvailabe){
// bundleIdentifier based on the QA or Production Environment
let bundleId = Bundle.main.bundleIdentifier
print("****************** BundleId based on the QA or Production Env ****************** \(bundleId!)")
if(file.contains(bundleId!)){
print("iCloud/Local Drive File")
let documentPaths:NSArray = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) as NSArray
let documentPath:NSString = documentPaths.object(at: 0) as! NSString
let filename:NSString = url.lastPathComponent as NSString
let demoTxPath:NSString = NSString.init(format: "%@/%@", documentPath, filename)
let importedfilePath = "\(self.getPath())/Inbox/\(filename)"
//New : Check if Guid is already exsit in the DB.
//If file is not exist in the document folder then processed.
if (FileManager.default.fileExists(atPath: importedfilePath as String) != true ) {
if (FileManager.default.fileExists(atPath: demoTxPath as String) != true ) {
// copy the file from our bundle
do{
try FileManager.default.moveItem(atPath: file as String, toPath: demoTxPath as String)
//New document path Url
file = demoTxPath
openUrl = URL(fileURLWithPath: demoTxPath as String) //URL(string: "file:///private\(demoTxPath as String)")
guid = getGuidByFilePath(filepath: file as String)
}catch let error{
print("error is \(error)")
}
}else{
print(" iCloud Drive File") //but exist in iCloud Drive
let filename:NSString = url.lastPathComponent as NSString
let importedfilePath = "\(self.getPath())/\(filename)"
guid = getGuidByFilePath(filepath: importedfilePath as String)
}
}else {
guid = getGuidByFilePath(filepath: importedfilePath as String)
}// File is already exist based of the file name.
}else{
print("Not in iCloud Drive File") //but exist in iCloud Drive
let filename:NSString = url.lastPathComponent as NSString
let importedfilePath = "\(self.getPath())/Inbox/\(filename)"
guid = getGuidByFilePath(filepath: importedfilePath as String)
}
}
I would like to know how to mitigate this issue as I have tried any suggestion give online ,but none of them worked in resolving this issue.
Any help would be great thanks in advance.
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.