Search results for

NSCocoaErrorDomain

1,063 results found

Post

Replies

Boosts

Views

Activity

Reply to Simulator issues with AUv3 Example code
I had this same error, in case I am compiling for watchOS.2017-07-07 18:18:19.403968-0300 TestingAV WatchKit Extension[7368:2935401] [audiocomp] 178: registration server connection invalidated2017-07-07 18:18:19.404003-0300 TestingAV WatchKit Extension[7368:2928791] [audiocomp] 170: registration server proxy error: Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.audio.AudioComponentRegistrar was invalidated. UserInfo={NSDebugDescription=The connection to service named com.apple.audio.AudioComponentRegistrar was invalidated.}
Topic: Media Technologies SubTopic: Audio Tags:
Jul ’17
Recording audio PCM on WatchOS 4
At WWDC17, new recording features were announced for WatchOS 4. And I've been trying to get a PCM array, but I was not successful.Currently I tried to use the following code.Check AudioSession: override func awake(withContext context: Any?) { super.awake(withContext: context) let recordingSession = AVAudioSession.sharedInstance() do { try recordingSession.setCategory(AVAudioSessionCategoryPlayAndRecord) try recordingSession.setActive(true) recordingSession.requestRecordPermission() { [unowned self] allowed in DispatchQueue.main.async { if allowed { self.recordingSessionSuccessfulPermission() } else { self.recordingSessionFailPermission() } } } } catch { self.recordingSessionFailPermission() } }Start Record: @IBAction func startRecordButton() { label.setText(start record) let audioEngine = AVAudioEngine.init() let inputNode = audioEngine.inputNode let format = inputNode.inputFormat(forBus: 0) inputNode.installTap(onBus: 0, bufferSize: 8000, format: format) { (buf, wheb) in self.label.setText(It is working) } a
1
0
691
Jul ’17
Xcode 9 beta 3 crashes installing extra tools
I have downloaded Xcode 9 beta 3, renamed it as Xcode9b3.app and moved it to /Applications. When I run it, a popup appears telling me I need to install extra tools. Part way through the installation it crashes. I am running macOS Sierra 10.12.5.I'll paste the full crash report, but the bits that looks most relevant are:UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Error getting value for key 'supportedClass' of extension 'Xcode.IDEKit.CocoaTouchIntegration.Navigable.PreviewItemGroup' in plug-in 'com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration'Error Domain=NSCocoaErrorDomain Code=3588 dlopen(/Applications/Xcode9b3.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, 265): Symbol not found: _SimAudioHostUseSystemDefaultDeviceUIDn Referenced from: /Applications/Xcode9b3.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/Versions/A/../../../../Developer/Library/PrivateFrameworks/SimulatorKit.framework/Ver
7
0
2.6k
Jul ’17
Xcode 9 Beta 3 crashes trying to open
Just re-downloaded. Running on the Desktop - simply crashes when trying to open.Process: Xcode [26076]Path: /Users/USER/Desktop/Xcode-beta.app/Contents/MacOS/XcodeIdentifier: com.apple.dt.XcodeVersion: 9.0 (13199.7)Build Info: IDEFrameworks-13199007000000000~18Code Type: X86-64 (Native)Parent Process: ??? [1]Responsible: Xcode [26076]User ID: 501Date/Time: 2017-07-14 14:24:52.077 -0400OS Version: Mac OS X 10.12.5 (16F73)Report Version: 12Anonymous UUID: 689C28E5-9F31-365C-DC18-61B967290E8CSleep/Wake UUID: 7309525C-E105-4CB6-B2F4-D2CA9193F6C1Time Awake Since Boot: 43000 secondsTime Since Wake: 11000 secondsSystem Integrity Protection: enabledCrashed Thread: 0 Dispatch queue: com.apple.main-threadException Type: EXC_CRASH (SIGABRT)Exception Codes: 0x0000000000000000, 0x0000000000000000Exception Note: EXC_CORPSE_NOTIFYApplication Specific Information:ProductBuildVersion: 9M174dUNCAUGHT EXCEPTION (NSInternalInconsistencyException): Error getting value for parameter key 'name' of extension 'Xcode.InterfaceBuilderK
6
0
3.3k
Jul ’17
HKWorkoutRouteBuilder does not work
HiI get an error when doing insertRouteData of HKWorkoutRouteBuilder 😢.Error Domain=NSCocoaErrorDomain Code=4097 connection to service named com.apple.healthd.server UserInfo={NSDebugDescription=connection to service named com.apple.healthd.server}I would have allowed write permission of Workout Route.And I tried with the following code.let builder = HKWorkoutRouteBuilder(healthStore:healthStore, device: nil) let routeData:[CLLocation] = ... builder.insertRouteData(routeData) { (success, error) in if let e = error { print(e) } }iOS: iOS 11 beta 3WatchOS: watchOS 4 beta 3What should I do to solve this error?Thank you.
5
0
1.6k
Jul ’17
Getting started with bookmarks for sandboxed app in OS X
I'm adapting my App (OSX, XCode 8.3) to sandbox.I've created the entitlements for the app.I'm locked at the first step of writing a file.In the basic version, I do so :IBAction is called by menu item @IBAction func newDossier(_ sender: NSMenuItem) { let savePanel = NSSavePanel() savePanel.title = List file savePanel.prompt = Create let fileManager = FileManager.default savePanel.begin() { (result) -> Void in if (result == NSFileHandlingPanelOKButton) { let fileWithExtensionURL = savePanel.url!.appendingPathExtension(xxxx) // I call the file Theleme and select Desktop as location if fileManager.fileExists(atPath: fileWithExtensionURL.path) { // warning that file did exist already } else { // fileWithExtensionURL is written to a global var globalURL = fileWithExtensionURL let _ = writeAFile } } } } func writeAFile() -> Bool { let url = globalURL // fileWithExtensionURL from the NSSavePanel, stored in a global let data = NSMutableData() let archiver = NSKeyedArchiver(forWritingWith: data) // Call archiver.
2
0
1.8k
Jul ’17
Reply to Getting started with bookmarks for sandboxed app in OS X
To be a bit more precise:If I test data.write: let result = data.write(to: GlobalData.sharedGlobal.docURL! as URL, atomically: true)result is falseSo I'm in a ctach-22:- I cannot write because I would need to use a bookmark (If I understand how sandboxing works)- but cannot build the bookmark if the file does not exist let result = data.write(to: globalURL, atomically: true) do { let bookmark = try globalURL!bookmarkData(options: [.withSecurityScope], includingResourceValuesForKeys: nil, relativeTo: nil) } catch { Swift.print(error) } }Creating URL give error:Error Domain=NSCocoaErrorDomain Code=513 Vous n’êtes pas autorisé à enregistrer le fichier « xxxxxxxx » dans le dossier « Bureau ». UserInfo={NSFilePath=/Users/Me/Desktop/xxxxxxxxx, NSUnderlyingError=0x61800024bb50 {Error Domain=NSPOSIXErrorDomain Code=1 Operation not permitted}}I tried to use what I thought was an authorized directory : do { let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] as URL let
Jul ’17
Reply to File icon does not show for sandboxed app
Thanks,So I used : write(to:options:) instead let fileName = docURL!.lastPathComponent // data.write does not work with extension do { try data.write(to: fileUrl, options: [.atomic]) } catch { Swift.print(error) }I get the following error thrown : You are not authorized to save file Theleme22.xxx in Desktop directoryError Domain=NSCocoaErrorDomain Code=513 Vous n’êtes pas autorisé à enregistrer le fichier « Theleme22.xxxx » dans le dossier « Desktop ». UserInfo={NSFilePath=/Users/me/Library/Containers/com.company.AppName/Data/Desktop/Theleme22.xxxx, NSUnderlyingError=0x600000056920No error if I replace line 01 with let fileName = docURL!.deletingPathExtension().lastPathComponent // data.write works if extension deletedNote: surprisingly, auto completion indicates that write(to:options:) is deprecated, but it is not. If I option click on the func name, it calls the func information with the following Availability information :iOS (2.0 and later), macOS (10.4 and later), tvOS (9.0 and later), watchOS (
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’17
Problems with initializing UIDocumentPickerViewController after updating to iOS11 beta 5
After updating to iOS11 beta 5 initializing an UIDocumentPickerViewController:let documentPicker = UIDocumentPickerViewController(documentTypes: [public.zip-archive], in: .import)shows these messages at runtime:[DocumentManager] Failed to get the remote browser View Controller with error (Error Domain=NSCocoaErrorDomain Code=4097 connection from pid 508 UserInfo={NSDebugDescription=connection from pid 508}) [DocumentManager] Failed to get the service proxy object with error Error Domain=NSCocoaErrorDomain Code=4099 The connection from pid 508 was invalidated. UserInfo={NSDebugDescription=The connection from pid 508 was invalidated.} [DocumentManager] The view service did terminate with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 (null) UserInfo={Message=Service Connection Interrupted}The app is still running. But when I try to present the documentPicker it ends up with a white screen and a endless loading activityIndicator.
1
0
1.6k
Aug ’17
Core Data - Binary datastores with transformable attributes will not open
I store colours in my core data model using transformable attributes. Starting iOS11, this no longer works and I get an error like :... returned error Error Domain=NSCocoaErrorDomain Code=259 The file couldn’t be opened because it isn’t in the correct format. UserInfo={NSUnderlyingException=Can't read binary data from file, NSUnderlyingError=0x60000005cb00 {Error Domain=NSCocoaErrorDomain Code=259 The file “<Persistent store name>” couldn’t be opened because it isn’t in the correct format. UserInfo={NSFilePath=<Path to persistent store>, NSUnderlyingException=value for key 'NS.objects' was of unexpected class 'UIColor'. Allowed classes are '{( NSDictionaryMapNode, NSSet, NSDictionary, NSOrderedSet, NSDecimalNumber, NSUUID, NSNumber, NSNull, NSData, NSDate, NSURL, NSString, NSArray )}'.}}} with userInfo dictionary { NSUnderlyingError = Error Domain=NSCocoaErrorDomain Code=259 The file U201cEmpty.ragU201d couldnU2019t be opened because it isnU2019t in the correct format. U
6
0
4.2k
Aug ’17
CallKit integration with multi target application
integrate the app extension by using the guides from: https://developer.apple.com/documentation/callkit ;once the extension is created on our app and linked to the target and with the proper development certificate, we run the app;on system settings when we try to activate the extension we get the following error:Error Enabling Extension - An error ocurred while attempting to enable <Extension name>. On Call Blocking & Identification system settings.these are the system logs related to such error:Aug 11 16:08:07 iPhone Preferences(UIKit)[281] <Notice>: activate generator <_UIFeedbackImpactBehavior: 0x174110a10: prepared=1> with style: TurnOn; activationCount: 1 -> 0; styleActivationCount: 1 -> 0 Aug 11 16:08:07 iPhone Preferences(UIKit)[281] <Notice>: feedback engine <_UIFeedbackHapticEngine: 0x1744c4a60: state=0, numberOfClients=1, prewarmCount=0, _isSuspended=0> state changed: Inactive -> Activating Aug 11 16:08:07 iPhone Preferences(AudioToolbox)[281] <Notice&g
1
0
2.1k
Aug ’17
Reply to Read the files in that folder
I tried this code in my func restorebookmark, but still see nothing.print(Restoring (bookmark.key)) restoredUrl = try URL.init(resolvingBookmarkData: bookmark.value, options: NSURL.BookmarkResolutionOptions.withSecurityScope, relativeTo: nil, bookmarkDataIsStale: &isStale) do { let resourceKeys : [URLResourceKey] = [.creationDateKey, .isDirectoryKey] let enumerator = FileManager.default.enumerator(at: restoredUrl!, includingPropertiesForKeys: resourceKeys, options: [.skipsHiddenFiles], errorHandler: { (url, error) -> Bool in print(Print: directoryEnumerator error at (url): , error) return true })! for case let fileURL as URL in enumerator { let resourceValues = try fileURL.resourceValues(forKeys: Set(resourceKeys)) print(fileURL.path, resourceValues.creationDate!, resourceValues.isDirectory!) } } catch { print(error) }In the debug log I get this message:Restoring file:///Users/stefan/Documents/Print: directoryEnumerator error at file:///Users/stefan/Documents: Error Domain=NSCocoaErrorDomain C
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’17
Reply to Read the files in that folder
There was no update because you missed my point: you were able to save the bookmark by an accident, but your code was still wrong (AFAICT). I hesitate to provide sample code, because I'm not sure exactly what your requirements are (and it's not my job to do your job), but here:import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching (_ notification: Notification) { // Create the Application Support subfolder if necessary let fileManager = FileManager.default let appSupportURL = fileManager.urls (for: .applicationSupportDirectory, in: .userDomainMask).first!.appendingPathComponent (com.example.testbookmark) do { // Note: this will fail after the first time, but the failure will be detected when the bookmark file read is tried try fileManager.createDirectory(at: appSupportURL, withIntermediateDirectories: true, attributes: nil) } catch { } // Look for an existing bookmark to the Documents folder let bookmarkURL = appSupportURL.appendingPathComponent
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’17
can't open file for writing with FileHandle(forWritingTo: fileURL)
I'm trying to open a file for writing. I can get the URL but the FileHandle always comes back nil. Any idea why this won't work?let fileURL = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false).appendingPathComponent(test.tag) let file: FileHandle? = try FileHandle(forWritingTo: fileURL)file always comes back as nil. I get this error:Error Domain=NSCocoaErrorDomain Code=4 The file “test.tag” doesn’t exist. UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/0D688141-D9C2-4CD0-849F-A2CBC69E34CD/Documents/test.tag, NSUnderlyingError=0x1c465d760 {Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory}}Isn't the FileHandle call supposed to create the file? How else do you do it? The only other create file I can find is one that creates a file when you already have the complete contents to provide at the start, and I don't.Thanks!
4
0
7.1k
Aug ’17
Reply to HKWorkoutRouteBuilder does not work
I'm running iOS 11 beta 8 and still getting the same error.Error Domain=NSCocoaErrorDomain Code=4099 The connection to service named com.apple.healthd.server 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.healthd.server was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}I'm simply calling insertRouteData to insert 10 locations into the builder and it fails. Perhaps HKWorkoutRouteBuilder doesn't work on iOS. Perhaps HKWorkoutRouteBuilder isn't yet working in Beta 8 of iOS 11. Perhaps a workout session has to be open. Who knows? It just seems like creating a builder and inserting a few locations is the simplest use case that ought to simply work. I haven't even gotten to the point of calling finishRoute.
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’17