- Open below directory in Finder with Cmnd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
- 
Open IDETextKeyBindingSet.plistwith a text editor.
- 
Add the content of IDETextKeyBindingSet.plist (see below) to this file 
- 
Open Xcode and go to Xcode preferences->Key Bindings->Text tab-> Scroll till you seeDuplication
- 
Click on Duplicate Current Line, add a shortcut for it, eg.Cmd + D(remove any other bindings for this key)
😎