Apple File System is the default file system for iOS 10.3 and later, and for macOS High Sierra and later.

Posts under APFS tag

83 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

DocumentGroupでファイルを切り替えることができない
DocumentGroup(newDocument: RelayDocument()) { file in ContentView(document: file.$document) } このプログラムで、RelayDocument()に引き渡すファイルを選択していましたが、アプリを立ち上げた最初は正しく機能しますが、ファイルを変更しようとしても一度選択したファイルを変更できなくなりました。 先月までは、これで問題なく動いていました。 何が変わったのでしょうか。
0
0
280
Nov ’23
Apple Scammed me
I purchase apple developer program membership i enrolled for it i paid to apple for 1 year membership they send me mail and showing my active subscription in Purchases and apple developer app also but they didn't give me appstoreconnect access what it is mean why i buy apple developer program membership ? because i want to publish my app on appstore i attached screenshot of proof that i have active membership but i didn't get access of appstoreconnect they didn't reply me on mail and on call i contacted apple developer support on call and vie email also they didn't give me any solution They not refunding my money they don't have me product for what i paid means Scam
0
0
461
Nov ’23
Convert a UIImage into cgContext
I have a UIImageView that will serve as a drawing canvas and i want to implement a function that will get the content inside of UIImageView and convert it into a cgContect so it could be set as a background for the canvas to draw over but i ran into an issue. I have a reset button that will set the UIImageView.image to nil (to clear the current UIview) for that I tried to save the UIImageView into a canvasArray array to save it into a second view savedImageView this is my reset function that will delete the content of mainImageView @objc func resetPressed(_ sender: Any) { mainImageView.image = nil } The array that will is store and object that receives mainImageView as a param and the function that saved it var canvasArray: [Canvas] = [] @objc func saveCanvas(_ sender: Any) {. //here is the UIImageView guard let canvas = Canvas(name: "", canvas: mainImageView, numOfPages: 0) else { return } canvasArray.append(canvas) if canvasArray.count > 0 { canvasArray.forEach{ canvas in print("\(canvas.canvas.image)") } } } And the function that will get the iUIImageView.image and will convert it into cgContext @objc func changeImagefunc(_ sender: Any) { if canvasArray.count < pages { return } if let savedImage = canvasArray[pages].canvas.image { UIGraphicsBeginImageContext(view.frame.size) savedImage.draw(in: view.bounds) if let drawnImage = UIGraphicsGetImageFromCurrentImageContext() { mainImageView.image = drawnImage } UIGraphicsEndImageContext() print("clicked button ") } } I have 3 different UIViewImage that will ser a specific purpose mainImageView and tempImageView that will check the start and and of the drawing (function(which works fine) and the savedImageView that will receive the image converted into "cgContext " . Three of them stored in a function that then gets passed into the viewDidLoad section func setupImageViews() { view.addSubview(tempImageView) tempImageView.frame = view.bounds if savedImageView.image != nil { view.addSubview(savedImageView) savedImageView.frame = view.bounds } else { view.addSubview(mainImageView) mainImageView.frame = view.bounds } } Like I said i can not get this to work because the resetButton/function is deleted not only the current UIImageView (which is what is intended to do ) but also deletes the content inside the canvasArray which I want to avoid. Would there ve a different approach to it or what else do you recommend?
3
0
553
Nov ’23
recordAccelerometer
I am writing a code to capture the accelerometer data for one hour, it suppose to save in the iOS device first, and then I would like to upload to cloudkit. Here is my code. import UIKit import CoreMotion import CloudKit class ViewController: UIViewController { @IBOutlet weak var accelerometerSwitch: UISwitch! private let recorder = CMSensorRecorder() private let cloudKitContainer = CKContainer(identifier: "iCloud.com.example.accelerometer-recorder") override func viewDidLoad() { super.viewDidLoad() accelerometerSwitch.addTarget(self, action: #selector(accelerometerSwitchValueChanged), for: .valueChanged) } private func saveDataToAppFolder(data: [CMSensorRecordingData]) { let fileName = "accelerometer_data.dat" let fileManager = FileManager.default let documentsDirectoryURL = fileManager.urls(for: .documentDirectory, in: .userDomainMask).first! let fileURL = documentsDirectoryURL.appendingPathComponent(fileName) let jsonData = try! JSONEncoder().encode(data) try! jsonData.write(to: fileURL) } @objc private func accelerometerSwitchValueChanged() { if accelerometerSwitch.isOn { recorder.recordAccelerometer(forDuration: 3600.0) { sensorData in if let sensorData = sensorData { // Handle the recorded data saveDataToAppFolder(data: sensorData) uploadDataToCloudKit(data: sensorData) } else { print("No accelerometer data recorded") } } } else { // No need to stop recording since it will stop automatically after the duration } } private func uploadDataToCloudKit(filePath: String) { let fileURL = URL(fileURLWithPath: filePath) let data = try! Data(contentsOf: fileURL) let record = CKRecord(recordType: "RecordedData") record["data"] = data let database = cloudKitContainer.publicCloudDatabase database.save(record, completionHandler: { record, error in if let error = error { print("Error uploading data to CloudKit: \(error)") } else { print("Data uploaded to CloudKit successfully") } }) } } Anyone can help to fix the error. Thanks a lot.
1
0
474
Nov ’23
Detect a specific UIColor in a UIImage
I working on a drawing app using UIKit and I am trying to create a function that receives a UIImageView as an argument detects the color and then return that UIImageView updated. For example the UIImageView.image will contains a set of UIColors s and my detectColor will check if the image contains .systemGrey then will take any pixel that contains that specific color and change it to .systemPink and return the UIImageView updated For a beter explation here is an example of my function with pseudo code: func updateColor(_ imageView: UIImageView ) -> UIImageView { //.. initialize imageView //... if imageView.image color has pixels in .systemGrey color then //... change that color to .systemPink //... return updated imageView } Like I said I only want to change that specific color taking into account that in some cases my UIImageView.image multiple UIColors .Any Ideas, examples or suggestions will be much appreciated. Thanks!.
1
0
396
Nov ’23
External disk is not recognised and does not mount
Hi all, Since I updated to MacOS Sonoma beta, 6 I have the problem that my 4TB external disk (Rocket Pro) does not mount anymore and is not even recognized in Disk Utility. On other Macs with older system software, it mounts without any problem. Am I the only one with this problem? Any suggestions? I appreciate any help you can provide. Stefan
4
0
468
Oct ’23
DiskUtility inode warnings wont clear up with FirstAde
Hello everyone, I am running 14.0 (23A344) and have sporadic issues like operation not being permitted when trying to remove some folders in ~/Library after some application was uninstalled using AppCleaner.app, which I have used for years. It works 99% of the time, but sometimes I get errors that some files/folders in ~/Library can not be removed. If I try to "sudo rm -rf" that folder from Terminal, I get operation not permitted. So this did bring me to DiskUtility. I am running MBP 14 M1 Pro. As always when I get a new machine, the first thing I do is reformat SSD to Case Sensitive Encrypted from default Case Insensitive since that gives me issues with my source code compilation when developed between Mac and Linux. Here is my Disk Util. I do not get any warnings on any other partitions/sections under and including "Macintosh HD volume" at the top of the hierarchy. When I run FirstAid on the Data partition, I get the following warnings. Now I can run this repeatedly, and the same errors are produced. I can do a reboot in between running Disk Utilities, and the same warnings. I did boot to Safe Mode and run Disk Utility, and the same warnings. I contacted Apple support and have a case: 102125788648, but I was also instructed to create a case here. Here is my side story, why I can not use Time Machine. As a last resort, I was asked to reformat and reinstall. That is not an option for me at this point since restoring everything is a 1-2 day job. Now, I know there is a Time Machine, but on my two attempts in the past, backups created on brand new external Samsung 970 Pro SSD failed to restore. These two backups/restores were a few months apart. So on the second support call, it was suggested by support to back/restore using TimeMachine. After stating that I had a horror story on my first attempt a few months back, I was assured that the issue had been fixed and I should not have an issue. Oh well, same issue. After spending considerable time with support (a few folks) they noticed that the Time Machine folder structure was wrong and some intermediate folder was missing causing the issue. In both cases, I never heard anything back if it was addressed/fixed, except the support during the second case, assured me that it was fixed. That is why I did try to use Time Machine with him to back up while he was screensharing to make sure I did not do anything unusual. Still, restoration failed. So even Time Machine should make restoration painless, for it was pain, since on the first occasion I lost all the files. On second I could brow Time Machine folders in Terminal and pick files/folders from there. Took a long time. And to throw another strange case, I could only access them from Terminal under my wife's machine which is running an older Mac, but the new restored Mac I "was not able"! which is very weird. Both machines were at the time Intel machines. So I never attempted to use TimeMachine again on M1 Pro. So I hope everyone sees why I do not want to reformat and restore. Now, I have a feeling that most of my problems might be related to Case Sensitive reformated SSD. I can not go back to Case Insensitive (default), as I explained above. I am here to provide any information to help get this fixed. Any suggestions or anything to try? Robert
0
0
514
Oct ’23
Try build ios for flutter
The error message: Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:D8AAC390-9CB8-47CA-A1EA-42ED7CA153A1 } Available destinations for the "Runner" scheme: { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008103-000368981E62201E } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } Could not build the application for the simulator. Error launching application on iPhone 12 Pro.
0
0
443
Oct ’23
"Couldn't communicate with helper application"
My 2013 MacBook Pro computer died but I had all my files on iClould One Drive. But now, with my new MacBook Pro when I see a file that I had saved before on the iCloud drive, there is a little cloud symbol with a down error and a couple of people icons next to it. But when I try to open any file I get the error statement: "Couldn't communicate with the helper application". How can I access those files?
2
0
1.4k
Oct ’23
Random Shutdown in Big Sur (ThunderboltNHI) driver problem
Hey guys, I have the problem that my 2013 MacBook crashes frequently since upgrading to Big Sur. This means that all of a sudden the screen freezes, the fans turn up and all of a sudden the MacBook is off. In Catalina, through research I found out that it's because of the Thunderbolt driver (AppleThunderboltNHI.Kext etc.), which I had always renamed in Catalina using recovery mode (... .kext.BAK). This solved the problem. But now since Big Sur I can't rename the Kext files anymore because I'm only in read-only mode. So I wanted to ask here if there is a possibility to rename the files again? Otherwise the MacBook still runs really well!
66
0
35k
Oct ’23
Assistance Needed for Data Recovery from HD External Drive
I am using a 2021 MacBook Pro 16" with an Apple M1 Max chip and 64 GB of RAM, running macOS Ventura 13.6. I have been using an external drive, the Seagate BarraCuda Compute 2TB Hard Drive. Last week, I used it about five times to save some photos and work on Excel files. However, when I tried to open it the following day, it prompted me for a password, but it failed to mount. The partition type is Apple_HFS, and it is encrypted because I used it with Time Machine a few years ago. I can hear the noise it typically makes when I was working on it, but it doesn't mount. So, I attempted to view it in Disk Utility, but to no avail. I can see the drive, but the partition I use appears gray, and the Mac attempts to mount it. When I try to click on it in Disk Utility, the application crashes, and I have to force quit it. I also tried purchasing a new external hard drive reader to use with my hard drive, but I encountered the same issue. I also tried to work with the Terminal, but it responds very slowly. For example, the 'diskutil list' command took approximately 5 minutes to generate a response, and when I attempted to eject it, it didn't work and remained stuck loading. I have the last six years of my life stored on this drive, so it would be incredible to recover the data. Do you have any suggestions?
1
0
375
Oct ’23
Isaac VPN
This is my first time here, and I'm excited to seek assistance in creating my own VPN app. While I do have some experience with Swift 5, I'm not sure where to begin. I've successfully set up my VPN server using L2TP IPsec, and it has been running smoothly for several months. I can manually connect to it using my iPhone and Mac without any issues.
0
0
613
Oct ’23
Iphone 11 Glitch
Hello, I have and Iphone 11 that I purchased back In may, its fairly new, but lately the last couple of weeks it has been acting up, glitching if you will. So i went to see if I needed to update my software. Did that and it hasn't been right since. Today I was trying to get on my apps along with trying to reset and I couldn't even reset the phone it was not working at all. I am wondering what solutions I can utilize to maximize my phone. also the update takes half of my storage. I almost feel like im forced to purchase a new phone in which Im not really trying to do simply because my 11 is fairly new
1
1
313
Oct ’23
Failed to set app extension placeholders
Details Simulator device returned an error for the requested operation. Domain: IXErrorDomain Code: 2 Failure Reason: Failed to create promise. User Info: { DVTErrorCreationDateKey = "2023-04-22 20:00:00 +0000"; FunctionName = "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:placeholderType:mayBeDeltaPackage:error:]"; IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher; SimCallingSelector = "installApplication:withOptions:error:"; SourceFileLine = 884; } Failed to set app extension placeholders for com.**.**** Domain: IXErrorDomain Code: 2 Failure Reason: Failed to create promise. User Info: { FunctionName = "+[IXPlaceholder _placeholderForBundle:client:withParent:installType:metadata:placeholderType:mayBeDeltaPackage:error:]"; SourceFileLine = 884; } Attempted to set app extension placeholder promise with bundle ID com..********** that does not match required prefix of com..*****. for parent Domain: IXErrorDomain Code: 8 Failure Reason: Mismatched bundle IDs. User Info: { FunctionName = "-[IXPlaceholder setAppExtensionPlaceholderPromises:error:]"; SourceFileLine = 1392; } Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "iPhone14,5"; "device_osBuild" = "16.4 (20E247)"; "device_platform" = "com.apple.platform.iphonesimulator"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 105; "operation_errorCode" = 2; "operation_errorDomain" = IXErrorDomain; "operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphonesimulator"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 0; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphonesimulator16.4"; "sdk_osVersion" = "16.4"; "sdk_variant" = iphonesimulator; } System Information macOS Version 13.3.1 (Build 22E261) Xcode 14.3 (21812) (Build 14E222b) Timestamp: 2023-04-22T21:00:00+01:00
2
0
1.4k
Oct ’23