The PHB says that
A shield is made from wood or metal and is carried in one hand. Wielding a shield increases your Armor Class by 2. You can benefit from only one shield at a time.
Emphasis on "carried" and "wielding", because the Darkness spell description says that:
If the point you choose is on an object you are holding or one that isn't being worn or carried, the darkness emanates from the object and moves with it. Completely covering the source of the darkness with an opaque object, such as a bowl or a helm, blocks the darkness.
This left me a little confused as wielding and carrying seems to be two different things for the spell.
Another interpretation of the spell could be that you can't cast it on something that another creature is wearing or carrying, to avoid situations like "I cast it on his/her weapon/shield/armor" and just leaving the creature on darkness without it knowing where/what the source is.
If I can't cast it on my shield, is there any way to cast it on my weapon without wasting an action as the arcane focus occupies my other hand?
I've seen this answer, I could try to convince my DM to sell me a rapier that doubles as an arcane focus, but I doubt that he'll allow it.