How to properly import examples for RedBearLab's nRF5 into PlatformIO?

I’ve got into the same trouble as the author of the BLE Nano as central issue and wish if anyone can help.
I’ve imported BLE_CentralTest example from Arduino and tried to build it for nRF51822 with PlatformIO, but got stuck on “BLE_API.h: No such file or directory” error. I’ve tried to select PlatformIO or Arduino as a library manager upon project import, but no luck. Also. there is no such error if to build the same sketch using Arduino IDE.
Should Arduino core from RedBearLab be used instead of the one provided with nordicnrf51 platform? Then is it possible to setup and use a custom Arduino core in PlatformIO?

Just in case - related PlatformIO project files can be found at https://we.tl/t-1wUlh59cwd

The problem is that that board is configured to use the nRF5 Arduino core from GitHub - sandeepmistry/arduino-nRF5: Arduino Core for Nordic Semiconductor nRF5 based boards. That core explicitly supports the redbear board: arduino-nRF5/variants/RedBear_BLENano2 at master · sandeepmistry/arduino-nRF5 · GitHub.

PlatformIO does not know about the rebear/nrF5x core, or uses it. Since the BLE_API.h file is contained in that unknown core which is not used, that compile error appears.

The 3 options are:

Do you need to use that exact core? Hm well the BLE library of the sandeepmistry core only supports peripheral mode not central mode, and says to use the headers of the softdevice (arduino-nRF5/cores/nRF5/SDK/components/softdevice/s130/headers at master · sandeepmistry/arduino-nRF5 · GitHub) directly.