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

APFS Documentation

Posts under APFS tag

94 Posts
Sort by:
Post not yet marked as solved
6 Replies
583 Views
Hello, Anyone know of relevant documentation that captures the difference between vfsStruct.f_fsid and fstat.st_ino ? sys/stat.h declares: ino_t st_ino; /* [XSI] File serial number */ AND sys/statvfs.h declares: unsigned long f_fsid; /* Filesystem ID */ Based on some tests, it seems that the st_ino is the number/inode_number that the filesystem identifies the file-resource by ? I observed that this number gets a unique value when I copy a file even when the Finder/FS utilizes the Space-Saver feature of MacOS. This value is identical to the results returned by the command ls "-i" . When copying via Finder, I am seeing distinct st_ino values for source and destination files. f_fsid seems to be identifying the File differently though, perhaps taking into account what Data/attributes objects the file resource points to ? I observed that this number gets an identical value when I copy a file even when the Finder/FS utilizes the Space-Saver feature of MacOS. So, the value of f_fsid seems to be copied over to the destination file record. Also, I could not find a way to display f_fsid via the ls command. On a related note, Any documentation regarding MacOS Finder/FS's Space-Saver feature or how it is implemented ? Thanks, Vikram.S.Warraich
Posted
by Vikram_SW.
Last updated
.
Post marked as solved
3 Replies
513 Views
Hi, I stumbled about the Swift Student Challenge at Apples Website and now I have some questions. I've programmed some Apps in Xcode and I think one of them might be pretty god for this Challenge. Now I've read something about Swift Playgrounds and I'm confused. What's a Swift Playground? Do I need to create one or is it enough to have the App? and finally: I'm currently 14 and live in Germany. Is it possible to participate when I'm 14? And if not would it be a big thing to lets say forget my age and somehow think that I'm 16? Thanks a lot for answers
Posted
by StrgR.
Last updated
.
Post not yet marked as solved
0 Replies
323 Views
We have noticed that after the iOS 17 update, there has been a sudden increase in the data for “Discarded - Token Unregistered.” In the statistics for error codes returned by the APNs service, the number of http code 200 has increased, while the number of error code 410 has decreased. Have there been any recent updates to this service?
Posted
by shuju.
Last updated
.
Post not yet marked as solved
0 Replies
332 Views
Hi , I'm a student and when i want to use an app dedicated to some engineering stuff it crashes , and i don't understand crash logs . If anyone can find the solution to this crash please , because i will need this program for my finals. Thanks . Here is the crash logs : Translated Report (Full Report Below) Process: bin_Cast3M_MAC_EDURE_64_21 [6039] Path: /Users/USER/*/bin_Cast3M_MAC_EDURE_64_21 Identifier: bin_Cast3M_MAC_EDURE_64_21 Version: ??? Code Type: X86-64 (Translated) Parent Process: Exited process [6038] Responsible: Terminal [1586] User ID: 501 Date/Time: 2023-12-12 21:40:36.1353 +0100 OS Version: macOS 14.2 (23C64) Report Version: 12 Anonymous UUID: D6BC8CC9-10BA-B312-A74B-F6D23DB1A62E Sleep/Wake UUID: 47696232-2279-448E-9291-26F8A6494DA1 Time Awake Since Boot: 13000 seconds Time Since Wake: 2165 seconds System Integrity Protection: enabled Notes: PC register does not match crashing frame (0x0 vs 0x106EAD710) Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Application Specific Information: abort() called Error Formulating Crash Report: PC register does not match crashing frame (0x0 vs 0x106EAD710) Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 0x106ead710 ??? 1 libsystem_platform.dylib 0x7ff805f41393 _sigtramp + 51 2 libsystem_c.dylib 0x7ff805e31a49 abort + 126 3 libc++abi.dylib 0x7ff805ecbc72 abort_message + 241 4 libc++abi.dylib 0x7ff805ebde1a demangling_terminate_handler() + 266 5 libobjc.A.dylib 0x7ff805b5c71b _objc_terminate() + 96 6 libc++abi.dylib 0x7ff805ecb0cb std::terminate(void ()()) + 6 7 libc++abi.dylib 0x7ff805ecda97 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception) + 27 8 libc++abi.dylib 0x7ff805ecda5e cxa_throw + 116 9 libobjc.A.dylib 0x7ff805b5477e objc_exception_throw + 303 10 CoreFoundation 0x7ff80610686d -[NSObject(NSObject) doesNotRecognizeSelector:] + 328 11 CoreFoundation 0x7ff805fcfdb8 forwarding + 1379 12 CoreFoundation 0x7ff805fcf7c8 CF_forwarding_prep_0 + 120 13 libcastem_gui_apple.dylib 0x10f969ed4 +[Layer recherche_layer:Trac:couleur_fond:string_attributes:type:frame:] + 308 14 libcastem_gui_apple.dylib 0x10f967fca -[Application macos_menu_with_positions:legend:nbcase:lon:] + 538 15 libcastem_gui_apple.dylib 0x10f95f247 xenu + 183 16 bin_Cast3M_MAC_EDURE_64_21 0x103996cff master.0.xtrini + 16095 17 bin_Cast3M_MAC_EDURE_64_21 0x103996cff master.0.xtrini + 16095 18 bin_Cast3M_MAC_EDURE_64_21 0x103996cff master.0.xtrini + 16095 19 bin_Cast3M_MAC_EDURE_64_21 0x103996cff master.0.xtrini + 16095 Thread 1:: com.apple.rosetta.exceptionserver 0 runtime 0x7ff7ffc33294 0x7ff7ffc2f000 + 17044 Thread 2: 0 ??? 0x7ff896492a78 ??? 1 libsystem_kernel.dylib 0x7ff805ed65ce __psynch_cvwait + 10 2 libsystem_pthread.dylib 0x7ff805f1376b _pthread_cond_wait + 1211 3 bin_Cast3M_MAC_EDURE_64_21 0x1037acd37 threadstart + 119 Thread 3: 0 ??? 0x7ff896492a78 ??? 1 libsystem_kernel.dylib 0x7ff805ed65ce __psynch_cvwait + 10 2 libsystem_pthread.dylib 0x7ff805f1376b _pthread_cond_wait + 1211 3 bin_Cast3M_MAC_EDURE_64_21 0x1037acd37 threadstart + 119 Thread 4: 0 ??? 0x7ff896492a78 ??? 1 libsystem_kernel.dylib 0x7ff805ed65ce __psynch_cvwait + 10 2 libsystem_pthread.dylib 0x7ff805f1376b _pthread_cond_wait + 1211 3 bin_Cast3M_MAC_EDURE_64_21 0x1037acd37 threadstart + 119 Thread 5: 0 ??? 0x7ff896492a78 ??? 1 libsystem_kernel.dylib 0x7ff805ed65ce __psynch_cvwait + 10 2 libsystem_pthread.dylib 0x7ff805f1376b _pthread_cond_wait + 1211 3 bin_Cast3M_MAC_EDURE_64_21 0x1037acd37 threadstart + 119 Thread 6: 0 ??? 0x7ff896492a78 ??? 1 libsystem_kernel.dylib 0x7ff805ed65ce __psynch_cvwait + 10 2 libsystem_pthread.dylib 0x7ff805f1376b _pthread_cond_wait + 1211 3 bin_Cast3M_MAC_EDURE_64_21 0x1037acd37 threadstart + 119 Thread 7: 0 ??? 0x7ff896492a78 ??? 1 libsystem_kernel.dylib 0x7ff805ed65ce __psynch_cvwait + 10 2 libsystem_pthread.dylib 0x7ff805f1376b _pthread_cond_wait + 1211 3 bin_Cast3M_MAC_EDURE_64_21 0x1037acd37 threadstart + 119 Thread 8: 0 ??? 0x7ff896492a78 ??? 1 libsystem_kernel.dylib 0x7ff805ed65ce __psynch_cvwait + 10 2 libsystem_pthread.dylib 0x7ff805f1376b _pthread_cond_wait + 1211 3 bin_Cast3M_MAC_EDURE_64_21 0x1037acd37 threadstart + 119 Thread 9: 0 ??? 0x7ff896492a78 ??? 1 libsystem_kernel.dylib 0x7ff805ed65ce __psynch_cvwait + 10 2 libsystem_pthread.dylib 0x7ff805f1376b _pthread_cond_wait + 1211 3 bin_Cast3M_MAC_EDURE_64_21 0x1037acd37 threadstart + 119 Thread 10: 0 runtime 0x7ff7ffc5194c 0x7ff7ffc2f000 + 141644 Thread 11: 0 runtime 0x7ff7ffc5194c 0x7ff7ffc2f000 + 141644 Thread 12: 0 runtime 0x7ff7ffc5194c 0x7ff7ffc2f000 + 141644 Thread 13: 0 runtime 0x7ff7ffc5194c 0x7ff7ffc2f000 + 141644 Thread 14: 0 runtime 0x7ff7ffc5194c 0x7ff7ffc2f000 + 141644 Thread 15: 0 runtime 0x7ff7ffc5194c 0x7ff7ffc2f000 + 141644 Thread 16: 0 runtime 0x7ff7ffc5194c 0x7ff7ffc2f000 + 141644 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x0000000000000000 rdx: 0x0000000000000000 rdi: 0x0000000000000103 rsi: 0x0000000000000006 rbp: 0x000000030aa95130 rsp: 0x000000030aa95108 r8: 0x000000030aa94fd0 r9: 0x000000030aa95230 r10: 0x0000000000000000 r11: 0x000000000000002a r12: 0x0000000000000103 r13: 0x0000003000000008 r14: 0x00000002049e2240 r15: 0x0000000000000016 rip: rfl: 0x0000000000000246 tmp0: 0xffffffffffffffff tmp1: 0x00007ff896492a4c tmp2: 0x00007ff805eda798 Binary Images: 0x204936000 - 0x2049d5fff dyld (*) /usr/lib/dyld
Posted
by bahaaziad.
Last updated
.
Post not yet marked as solved
0 Replies
250 Views
Dear Apple developers. I found a crash problem,Apple Pencil crashes when written in a textField. See attachment for details.I hope you will reply after reading this and give a solution.
Posted Last updated
.
Post not yet marked as solved
0 Replies
279 Views
The problem is described as follows: #26642372 SIGSEGV SEGV_ACCERR CoreHandwriting + 112016 A mobile app installed on the ipad crashed when a page containing a text input field called up the keyboard. We are seeing a lot of users experiencing this problem. The crashes occurred mainly in the 16 and 17 operating systems.
Posted Last updated
.
Post marked as solved
1 Replies
326 Views
Hello, I don't understand what is /System/Applications/ folder (macOS Sonoma). It is not an (hard)link to /Applications/. /Applications/ is not a (hard)link to /System/Applications/ Can anyone explain me what is /System/Applications/ ? Isn't it redundant to /Applications/ ? Thanks
Posted Last updated
.
Post not yet marked as solved
0 Replies
287 Views
i have face this error much time while build ipa. i don't understand where i going to wrong any steps of gentrate ipa Cycle in dependencies between targets 'BoschTPMS' and 'BoschTPMSTests'; building could produce unreliable results. Cycle path: BoschTPMS → BoschTPMSTests → BoschTPMS Cycle details: → Target 'BoschTPMS': CodeSign /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/InstallationBuildProductsLocation/Applications/BoschTPMS.app → Target 'BoschTPMSTests' has symlink command from '/Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/BuildProductsPath/Release-iphoneos/BoschTPMSTests.xctest' to '/Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/BoschTPMSTests.xctest' ○ That command depends on command in Target 'BoschTPMS': script phase “[CP] Embed Pods Frameworks” → Target 'BoschTPMS' has copy command from '/Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/BuildProductsPath/Release-iphoneos/BoschTPMSTests.xctest' to '/Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/InstallationBuildProductsLocation/Applications/BoschTPMS.app/BoschTPMSTests.xctest' Raw dependency cycle trace: target: -> node: -> command: -> node: /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/InstallationBuildProductsLocation/Applications/BoschTPMS.app/_CodeSignature -> command: P0:target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4-:Release:CodeSign /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/InstallationBuildProductsLocation/Applications/BoschTPMS.app -> CYCLE POINT -> node: /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/BuildProductsPath/Release-iphoneos/BoschTPMSTests.xctest/ -> directoryTreeSignature: � -> directoryContents: /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/BuildProductsPath/Release-iphoneos/BoschTPMSTests.xctest -> node: /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/BuildProductsPath/Release-iphoneos/BoschTPMSTests.xctest -> command: P0:target-BoschTPMSTests-b5fc7568513ab14026b57e3bce5411654ebe0d049eab1c8e98799301503b0e60-:Release:SymLink /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/BuildProductsPath/Release-iphoneos/BoschTPMSTests.xctest /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/BoschTPMSTests.xctest -> node: -> command: P2:target-BoschTPMSTests-b5fc7568513ab14026b57e3bce5411654ebe0d049eab1c8e98799301503b0e60-:Release:Gate target-BoschTPMSTests-b5fc7568513ab14026b57e3bce5411654ebe0d049eab1c8e98799301503b0e60--immediate -> node: -> command: P2:target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4-:Release:Gate target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4--unsigned-product-ready -> node: /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/InstallationBuildProductsLocation/Applications/BoschTPMS.app/Frameworks/ACFloatingTextfield_Swift.framework -> command: P1:target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4-:Release:PhaseScriptExecution [CP] Embed Pods Frameworks /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/IntermediateBuildFilesPath/BoschTPMS.build/Release-iphoneos/BoschTPMS.build/Script-16CB477461664389A9FF0209.sh -> node: /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/IntermediateBuildFilesPath/BoschTPMS.build/Release-iphoneos/BoschTPMS.build/Script-16CB477461664389A9FF0209.sh -> command: P1:target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4-:Release:WriteAuxiliaryFile /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/IntermediateBuildFilesPath/BoschTPMS.build/Release-iphoneos/BoschTPMS.build/Script-16CB477461664389A9FF0209.sh -> node: -> command: P2:::Gate target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4--fused-phase4-copy-files -> node: -> command: P2:::Gate target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4--fused-phase3-copy-files -> node: <target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4--fused-phase2-compile-sources&link-binary&copy-bundle-resources> -> command: P2:::Gate target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4--fused-phase2-compile-sources&link-binary&copy-bundle-resources -> node: /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/InstallationBuildProductsLocation/Applications/BoschTPMS.app/BoschTPMSTests.xctest -> command: P0:target-BoschTPMS-b5fc7568513ab14026b57e3bce5411659f4315a864406fa68ed343c84c86faf4-:Release:CpResource /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/InstallationBuildProductsLocation/Applications/BoschTPMS.app/BoschTPMSTests.xctest /Users/treel/Library/Developer/Xcode/DerivedData/BoschTPMS-gulcbtjkwwwxcjappexrbhzhijsp/ArchiveIntermediates/BoschTPMS/BuildProductsPath/Release-iphoneos/BoschTPMSTests.xctest -> please anyone give me resolved my issued
Posted Last updated
.
Post not yet marked as solved
0 Replies
286 Views
I'm trying to update my OS from Big Sur. I had 16GB of free space available, but I can't install the OS update. Looks like there are 20GB worth of APFS snapshots on my 120GB SSD drive. That's absurd. This is what they are called, according to tmutil. com.apple.os.update-51D425C3F73C05488FE6273A584E6DADB9CFAAD5AEB57007C65CE78C69F4AEE1 com.apple.os.update-MSUPrepareUpdate How do I get rid of them? Lots of posts talk about using DiskUtility, but I don't seem to be able to do that. I turned off automatic Time Machine backups, and there don't seem to be any (none above have dates), but I'm still stuck. And the free space keeps getting less and less and the APFS Snapshot volume appears to be increasing in size as I watch it. What can I do?
Posted
by mmoryl.
Last updated
.
Post marked as solved
4 Replies
1.9k Views
Hello EveryOne, What is the process to upload compliance details for my ios app to be available in France. Apple documentation is not Fully Helpful and the links that open up French site are broken. Which form should i upload where can i get it, Can Apple Team or some one help ?
Posted
by Hema_k.
Last updated
.
Post not yet marked as solved
0 Replies
235 Views
DocumentGroup(newDocument: RelayDocument()) { file in ContentView(document: file.$document) } このプログラムで、RelayDocument()に引き渡すファイルを選択していましたが、アプリを立ち上げた最初は正しく機能しますが、ファイルを変更しようとしても一度選択したファイルを変更できなくなりました。 先月までは、これで問題なく動いていました。 何が変わったのでしょうか。
Posted Last updated
.
Post not yet marked as solved
1 Replies
257 Views
[website] i do not know why this website sometimes do not open up on safari, but works fine on chrome.
Posted Last updated
.
Post not yet marked as solved
0 Replies
359 Views
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
Posted Last updated
.
Post not yet marked as solved
3 Replies
468 Views
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?
Posted
by AdelD.
Last updated
.
Post not yet marked as solved
1 Replies
388 Views
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.
Posted
by douglasng.
Last updated
.
Post not yet marked as solved
1 Replies
324 Views
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!.
Posted
by AdelD.
Last updated
.
Post not yet marked as solved
1 Replies
308 Views
terminating due to uncaught exception of type std::__1::__fs::filesystem::filesystem_error: filesystem error: in temp_directory_path: path "/private/var/mobile/Containers/Data/Application/29DF84C0-0BAD-45C7-BEF9-6F49053DC1E8/tmp/" is not a directory: Not this crash started with iOS 17
Posted
by super_C.
Last updated
.
Post not yet marked as solved
4 Replies
407 Views
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
Posted Last updated
.