Xcode创建动态库

1.用Xcode打开如下2个xcspec文件:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/iPhoneOSPackageTypes.xcspec
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/MacOSX Package Types.xcspec

2.把MacOSX Package Types.xcspec中Identifier为com.apple.package-type.mach-o-dylib的item复制到iPhoneOSPackageTypes.xcspec

3.把MacOSX Product Types.xcspec中Identifier为com.apple.product-type.library.dynamic的item复制到iPhoneOSProductTypes.xcspec

以上为真机,模拟器类似,路径在:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/

 

1.把/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/Framework & Library/Cocoa Touch Static Library.xctemplate整个文件夹复制并改名为Cocoa Touch Dynamic Library.xctemplate

2.修改Description中的"a static library"为"a dynamic library"
修改Identifier中的"cocoaTouchStaticLibrary"为"cocoaTouchDynamicLibrary"
修改Description中的".static"为".dynamic"

 

1.Installation Directory设置为@executable_path/

UIWebView与CRITTERCISM冲突

问题描述:
今天做TAG,UIWebView有时正常。有时无任何显示,并报如下错误:

2013-12-05 14:49:49.028 TAG[2680:c817] void SendDelegateMessage(NSInvocation *): delegate (webView:decidePolicyForNavigationAction:request:frame:decisionListener:) failed to return after waiting 10 seconds. main run loop mode:

问题解决:
网上搜了一圈。原因是UIKit不支持多线程,必须在主线程上修改。具体原因是UIWebView是CRITTERCISM冲突,UIWebView需要在CRITTERCISM前初始化,但是项目里办不到。因为项目用了Segment.io,所以直接off了。

CocoaPods编译link错误Bug

问题描述:使用CocoaPods加了TestFlight类库:pod 'TestFlightSDK', '~> 2.0.2'

报如下错误:"_OBJC_CLASS_$_TestFlight", referenced from:

问题解决:先是觉得会不会和Crashlytics冲突,结果Google了很多,试了很多,最后试了如下方子成功!

In the Build Settings, do not override "Other Linker Flags". If it is bold, select it press backspace, it should be back to its normal state. If it is not fixed, delete all flags, remove and reinstall Pods and that should fix it.

可能是Other Linker Flags自定义的时候CocoaPods就不更新的关系。

iOS设计开发工具

参考:http://ios.devtools.me

 

内容

LittleIpsum随机文字
lorempixel随机图片

设计

iOS FontsiOS支持字体
App Icon TemplatePhotoshop APP icon设计模板
PrepoAPP icon各尺寸生成
Resizer@2x或者-hd图片自动生成低清版本图片
SlicyPhotoshop自动切图(支持png、jpg、+@2x)
ImageOptimImageAlpha减少图片大小
PaintCode适量画图生成代码
Skala PreviewPhotoshop、Illustrator等同步到iPhone、iPad
xScope测量工具九合一

文档

CocoaDocs在线文档
AppleDoc生成文档
Dash查看文档

类库

GitHub类库查询
SourceTreeGit软件
CocoaPods类库管理

测试

chiselLLDB调试命令增强集

TestFlight测试版本发布
CrashlyticsCrash记录工具

Frankk自动化UI测试

其他

Skala Preview原型设计,相当于APP上的Axure RP
iOS Support Matrix各iOS设备、各iOS版本功能矩阵
Parse推送服务,以及数据储存服务
Particle Designer粒子系统
App Annie统计分析工具
Glyph Designer数据接口访问记录
Developer Color PickerXcode颜色拾取器

SimPholders模拟器目录工具

CocoaDeveloper Quicklook Plugin快速查看.ipa和.mobileprovision信息插件

FuzzyAutocompletePluginXcode5自动完成代码插件

正则表达式

ReggyiOS官方正则表达式类库检查工具

Reginald RegEx explorer第三方正则表达式类库RegexKitLite检查工具

更新CocoaPods需要Xcode命令行工具

问题描述:想更新CocoaPods,在终端运行sudo gem update cocoapods,出现如下错误:

Updating cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/xcodeproj-0.13.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/xcodeproj-0.13.1/ext/xcodeproj/gem_make.out

问题解决:Go to Xcode, Preferences -> Downloads,download Command Line Tools.