Alright, got this working, you got to have root access with admin as group and SetUID flag should be set to write to that specific location. What i did is, i saw the directory structure of Cydia.app and compiled my app according to that(e.g. Cydia and Cydia_).
Rename your app name to YourApp_ and make a new file named YourApp and post the text below into it, set the proper permissions and you are good to go.
#!/bin/bash
C=/${0}
C=${C%/*}
declare -a flags
exec "${C:-.}"/MyApp_"${flags[@]}" -- "$@" 2>>/tmp/MyApp.log`
BTW YourApp binary should have a permission of 4755 to setuid flag as well.