With all due respect to Benxine, I found that nothing described helped to solve my issue. I tried the following and have documented it here in order to potentially help some others.
BOTTOM LINE: I had to reinstall the OS to solve the issue
Original issue described below:
I cannot connect my iPad to iTunes and receive the error "iTunes cannot connect to this iPad. Could not allocate a resource". Same for my iPhone but the error reads "iTunes cannot connect to this iPhone. Could not allocate a resource". It shows the triangle caution sign with an exclamation mark and the iTunes logo with the error message.
The basics:
iPad is running iOS 7.1.2 and iPhone is running iOS 8.3 (each has own iTunes library)
Mac is running OS 10.9.5
iTunes is version 12.1.2.27
Tried different cables. Issue still exists
Rebooted Mac as well as both iPhone and iPad. Issue still exists
Added the “lockdown” folder as it was missing. The file /var/db/lockdown is empty except system configuration folder. Issue still exits. Please see note below ***
Started in safe mode and have the same issue.
Download and reinstalled iTunes (12.1.2). Issue still exists.
Deauthorized/reauthorized computer. Issue still exits.
Backed up iPad to iCloud and reset the iPad to factory settings. Restored from iCloud backup. Issue still exists.
Created new iTunes library for iPad. Reset iPad to factory settings. Basically, made it a new iPad. Same issue.
Looked for file com.ghughes.wifisync.root.plist in Library>Launch Daemons but it was not there so could not throw it away. Same issue.
Looked for Wi-Fi Sync folder in Library>Application Support folder but it was not there so could not throw it away. Same issue.
When iPhoto opened (as it should when a device is attached either iPad or iPhone), it gave an error message “Photos on the device <name of device> cannot be imported because the device is locked with a passcode” “you must unlock device to import them” BUT THIS IS INCORRECT as the iPad has no lock or passcode.
The "trust computer" is hit on the device yet nothing changes.
***PLEASE NOTE that when looking at my other MAC computer that sinks other family devices fine (also running 10.9.5 and iTunes 12.1.2.27), there is no /var/db/lockdown file on that computer......
Searched the internet and found so-called solutions but none of them worked. I do not understand why one cannot reset a device to factory settings and then start from scratch. It tells me that something is wrong with iTunes or the OS. I do not want to reinstall the OS but I fear that is the next step.
Ultimately, reinstalling the OS solved the issue.
Hope this helps those who did a google search and landed here first as I did.
😎