Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to Keep app "alive" when going from Login to user context.
Hello! I crated the support incident and today as I was trying again and I realized my app was sandbox. After dealing with that this is what I have: let service = daemonConnection.remoteObjectProxyWithErrorHandler { err in print(Received error: (err.localizedDescription)) } as? MyServiceProtocol which prints: Received error: Couldn’t communicate with a helper application. or Received error: Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.serviceName UserInfo={NSDebugDescription=connection to service named com.serviceName }
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’22
Error Domain=NSCocoaErrorDomain Code=3840 AND
Hello, I have a problem when I launch the application I have this error displayed in the log of the swift: Error Domain=NSCocoaErrorDomain Code=3840 JSON text did not have any content around line 2, column 0. UserInfo={NSDebugDescription=JSON text did not have any content around line 2, column 0., NSJSONSerializationErrorIndex=1} here is the php : set_charset(utf8mb4); // Check connection if (mysqli_connect_errno()) { echo Failed to connect to MySQL: . mysqli_connect_error(); } // This SQL statement selects ALL from the table 'Locations' $sql = SELECT `id`,`nom`,`prenom`,`tel`,`email`,`mdp`,`adr`,`cp`,`ville` FROM clients; // Check if there are results if ($result = mysqli_query($con, $sql)) { // If so, then create a results array and a temporary one // to hold the data $resultArray = array(); $tempArray = array(); // Loop through each row in the result set while($row = $result->fetch_object()) { // Add each row into our results array $tempArray = $row; array_push($resultArray, $tempArray); } //
5
0
1.8k
Nov ’22
Reply to Error Domain=NSCocoaErrorDomain Code=3840 AND
my bad i forgot my code : import Foundation import UIKit protocol HomeModelDelegate { func itemsDowloaded(client:[Client] ) } class HomeModel : NSObject { var delegate:HomeModelDelegate? func getItems(){ //Hit the conn url let serviceURL = http://myFTPSERVER/service.php //Download the JSON Data let url = URL(string: serviceURL) if let url = url { // Create a URL Session let session = URLSession(configuration: .default) let task = session.dataTask(with: url) { (data, url, error) in if let data = data { //Succed print(data) //call the parseJson self.parseJson(data) }else{ } } // Start the task task.resume() } //notify the view controller and pass the data back } func parseJson(_ data:Data){ var clientArray = [Client]() do { //Parse the data into Client structs let jsonArray = try JSONSerialization.jsonObject(with: data, options: []) as! [Any] print(jsonArray) //loop through each result in the json array for jsonResult in jsonArray { //Cast json result as a dictionary let jsonDict = jsonResult as! [String:String
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’22
WeatherKit returns me error on main project but works on side projects.
Hi ! I'm using WeatherKit and Core Location for give to my users the weather from their long and lat. I done this on snippet code, it works on littlest project but when I implement it on my main project I get errors I got the developer program and activated it on Apple Developer. 2022-10-15 15:15:52.451584+0200 Sporolotor[9275:1486477] [AuthService] Failed to get remote object proxy for: com.apple.weatherkit.authservice with error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.weatherkit.authservice was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.weatherkit.authservice was invalidated: failed at lookup with error 159 - Sandbox restriction.} 2022-10-15 15:15:52.452560+0200 Sporolotor[9275:1486477] [WeatherService] Encountered an error when fetching weather data subset; location=<+48.77307076,+2.34674782> +/- 0.00m (speed -1.00 mps / course -1.00) @ 15/10/2022 15:15
2
0
1.8k
Nov ’22
Game Center doesn't work on Mac Catalyst app via TestFlight due to sandbox error.
Following the advice here: https://developer.apple.com/documentation/gamekit/enabling_and_configuring_game_center I tried allowing incoming connections in addition to outgoing connections but it doesn't help. I get this error: Could not get services from gamed. Please file a radar including GameKit logs, and any gamed crash logs. ERROR Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.gamed was invalidated: failed at lookup with error 159 - Sandbox restriction. UserInfo={NSDebugDescription=The connection to service named com.apple.gamed was invalidated: failed at lookup with error 159 - Sandbox restriction.} This happens on macOS 12.6.1. What am I doing wrong? Is there a workaround?
1
0
1.2k
Oct ’22
Document security scoped bookmark fails with helper app
I have a macOS app with a helper tool that communicates via an XPC connection. In 10.15 Beta 4, a document-based security scoped bookmark fails when it is passed from the main macOS app to the helper app.In the sample code below from the main app, a bookmark is created from a URL and the attribute is saved on “/Users/tperfitt/passing”: NSURL *wimURL=[NSURL fileURLWithPath:@/Users/tperfitt/Desktop/test.winclone/Windows.wim]; NSError *error; NSData *bookmark = [wimURL bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope includingResourceValuesForKeys:nil relativeToURL:[NSURL fileURLWithPath:@/Users/tperfitt/passing] error:&error]; If I resolve this in the main app, it resolves fine. However, if I pass the NSData to the helper app over an XPC connection and attempt to resolve it, it resolves as nil and error is set. The system log shows:2019-07-23 18:02:03.577313-0500 localhost com.twocanoes.WincloneHelper[3026]: (CoreServicesInternal) the ScopedBookmarkAgent service could not be found (configurati
2
0
1.4k
Oct ’22
Reply to How to access files when running XCTests in Ventura. Currently I receive "unauthorised access" errors.
Sorry for my negative question ;-) Sorry for using a language where there’s no way to answer negative questions reliably (-: When launching the tests for the first time, I get the prompt for the Tester app to access Removable volumes. Right, because in that case you’re running your unit test within the Tester app. This is controlled by the Host Application popup in the General tab of your test target. If it’s set to None, the tests run in the Xcode test runner (in this caes, xctest). I did run my tests in Xcode. OK. To continue the story from yesterday, I opened my Package.swift file in Xcode and ran my tests. The test failed with: …/Tests/TestTests/TestTests.swift:8: error: -[TestTests.TestTests testExample] : failed: caught error: Error Domain=NSCocoaErrorDomain Code=257 The file “test.txt” couldn’t be opened because you don’t have permission to view it. UserInfo={NSFilePath=/Volumes/TCCTestRemovable/test.txt, NSUnderlyingError=0x600000c09f80 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not pe
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’22
Reply to How to access files when running XCTests in Ventura. Currently I receive "unauthorised access" errors.
Isn’t that the expected outcome? Oooo, negative questions are hard to answer in English (-: I ran a quick test of a regular app on macOS 13. Granting Full Disk Access to the app avoids the need for Files and Folders > Removable Volume. So this problem is somehow related to xctest. I then retried using a Swift package. Specifically, I created a simple package: % swift package init and modified the test like so: % cat Tests/TestTests/TestTests.swift import XCTest @testable import Test final class TestTests: XCTestCase { func testExample() throws { let url = URL(fileURLWithPath: /Volumes/TCCTestRemovable/test.txt) let d = try Data(contentsOf: url) print(count:, d.count) } } where TCCTestRemovable is a removable volume. Running this test from Terminal works: % swift test … count: 14 That’s because Terminal on my Mac has the Files and Folders > Removable Volumes privilege. In TCC parlance, Terminal in the responsible code for any programs you run from the shell. If I remove that privilege, the test fails: %
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’22
CloudKit - How to use Configurations to properly segregate public and private data
I am trying to understand the concepts between two of the CloudKit code samples: CoreDataCloudKitDemo, which shows sync between CoreData and CloudKit CoreDataFetchedProperty which shows how you can keep public and private data in two CoreData configurations and join them together. After some trial and error I created a single NSPersistentCloudKitContainer that I thought used the two separate configurations - each had it's own local persistent store, database scope was set properly for both stores, etc. But when I run the app it complained of the following: Failed to load persistent stores:Error Domain=NSCocoaErrorDomain Code=134060 A Core Data error occurred. UserInfo={NSLocalizedFailureReason=CloudKit integration does not allow relationships to objects that aren't sync'd. The following relationships have destination entities that not in the specified configuration. EntityA: entityB - EntityB So, I went back to the model and although I had created two separate Configurations (with EntityA in one and
2
0
1.3k
Oct ’22
SWIFT: Unable to downlaod larger files from aws bucket using transfer utility
I have a swift application and there is a requirement to download mp4 files from AWS bucket. I'm able to download file with smaller sizes but can't download files above particular sizes say 2GB and its depend on device too. While trying to download such kind of files, getting the below error `Failed with error: Error Domain=NSCocoaErrorDomain Code=256 The file couldn’t be opened. Also noticed that when trying to download 140 files with size of 100 MB each only able to download a maximum of approximately 100 files, after that I got the same error. Is there any such limit on iOS for downloading files.
3
0
1.2k
Oct ’22
Cannot delete files inside app's Documents directory
Hi. I've been struggling with this for quite sometime, and none of the solutions here or on StackOverflow work for me. In the app's Documents directory I create an images folder, and inside it there are many other folders and each one contains images. I do have permissions to create and read each folder and image, but I can't delete them. I get the following error: Error Domain=NSCocoaErrorDomain Code=513 “Front” couldn’t be removed because you don’t have permission to access it. UserInfo={NSUserStringVariant=(Remove), NSFilePath=/var/mobile/Containers/Data/Application/643B50DD-8696-4C5D-9EC2-106AFE317B8B/Documents/horseImages/54da3ac3-bdbc-4670-a848-b507abf5fcc0/Front, NSUnderlyingError=0x280e12a00 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}} I create the folders like this: try fileManager.createDirectory(at: imagesUrl, withIntermediateDirectories: true, attributes: [:]) but I also tried setting the attributes as nil, and also giving the .posixPermissions key a 777 value. The wa
2
0
2.0k
Oct ’22
App always opening up to white screen
I am currently trying to run my app in release mode on my iOS device and every time the app starts up, it only displays a white screen. In the device logs I see this when the app is first launched: Error loading metadata for com.outlit.app: Error Domain=ASDErrorDomain Code=513 Loading failed for '/private/var/containers/Bundle/Application/6C87729B-A97F-4D3E-BA9F-ADEADF6BD28A' UserInfo={NSDebugDescription=Loading failed for '/private/var/containers/Bundle/Application/6C87729B-A97F-4D3E-BA9F-ADEADF6BD28A', NSUnderlyingError=0x100e11a30 {Error Domain=MIInstallerErrorDomain Code=78 Failed to read iTunesMetadata.plist from /private/var/containers/Bundle/Application/6C87729B-A97F-4D3E-BA9F-ADEADF6BD28A/iTunesMetadata.plist UserInfo={NSLocalizedDescription=Failed to read iTunesMetadata.plist from /private/var/containers/Bundle/Application/6C87729B-A97F-4D3E-BA9F-ADEADF6BD28A/iTunesMetadata.plist, LegacyErrorString=InvalidiTunesMetadataPlist, FunctionName=+[MIStoreMetadata metadataFromPlistAtURL:error:], SourceFileLi
1
0
1.8k
Oct ’22
Running unit tests on iOS 11 device from Xcode 14 fails
There appears to be an interoperability issue between Xcode 14 and iOS 11 devices. Specifically with libswiftCoreGraphics.dylib. I build a Swift based framework that has a deployment target of iOS 11. When I build the SDK with Xcode 13.4.1 and run the unit tests on iOS 11, everything works as expected. When I switched to Xcode 14, it continually fails when attempting to run the unit tests on an iOS 11 device. I began digging into this and was trying to determine if it was an issue with some dependency or something in my project. I created a test project with Xcode 13.4.1, Xcode14-iOS11_Bug, which consists of a simple Swift application and one unit test file. When I run the unit from Xcode 13.4.1 targeting an iPhone 7 running iOS 11.4.1, it runs as expected. I then opened the same project with Xcode 14 and attempted to run the unit test I am greeted with the same error about libswiftCoreGraphics.dylib not being loaded. 2022-09-14 15:19:00.871686-0400 Xcode14-iOS11_Bug[616:100103] Failed to load test bundle fro
3
0
3.6k
Sep ’22
Save 48MP ProRaw to PhotoLibrary may fail
After took 48MP ProRaw photo, captureOutput:(AVCapturePhotoOutput *)output didFinishProcessingPhoto write to photo library use [PHPhotoLibrary sharedPhotoLibrary] performChangesAndWait: or [PHPhotoLibrary sharedPhotoLibrary] performChanges There is a high probability of failure No matter use fileURL or [photo fileDataRepresentation] failure info below 2022-09-28 10:43:57.353815+0800 LUTCamera[2031:218103] [GatekeeperXPC] Error received from proxy factory in sendChangesRequest:usingProxyFactory:error:: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.photos.service was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid. UserInfo={NSDebugDescription=The connection to service named com.apple.photos.service was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.} 2022-09-28 10:43:57.354114+0800 LUTCamera[2031:218103] [PhotoKit] PhotoKit XPC proxy is invalid.
1
0
1.6k
Sep ’22
MusicKit play back with Mac Catalyst seems not be working.
I have be trying to use the sample code project associated with WWDC21 session 10294: Meet MusicKit for Swift, with Catalyst. The apps works on mac correctly excepted the playback and the barcode scanning (that is out of my scope) The following message is displayed continuously: MusicAlbums[30849:533531] [SDKPlayback] Failed to obtain synchronousRemoteObject: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.Music.MPMusicPlayerApplicationControllerInternal was invalidated: failed at lookup with error 3 - No such process. UserInfo={NSDebugDescription=The connection to service named com.apple.Music.MPMusicPlayerApplicationControllerInternal was invalidated: failed at lookup with error 3 - No such process.} Before diving deeper i wanted to know if some of you have been able to play music via MusicKit with Mac catalyst? The sample code uses an ApplicationMusicPlayer.shared that is not available directly on macOS. (In fact none of the Music players are available) Would yo
6
0
3.3k
Sep ’22