Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 用于添加库的Xcode文件夹结构_Objective C_Xcode_Ios_Directory Structure - Fatal编程技术网

Objective c 用于添加库的Xcode文件夹结构

Objective c 用于添加库的Xcode文件夹结构,objective-c,xcode,ios,directory-structure,Objective C,Xcode,Ios,Directory Structure,我正在用X代码创建一个iPhone应用程序。我已下载该库以向我的web服务器发出请求。添加此库后,我的文件夹结构应该是什么样子?如果我对一般最佳实践进行粗略猜测,应该是这样的: in the folder 'Development': /project_1 /* my project that makes use of json and egocache */ /project_2 /* my project that makes use of json and three20 */ /proj

我正在用X代码创建一个iPhone应用程序。我已下载该库以向我的web服务器发出请求。添加此库后,我的文件夹结构应该是什么样子?如果我对一般最佳实践进行粗略猜测,应该是这样的:

in the folder 'Development':
/project_1 /* my project that makes use of json and egocache */
/project_2 /* my project that makes use of json and three20 */
/project_3 /* my project that makes use of three20 and egocache */
/...
/json-lib-github
/egocache-lib-github
/three20-lib-github 
etc...
  • 班级
    • Asittprequest
      • 阿什特前传
      • 阿什特前传
      • 阿什特前传类别2.h
      • ASHTTPRequestClass2.m
  • 其他来源
  • 资源
  • 框架
  • 产品

  • 班级
  • 其他来源
  • 资源
  • 框架
    • Asittprequest
      • 阿什特前传
      • 阿什特前传
      • 阿什特前传类别2.h
      • ASHTTPRequestClass2.m
  • 产品

在类文件夹中添加并在代码中使用include头是安全的。

我个人只将编译后的产品放在框架文件夹中。未编译类是“库”的一部分,我通常将其放入项目根目录下的实用程序文件夹中。我应该补充一点,最近我在我的项目中使用了越来越多的源代码,比如github。我喜欢将这些类型的项目放在我的开发文件夹的根目录中,例如:

in the folder 'Development':
/project_1 /* my project that makes use of json and egocache */
/project_2 /* my project that makes use of json and three20 */
/project_3 /* my project that makes use of three20 and egocache */
/...
/json-lib-github
/egocache-lib-github
/three20-lib-github 
etc...
在使用库的项目中,我创建了对这些项目的引用,这些引用同样是在当前项目根目录下的实用工具文件夹中创建的。这样,我的所有项目都可以共享github代码,并且我可以轻松地一次为我的所有项目更新这些库