To shoot these type of images you have to be totally dialed in! It takes a bit of practice, but once you get the hang of it - it's a great option to have on hand when you don't happen to have a DSLR handy!
Step One: Download the Right App
I used Night Cap Pro to shoot these images, but there are other good options like Slow-Shutter app.
Step Two: Dial it In
The right app settings are crucial to pulling this off!
Here is a cheat-sheet for Light-painting with NightCap Pro:
1. Start off with selecting 'light trails' - tap the star icon on the right to toggle this option.
2. Just above the star is a lock button for once you get your settings down - don't do it yet, but just know it's there and that the green light should be on for at least 'FOC (focus)' and 'EXP (exposure)' options before you start your shot. 'WB (white balance)' is not something I used very often - I think it's set to 'auto' if you do nothing, which looks fine.
3. Adjust the exposure setting by sliding your thumb up on the right side of the viewer - I go with 1/2 - do this unless you want your light-lines to be dotted (no thanks!).
4. Set your ISO - I went with 50, but I've tried higher - 400 is ok, but it starts to get pretty noisy after 800.
5. Set your focus using the bottom slide-toggle - '0' is for super-macro stuff while I'd assume '100' would be for far away star-trails. I usually go with something from 69-75 - this is good for that 35mm look that most of us are familiar shooting with.
Step Three: Steady as She Goes
Please know that the camera has to be totally still while the long-exposure is happening! So use a tripod. If you don't have one handy - a coffee mug on a table will suffice (the dude abides):