得到程序包路径

 NSString *sourcePath = [[NSBundle mainBundle]resourcePath];

原文地址:https://www.cnblogs.com/Bo-tree/p/5161383.html