Posts

Post not yet marked as solved
1 Replies
1.1k Views
As of yesterday I cannot push/pull from GitHub using Xcode. I can still push/pull from command line. I get the error (in Xcode) ERROR: You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type I am using MacOS 12.2.1 Xcode: 13.2.1
Posted Last updated
.
Post not yet marked as solved
0 Replies
186 Views
Using the Files app on iOS I can see folders created by Apps I installed from the App store. How can I create such a folder in my app? I can create folders in the app's bundle, I can share files into the file system where the Files app can find them. But I cannot create folders that the files app can see, or set that folder as the default place to save files Setting Supports Document Browser and in Custom iOS Target Properties is not sufficient
Posted Last updated
.
Post not yet marked as solved
1 Replies
403 Views
When I use UIActivityViewController to share a PDF file (or save it to the file system) the default file name is: PDF document when saved to file or something like PDF document-3A147CA34B5F when air dropped. Is there a way I can change the default file name? Can I set the default folder when using "Save to files"? I am using: struct PDFSaveController: UIViewControllerRepresentable { // https://stackoverflow.com/a/58341956/16675319 var activityItems: [Any] var applicationActivities: [UIActivity]? = nil func makeUIViewController(context: UIViewControllerRepresentableContext<PDFSaveController>) -> UIActivityViewController { let controller = UIActivityViewController(activityItems: activityItems, applicationActivities: applicationActivities) return controller } func updateUIViewController(_ uiViewController: UIActivityViewController, context: UIViewControllerRepresentableContext<PDFSaveController>) {} }
Posted Last updated
.
Post not yet marked as solved
0 Replies
127 Views
Is there any way to tell, in code, if UIGraphicsGetImageFromCurrentImageContext has failed? I am seeing: "CGBitmapContextInfoCreate: unable to allocate 1112756160 bytes for bitmap data" regularly in the console but the execution of the code carries on regardless. How can I detect this failure from in code?
Posted Last updated
.
Post not yet marked as solved
2 Replies
465 Views
UIImageWriteToSavedPhotosAlbum is not working reliably for me. It seems to work about a third of the times I call it. When I say does not work, I mean the callback is not called, and it silently returns When I use the code snipped below I get the results: Call UIImageWriteToSavedPhotosAlbum Called UIImageWriteToSavedPhotosAlbum If I call it twice in a row sometimes the first call works, never the second. Neither of the print statements in the callback are executed class ImageSaver: NSObject { func writeToPhotoAlbum(image: UIImage) { print("Call UIImageWriteToSavedPhotosAlbum") UIImageWriteToSavedPhotosAlbum(image, self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil) print("Called UIImageWriteToSavedPhotosAlbum") } // https://www.hackingwithswift.com/example-code/media/uiimagewritetosavedphotosalbum-how-to-write-to-the-ios-photo-album @objc func image(_ image: UIImage, didFinishSavingWithError error: NSError?, contextInfo: UnsafeRawPointer) { if let error = error { // we got back an error! print("Error: \(error.localizedDescription)") } else { print ("Image saved") } } }
Posted Last updated
.
Post not yet marked as solved
1 Replies
202 Views
tl;dr Where is there documentation for the implementation of mach_task_basic_info on iOS? There is a lot of conflicting information out there, a lot of micro kernels that use a structure named like this. https://developer.apple.com/documentation/kernel/mach_task_basic_info_data_t lists the fields (and gives types) as: policy: int resident_size: uint64_t resident_size_max suspend_count system_time user_time virtual_size What are the relative meanings of the *_size variables? resident_size is that the number of bytes used? Number of pages? Is it a total for all processes? The calling process? And so on.
Posted Last updated
.
Post not yet marked as solved
2 Replies
252 Views
iPad Pro (11-inch) (2nd generation) Software 14.6 macOS Big Sur Version 11.3.1 Xcode Version 12.0 (12A7209) I have joined a team, I have the iPad logged in to iCloud, I have same credentials in xcode (it is all very complex, I am happy to delve into more details if it will help clear up this problem) I have been having a good run for the past few months, very few problems. Switched teams, new Apple accounts etcetera. Yesterday the App on the iPad/ xcode combination would crash if I set break points, but it ran. Today I get the error: "To run on this device, please update to a version of Xcode that supports iOS 14.6. You can download Xcode from the Mac App Store or the Apple Developer website" I got that message from Windows -> Devices This is costing me a lot of time and effort and my employer a tonne of money.
Posted Last updated
.