NSUbiquitousKeyValueStore failing on macOS Sierra - macos

When I call NSUbiquitousKeyValueStore's synchronize method after running my app directly from Xcode on macOS Sierra, it returns false and following error is printed in Console.app:
Refusing TCCAccessRequest for service kTCCServiceUbiquity from client
com.apple.dt.Xcode in background session
As far as I can tell, changed keys are not saved to iCloud. They are remembered in memory locally but lost after app re-launch.
I believe all my entitlements are set correctly (iCloud KVS enabled in Capabalities of the project, all checked). Do I need to archive & export my app in order to debug / test iCloud on macOS?
Any ideas how to fix / workaround this?

Apple DTS has confirmed that this is an issue on Apple's side and they are working on that.
Update: Problem has been solved in macOS 10.12.1

Related

macOS app on Catalina through Xcode receives "TCC deny IOHIDDeviceOpen"

With Catalina out, I have took time to update and tried to run my app but I am facing a weird issue.
My app is monitoring key events therefore needing the new authorization to monitor inputs.
If I run through the signed bundle, I do get the warning telling me to turn it on in the system preferences which I do. It then works fine.
If I do the same running through Xcode or through Iterm2, I always have the "TCC deny IOHIDDeviceOpen". I have tried to authorize products of the build but it does not change anything.
Anyone with an idea ?
If that doesn't work, make sure your terminal program (e.g. iTerm.app) is also checked in the "Input Monitoring" permissions.
I had a similar problem. I found that removing all entries for my app from System Preferences->Security & Privacy->Input Monitoring and then re-running under Xcode worked. It is almost like Catalina recognises the app as one in the store and doesn't ask about turning support on but then sees it as a different app when it actually comes to opening devices

Failed to boot IBSimDeviceTypeiPad2x

Accessing storyboard hangs xcode, then throws error below.
This happens for newly created project, on newly (re)installed xcode.
I've tried xcrun simctl commands, there is no device with UDID: 9C08E254-108D-49F6-A1FC-CE43B2F30EB9.
Not clear which device IBSimDeviceTypeiPad2x is.
Deleted and recreated all iPad devices in Simulator.
iPad 2 is not possible on iOS 11.4
Have already done complete uninstall and reinstall of xcode (including removing ~/Library/Developer / Cache / Application Support stuff.
Problem persists.
Error:
Encountered an error communicating with Interface Builder Cocoa Touch Tool.
(Failure reason: Interface Builder Cocoa Touch Tool failed to launch):
Failed to boot device IBSimDeviceTypeiPad2x (9C08E254-108D-49F6-A1FC-CE43B2F30EB9, iOS 11.4, Shutdown)
System content for IBCocoaTouchFramework-ElevenAndLater <IBScaleFactorDeviceTypeDescription:
0x7f93a450bec0> scaleFactor=2x (Failure reason: Failed to boot IBSimDeviceTypeiPad2x (9C08E254-108D-49F6-A1FC-CE43B2F30EB9, iOS 11.4, Shutdown)):
Unable to boot the Simulator. (Failure reason: launchd failed to respond.)
launchd_sim log contains:
missing or invalid configuration plist
xcode version:
Version = 9.4.1 (9F2000)
Plugin Version = 14113
Beta Version = 0
OS Version = 10.13.6 (17G65)
In case this helps anyone else with this issue: after weeks of back and forth with Apple Support, we tracked this down to either third party kernel extensions or third-party antivirus. After thoroughly ensuring both were disabled, Storyboard editing became available again. In my case, it was most likely Little Snitch that was interfering (make sure both Network Filter & Network Monitor are set to the "off" position). There could potentially be a Little Snitch rule that's interfering as well, I haven't spent enough time to track it down yet.
I have been struggling with this for some time, filed a bug report with Apple and they claimed I didn't have permission. No reference to what permissions.
Towards the bottom of the log file from the bug report was the following text.
"You don’t have permission to save the file “60ACC3A5-E7E2-4330-869B-15447826C019” in the folder “CoreSimulator”." UserInfo={NSFilePath=/Users/terryburdett/Library/Logs/CoreSimulator/60ACC3A5-E7E2-4330-869B-15447826C019, NSUnderlyingError=0x7fda1871c8b0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}}}}
Follow the path to Logs and getinfo on Logs folder. If your name isn't in the sharing and permissions list, unlock the folder and add it. Change permissions to read/write. Next time you run Xcode it should create an CoreSimulator folder in the Logs folder and compile without bug.

LLDB RPC server freezes app

For the past months I have not been able to debug macOS or iOS apps through Xcode. What happens is the following:
Build and run app from Xcode.
Xcode says app is running, but no app has appeared and no debug output from app either.
Kill the process lldb-rpc-server.
App appears and runs as normal, but Xcode is no longer debugging.
Start a new debugging session by attaching it to the app's process.
App freezes again, until lldb-rpc-server is killed.
This OpenRadar has the same description.
I have tried re-installing Xcode (including command-line tools), but it didn't help. Any ideas?
Xcode: Version 9.3.1 (9E501)
MacOS: 10.13.4 (17E199)
The cause of this was that I had installed a GDB/LLDB-extension called Voltron. I was unaware that the installation also created/modified the .lldbinit in the home folder. Removing this file fixed the issue. See also this issue for Voltron.
Got some very good help from Apple.
I had received this warning msg when device was locked and I was running app on device, so when device is unlocked this warning goes

Message from debugger: unable to attach error for osx app

I have been building mac app on my mac mini and it always worked well but today i faced this error, searched a lot but no luck.
Message from debugger: unable to attach
What i tried:
Clear derived data
Quit Xcode
Restart machine
installation directory set to blank and also to /Applications
Tried Skip Install No / Yes
Using developer Signing certs
M using only Developer certificates and not provisioning profile to sign my cocoa app
Xcode 8.2
OSX 10.12.1
Please help :)
This is what fixed it for me, perhaps it will help others but I do realize the question was for 8.2. I had it set to Xcode 9 "New Build System" disabling this and switching to "Standard Build System" in the Project Settings under the File Menu. I had tried all the other things like killing DerivedData, clean build, restarting Xcode. I also verified that my dependent libraries were set correctly. The only thing that worked was disabling new "New Build System"
I just had this problem today. I have little demo code in a mac project(created with Xcode 9.4). This error just started to occur after I upgraded system to macOS Mojave 10.14. However, in Xcode 10 this project runs no problem(without changing anything). If you can use Xcode 10 it will probably be fixed.
Unfortunately, the above solutions didn't work for me (although I am sure they work for some people).
Here is what worked for me, in case this helps anyone else:
Close Xcode
Open Xcode and Create a new Xcode project
In the iOS template, select Single View App then click Next
yes, I know you are trying to get a macOS app attaching to the debugger :).
Give the iOS app any product name and organization identifier you would like and click Next
Create the new project anywhere you would like (I saved it to my desktop)
Build and run (cmd + r) the iOS app on a simulator like the iPhone 8 (starting a simulator and running the iOS app will take a little time, so have patients)
After the iOS app runs in the simulator, click to stop it from running (the stop button is next to the run button)
Open your macOS app that you are having trouble connecting a debugger to, and build and run it (cmd + r)
This, for some reason, allowed me to connect to the debugger with my macOS app...
Xcode version: 10.1, macOS Mojave version: 10.14.2

Xcode quit unexpectedly while using the dsc_extractor.bundle plugin

When I attach my new iPhone 5s to my Mac, Xcode crashes with this error:
Xcode quit unexpectedly while using the dsc_extractor.bundle plugin
This happens while Xcode is processing symbols from the device.
It all works fine on my iPad4 which is running IOS 6.1.3.
I updated MacOS to Maverick, I reinstalled Xcode and I still have the same error.
My current Xcode version is 5.0.2 (3335.32), iPhone IOS is 7.0.4 (11B554a).
For me it worked out when I delete the "~/Library/Developer/Xcode/iOS DeviceSupport/(iOS Version of the device)" folder. It is recreated next time, when the device is connected to the Mac and Xcode is running.
A previous restore of the iPhone 5S did not help and I had no problems to connect the device to another Mac. So it seems to be an issue only on the Mac and not on the device.
I use a 5S both with a MBPro/Mavericks and regular MB/Snow Leopard; it works fine. Something is messed up on your system, I suspect. Any 3rd party extensions? Try logging out, and logging back in with the shift key down (prevents extensions from loading).
I formatted hard drive and re installed Maverick and that did the trick.

Resources