CB-6329 added logic to collect callbacks

When more than one platform is present in the project, with the first
callback the promise is resolved, so the other callbacks are ignored, so
I've added some logic just to collect all callbacks, and then resolve
the promise without any problem.