Xcode3.2.6+iOS4.2無法上傳iPhone

  • warning: Declaration of views_handler_argument::init(&$view, &$options) should be compatible with views_handler::init(&$view, $options) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_argument.inc on line 745.
  • warning: Declaration of views_handler_filter::options_validate(&$form, &$form_state) should be compatible with views_handler::options_validate($form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 585.
  • warning: Declaration of views_handler_filter::options_submit(&$form, &$form_state) should be compatible with views_handler::options_submit($form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 585.
  • warning: Declaration of views_handler_filter_boolean_operator::value_validate(&$form, &$form_state) should be compatible with views_handler_filter::value_validate($form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 149.
  • warning: Declaration of views_plugin_style_default::options(&$options) should be compatible with views_object::options() in /home/xnvgu7/public_html/sites/all/modules/views/plugins/views_plugin_style_default.inc on line 25.
  • warning: Declaration of views_plugin_row::options_validate($form, &$form_state) should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.
  • warning: Declaration of views_plugin_row::options_submit($form, &$form_state) should be compatible with views_plugin::options_submit(&$form, &$form_state) in /home/xnvgu7/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.

Xcode3.2.6+iOS4.2無法上傳iPhone:2011年04月04日星期一

若最近下載了Xcode3.2.6,選了Device/Debug後想將程式上傳iPhone測試,卻不成功,而有以下message,可繼續讀本文。

Can’t install application

The Info.plist for application at /Users/admin/Desktop/abc/def/build/Debug-iphoneos/def.app specifies a minimum OS version of 4.3, which is too high to be installed on someiPhoneDevice

原因:Xcode每一版本事先設定support的iOS版本不同,例如Xcode3.2.5 support版本 iOS4.2,Xcode3.2.6 support版本 iOS4.3。所以,當Xcode3.2.6遇上iOS4.2的oPhone(以上例,就是someiPhoneDevice是iOS4.2),就不行了,這個問題以前曾讓我停了一、兩星期才搞清楚,解法卻非常簡單。

解法:

  1. 打開project後,找Targets下那一個...app,以上例,就是def.app。用右鍵點def.app後,出現Target "def " Info畫面,點Build,在Architecture下的Base SDK,可看到其右為Latest iOS(iOS4.3),點一下這個Latest iOS(iOS4.3),可選Current MAC OS/MAC OS X SDKs/iOS SDKs/Other..,但iOS SDKs下只有 iOS4.3及Latest iOS(iOS4.3)。因而,Base SDK一定是iOS4.3。用這個Base SDK compile後,遇上 someiPhoneDevice不是iOS4.3,就無法install了(Can’t install application)。
  2. 解決之道是:仍在Target "def " Info畫面,點Build,往下scroll至Deployment那一大欄下,有iOS Deployment Target,其右現在是iOS 4.3,Click iOS 4.3後會出現一排iOS什麼什麼的,我的畫面是iOS3.0, iOS3.1, iOS3.1.2, iOS3.1.3, iOS3.2, iOS3.2.1, iOS3.2.2, iOS4.0, iOS4.0.1, iOS4.0.2, iOS4.1, iOS4.2, iOS4.3。如果選iOS3.0,則iOS3.0以上均support,我以前用Xcode3.2.4時選iOS3.2,因為iOS3.2有不少新功能(若選iOS3.0會不work)。現在Xcode3.2.6已有更多功能,我至少只能選iOS4.0了,因Xcode3.2.5~3.2.6加了許多iOS4才有的功能,我用了這些功能,若選iOS4.0以下,程式會不work。

注意事項1:既然我的iPhone是iOS4.2,何不直接選iOS4.2?

原因是,你的A/P上App Store後,這個iOS Deployment Target同時也是給使用者用的,如果你選iOS4.2,若使用者的iPhone內只有iOS4.1,那他就不能下載你的A/P。

注意事項2:在error message中有The Info.plist for application ... 字樣,所以很多人會在Info.plist內找,這就是我過去讓我停了一、兩星期才搞清楚的地方。