How to (almost) create your own iPhone OS framework
2010-04-19 16:13:00 来源:WEB开发网As of iPhone SDK version 2.1, it doesn't seem to be possible to package your own code into an iPhone OS framework. Messing around with OS X 10.5 framework build options didn't yield any useful results for us. The closest we got is a static library built for each platform (iPhone OS and the Aspen simulator), bundled up into one file (using a command line tool called 'lipo') and a set of header files that you would reference in order to use the library.
Setting: You have several implementation files with the corresponding header files that you'd like to reuse in another iPhone app project.
Step 1: Create static libraries for iPhone OS and iPhone Simulator.
You need to create one "static library" build target for each platform in an empty project. Create a new "Window-Based Application" project for iPhone OS. Delete all source and NIB files and remove all references to frameworks that your library won't be using. Keep the .pch file. Remove the existing build target. At this point, your project should look something like this:
In order to bundle lib files for different platforms into one, we need to build them separately first. To do that, create 2 new "Static Library" build targets, we'll call them 'PseudoFramework sim' and 'PseudoFramework dev' for Simulator and device, respectively. Add your library source and header files. In the build settings for target 'PseudoFramework sim', click on 'Base SDK' and select 'Simulator - iPhone OS'; 'PseudoFramework dev' should be using the 'Device - iPhone OS' Base SDK. At this point you should be able to build separate .a files by selecting "Active SDK"->"Use project settings" from the dropdown box on top, selecting your desired configuration (debug or release) and right-clicking on each target and selecting "Build" from the menu. At this
- ››TOscilloscope 仿Windows任务管理器CPU使用记录组...
- ››How to Make a Dark, Post-Apocalyptic City Illu...
- ››tomcat不支持TCP/IP6协议
- ››tomcat 下的 url 大小写问题
- ››tomcat6.0.28 内存溢出PermGen Space
- ››Tomcat 系统架构与设计模式,第 2 部分: 设计模式...
- ››Tomcat 系统架构与设计模式,第 1 部分: 工作原理...
- ››How to (almost) create your own iPhone OS fram...
- ››TOMCAT和IIS整合
- ››Tomcat性能调优方案
- ››Tomcat6 下 MySQL 5.1 数据源配制
- ››Tomcat启动分析server.xml
更多精彩
赞助商链接