Modify template of lua ios_mac config and some bugs