Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

ImmersiveSpaceを切り替えるとAVAudioPlayerで再生していたBGMの音が聞こえなくなる / When switching ImmersiveSpace, background music played by AVAudioPlayer is not heard.
【手順】 1.アプリを起動する。 2.ImmersiveSpace1がopenされ、3Dオブジェクトのアニメーションが再生される。 3.アニメーションが終了するとImmersiveSpace1をdismissしてImmersiveSpace2をopenする。 【期待値】 ImmersiveSpace1をopenするとBGMが再生され、ImmersiveSpace2がopenしても引き続きBGMが再生されていること。 【結果】 ImmersiveSpace1をopenするとBGMが再生され、ImmersiveSpace2がopenするとBGMの再生が止まる。 【環境】 ・実機(VisionOS2)にて発生。 ・シミュレータでは発生しない。 ・Xcode:Version 15.2 (15C500b) 【ログ】 ImmersiveSpace2をopenした際に実機で出力されている。シミュレータでは出力されない。 AVAudioSession_iOS.mm:2223 Server returned an error from destroySession:. Error Domain=NSCocoaErrorDomain Code=4099 The connection to service with pid 39 named com.apple.audio.AudioSession was invalidated from this process. UserInfo={NSDebugDescription=The connection to service with pid 39 named com.apple.audio.AudioSession was invalidated from this process.} 【Procedure】 Launch the application. ImmersiveSpace1 is opened and the animation of the 3D object is played. When the animation finishes, ImmersiveSpace1 is dismissed and ImmersiveSpace2 is opened. 【Expected value】 When ImmersiveSpace1 is opened
0
0
566
Jun ’24
iPadOS 18 Beta and SwiftData issues
I had a series of @Model classes with some mandatory attributes and some optional. Pre-move to 18, everything was working fine. After the migration, it reports that every single non-Optional attribute is nil upon trying to save. The error is CoreData related but not sure if its in the Core layer or Swift layer. Sample error (with app data removed) is : SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1560 Multiple validation errors occurred. Error Domain=NSCocoaErrorDomain Code=1570 %{PROPERTY}@ is a required value. UserInfo={NSValidationErrorObject= NSLocalizedDescription=%{PROPERTY}@ is a required value., NSValidationErrorKey=systemName, NSValidationErrorValue=null} I have modified the code to provide default values for all constructors in an attempt to see a difference, but get the same errors
3
0
1k
Jun ’24
Sticker Pack App Not Working in Sim
Hello, Im trying to create a sticker pack app. I have all the png in correct sizes however when running a simulation it does not show up. objc[19306]: Class CKDetailsTUConversationCell is implemented in both /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ChatKit.framework/ChatKit (0x7ff84276a840) and /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/Applications/MobileSMS.app/MobileSMS (0x103257b98). One of the two will be used. Which one is undefined. mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] setAllowableTypes_block_invoke:1242: *** CGImageSourceSetAllowableTypes - ignoring unknown: 'public.avci' Received Connection Invalid
1
0
832
Jun ’24
Error when downloading files with multiple background urlsession
Hi, I am trying to download multiple files in background (using multiple background urlsession). I initiate the download on click of a button and push the app to background where the download should happen. I am getting the following error: Error Domain=NSCocoaErrorDomain Code=4 “CFNetworkDownload_EYp3BT.tmp” couldn’t be moved to “Documents” because either the former doesn’t exist, or the folder containing the latter doesn’t exist. UserInfo={NSSourceFilePathErrorKey=/private/var/mobile/Containers/Data/Application/85AEEB4F-1512-4C0C-8B04-C9C73634CC49/Library/Caches/com.apple.nsurlsessiond/Downloads/com.mycompany.DownloadMultipleFilesTestApp/CFNetworkDownload_EYp3BT.tmp, NSUserStringVariant=(n Moven), NSDestinationFilePath=/var/mobile/Containers/Data/Application/85AEEB4F-1512-4C0C-8B04-C9C73634CC49/Documents/file-441966.pdf, NSFilePath=/private/var/mobile/Containers/Data/Application/85AEEB4F-1512-4C0C-8B04-C9C73634CC49/Library/Caches/com.apple.nsurlsessiond/Downloads/com.mycompany.DownloadMultipleFiles
3
0
1.3k
Jun ’24
Reply to Sanboxed apps won't open 3rd party filesystem files
When launching Preview.app on the command line, I get an 'Operation not permitted' error returned. % /System/Applications/Preview.app/Contents/MacOS/Preview /Volumes/myfs/Through_the_pines.jpg 2024-06-17 14:23:16.826 Preview[2745:37915] PVImageContainer initWithURL:file:///Volumes/myfs/Through_the_pines.jpg failed, error = Error Domain=NSCocoaErrorDomain Code=257 The file “Through_the_pines.jpg” couldn’t be opened because you don’t have permission to view it. UserInfo={NSFilePath=/Volumes/myfs/Through_the_pines.jpg, NSUnderlyingError=0x6000022302a0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}} File permissions allow reading for all users: % ls -l /Volumes/myfs/Through_the_pines.jpg -rw-rw-r--@ 1 developer staff 2396454 Mar 25 10:48 /Volumes/myfs/Through_the_pines.jpg Am I right in assuming it's sandbox related?
Topic: Privacy & Security SubTopic: General Tags:
Jun ’24
Core Data error: SQLITE_IOERR_SHMOPEN; what is this?
Hi, when setting up our Core Data stack in our iOS app (manually, with a NSManagedObjectModel/Context & NSPersistentStoreCoordinator) we have reports a rare bug we haven't been able to reproduce. Occasionally when adding a persistent store we get a NSCocoaErrorDomain 256 error (NSFileReadUnknownError) with NSSQLiteErrorDomain=4618 in the user info. That's SQLITE_IOERR_SHMOPEN , which the SQLite docs describe this way: I/O error within the xShmMap method on the sqlite3_io_methods object while trying to open a new shared memory segment It seems to specifically /not/ be a SQLITE_FULL error. Do you know what type of issue can cause this? Or where/how I can start tracking this down?
1
0
1.1k
Jun ’24
Reply to Local SwiftData to CloudKit migration
Unresolved error loading container Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=Unable to find a configuration named 'default' in the specified managed object model.} It seems that you are hitting a SwiftData bug – When CloudKit integration is enabled, creating a ModelContainer with a migration plan triggers an error. Since WWDC is there, I'd suggest that you try with the latest beta. If the issue is still there, please file a feedback report for the SwiftData team to investigate. For an immediate workaround, you might consider the following flow: Create two model containers, container1 for the local store and container2 for the CloudKit store. For container2, use a configuration name (synced in your case) to differentiate the CloudKit store from the local one, and don't use migration plan, which avoids the error. Migrate the data with your own code, which includes fetching data from container1, transforming it if necessary, and saving the
Jun ’24
How do you allow an XPC service to create a new file based on an NSURL that the user selected from an NSSavePanel?
How do you send an NSURL representing a new file, as returned from an NSSavePanel, to an XPC service such that the service is granted permission to create the file? I can successfully pass an NSURL to the XPC process if the NSURL represents an existing file. This is documented in Apple's Documentation: Share file access between processes with URL bookmarks This involves creating bookmark date while passing 0 in as the options. However, if you try to create bookmark data for an NSURL that represents a file that is not yet created, you do not get any bookmark data back and an error is returned instead: Error Domain=NSCocoaErrorDomain Code=260 The file couldn’t be opened because it doesn’t exist. Simply passing the file path to the XPC process, by way of: xpc_dictionary_set_string(message, file_path, url.fileSystemRepresentation); Does not grant the XPC create/write permissions. Is there an API or trick I'm missing? Note that the user should be allowed to save and create new files anywhere of their choo
1
0
987
Jun ’24
Reply to swiftUI apps with SwiftData and CloudKit crashes on iOS but works on MacOS
on MacOS 14.5, the app on Mac also crash with the same error Unresolved error loading container Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=Unable to find a configuration named 'default' in the specified managed object model.} I think there is something todo with MacOS 14.5 and iOS 17.5.....
Jun ’24
Unable to see sticker pack in simulator
Hello, I am trying to update my 3 sticker packs. I updated them a few years ago with no problem. I have uploaded my new stickers and when I try to test with simulator, they are not showing up. I tried making a new pack with only 3 small stickers (total of 44kb for all 3) using the template and I got the same errors, nothing shows up in simulator. This is what I get: mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] setAllowableTypes_block_invoke:1242: *** CGImageSourceSetAllowableTypes - ignoring unknown: 'public.avci' Received Connection Invalid mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory] Synchronous remote object got an error attempting to post setup, reason: Couldn’t communicate with a helper application. [com.apple.MobileSMS:2F148998-0636-4F50-B2E6-834AD4394B69] Error when getting current app configuration for a
5
0
1.2k
Jun ’24
Reply to SwiftData does not retrieve my inverse one-to-many Relationship
Your code actually throws the following error when saving the context (if you add do...try... catch for context.save()) SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1570 %{PROPERTY}@ is a required value. UserInfo={NSValidationErrorObject= (entity: ThirdModel; id: 0x60000028c520 ; data: { name = my third model; parent = nil; }), NSLocalizedDescription=%{PROPERTY}@ is a required value., NSValidationErrorKey=parent, NSValidationErrorValue=null} To avoid the error, change the to-one relationship to Optional. Also, when declaring a relationship, use var because SwiftData maintains it for you. If you declare your models in the following way, your code will work: final public class SecondModel { var parent: FirstModel? ... } @Model final public class ThirdModel { var parent: SecondModel? ... }
Topic: Programming Languages SubTopic: Swift Tags:
May ’24
Xcode 15.3+ bug: framework tests executed in fresh simulator fail to write data to disk
I have filed this as FB13722352. I am sharing it here because I haven't seen it mentioned anywhere online yet and am curious if anyone else has run into it. In Xcode 15.3+, writing data to disk fails when running the tests for a Framework project in a fresh simulator. Specifically, if the selected simulator has never been launched before (i.e. is newly-created), any test execution that attempts to write data into the NSDocumentDirectory directory will fail for a period of time after the simulator is first launched (I've observed between 10s and 20s). After that period of time, the same data write action will succeed. It appears that Xcode 15.3+ is starting test execution too soon, without waiting a sufficient amount of time for the Simulator to fully boot. This issue does not occur in Xcode 15.2 or prior versions. Since the issue only appears in a fresh (never-before booted) simulator, it is likely to pop up consistently in CI test runs (where simulators are not re-used). This can cause confusion because the
1
0
834
May ’24
File transfer issue from iPhone to Watch after iOS 17.5 & WatchOS 10.5 update
After updating to iOS 17.5 & WatchOS 10.5, the didFinish response from WCSessionDelegate does not come when transferring files from iPhone to Watch. It worked normally until 17.4 & 10.4. There is no problem with checking file completion even if a didFinish response is not received, but I think Apple needs to check this issue and update. File transfer is done using the transferFile function of WCSession. The file being transferred is a single file and its size does not exceed 30MB. When you try to transfer Pi, the message below appears in the Xcode log section. -[WCFileStorage persistOutgoingFileTransfer:] error serializing file transfer , transferring: YES> due to Error Domain=NSCocoaErrorDomain Code=4866 Caught exception during archival: This object may only be encoded by an NSXPCCoder. ( 0 CoreFoundation 0x000000019b064f2c 00E76A98-210C-3CB5-930B-F236807FF24C + 540460 1 libobjc.A.dylib 0x0000000192ef6018 objc_exception_throw + 60 2 Foundation 0x0000000199fe7778 3D3A12E3-F5E9-361F-B00A-4A
29
0
6.6k
May ’24
Read and write permission error in FilterDataProvider Network Extension class
Hi, in my Extension FilterDataProvider class that is inherited from NEFilterDataProvider i am trying to insert logs into my CoreData entity, but when i insert it gives me error NSCocoaErrorDomain: -513 reason: Unable to write to file opened Readonly Any suggestions please to update the read write permission i already have tried this way but no luck let description = NSPersistentStoreDescription(url: storeURL) description.shouldInferMappingModelAutomatically = true description.shouldMigrateStoreAutomatically = true description.setOption(false as NSNumber, forKey: NSReadOnlyPersistentStoreOption) ?
4
0
696
May ’24
Malware in Xcode Simulator files says Apple XProtect
During last night, Apple allegedly pushed new XProtect antivirus signatures. After that, I think XProtect found the malware Pirrit in my Xcode Simulator files from Apple. I'm not kidding. This is an excerpt from the XProtect log (notice the NSFilePath!): 2024-05-01 07:54:12.951 Pirrit 👉 no status_message report time 0.0000000 {action:report,path:{modificationDate:732892166.8634809,path:/Library/Developer/CoreSimulator/Images/1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg,creationDate:732892166.8634809},status:{description:Error deleting path: /Library/Developer/CoreSimulator/Images/1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg: Error Domain=NSCocoaErrorDomain Code=513 “1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg” couldn’t be removed because you don’t have permission to access it. UserInfo={NSUserStringVariant=(n Removen), NSFilePath=/Library/Developer/CoreSimulator/Images/1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg, NSUnderlyingError=0x1247612a0 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}}.,caus
4
0
1.7k
May ’24