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

`Bad file descriptor` when copying using hardlink flag
When I try to link a file on macOS, I get: $ cp -l release-source/release/examples/stubs-1-pubsub.test.js . cp: ./stubs-1-pubsub.test.js: Bad file descriptor This made it seem like the copying failed, but ls shows it went fine: $ ls -li release-source/release/examples/stubs-1-pubsub.test.js stubs-1-pubsub.test.js 9825657 -rw-r--r-- 2 carlerik staff 1072 26 sep 16:24 release-source/release/examples/stubs-1-pubsub.test.js 9825657 -rw-r--r-- 2 carlerik staff 1072 26 sep 16:24 stubs-1-pubsub.test.js A related post talks about this error coming from the file system, not the cp util itself. Creating a hard link using the ln command works fine, so the error must be due to something cp does that ln does not, so I fired up the console and captured messages hoping to see something. I cannot see that I do ... Does anyone have an idea what this is caused by? System information ❯ npx envinfo --system System: OS: macOS 13.5.2 CPU: (12) arm64 Apple M2 Max Memory: 4.24 GB / 64.00 GB Shell: 5.2.15 - /opt/homebrew/bin/bash ❯ diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *2.0 TB disk0 1: Apple_APFS_ISC Container disk1 524.3 MB disk0s1 2: Apple_APFS Container disk3 2.0 TB disk0s2 3: Apple_APFS_Recovery Container disk2 5.4 GB disk0s3
3
2
1.4k
Sep ’23
Influx to XCode
Hi, I am a high school student currently wokring on an IOT-based project where data is sent from a collection of sensors, to an IOT, to a Database, to an XCode App. It is the last step I am currently stuck on. I am able to get data from the sensors to the database but I'm not sure how to make the database (InfluxDB) transfer data to the app. Any ideas?
1
0
266
Sep ’23
Deleting app while its running &
I'm writing an uninstaller, lets call it UNINS, for my developer id signed Mac app, lets call it APP(it contains system extensions) . UNINS is supposed to delete APP and its associated data. But after INS is done, it needs to delete itself. From my experience, when an app is running and we try to delete it, OS does not allow this operation. How to do this correctly? During uninstallation, if we delete an app from /Applications folder, do we also manually need to delete its data from ~/Library/Containers for all users ? Or this is done automatically by OS? if I need to unload launchdaemon that we installed, can this UNINS do that ? (Because I think unloading daemons require root priveleges)
5
0
768
Sep ’23
Xcode 14 Asset Validation Issue: 1024 by 1024 PNG Image Not Recognized in Assert Catalog
I am encountering a Asset validation failed issue with Xcode 14 when uploading .ipa file to TestFlight. Tried with uploading tools Xcode and Transporter. Despite of having a 1024x1024 pixel PNG image in my iOS asset catalog, Xcode is reporting an below error. Asset validation failed (90704) Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/. (ID: 74e79ac5-0825-4ee3-ac5a-10ba3fc902cd) Here are the steps I have taken to address the issue. I have confirmed that the 1024x1024 pixel PNG image is present in the asset catalog. I have checked the image's dimensions and ensure that it indeed measures 1024x1024 pixels. I have re-imported the image into the asset catalog with Xcode 14 AllSizes, making sure that it is correctly associated with the target. I have cleaned and rebuilt the project to rule out any caching or build issues. To make sure the image properties, verified alpha channel is set as No. Also tried by adding Xamarin default AppIcons from default sample. Verified my Info.plist has key XSAppIconAssets and associated with correct AppIcon. Ensure Xcode and IOS SDK compatiblity. Version Details: Xcode : 14.3.1.21815 Visual Studio Professional 2022 for Mac, Version 17.6.4 Xamarin IOS: 16.4.0.6 .NET SDK : 7.0.308 App Minimum Deployment Target is 15. Mac Os: Ventura 13.5.2 Despite these efforts, Xcode 14 continues to flag the image as missing during asset validation. This issue is particularly troublesome as it affects the smooth development of my iOS app. Has anyone else encountered a similar issue with Xcode 14, and if so, how did you manage to address it? Thank you in advance
1
0
811
Sep ’23
DiskArbitration and APFS container recognition
DADiskCopyDescription() give basic information for disk and partition but not how these info elements are linked together. By example how to get the volume parent container ? How to decode de CFSTR given by DADiskCopyDescription() ? When does DAMediaContent hold "GUID_partition_scheme" or "FDisk_partition_scheme" ? For volume DAMediaContent is something like "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" (with volume name in DAMediaName). But DAMediaContent with such numeric value is not always volume (DAMediaName and DAVolumeKind are then empty). And sometime DAMediaContent is empty. Where can I found documentation about DADiskCopyDescription() and the way to get APFS volume\container childs and parent
1
0
734
Sep ’23
After screen repair -> the version of macOS need to be reinstalled ; but fail
Hi guys and girls, I need your help. I was on the last beta version of Sonoma and I had to replace the screen of my Macbook pro m1. ->The problem I'm having is that when the mac starts up it goes to recovery and displays "The version of macOS on the selected drive needs to be reinstalled". It suggested that I reinstall Sonoma, which I did, but I rebooted and the same message appeared. I then erased the SSD disk with disk utility and chose to reinstall the latest version of Ventura. The installer did the job, the Mac restarted and displayed the same problem. Can you help me?
2
1
732
Sep ’23
Error in tutorial AboutMe
Trying to learn swift by going through the tutorial AboutMe. https://developer.apple.com/tutorials/sample-apps/aboutme see code below: struct Info { let image: String let name: String let story: String let hobbies: [String] let foods: [String] let colors: [Color] let funFacts: [String] } let information = Info( image: "Placeholder", name: "My Name", story: "A story can be about anything you can dream up. There are no right answers, there is no one else.\n\nNeed some inspiration?\n• 🐶🐱🛶️🎭🎤🎧🎸\n• 🏄‍♀️🚵‍♀️🚴‍♀️⛵️🥾🏂⛷📚\n• ✍️🥖☕️🏋️‍♂️🚲🧗‍♀️ ", hobbies: ["bicycle", "ticket.fill", "book.fill"], the var information does not appear to be defined anywhere. Step 3 in this section says This value, information, uses the Info structure to store all of the data used in your app. You can refer to this global variable by its name from any file of the project. But no explanation on where that definition takes place. This causes a 'not found in scope' error elsewhere in the project. Where should this be defined and of what type?
0
0
238
Sep ’23
When I download the Mac beta, I can't choose where to install the dossier.
Premise: I did this in an external SSD drive system. I followed the tutorial, added new clusters to the disk in Disk Utility (current system, external ssd, current external ssd), then registered the device at: https://beta.apple.com/zh-CN/enroll-your-devices, downloaded the beta system in Settings, and then clicked on Upgrade, and it didn't come up to let me choose which zoned volume to install to, directly the system automatically rebooted multiple times and upgraded the current system to beta. Question 1: Why is there no disk selection? Is it an external ssd system where selection is not possible? Q2: Can I downgrade back to the original system now? Can I downgrade back to my original system now and do it all over again? QUESTION THREE: How do I correctly install beta in the new dossier instead of the current system.
0
0
289
Sep ’23
Installing Ventura aside with Sonoma - problem in selecting Volume
I had updated my Mac from Ventura to Sonoma beta 7, and now want to have also the Ventura on my Mac. Below is my process. The problem was that I could not select the volume where I wanted the Ventura. I downloaded the "InstallAssistant.pkg" for Ventura and extracted from it "Install macOS Ventura.app". But it could not be started, because I was using macOS Sonoma. I made an apfs volume where I want the Ventura installed. On ssd, there are also other volumes Then, following guide of Apple (HT201372), I made successfully a bootable memory stick. I closed the Mac, and booted it keeping the start-button pressed I selected the just made external volume, and it was booted The start page of install app did not come up, but followed a series of boots with text (with estimated time) on black background Finally Ventura was installed, and dual boot (Ventura / Sonoma) working The final result was ok, and Ventura was luckily not installed on my document apfs volume, but on one of the two empty apfs volumes I had. Before this all, I had a working Ventura, and I wanted to have Sonoma beta 7 beside it. But the update process which started from System Setting, replaced my Ventura by Sonoma beta. It is a bad idea, if Apple is dropping informative details in these install processes.
0
0
619
Sep ’23
Not able join disk partition in M1 mac
Lately, I had Ubuntu in dual boot on an 82 GB partition and macOS on a 162 GB partition. After removing Ubuntu, I attempted to merge these partitions using Disk Utility, but I keep encountering persistent errors like "Operation failed..." "An internal state error occurred." Okay, I got it I can still the 82 GB volume as partition like people use in windows but I don't wanna do that I want a single volume with all 245 GB storage. Currently there's nothing in my 82 GB volume and macOS is installed in 162 GB volume. I've already reached out to Apple Support and reinstalled macOS twice, but the problem persists. Any advice on how to resolve this?
0
0
331
Aug ’23
Force Refresh Volume to Get Current Amount of Free Bytes From File System Without Any Caches
Hello, in my app I need the current amount of free space on a certain volume. I use the following code to the this information: if let mountedVolumeURLs = FileManager.default.mountedVolumeURLs(includingResourceValuesForKeys: nil) { for volumeUrl in mountedVolumeURLs { guard let values = try? self.url.resourceValues(forKeys: [.volumeTotalCapacityKey, .volumeAvailableCapacityKey]) else { continue } let totalBytes = values.allValues[.volumeTotalCapacityKey] as? UInt64 ?? 0 let freeBytes = values.allValues[.volumeAvailableCapacityKey] as? UInt64 ?? 0 // This is not always correct. } } When writing to a volume and then calling the code above, a wrong amount is returned. I suspect that there is still some cacheing going on. Is there any function that I can call to get this information from the file system without any cacheing? I guess an alternative would be to get a list of all files, get their sizes, add them up and subtract that number from the total bytes of the volume. But maybe there is a more elegant solution. I also tried something like this: let handle = try FileDescriptor.open(volumeUrl.path, .writeOnly, options: .create, permissions: .ownerReadWrite, retryOnInterrupt: true) fcntl(handle.rawValue, F_FULLFSYNC) But this did not help. I would appreciate any help. Regards
1
0
459
Aug ’23
Maui sample app not downloading to iPhone using visual studio
I am trying to download a sample MAUI project provided by visual studio 2022 version 17.7.3 and xcode version 15_6. The program runs on the android emulator and maccatalyst but does not compile and run on actual device because NewsstandKit is missing from the new Xcode release. I am not using NewsstandKit and not really sure what even does. I think there is something wrong with Xcode version 15_6 as it does not allow a build to go to the iPhone. Version 15 doesn't work either. I tried version 14.3, 15, 15.6 upgraded my iPhone and mac versions and so forth. I have been trying to do one simple task for over a month. Has anybody had this problem? The release notes say that NewsstandKit was removed from 15_6 so why is it still trying to link in?
0
0
418
Aug ’23
com.apple.DiskManagement.disenter error -119930868 on external drive
Hi, Hope you are all fine ! I had a problem on several disk due to bad unmounting caused by Caldigit TS4. The TS4 has/had problem managing hard drives and sleep of the computer… The problem appeared on internal drives pugged into a OWC Dock. The dock is TB2 with Apple TB2 to TB3 pugged into the Caldigit TS4. One of the drives is a 4TB Seagate Exos Enterprise that is brand new and I'm almost sure I formatted it in APFS when using it for the first time. The other/s are 2TB or 3TB but almost sure at that time I was using HFS. The drives are seen But no way to SOS… This particular 4 TB drive seems to respond mechanically well, like spinning when tryning to acces, going to sleep…And is brand new… After reading a few (many actually ;) ) pages on Apple forums I've found, I've tried the diskutil way on terminal… but having some problem with syntax, sometimes it worked sometimes I think I'm not writing correctly so it does nothing… If I understand well this error com.apple.DiskManagement.disenter error -119930868 Is a directory problem. A long time ago I used Disk Warrior a lot in the G4/G5 age ;) But it seems it doesn't handle APFS… I've run a scan with Stellar Recovery and this software seems to see all my files… The Hard drive seemed to act normally during all the process… But it seems it doesn't just rebuild the directory and will recover all the files and put them like video in video folder…pictures in picture folder… so I'll have my files but a great mess… I've also tried rhe FSCK command…but didn't undertood enough to get something good… So my question are : As the data seems to be there and the drive still working fine, is there a way to make Mac Os or a software rebuild the directory like Disk Warrior used to do. And not just back uping the files a la Stellar recovery. Could someone make a comprehensive diskutil / fsck tutorial for noobs ;) After the fix , if successful … should I throw this drive away or the prob is only a Mac OS bug… Can the adapted TB2 to TB3 add source of problem ? Can the adapted TB2 to TB3 ON Caldigit TB port add source of problem ? AFPS is still recommanded for external HD Could someone explain those DiskManagement.disenter error Best .V
3
0
1.9k
Aug ’23
Strange chinese character next to the iPhone folder name and different format of images
I was wondering if anyone has same problem. When i plug the iphone to my windows laptop the folders in iphone showing a chinese word next to the folder name. Also images format having different type of word and when i copy them to the windows, it doesn't recognize them as images. I have already erase the iphone and when plug again, same issue is there. Please refer attached two pics. I'm running IOS 17 public beta.
10
2
2.2k
Aug ’23