Here is a customizable iPhone mount for iPhone 4 to iPhone 5s. By default the mount has the size of an iPhone 5 with an Apple bumper but you can customize it to fit an iPhone 5 without bumper or an iPhone 4 (or maybe any other phone, I did not test it yet).
The mount is attached to the bike with cable ties and can be used horizontally or vertically. Even the radius of the bike's tube (is it called so?) can be adjusted.
To save material you can adjust the width of the bridges as well.
In the settings you now can define "wallwidth" for the width of the outer wall parts. Sometimes they broke too easy so using a width of 4 mm is a good choice.
Here are some settings for the Samsung Galaxy S9 without a case:
width = 69;
wallwidth = 4;
length = 147;
height = 8;
bridgewidth = 15;
cornerradius = 7;
To assemble the mount first print all elements out. I recommend using suppoort material for the mount.
When the holder is too small thats bad. But when it is a little too big, you can put your phone in and squeeze the side bars right after printing when it is still warm.
Next you can decide in which direction you want to use the holder. So push-slide the two pieces together like you need. I designed the mount to have a little space for easier assembly but it can be that it wobbles around. So you can put some paper between the pieces (dirty hack, I know). The reason for the space is that my printer does not print precise enough.
Use two cable wires to attach the mount to the bike and start driving!