自从10月16日苹果发送给所有开发者的那一封信,通知了程序内购买将可用于免费应用,我认为这也宣告了LITE版的时代结束。
成千上万的免费版的软件或游戏,将作为限制了功能的完整版免费发售,如果用户觉得有意购买,可以直接解锁完整版的功能或购买附加内容。
本文讲阐述如何为你现有的应用或游戏添加程序内购买(In App Purchase)功能。
阅读前提:假设了你拥有一定的iPhone SDK开发基础,和App Store实践经验。 Continue Reading »
Xcode 3.2引入了Clang的代码静态分析功能,在项目设置中替换默认编译器即可开启。
唯一的不足就是xcode 3.2只能安装在snow leopard,对于没有升级的开发者来说比较遗憾。
leopard最新的只有3.1.4,支持使用Instruments通过Wifi调试,据说3.2xcode支持wifi调试。(需要OS 3.1)
Overview 
Architecture 
Usage 
Device vs. Simulator
Taking advantage of the differences
the code for detect
if TARGET_IPHONE_SIMULATOR
// Simulator-specific code
else
// iPhone-specific code
end

今天在项目里准备把管理功能移进后台系统,于是创建根据controller的examples创建了一个模块:
Modules Example:
./script/generate controller 'admin/credit_card' suspend late_fee
Credit card admin controller with URLs /admin/credit_card/suspend.
Controller: app/controllers/admin/credit_card_controller.rb
Views: app/views/admin/credit_card/debit.html.erb [...]
Helper: app/helpers/admin/credit_card_helper.rb
Test: test/functional/admin/credit_card_controller_test.rb
./script/generate controller 'admin/credit_card'
因为安全方面的问题,文章里的module名都用帮助实例里的名字代替。
我使用如上的方法创建了一个module以后,在浏览器里是直接不能访问的,于是又在routes.rb里添加路由映射的命名空间:
map.namespace :admin do |admin|
admin.resources :credit_card
end
这样做了以后就有一个奇怪的现象产生。
Continue Reading »