Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

iOS Content Blockers Reload - Couldn’t communicate with a helper application
Hi everyone and thanks for your time. Intro I'm developing an iOS app that has Content Blockers as one of its features. For this, we have a list of predefined rules the user can enable/disable at will, and also an option to enter custom rules. Whenever there's a change (enable, disable, add or remove), I get all the rules and recreate the JSON files, one file for every 150K rules (we have more than one content blocker). Most users just need one JSON file though. And then call the content blockers reload. The Problem Most of the time, it works well. The content blocker reloads and I can verify in Safari that it's working. But, sometimes within the completionHandler of: SFContentBlockerManager.reloadContentBlocker(withIdentifier:completionHandler:) It returns the following error: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.SafariServices.ContentBlockerLoader UserInfo={NSDebugDescription=connection to service named com.apple.SafariServices.ContentBlockerLoader} Locali
2
0
1.2k
Sep ’21
EXC_CORPSE_NOTIFY crash on STWebpageController loadView
Hi All, Working on one browsing application for iOS. While browsing and closing tabs, application gets crash on few of client devices. In console log we can see following details: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Fatal error occured Error Domain=NSCocoaErrorDomain Code=4099 The connection to service on pid 87053 named com.apple.ScreenTime.ScreenTimeWebExtension.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid. UserInfo= In crash file, following can be seen. Incident Identifier: 68DF3B97-3DD2-4E55-B350-B424CEF955F8 Hardware Model: iPhone11,6 Process: Browser [86470] Path: /private/var/containers/Bundle/Application/B1B7A7F8-3CEC-4952-97D1-D2A5C1203684/Browser.app/Browser Identifier: jp.co.rakuten.mobile.browser Version: 1.4.3.0 (1.0.0) AppStoreTools: 12E506 AppVariant: 1:iPhone11,6:14 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition:
0
0
606
Sep ’21
Bug in Files App/FileManager: App folder is hidden and files in app folder can be read but not deleted
This is an old bug but it has never been fixed: App Folder do not shown in Files App. (UIFileSharingEnabled and LSSupportsOpeningDocumentsInPlace in info.plist are true) There was a workaround to make the app folder appears in Files app again: Restart device or simulator. But this trick doesn't work any more after I updated to XCode 13 and run simulators in iOS15. I can read files in the Documents folder of the app, but unable to delete or trash them. If I trash a file in the Documents folder, this error will appear: Error Domain=NSCocoaErrorDomain Code=4101 Provider returned unsupported error UserInfo={NSUserStringVariant=Trash, NSURL=file:///Users/xxx/Library/Developer/CoreSimulator/Devices/xxx/data/Containers/Data/Application/xxx/Documents/file.zip, NSDebugDescription=Provider returned unsupported error, NSUnderlyingError=0x600001b93270 {Error Domain=NSFileProviderInternalErrorDomain Code=3 } ... However, I still can open the Documents folder from simulator with MacOS Finder and delete files from
0
0
1.6k
Sep ’21
Reply to Error thrown when querying for Subscription Products
Hi there, I have been working on StoreKit 2 for my app. I'm still facing the issue with simulators even after updating to the released version of Xcode 13 and its simulators. It's been working correctly on a device. Below is the query code: let productIdentifiers: Set = [monthly_subscription, yearly_subscription, family_monthly_subscription, family_yearly_subscription] Task(priority: nil){ do { let _subscribableProducts = try await Product.products(for: productIdentifiers) /**/ self.subscribableProducts = _subscribableProducts /**/ for subscriptionProduct in self.subscribableProducts { let model_Subscribe = Model_SubscribeType(subscribeType: subscriptionProduct.id, subscribeKey: subscriptionProduct.id, subscribeDuration: , subscribe_CostCurrency: String(subscriptionProduct.displayPrice.prefix(1)), subscribe_Cost: (subscriptionProduct.price), subscribe_DisplayPrice: subscriptionProduct.displayPrice, subscribe_isSubscribed: false, subscribe_FamilySharing: subscriptionProduct.isFamilyShareable, subscribe_SKProdu
Topic: App & System Services SubTopic: StoreKit Tags:
Sep ’21
Reply to I want to access twitter filter search v2 endpoint in ios app
Ok I did this static func callFilterSearch() { let Url = String(format: https://api.twitter.com/2/tweets/search/stream?place.fields=contained_within&user.fields=location&tweet.fields=geo) guard let serviceUrl = URL(string: Url) else { return } var request = URLRequest(url: serviceUrl) request.httpMethod = POST request.setValue(Bearer MY TOKEN, forHTTPHeaderField: Authorization) request.setValue(text/html; charset=UTF-8, forHTTPHeaderField: Content-Type) request.setValue(gzip, deflate, br, forHTTPHeaderField: Accept-Encoding) let session = URLSession.shared session.dataTask(with: request) { (data, response, error) in if let response = response { print(response) } if let data = data { do { let json = try JSONSerialization.jsonObject(with: data, options: .allowFragments) print(json) } catch let error { print(error: (error)) } } }.resume() } and now it is giving me this error error: Error Domain=NSCocoaErrorDomain Code=3840 Invalid value around character 0. UserInfo={NSDebugDescription=Invalid
Topic: App & System Services SubTopic: General Tags:
Sep ’21
Reply to I want to access twitter filter search v2 endpoint in ios app
Ok, I tried this: static func callFilterSearch() { let Url = String(format: https://api.twitter.com/2/tweets/search/stream?place.fields=contained_within&user.fields=location&tweet.fields=geo) guard let serviceUrl = URL(string: Url) else { return } let parameterDictionary = [:] var request = URLRequest(url: serviceUrl) request.httpMethod = POST request.setValue(Bearer token, forHTTPHeaderField: Authorization) request.setValue(Application/json, forHTTPHeaderField: Content-Type) guard let httpBody = try? JSONSerialization.data(withJSONObject: parameterDictionary, options: []) else { return } request.httpBody = httpBody let session = URLSession.shared session.dataTask(with: request) { (data, response, error) in if let response = response { print(response) } if let data = data { do { let json = try JSONSerialization.jsonObject(with: data, options: []) print(json) } catch { print(error) } } }.resume() } But got this error: Error Domain=NSCocoaErrorDomain Code=3840 JSON text did not start with ar
Topic: App & System Services SubTopic: General Tags:
Sep ’21
Reply to Enable access to Documents Directory in Xcode 13
What I am trying to do is export a collection of Markdown files into an EPUB book. To create the EPUB book I start by creating a file wrapper that has everything the EPUB needs. I finish by using the ZIPFoundation framework to compress the file wrapper into a valid EPUB/Zip archive. When I finish building the file wrapper, I call the FileWrapper class's write function to temporarily create the file so ZIPFoundation can compress and archive it. do { // mainDirectory is the file wrapper root. wrapperURL is the location to export // from either the file exporter panel or NSSavePanel. try mainDirectory.write(to: wrapperURL, options: [], originalContentsURL: nil) } catch { Swift.print(Error temporarily writing the book's file wrapper to disk. Error: (error)) } When I step through this code in the debugger, it goes to the catch block and prints the following message in the console: Error: Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file TestBook in the location (path to f
Topic: Code Signing SubTopic: General Tags:
Sep ’21
Reply to dataWithContentsOfURL is nil with url from Files app
Why would my app not have permission to view the document when it's from the files app? Error Domain=NSCocoaErrorDomain Code=257 The file “afile.pdf” couldn’t be opened because you don’t have permission to view it. UserInfo={NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/xxxxxxxx/File Provider Storage/afile.pdf, NSUnderlyingError=0x281f4f150 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}}
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’21
Enable access to Documents Directory in Xcode 13
I'm trying to export a text document in the Documents directory and running into file permission problem in a Mac app that does not use the App Sandbox. As a workaround for the issue, I tried turning on the App Sandbox and giving read/write access to the Documents directory, but when I add the App Sandbox capability, I have the following entries for file access: User Selected File Downloads Folder Pictures Folder Music Folder Movies Folder Since the file is a text file, exporting to any of the folders in the list makes no sense. If I give User Selected File read/write access, I still get file permission errors when I export. The UI in Xcode provides no way to add folders to the File Access list. All I want to do is let someone export a file in the folder of their choice. How do I do this with the App Sandbox? UPDATE I'm developing a SwiftUI app. I was using SwiftUI's file exporter to export the document. I took robnotyou's suggestion to use NSSavePanel, but I still get the file permission error, with or witho
10
0
7.2k
Sep ’21
Reply to Family Controls application-identifier Entitlement error while blocking an application
Hi, Any update on the above issue? I am also trying to block application in the same way but I am getting different error, Attempts remaining: 1 Failed to fetch effective value for com.apple.ManagedSettings.effective-media-settings.changed: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.ManagedSettingsAgent was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.ManagedSettingsAgent was invalidated: failed at lookup with error 159 - Sandbox restriction.}``` could you please guide me if I'm missing something?
Topic: Business & Education SubTopic: General Tags:
Sep ’21
CoreData+CloudKit integration issue
Hello. I'm trying to setup CoreData+CloudKit integration. But I receive following errors right after NSPersistentCloudKitContainer configuration. CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(939): : Failed to set up CloudKit integration for store: (URL: file:///var/mobile/Containers/Data/Application/18992BCF-7F0C-4271-B106-947B8F52A723/Library/Application%20Support/App.sqlite) Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=The mirroring delegate could not initialize because it's store was removed from the coordinator.} Here is the code of persistent container setup: self.persistentContainer = NSPersistentCloudKitContainer(name: containerName) let localStorage = NSPersistentStoreDescription(url: storageURL) let localStorageOptions = NSPersistentCloudKitContainerOptions(containerIdentifier: iCloud.com.myapp) localStorageOptions.databaseScope = .private localStorage.cloudKitContainerOpti
0
0
1.1k
Aug ’21
NSPersistentCloudKitContainer - Import failed because applying the accumulated changes hit an unhandled exception
When I use NSPersistentCloudKitContainer to sync data, I receive error Code=134421/134406 Import failed because applying the accumulated changes hit an unhandled exception. iOS/iPadOS 15 beta 5 - iOS/iPadOS 15 beta 7(latest) When this error appears, data can not be import/merged from iCloud. Delete app and reinstall is not working. Same momd on macOS 12(Catalyst, with full data upgrated from macOS 11) works fine. Maybe a system bug? Merge Policy: context.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy context.automaticallyMergesChangesFromParent = true Console log here: CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _requestAbortedNotInitialized:](1826): - Never successfully initialized and cannot execute request ' B7974D4D-C5DA-413E-AE3B-072C88D38D47' due to error: Error Domain=NSCocoaErrorDomain Code=134421 Import failed because applying the accumulated changes hit an unhandled exception. UserInfo={NSLocalizedFailureReason=Import failed because applying the accumulated cha
15
0
7.2k
Aug ’21
Reply to SharePlay Developer Profile not working?
I'm trying with iOS beta 7 and the updated SharePlay Developer Profile and I'm getting the following error: Error preparing group activity: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.group-activities.conversationmanagerhost was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.group-activities.conversationmanagerhost was invalidated: failed at lookup with error 159 - Sandbox restriction.} The call to prepareForActivation() is returning .cancelled without any prompt on the device.
Topic: App & System Services SubTopic: General Tags:
Aug ’21
What is the exposureBiasesByMode dictionary?
Where can I find it? What's the content of this dictionary? Whenever I open the UIIMagePickerController with source type .camera I see an error: Failed to read exposureBiasesByMode dictionary. The camera seems to work fine, though. 2021-08-16 06:51:59.608807+0200 myProject[19537:4428708] [Camera] Failed to read exposureBiasesByMode dictionary: Error Domain=NSCocoaErrorDomain Code=4864 *** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: data is NULL UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: data is NULL} Thank you for any advise.
0
0
1.1k
Aug ’21
Open UIManagedDocument in a QLThumbnailProvider
Hello there, I'm using a combination of UIDocumentBrowserViewController + UIManagedDocument to manage documents, store and sync them with iCloud. Right now I'm trying to add support for thumbnails (custom type) using QuickLookThumbnailing framework. In a subclass of QLThumbnailProvider when trying to open the UIManagedDocument, Xcode returns an error from within thumbnail target: [error]addPersistentStoreWithType:configuration:URL:options:error: returned error NSCocoaErrorDomain (513) Also UIManagedDocument itself throws an error Error Domain=NSCocoaErrorDomain Code=513 The file couldn’t be saved because you don’t have permission.. The cocoa error 513 is about no writing permissions, but I'm not sure what exactly it's tried to be written. In the thumbnail extension I just init the document with the URL that system send via the system method. Also I do not change anything in the document explicitly. I'm not sure what I'm missing, I took a look over the Particles example from Apple engineers,
0
0
796
Aug ’21