Cocos2D-x 2.x and 3.x have very easy solution for multi-resolution problem ( either iDevices or Android devices) (and I think cocos2d-iphone should have a similar mechanism (maybe with different signature).
In fact you just need to set your
DesignResolution and then just imagine your target device will has this resolution.
If target device really has this resolution ( or some other but with same ratio) cocos2d will handle to fix screen and your game looks same in all devices.
And when ratio of target device is different, you have many option ( as cocos2d language,
policy) to manage that.
For example if you use
Exact fit policy, cocos2d will force your game ( and design) to fit target device screen (without that black boarder).
The entire application is visible in the specified area without trying
to preserve the original aspect ratio. Distortion can occur, and the
application may appear stretched or compressed.
For more detail just take a look at the official wiki.