<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_把牛牵到北京</title><subtitle type="text">杯具啊！</subtitle><id>http://feed.cnblogs.com/blog/u/13476/rss</id><updated>2011-06-28T09:16:47Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/13476/rss"/><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/06/28/2092474.html</id><title type="text">mse</title><summary type="text">1PublicClassgzlc2PublicSubNew()3EndSub4Private_YpcsxmIDAsInteger5PublicPropertyYpcsxmID()AsInteger6Get7Return_YpcsxmID8EndGet9Set(ByValvalueAsInteger)10_YpcsxmID=value11EndSet12EndProperty</summary><published>2011-06-28T09:17:00Z</published><updated>2011-06-28T09:17:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/06/28/2092474.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/06/28/2092474.html"/><content type="html">&lt;div style="background-color: #F5F5F5;border: 1px solid #CCCCCC;padding-left:5px;padding-right:5px;"&gt;&lt;div&gt;&lt;div style="background-color: #F5F5F5;border: 1px solid #CCCCCC;padding-left:5px;padding-right:5px;"&gt;&lt;div&gt;&lt;span style="color: #008080; "&gt;&amp;nbsp;1&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #0000ff; "&gt;Public&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Class&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;gzlc&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;&amp;nbsp;2&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Public&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Sub&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;New&lt;/span&gt;&lt;span style="color: #000000; "&gt;()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;&amp;nbsp;3&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;End&amp;nbsp;Sub&lt;/span&gt;&lt;span style="color: #000000; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;&amp;nbsp;4&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Private&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;_YpcsxmID&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;As&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Integer&lt;/span&gt;&lt;span style="color: #000000; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;&amp;nbsp;5&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Public&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Property&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;YpcsxmID()&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;As&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Integer&lt;/span&gt;&lt;span style="color: #000000; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;&amp;nbsp;6&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Get&lt;/span&gt;&lt;span style="color: #000000; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;&amp;nbsp;7&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Return&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;_YpcsxmID&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;&amp;nbsp;8&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;End&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Get&lt;/span&gt;&lt;span style="color: #000000; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;&amp;nbsp;9&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Set&lt;/span&gt;&lt;span style="color: #000000; "&gt;(&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;ByVal&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;value&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;As&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Integer&lt;/span&gt;&lt;span style="color: #000000; "&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;10&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_YpcsxmID&amp;nbsp;&lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;value&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;11&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;End&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;Set&lt;/span&gt;&lt;span style="color: #000000; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #008080; "&gt;12&lt;/span&gt;&lt;font  color="#0000ff"&gt;&amp;nbsp;&lt;/font&gt;&lt;span style="color: #000000; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000ff; "&gt;End&amp;nbsp;Property&lt;/span&gt;&lt;font  color="#008080"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/2092474.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/06/28/2092474.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063509.html</id><title type="text">iPhone 真机测试（调试）教程-伪造证书-免iPhone developer付款</title><summary type="text">---图片：图片：最近小弟開始在研究 iPhone 的開發,無奈找到的資料都是舊的,也不知道怎麼放到 iPhone 上,應該很多人都跟我有同樣的困擾吧!經過幾天的研究總算寫出第一個 HelloWorld,而且可以不用付99元美金就可以放到實機上執行! 今天先和大家分享怎麼放到手機上,以及基本的 Xcode 使用:我的環境如下:IBMX60+iDeneb 10.5.5iPhone 港版16G+FW2.2+越獄iPhone SDK 2.2 finalMobileInstallation 已替換(這很重要,不然沒法放到 IP 上,可以參考 weiphone 的這個帖子:http://www.weip</summary><published>2011-05-30T09:51:00Z</published><updated>2011-05-30T09:51:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063509.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063509.html"/><content type="html">&lt;div&gt;&lt;span style="color: #2f332e; font-family: Arial, Helvetica, sans-serif; font-size: 12px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "&gt;&lt;div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; "&gt;---图片：&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/3f7287d33af96f6f960a16ca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/div&gt;&lt;div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; "&gt;图片：&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/dbcbf6333673ff18ac4b5fca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/div&gt;&lt;p style="line-height: normal; "&gt;最近小弟開始在研究 iPhone 的開發,無奈找到的資料都是舊的,也不知道怎麼放到 iPhone 上,應該很多人都跟我有同樣的困擾吧!經過幾天的研究總算寫出第一個 HelloWorld,而且可以不用付99元美金就可以放到實機上執行! 今天先和大家分享怎麼放到手機上,以及基本的 Xcode 使用:&amp;nbsp;&lt;br style="line-height: normal; " /&gt;我的環境如下:&amp;nbsp;&lt;br style="line-height: normal; " /&gt;IBMX60+iDeneb 10.5.5&amp;nbsp;&lt;br style="line-height: normal; " /&gt;iPhone 港版16G+FW2.2+越獄&amp;nbsp;&lt;br style="line-height: normal; " /&gt;iPhone SDK 2.2 final&amp;nbsp;&lt;br style="line-height: normal; " /&gt;MobileInstallation 已替換(這很重要,不然沒法放到 IP 上,可以參考 weiphone 的這個帖子:&lt;a href="http://www.weiphone.com/thread-206698-1-1.html" target="_blank" style="line-height: normal; font-family: Arial, Helvetica, sans-serif; text-decoration: underline; color: #847743; "&gt;&lt;span style="line-height: normal; color: #0070af; "&gt;http://www.weiphone.com/thread-206698-1-1.html&lt;/span&gt;&lt;/a&gt;)&amp;nbsp;&lt;br style="line-height: normal; " /&gt;注意: SDK 版本最好和 IP 版本一致!&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;好啦,同學們,課程開始啦!&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;1. 產生證書&amp;nbsp;&lt;br style="line-height: normal; " /&gt;由於 XCode 後面的版本都要求應用程式必須經過簽署,也因此你必須要&amp;nbsp;&lt;br style="line-height: normal; " /&gt;多花99美元加入 Developer Program (真是黑呀),反正我又不放到 App Store 賣錢,乾脆自己簽個證書來用不就好了&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;打開 Key Access 這個工具程式(在應用程式-&amp;gt;工具程式內),並建立一個 "iPhone Developer" 名稱的證書(這個名稱不要改,否則你得在專案內改變)&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/0e661f4eeef9bb91d0c86aca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/bc73baca1c2e89ddc81768ca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/51f9fe43adacff4872f05dca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;類型選擇"編碼簽名"&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/3427fe137117ac595baf53ca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;輸入憑證資訊&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/ea9cad025e488a544afb51ca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/48a4888606f1516566096eca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/fe65e63da329159c9e3d62ca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;最後選擇存放在"登入"內(不是 "系统"，因为后面的xCode的破解是需要 &amp;#8220;登陆&amp;#8221; 才行)&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/d297d4eda3832d1479f055ca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;這樣就大功告成了,你已經省下$99了!&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2. 打開 XCode 建立 View Based Application&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/0651d7dc06e694facc1166ca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/486c95a114f75cd0461064ca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2. 專案建立好了後,打開 Project Setting,並在 User-Defined Settings 輸入:&amp;nbsp;&lt;br style="line-height: normal; " /&gt;PROVISIONING_PROFILE_ALLOWED = NO&amp;nbsp;&lt;br style="line-height: normal; " /&gt;PROVISIONING_PROFILE_REQUIRED = NO&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;span style="line-height: normal; "&gt;&lt;br style="line-height: normal; " /&gt;&lt;img src="http://hiphotos.baidu.com/aidfan/pic/item/de7c9612151aed95c2fd78ca.jpg" border="0" alt="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" title="iPhone 真机测试教程-伪造证书,使用证书 - Hi,MR.Q - HI,MR.Q" width="700" style="line-height: normal; margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; " /&gt;&lt;/span&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3. 打開 Info.plist,這個檔案主要存放應用程式的相關描述,按右鍵 Add Row,新增 SignerIdentity = "Apple iPhone OS Application Signing" (要一樣的,亂輸好像不行)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;接着下来就破解 xCode&lt;/p&gt;&lt;ul style="line-height: normal; color: #232622; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 2em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; list-style-type: none; "&gt;&lt;li style="line-height: normal; margin-top: 0.2em; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; float: none; "&gt;关闭Xcode，打开你的命令行终端，复制粘贴下面的代码：&lt;/li&gt;&lt;/ul&gt;&lt;p style="line-height: normal; "&gt;&lt;span style="line-height: normal; color: #993300; "&gt;#!/bin/bash&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #993300; "&gt;cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #993300; "&gt;dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #993300; "&gt;printf &amp;#8220;\x8f\x2a\x00\x00&amp;#8243; &amp;gt;&amp;gt; working&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #993300; "&gt;dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 skip=127504 seek=127504&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #993300; "&gt;/bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #993300; "&gt;/bin/mv working iPhoneOS\ Build\ System\ Support&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #993300; "&gt;chmod a+x iPhoneOS\ Build\ System\ Support&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;/p&gt;&lt;ul style="line-height: normal; color: #232622; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 2em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; list-style-type: none; "&gt;&lt;li style="line-height: normal; margin-top: 0.2em; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; float: none; "&gt;执行完后再复制粘贴下面的代码到命令行终端：（需要internet网络连接）&lt;/li&gt;&lt;/ul&gt;&lt;p style="line-height: normal; "&gt;&lt;span style="line-height: normal; color: #ff0000; "&gt;mkdir /Developer/iphoneentitlements30&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #ff0000; "&gt;cd /Developer/iphoneentitlements30&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #ff0000; "&gt;curl -O&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.alexwhittemore.com/iphone/gen_entitlements.txt" style="line-height: normal; font-family: Arial, Helvetica, sans-serif; text-decoration: underline; color: #847743; "&gt;&lt;span style="line-height: normal; color: #ff0000; "&gt;http://www.alexwhittemore.com/iphone/gen_entitlements.txt&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #ff0000; "&gt;mv gen_entitlements.txt gen_entitlements.py&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;span style="line-height: normal; color: #ff0000; "&gt;chmod 777 gen_entitlements.py&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;/p&gt;&lt;ul style="line-height: normal; color: #232622; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 2em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; list-style-type: none; "&gt;&lt;li style="line-height: normal; margin-top: 0.2em; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; float: none; "&gt;执行完脚本后修改&amp;#8221;/Developer/Platforms/iPhoneOS.platform/Info.plist&amp;#8221;文件，做如下修改：&lt;/li&gt;&lt;/ul&gt;&lt;p style="line-height: normal; "&gt;新增如下两项：&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;strong style="line-height: normal; "&gt;&lt;span style="line-height: normal; color: #ff0000; "&gt;PROVISIONING_PROFILE_ALLOWED = NO&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;strong style="line-height: normal; "&gt;&lt;span style="line-height: normal; color: #ff0000; "&gt;PROVISIONING_PROFILE_REQUIRED = NO&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;/p&gt;&lt;ul style="line-height: normal; color: #232622; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 2em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; list-style-type: none; "&gt;&lt;li style="line-height: normal; margin-top: 0.2em; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; float: none; "&gt;再用文本编辑器打开&amp;#8221;/Developer/Platforms/iPhoneOS.platform/Info.plist&amp;#8221;文件，将所有&amp;#8220;XCiPhoneOSCodeSignContext&amp;#8221;替换为&amp;#8220;XCCodeSignContext&amp;#8221;，（&lt;span style="line-height: normal; color: #ff0000; "&gt;非常重要，不进行此步骤会导致打开项目文件Xcode会崩溃报错退出&lt;/span&gt;）保存退出。&lt;/li&gt;&lt;/ul&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;/p&gt;&lt;ul style="line-height: normal; color: #232622; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 2em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; list-style-type: none; "&gt;&lt;li style="line-height: normal; margin-top: 0.2em; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; float: none; "&gt;打开Xcode，打开你的项目，Project&amp;gt;&amp;gt;Edit Project Setting,选择&amp;#8220;Build&amp;#8221;页面，Configurations和Show都选择All，找到Code Signing Identity项，删除其子项，并将&amp;#8220;Code Signing Identity&amp;#8221;赋值为&amp;#8220;iPhone Developer&amp;#8221;(其实是个选项)。&lt;/li&gt;&lt;/ul&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;/p&gt;&lt;ul style="line-height: normal; color: #232622; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 2em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; list-style-type: none; "&gt;&lt;li style="line-height: normal; margin-top: 0.2em; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; float: none; "&gt;然后找到你项目的xxx-Info.plist文件，添加&amp;#8220;SignerIdentity&amp;#8221;项，其值为&amp;#8220;Apple iPhone OS Application Signing&amp;#8221;.保存。&lt;/li&gt;&lt;/ul&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;/p&gt;&lt;ul style="line-height: normal; color: #232622; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 2em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; list-style-type: none; "&gt;&lt;li style="line-height: normal; margin-top: 0.2em; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; float: none; "&gt;将iPhone接入电脑，在Xcode的Window&amp;gt;&amp;gt;Organizer中会侦测到你的iPhone.查看iPhone和你的 Xcode识别正常后退出Organizer，选择编译环境为&amp;#8220;iPhone Device-3.1.2|Release&amp;#8221;,点击"Build and Go",期间会出现让我们选择签名证书，点选&amp;#8220;允许&amp;#8221;后，祈祷你的iPhone屏幕亮起吧。&lt;/li&gt;&lt;/ul&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;/p&gt;&lt;ul style="line-height: normal; color: #232622; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 2em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; list-style-type: none; "&gt;&lt;li style="line-height: normal; margin-top: 0.2em; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; float: none; "&gt;你的程序会自动下载到你的iPhone中。点触运行无任何错误提示。&lt;/li&gt;&lt;/ul&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;strong style="line-height: normal; "&gt;PS:&lt;/strong&gt;&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;&lt;strong style="line-height: normal; "&gt;&lt;span style="line-height: normal; color: #ff0000; "&gt;有几个小问题，说一下，以免后来者走弯路。&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;1. 如果你把Xcode不是装在系统盘，比如我是装在另外一个分区，则相应的命令为：cd /Volumes/分区卷标/你装Xcode的文件夹/Platforms/iPhoneOS.platform/Developer/Library /Xcode/Plug-ins/iPhoneOS\Build\ System\ Support.xcplugin/Contents/MacOS/ 其他好像基本不用改，不过我是自己在终端里面一条条敲，不是复制粘贴，直接用tab补全也挺快&lt;/p&gt;&lt;p style="line-height: normal; text-indent: 2em; "&gt;2.如果你之前用过别的方法，并新建了证书，一定要在这次操作前把以前的证书删掉，（在/应用程序/key access或者中文叫钥匙串访问），而且最好是注销后再删，不然可能删不了，我就是因为没删，后面出了好多问。&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/2063509.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063509.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063511.html</id><title type="text">App Store 审核指南</title><summary type="text">苹果对开发者提交的应用的审核之严格是出了名的，了解苹果的审核标准对于开发者防止应用被拒有着十分重要的意义。几天前苹果官方公布了 App Store 审核指南，后经译言网翻译成了中文，现全文转发，供大家参考。前言感谢您付出宝贵的才华与时间来开发iOS应用程程序。从职业与报酬的角度而言，这对于成千上万的开发员来说一直都是一项值得投入的 事业。我们希望帮助您加入这个成功的组织。这是我们首次发布《应用程序商店评估指导》（App Store Review Guidelines）。通过它，我们希望帮助您解决开发应用程序时遇到的问题，以便于您在提交应用程序时，可以加快审批流程的速度。我们将应用程序（Apps</summary><published>2011-05-30T09:51:00Z</published><updated>2011-05-30T09:51:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063511.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063511.html"/><content type="html">&lt;div&gt;&lt;span style="color: #2f332e; font-family: Arial, Helvetica, sans-serif; font-size: 12px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "&gt;苹果对开发者提交的应用的审核之严格是出了名的，了解苹果的审核标准对于开发者防止应用被拒有着十分重要的意义。几天前苹果官方公布了 App Store 审核指南，后经译言网翻译成了中文，现全文转发，供大家参考。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;前言&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;感谢您付出宝贵的才华与时间来开发iOS应用程程序。从职业与报酬的角度而言，这对于成千上万的开发员来说一直都是一项值得投入的 事业。我们希望帮助您加入这个成功的组织。这是我们首次发布《应用程序商店评估指导》（App Store Review Guidelines）。通过它，我们希望帮助您解决开发应用程序时遇到的问题，以便于您在提交应用程序时，可以加快审批流程的速度。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;我们将应用程序（Apps）视为与书籍或歌曲不同的产品，我们并不存储它们。如果您意欲批评宗教，那就去写本书。如果您想要描述***过程，写本书或写首歌 曲，或者可以创建一个医疗程序。这会出现非常复杂的局面，但是我们决定，在应用程序商店（App Store）禁止出现某种内容。这或许会让您认识到我们秉持的更为深远的目的：&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;我们拥有许多儿童可以下载的应用程序，除非父母事先进行了设置（一般父母都不会设置），否则父母对这些内容的操作控制将会无效。因此，您要了解我们时刻在留意着您的孩子。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;在我们的应用程序商店中已经拥有了超过 25万个应用程序。我们不再需要那些垃圾应用程序。如果您的应用程序没有什么有益的用途或者持续性的娱乐功能，则可能不会获得我方的接受。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;如果您的应用程序看上去像是那种只花了几天功夫简单拼凑出来的产品，或者只是想在我们的商店中抓住朋友的眼球，请提前做好遭拒的准备。我们有很多具有严谨态度的开发程序员不希望他们的高品质应用程序充斥在一些业余作品之中。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;我们将拒绝任何包含越界内容或行为的应用程序。您可能会问道，具体限制是什么？最高法院的法官曾有言：&amp;#8220;它出现时我自然心中有数。&amp;#8221;当您越过这一范围时，我们认为您也会有自知之明。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;如果您的应用程序被拒，我们设立了一个审(我们的)查委员会供您上诉。如果您去媒体抨击我们，肯定对您于事无补。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;这是一个动态文档，新提交的应用程序会导致新的问题产生，并可能随时产生新的规则。或许您的应用程序会触及到这一点。&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;最后要说明的是，我们非常珍惜这个平台，并且向您的作品表示敬意。我们确实在尝试尽力创建全球最佳平台，以便让您展示才华，同时获得相应的报酬。如果这读上去让您感觉我们的控制欲过强，那是因为我们曾向用户承诺保证，我们将利用我们的产品让他们获得高品质体验。&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;目录&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;1. 条款与条件&lt;br style="line-height: normal; " /&gt;2. 功能&lt;br style="line-height: normal; " /&gt;3. 元数据、评级与排名&lt;br style="line-height: normal; " /&gt;4. 位置&lt;br style="line-height: normal; " /&gt;5. 推送通知&lt;br style="line-height: normal; " /&gt;6. 游戏中心&lt;br style="line-height: normal; " /&gt;7. iAd相关&lt;br style="line-height: normal; " /&gt;8. 商标与商业外观&lt;br style="line-height: normal; " /&gt;9. 媒体内容&lt;br style="line-height: normal; " /&gt;10. 用户界面&lt;br style="line-height: normal; " /&gt;11. 购买与流通&lt;br style="line-height: normal; " /&gt;12. 抓取与聚合&lt;br style="line-height: normal; " /&gt;13. 设备损害&lt;br style="line-height: normal; " /&gt;14. 人身攻击&lt;br style="line-height: normal; " /&gt;15. 暴力&lt;br style="line-height: normal; " /&gt;16. 不当内容&lt;br style="line-height: normal; " /&gt;17. 隐私&lt;br style="line-height: normal; " /&gt;18. 色情&lt;br style="line-height: normal; " /&gt;19. 宗教、文化与种族&lt;br style="line-height: normal; " /&gt;20. 竞赛、赌金、彩票与抽彩售物&lt;br style="line-height: normal; " /&gt;21. 慈善与援助&lt;br style="line-height: normal; " /&gt;22. 法律要件&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;1. 条款和条件&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;1.1 为App Store开发程序，开发者必须遵守程序许可协议（PLA）、人机交互指南（HIG）以及开发者和苹果签订的任何协议和合同。以下规则和例子旨在帮助开发者的程序能获得App Store的认可，而不是修改或删除任何其他协议中的条款。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2. 功能&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.1 崩溃的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.2 有错误的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.3 跟开发者宣传不符的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.4 无应用文档或隐藏功能与描述不符的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.5 使用非公开API的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.6 在指定容器范围外读写数据的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.7 以任何方式或形式下载代码的程序将会被拒绝&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.8 安装或释放其他可执行代码的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.9 beta版、演示版、trial版和测试版的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.10 iPhone程序必须不经修改就能以iPhone分辨率和2倍 iPhone 3GS的分辨率在iPad上运行&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.11 与App Store已有程序重复的程序可能会被拒绝，特别是数量很多的情况下&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.12 没有显著用途或不提供任何持久娱乐价值的程序可能会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.13 主要内容为营销或广告的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.14 欺骗或有虚假功能，没有明确标明的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.15 大于20MB的程序不会通过蜂窝网络下载（App Store会自动禁止）&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.16 多任务程序仅可以为达到预期目的而使用后台服务：网络电话、音频播放、地点、任务完成、本地通知等&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.17 浏览网络的程序必须使用iOS WebKit框架和WebKit Javascript&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.18 鼓励过量饮酒或非法物质，或鼓励青少年饮酒或吸烟的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.19 提供不正确诊断或其他不准确设备数据的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;2.20 向App Store上传大量相似版本程序的开发者将会从iOS开发者项目中除名&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3. 元数据（名称、描述、评级、排名等）&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.1 带有任何其他移动平台名称的元数据程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.2 带有占位符文本的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.3 带有与程序内容和功能不相关描述的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.4 连接到 iTunes 中的程序名称及显示在设备的程序名称应该相似，不至引起混淆&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.5 小型与大型程序的图标应该类似，不至引起混淆&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.6 程序图标与画面不符合4+年龄评级的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.7 目录与类型不适合于程序内容的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.8 开发程序员负责为其程序指定适合的评级。评级不适用可能会由苹果公司修改&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.9 开发程序员负责为其程序指定适合的关键字。关键字不适用可能会由苹果公司修改/删除&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;3.10 利用伪造或付费评论的方式在App Store中企图操纵或欺骗用户评价或图表排名的开发程序员（或者采用其他不正当方式）将会从iOS开发者项目中除名&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;4. 位置&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;4.1 在采集、传送或使用位置数据之前未通知并获得用户同意的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;4.2 使用基于位置的API用于车辆、飞机或其他设备的自动控制或自主控制的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;4.3 使用基于位置的API用于调度、车队管理或应急服务的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5. 推送通知&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5.1 不采用苹果推送通知 (APN)应用接口提供推送通知的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5.2 未从苹果获得推送应用ID便擅自使用APN服务的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5.3 未获得用户初次同意便发送推送通知的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5.4 使用推送通知发送敏感个人信息或机密信息的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5.5 使用推送通知发送非请求消息或用于钓鱼或群发垃圾邮件用途的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5.6 程序不可使用推送通知发送广告、促销或任何类型的直销&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5.7 程序不能向使用推送通知服务的用户收取费用&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5.8 使用推送通知会利用过多APN服务的网络流量或带宽或给设备带来过度负担的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;5.9 如果程序能够传送病毒、文件、计算机代码或程序，并且对APN服务的正常运行造成损害或中断，该程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;6. 游戏中心&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;6.1 向终端用户或任意第三方显示玩家ID的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;6.2 将玩家ID用于任何未经游戏中心条款批准用途的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;6.3 企图进行反射查找、跟踪、关联、挖掘、获得或利用玩家ID、化名或通过游戏中心获得的其他信息将会从iOS 开发程序员项目中除名&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;6.4 游戏中心信息（例如计分板得分）可能仅能用于游戏中心批准的程序&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;6.5 利用游戏中心服务发送非请求信息或用于钓鱼或群发垃圾邮件的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;6.6 过多使用游戏中心网络流量或带宽的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;6.7 如果程序能够传送病毒、文件、计算机代码或程序，并且对游戏中心服务的正常运行造成损害或中断，该程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;7. iAd相关&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;7.1 人工增加访问次数或者广告点击量的应用程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;7.2 包含有空的iAd广告栏的应用程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;7.3 主要设计目的在于显示广告的应用程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;8. 商标与商业外观&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;8.1 应用程序必须遵守使用苹果商标和版权以及苹果商标列表指导手册中说明的所有条款与条件&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;8.2 任何误导和暗示苹果公司是该应用程序来源或提供商，或者苹果公司以任何形式表示认可其质量或功能的应用程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;8.3 与目前已有苹果产品或者广告主题外观相似混淆的应用程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;8.4 在应用程序名称中将苹果产品名拼错的应用程序（例如，GPS for Iphone， iTunz）将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;8.5 使用受保护的第三方材料（商标、版权、商业机密、其他私有内容）在申请时需要提供一份文本形式的版权确认&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;8.6 当原内容所有的商标特征保持不被修改并完整显示时， 谷歌地图和通过谷歌地图API获取的谷歌地球的图像可以在应用程序内部使用。掩盖或者修改谷歌标志或者版权拥有者身份证明的应用程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;9. 媒体内容&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;9.1 不使用媒体播放器框架（MediaPlayer Framework）获取音乐库中媒体的应用程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;9.2 模仿任何iPod界面的应用程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;9.3 通过蜂窝网络传输的音频流内容每5分钟不得大于5MB&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;9.4 通过蜂窝网络传输超过10分钟的视频流内容需要使用HTTP直播流（HTTP Live Streaming）并包含一个亟待64kbps仅音频的HTTP直播流&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;10. 用户界面&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;10.1 应用程序必须遵守苹果《iPhone用户界面指导原则》以及《iPad用户界面指导原则》中解释的所有条款和条件。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;10.2 与App Store、iTunes Store和iBookstore等提供的iPhone捆绑应用程序类似的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;10.3 未能按苹果《iPhone用户界面指导原则》及《iPad用户界面指导原则》所述，正确使用系统自带的按钮、图标等项目的应用程序可能会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;10.4 创建alternat桌面/主屏幕环境或者模拟多应用程序widget体验的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;10.5 改变音量大小和铃声/静音开关等标准开关功能的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;10.6 苹果及我们的客户高度推崇简单、精致、富有创造性以及经过精心设计的界面。虽然需要付出更多，但却非常值得。苹果设立了很高的门槛。如果你的用户界面太过复杂或者水准不高，可能会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11. 购买与流通&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.1 使用App Store以外的软件开启或提供额外功能的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.2 使用应用内支付系统（IAP）以外的系统购买内容、功能或服务的应用软件将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.3 使用IAP购买实物商品和并非用于该软件的服务的应用软件将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.4 应用软件使用IAP购买信用点或者其他货币必须消费本软件内的信用点。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.5使用IAP购买已过期信用点或者其他货币的应用软件将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.6使用IAP订阅内容最少需持续30天，所有iOS设备用户都可使用这项功能。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.7 应用软件使用IAP购买的商品必须具有可购买性。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.8&amp;nbsp; 使用IAP购买iOS提供的照相摄像或陀螺仪等内置功能的应用软件将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.9 含有已超过限定时间的&amp;#8220;出租&amp;#8221;内容或服务的应用软件将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.10 保险应用软件必须免费，遵守发布地区的法律同时不能使用IAP。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;11.11&amp;nbsp; 一般而言，你的应用程序越贵，我们的评审越彻底。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;12. 抓取和聚合&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;12.1 从苹果网站（例如apple.com、iTunes Store、App Store、iTunes Connect、苹果开发者计划等）抓取任何信息或者使用苹果网站的内容和服务进行排名的应用软件将遭到拒绝。&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;12.2 应用软件可以使用获得批准的苹果RSS feeds，例如iTunes Store RSS feeds。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;12.3 只是简单的网页剪切、内容聚合器或者罗列链接的应用软件可能会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;13. 设备损害&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;13.1 怂恿用户以可能造成损害的方式使用苹果设备的应用软件将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;13.2 快速耗光设备电量或产生过多热量的应用软件将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;14. 人身攻击&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;14.1 具有诽谤、人身攻击性质以及内容狭隘卑鄙的应用软件或者打击特定个人或组织的应用软件将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;14.2 职业政治讽刺家不受这一禁令约束，可进行具有攻击性或狭隘刻薄的评论。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;15. 暴力&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;15.1 应用程序中出现人或动物被杀、致残以及枪击、刺伤、拷打等受伤情形的真实画面将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;15.2 出现描绘暴力或虐待儿童等内容的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;15.3 游戏中出现的&amp;#8220;敌人&amp;#8221;不可指向一个特定种族、文化、一个真实存在的政府、企业或者其他任何现实中的实体。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;15.4 对武器进行真实描述以怂恿非法使用或滥用这些武器的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;15.5 内含与俄罗斯轮盘相关的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;16. 不当内容&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;16.1 应用程序中出现过于令人反感或者低俗的内容将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;16.2 在设计上用于激怒用户或令人感到厌恶的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;17.隐私&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;17.1 应用程序不能在未获用户允许或未向用户提供如何使用及在何处使用数据的相关信息情况下传输有关用户的数据。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;17.2 要求用户共享电子邮箱地址和出生日期等私人信息才可使用其功能的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;17.3 锁定未成年人进行数据收集的应用程序将会被拒绝。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;18. 色情&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;18.1 含有色情素材，也就是《韦氏词典》中定义的&amp;#8220;旨在激发情欲，对性器官或性行为的明确描述或展示，而无关美学或情绪感受&amp;#8221;的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;18.2 用户产生内容多为色情的程序（比如以前的Chat Roulette程序）将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;19.宗教，文化与种族&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;19.1 涉及宗教、文化或种族群体的引用或评论包含诽谤性、攻击性或自私性内容，或会使特定群体遭受伤害或暴力的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;19.2 程序可以包含或引用宗教经文，程序所提供的引用或翻译必须准确且不会引起误导。评论应该有教育意义，可以令人开阔眼界，而不应有煽动性&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;20.竞赛、赌金、彩票与抽彩售物&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;20.1 赌金和竞赛必须由程序的开发者/公司发起&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;20.2 赌金和竞赛的正式规则必须在程序中注明，并且必须明确表示苹果不是发起者，也没有以任何方式参与活动&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;20.3 开发者运营的彩票程序必须在法律容许范围之内，彩票程序必须具有以下所有特性：报酬、几率及奖品&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;20.4 允许用户直接购买彩票或抽彩售物券的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;21.慈善与援助&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;21.1包含可以向认证的慈善组织捐赠功能的程序必须是免费的&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;21.2 捐赠款项的募集必须通过Safari浏览器中的网站或是手机短消息。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;22. 法律要件&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;22.1 程序必须遵守各地用户遵守的任何法律要求。开发者有义务了解并遵守当地所有法律&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;22.2 包含虚假，欺诈或误导性陈述的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;22.3 请求、促进或鼓励犯罪或明显鲁莽行为的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;22.4 使用非法文件共享的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;22.5 被设计用作非法赌博辅助工具，包括算牌的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;22.6 具有拨打匿名或恶作剧电话或发送类似短信/彩信功能的程序将会被拒绝&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;22.7 开发暗中收集用户密码或用户私人数据程序的开发者将会从iOS开发者项目中除名&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;动态文档&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;这份文档展现了我们在竭尽所能向您分享我们对提交到App Store的程序的审(我们的)查方式，我们希望您在开发和提交程序时，这份指南能对您有所帮助。这是一份动态文档，随着新程序和新情况的发生会有所变化。我们会定期更新，以反映这些变化。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;感谢您参与到iOS的开发中来。虽然此文档是一份&amp;#8220;不该做事宜&amp;#8221;的列表，但也请将那份短得多的&amp;#8220;必做事宜&amp;#8221;列表牢记在心。最重要的是，与我们一道共同努力让 用户感到惊奇和欣喜。用创新方式向他们展示世界，让他们用前所未有的方式与之交流。根据我们的经验，无论是在功能和用户界面上，用户确实会对完善的程序有 所反应。更进一步，给他们期望之外的东西，带他们去从未去过的地方。我们愿意提供帮助。&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/2063511.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063511.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063505.html</id><title type="text">How to use NSString</title><summary type="text">转贴：http://hi.baidu.com/aidfan/blog/item/c7b3a2b185bfda4308230254.html/一、NSString/*----------------创建字符串的方法----------------*///1、创建常量字符串。NSString *astring = @&amp;quot;This is a String!&amp;quot;;//2、创建空字符串，给予赋值。NSString *astring = [[NSString alloc] init];astring = @&amp;quot;This is a String!&amp;quot;;NSLog(@&amp;quot</summary><published>2011-05-30T09:47:00Z</published><updated>2011-05-30T09:47:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063505.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063505.html"/><content type="html">&lt;div&gt;&lt;span style="color: #2f332e; font-family: Arial, Helvetica, sans-serif; font-size: 12px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "&gt;&lt;p style="line-height: normal; "&gt;转贴：http://hi.baidu.com/aidfan/blog/item/c7b3a2b185bfda4308230254.html&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;/一、NSString&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*----------------创建字符串的方法----------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//1、创建常量字符串。&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//2、创建空字符串，给予赋值。&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring = [[NSString alloc] init];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;astring = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"astring:%@",astring);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[astring release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//3、在以上方法中，提升速度:initWithString方法&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring = [[NSString alloc] initWithString:@"This is a String!"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"astring:%@",astring);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[astring release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//4、用标准c创建字符串:initWithCString方法&lt;/p&gt;&lt;p style="line-height: normal; "&gt;char *Cstring = "This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring = [[NSString alloc] initWithCString:Cstring];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"astring:%@",astring);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[astring release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//5、创建格式化字符串:占位符(由一个%加一个字符组成)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;int i = 1;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;int j = 2;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring = [[NSString alloc] initWithString:[NSString stringWithFormat:@"%d.This is %i string!",i,j]];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"astring:%@",astring);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[astring release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//6、创建临时字符串&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;astring = [NSString stringWithCString:"This is a temporary string"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"astring:%@",astring);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*----------------从文件读取字符串:initWithContentsOfFile方法 ----------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *path = @"astring.text";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring = [[NSString alloc] initWithContentsOfFile:path];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"astring:%@",astring);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[astring release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*----------------写字符串到文件:writeToFile方法 ----------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring = [[NSString alloc] initWithString:@"This is a String!"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"astring:%@",astring);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *path = @"astring.text";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[astring writeToFile: path atomically: YES];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[astring release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*---------------- 比较两个字符串----------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//用C比较:strcmp函数&lt;/p&gt;&lt;p style="line-height: normal; "&gt;char string1[] = "string!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;char string2[] = "string!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;if(strcmp(string1, string2) = = 0)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;{&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"1");&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//isEqualToString方法&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring01 = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring02 = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;BOOL result = [astring01 isEqualToString:astring02];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"result:%d",result);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//compare方法(comparer返回的三种值)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring01 = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring02 = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;BOOL result = [astring01 compare:astring02] = = NSOrderedSame;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"result:%d",result);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSOrderedSame 判断两者内容是否相同&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring01 = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring02 = @"this is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;BOOL result = [astring01 compare:astring02] = = NSOrderedAscending;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"result:%d",result);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSOrderedAscending 判断两对象值的大小(按字母顺序进行比较，astring02大于astring01为真)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring01 = @"this is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring02 = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;BOOL result = [astring01 compare:astring02] = = NSOrderedDescending;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"result:%d",result);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSOrderedDescending 判断两对象值的大小(按字母顺序进行比较，astring02小于astring01为真)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//不考虑大 小写比较字符串1&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring01 = @"this is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring02 = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;BOOL result = [astring01 caseInsensitiveCompare:astring02] = = NSOrderedSame;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"result:%d",result);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSOrderedDescending判断两对象值的大小(按字母顺序进行比较，astring02小于astring01为 真)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//不考虑大小写比较字符串2&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring01 = @"this is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring02 = @"This is a String!";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;BOOL result = [astring01 compare:astring02&lt;/p&gt;&lt;p style="line-height: normal; "&gt;options:NSCaseInsensitiveSearch | NSNumericSearch] = = NSOrderedSame;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"result:%d",result);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSCaseInsensitiveSearch:不区分大小写比较 NSLiteralSearch:进行完全比较，区分大小写 NSNumericSearch:比较字符串的字符个数，而不是字符值。&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*----------------改变字符串的大小写----------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string1 = @"A String";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string2 = @"String";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string1:%@",[string1 uppercaseString]);//大写&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string2:%@",[string2 lowercaseString]);//小写&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string2:%@",[string2 capitalizedString]);//首字母大小&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*----------------在串中搜索子串 ----------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string1 = @"This is a string";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string2 = @"string";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSRange range = [string1 rangeOfString:string2];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;int location = range.location;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;int leight = range.length;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *astring = [[NSString alloc] initWithString:[NSString stringWithFormat:@"Location:%i,Leight:%i",location,leight]];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"astring:%@",astring);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[astring release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*----------------抽取子串 ----------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//-substringToIndex: 从字符串的开头一直截取到指定的位置，但不包括该位置的字符&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string1 = @"This is a string";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string2 = [string1 substringToIndex:3];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string2:%@",string2);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//-substringFromIndex: 以指定位置开始(包括指定位置的字符)，并包括之后的全部字符&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string1 = @"This is a string";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string2 = [string1 substringFromIndex:3];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string2:%@",string2);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//-substringWithRange: //按照所给出的位置，长度，任意地从字符串中截取子串&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string1 = @"This is a string";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string2 = [string1 substringWithRange:NSMakeRange(0, 4)];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string2:%@",string2);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//快速枚举&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//for(NSString *filename in direnum)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//{&lt;/p&gt;&lt;p style="line-height: normal; "&gt;// if([[filename pathExtension] isEqualToString:@"jpg"]){&lt;/p&gt;&lt;p style="line-height: normal; "&gt;// [files addObject:filename];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;// }&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"files:%@",files);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//枚举&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSEnumerator *filenum;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;filenum = [files objectEnumerator];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;while (filename = [filenum nextObject]) {&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"filename:%@",filename);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/2063505.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063505.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063501.html</id><title type="text">数组一些基础操作 NSArray/NSMutableArray</title><summary type="text">转自：http://hi.baidu.com/aidfan/blog/item/656fbd45880366288694736b.htmlNSArray *******************************************************************************************/ /*---------------------------创建数组------------------------------*/ //NSArray *array = ［NSArray alloc] initWithObjects: @&amp;quot;One&amp;q</summary><published>2011-05-30T09:44:00Z</published><updated>2011-05-30T09:44:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063501.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063501.html"/><content type="html">&lt;div&gt;&lt;span style="color: #333333; font-family: Arial; line-height: 20px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;p style="line-height: normal; "&gt;转自：&amp;nbsp;&lt;span  style="line-height: 20px; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span  style="line-height: 20px; "&gt;http://hi.baidu.com/aidfan/blog/item/656fbd45880366288694736b.html&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;NSArray&lt;/p&gt;&lt;p style="line-height: normal; "&gt;*******************************************************************************************/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*---------------------------创建数组------------------------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSArray *array = ［NSArray alloc] initWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"One",@"Two",@"Three",@"Four",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;self.dataArray = array;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[array release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//- (unsigned) Count;数组所包含对象个数；&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"self.dataArray cound:%d",[self.dataArray count]);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//- (id) objectAtIndex: (unsigned int) index;获取指定索引处的对象;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"self.dataArray cound 2:%@",[self.dataArray objectAtIndex:2]);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*--------------------------从一个数组拷贝数据到另一数组(可变数级)----------------------------*/ &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//arrayWithArray:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSArray *array1 = ［NSArray alloc] init];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSMutableArray *MutableArray = ［NSMutableArray alloc] init];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSArray *array = [NSArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"a",@"b",@"c",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"array:%@",array);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;MutableArray = [NSMutableArray arrayWithArray:array];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"MutableArray:%@",MutableArray);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;array1 = [NSArray arrayWithArray:array];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"array1:%@",array1);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//Copy&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//id obj;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSMutableArray *newArray = ［NSMutableArray alloc] init];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSArray *oldArray = [NSArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"a",@"b",@"c",@"d",@"e",@"f",@"g",@"h",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"oldArray:%@",oldArray);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;for(int i = 0; i &amp;lt; [oldArray count]; i++)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;obj = ［oldArray objectAtIndex:i] copy];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[newArray addObject: obj];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;// &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"newArray:%@", newArray);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[newArray release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//快速枚举&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSMutableArray *newArray = ［NSMutableArray alloc] init];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSArray *oldArray = [NSArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"a",@"b",@"c",@"d",@"e",@"f",@"g",@"h",nil]; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"oldArray:%@",oldArray);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;for(id obj in oldArray)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;{&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[newArray addObject: obj];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;// &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"newArray:%@", newArray);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[newArray release]; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//Deep copy&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSMutableArray *newArray = ［NSMutableArray alloc] init];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSArray *oldArray = [NSArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"a",@"b",@"c",@"d",@"e",@"f",@"g",@"h",nil]; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"oldArray:%@",oldArray); &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;newArray = (NSMutableArray*)CFPropertyListCreateDeepCopy(kCFAllocatorDefault, (CFPropertyListRef)oldArray, kCFPropertyListMutableContainers);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"newArray:%@", newArray);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[newArray release]; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//Copy and sort&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSMutableArray *newArray = ［NSMutableArray alloc] init];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSArray *oldArray = [NSArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"b",@"a",@"e",@"d",@"c",@"f",@"h",@"g",nil]; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"oldArray:%@",oldArray);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSEnumerator *enumerator;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;enumerator = [oldArray objectEnumerator];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;id obj;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;while(obj = [enumerator nextObject])&lt;/p&gt;&lt;p style="line-height: normal; "&gt;{&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[newArray addObject: obj];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[newArray sortUsingSelector:@selector(compare:)];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"newArray:%@", newArray);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[newArray release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*---------------------------切分数组------------------------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//从字符串分割到数组－ componentsSeparatedByString:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string = ［NSString alloc] initWithString:@"One,Two,Three,Four"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string:%@",string); &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSArray *array = [string componentsSeparatedByString:@","];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"array:%@",array);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[string release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//从数组合并元素到字符串- componentsJoinedByString:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSArray *array = ［NSArray alloc] initWithObjects:@"One",@"Two",@"Three",@"Four",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string = [array componentsJoinedByString:@","];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string:%@",string);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*******************************************************************************************&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSMutableArray&lt;/p&gt;&lt;p style="line-height: normal; "&gt;*******************************************************************************************/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*---------------给数组分配容量----------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSArray *array;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;array = [NSMutableArray arrayWithCapacity:20];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*--------------在数组末尾添加对象----------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//- (void) addObject: (id) anObject;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSMutableArray *array = [NSMutableArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"One",@"Two",@"Three",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[array addObject:@"Four"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"array:%@",array);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*--------------删除数组中指定索引处对象----------------*/ &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//-(void) removeObjectAtIndex: (unsigned) index; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSMutableArray *array = [NSMutableArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"One",@"Two",@"Three",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[array removeObjectAtIndex:1];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"array:%@",array);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*-------------数组枚举---------------*/ &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//- (NSEnumerator *)objectEnumerator;从前向后&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSMutableArray *array = [NSMutableArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"One",@"Two",@"Three",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSEnumerator *enumerator;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;enumerator = [array objectEnumerator];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;id thingie;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;while (thingie = [enumerator nextObject]) {&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"thingie:%@",thingie);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//- (NSEnumerator *)reverseObjectEnumerator;从后向前&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSMutableArray *array = [NSMutableArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"One",@"Two",@"Three",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSEnumerator *enumerator;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;enumerator = [array reverseObjectEnumerator];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;id object;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;while (object = [enumerator nextObject]) {&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"object:%@",object);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//快速枚举&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSMutableArray *array = [NSMutableArray arrayWithObjects:&lt;/p&gt;&lt;p style="line-height: normal; "&gt;@"One",@"Two",@"Three",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;for(NSString *string in array)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;{&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string:%@",string);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*******************************************************************************************&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSDictionary&lt;/p&gt;&lt;p style="line-height: normal; "&gt;*******************************************************************************************/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*------------------------------------创建字典------------------------------------*/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//- (id) initWithObjectsAndKeys;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSDictionary *dictionary = ［NSDictionary alloc] initWithObjectsAndKeys:@"One",@"1",@"Two",@"2",@"Three",@"3",nil];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *string = [dictionary objectForKey:@"One"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"string:%@",string);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"dictionary:%@",dictionary);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[dictionary release];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*******************************************************************************************&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSMutableDictionary&lt;/p&gt;&lt;p style="line-height: normal; "&gt;*******************************************************************************************/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*------------------------------------创建可变字典------------------------------------*/ &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//创建&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//添加字典&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[dictionary setObject:@"One" forKey:@"1"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[dictionary setObject:@"Two" forKey:@"2"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[dictionary setObject:@"Three" forKey:@"3"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[dictionary setObject:@"Four" forKey:@"4"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"dictionary:%@",dictionary);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//删除指定的字典&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[dictionary removeObjectForKey:@"3"];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"dictionary:%@",dictionary);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*******************************************************************************************&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSValue（对任何对象进行包装）&lt;/p&gt;&lt;p style="line-height: normal; "&gt;*******************************************************************************************/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*--------------------------------将NSRect放入NSArray中------------------------------------*/ &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//将NSRect放入NSArray中&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSMutableArray *array = ［NSMutableArray alloc] init];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSValue *value;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;CGRect rect = CGRectMake(0, 0, 320, 480); &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;value = [NSValue valueWithBytes:&amp;amp;rect objCType:@encode(CGRect)];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[array addObject:value];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"array:%@",array);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//从Array中提取&lt;/p&gt;&lt;p style="line-height: normal; "&gt;value = [array objectAtIndex:0];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[value getValue:&amp;amp;rect];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"value:%@",value);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;/*******************************************************************************************&lt;/p&gt;&lt;p style="line-height: normal; "&gt;从目录搜索扩展名为jpg的文件&lt;/p&gt;&lt;p style="line-height: normal; "&gt;*******************************************************************************************/&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//NSFileManager *fileManager = [NSFileManager defaultManager];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *home;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;home = @"../Users/";&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSDirectoryEnumerator *direnum;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;direnum = [fileManager enumeratorAtPath: home];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSMutableArray *files = ［NSMutableArray alloc] init];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//枚举&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSString *filename;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;while (filename = [direnum nextObject]) {&lt;/p&gt;&lt;p style="line-height: normal; "&gt;if(［filename pathExtension] hasSuffix:@"jpg"]){&lt;/p&gt;&lt;p style="line-height: normal; "&gt;[files addObject:filename];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//快速枚举&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//for(NSString *filename in direnum)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//{&lt;/p&gt;&lt;p style="line-height: normal; "&gt;// &amp;nbsp; &amp;nbsp;if(［filename pathExtension] isEqualToString:@"jpg"]){&lt;/p&gt;&lt;p style="line-height: normal; "&gt;// &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[files addObject:filename];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;// &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"files:%@",files);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//枚举&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSEnumerator *filenum;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;filenum = [files objectEnumerator];&lt;/p&gt;&lt;p style="line-height: normal; "&gt;while (filename = [filenum nextObject]) {&lt;/p&gt;&lt;p style="line-height: normal; "&gt;NSLog(@"filename:%@",filename);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;}&lt;/p&gt;&lt;p style="line-height: normal; "&gt;&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//快速枚举&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//for(id object in files)&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//{&lt;/p&gt;&lt;p style="line-height: normal; "&gt;// &amp;nbsp; &amp;nbsp;NSLog(@"object:%@",object);&lt;/p&gt;&lt;p style="line-height: normal; "&gt;//}&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/2063501.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/05/30/2063501.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950317.html</id><title type="text">git时的一些参数</title><summary type="text">stashyour current change orreset --hard HEAD(if you do not mind losing those minor changes) orcheckout -f(When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes. )</summary><published>2011-02-09T09:22:00Z</published><updated>2011-02-09T09:22:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950317.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950317.html"/><content type="html">&lt;div&gt;&lt;span style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18px; "&gt;&lt;ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; list-style-type: disc; list-style-position: initial; list-style-image: initial; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-stash.html" rel="nofollow" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #0077cc; text-decoration: none; cursor: pointer; background-position: initial initial; background-repeat: initial initial; "&gt;stash&lt;/a&gt;&amp;nbsp;your current change or&lt;/li&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-reset.html" rel="nofollow" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #0077cc; text-decoration: none; cursor: pointer; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;reset --hard HEAD&lt;/code&gt;&lt;/a&gt;&amp;nbsp;(if you do not mind losing those minor changes) or&lt;/li&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html" rel="nofollow" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #0077cc; text-decoration: none; cursor: pointer; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;checkout -f&lt;/code&gt;&lt;/a&gt;&amp;nbsp;(When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes. )&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/1950317.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950317.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950302.html</id><title type="text">如何编译Android的kernel</title><summary type="text">书接上文，你想编译内核源代码，至少要先拿到源代码。1.编译的办法基本可以参考链接：http://www.cnblogs.com/mengshu-lbq/archive/2010/12/23/1914953.html最初我也奇怪为什么google没有直接准备好交叉编译工具链，我在http://blog.csdn.net/chizhaolin/archive/2010/07/08/5721539.aspx找到了一个答案：&amp;amp;#8220;android代码树中有一个prebuilt项目，包含了我们编译内核所需的交叉编译工具。注意：虽然Prebuilt下包含了交叉编译工具，但是编译时有可能会出现</summary><published>2011-02-09T09:01:00Z</published><updated>2011-02-09T09:01:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950302.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950302.html"/><content type="html">&lt;p&gt;书接上文，你想编译内核源代码，至少要先拿到源代码。&lt;/p&gt;&lt;p&gt;1.编译的办法基本可以参考链接：&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/mengshu-lbq/archive/2010/12/23/1914953.html"&gt;http://www.cnblogs.com/mengshu-lbq/archive/2010/12/23/1914953.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;最初我也奇怪为什么google没有直接准备好&lt;span  style="font-family: verdana, sans-serif; "&gt;交叉编译工具链，我在&lt;/span&gt;&lt;a href="http://blog.csdn.net/chizhaolin/archive/2010/07/08/5721539.aspx"&gt;http://blog.csdn.net/chizhaolin/archive/2010/07/08/5721539.aspx&lt;/a&gt;找到了一个答案：&lt;/p&gt;&lt;p&gt;&lt;span  style="font-family: verdana, sans-serif; "&gt;&amp;#8220;android代码树中有一个prebuilt项目，包含了我们编译内核所需的交叉编译工具。注意：虽然Prebuilt下包含了交叉编译工具，但是编译时有可能会出现&lt;span style="line-height: 21px; color: #ff0000; "&gt;&lt;strong&gt;&amp;#8220;/bin/sh: arm-eabi-gcc: not found&amp;#8221;&lt;/strong&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span  style="font-family: verdana, sans-serif; "&gt;这样的错误，因此最好从CodeSourcery上面下载。&amp;#8221;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;2.在编译的时候可能会遇到 类似&lt;span  style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; "&gt;main.c:704: undefined reference to `__gnu_mcount_nc' 的错误&lt;/span&gt;&lt;/p&gt;&lt;p&gt;解决办法：&lt;span  style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; "&gt;编译器版本不兼容，&lt;/span&gt;&lt;span  style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; "&gt;下载arm2007q3编译器&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;参考链接：&lt;a href="http://wtxarmux.blog.163.com/blog/static/120089000201042992024562/"&gt;http://wtxarmux.blog.163.com/blog/static/120089000201042992024562/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;3.在编译的时候可能遇到 类似&amp;nbsp;&lt;span  style="font-family: Verdana, Arial, Helvetica, sans-serif; "&gt;drivers/scsi/advansys.c:9885: error: implicit declaration of function `dma_cache_sync' 的问题&lt;/span&gt;&lt;/p&gt;&lt;p&gt;解决办法： 参考链接&amp;nbsp;&lt;a href="http://www.delnabla.cn/article.asp?id=242"&gt;http://www.delnabla.cn/article.asp?id=242&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;4.在编译的时候可能遇到 类似&amp;nbsp;&lt;span  style="font-family: arial, sans-serif; font-size: 12px; line-height: normal; "&gt;error: &amp;#8216;PAGE_KERNEL_NOCACHE&amp;#8217; undeclared&lt;/span&gt;&amp;nbsp;的问题&lt;/p&gt;&lt;p&gt;解决办法： 参考链接&amp;nbsp;&lt;a href="http://groups.google.com/group/comedi_list/msg/e6404fdd8237f6db"&gt;http://groups.google.com/group/comedi_list/msg/e6404fdd8237f6db&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;5.在修改CROSS_COMPILE=的时候，有时可能需要直接写上绝对路径，看到别人的帖子都是将arm交叉编译器的路径写到环境变量里，在我的环境里一直不好用，不知道为什么&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;另外&lt;a href="http://wtxarmux.blog.163.com/blog/static/120089000201042992024562/"&gt;http://wtxarmux.blog.163.com/blog/static/120089000201042992024562/&lt;/a&gt;&amp;nbsp;&amp;nbsp;这里有很多常见的错误参考&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;官方的指导参考（用途不大）&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: verdana, sans-serif; "&gt;&lt;p&gt;&lt;span  style="font-family: verdana, 'courier new'; "&gt;&lt;a href="http://source.android.com/porting/build_system.html#androidSourceSetupBuildingKernel"&gt;http://source.android.com/porting/build_system.html#androidSourceSetupBuildingKernel&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/1950302.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950302.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950277.html</id><title type="text">如何在Vmware下的Linux虚拟机增加磁盘空间</title><summary type="text">1.我使用的ubuntu10.10 去编译Android,但是发现预先分配好的20G空间很快就占没了，悲剧啊~解决办法参考：http://blog.csdn.net/brucelee0224/archive/2010/04/26/5528968.aspx其实原理就是a.给虚拟机加个新硬盘b.在系统上新建个文件夹作为挂载点,把新硬盘挂在这上边c.把原来系统上占空间比较大的某个文件夹的内容都move这个新的硬盘上来</summary><published>2011-02-09T08:22:00Z</published><updated>2011-02-09T08:22:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950277.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950277.html"/><content type="html">&lt;p&gt;1.我使用的ubuntu10.10 去编译Android,但是发现预先分配好的20G空间很快就占没了，悲剧啊~&lt;/p&gt;&lt;p&gt;解决办法参考：&lt;a href="http://blog.csdn.net/brucelee0224/archive/2010/04/26/5528968.aspx"&gt;http://blog.csdn.net/brucelee0224/archive/2010/04/26/5528968.aspx&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;其实原理就是&lt;/p&gt;&lt;p&gt;a.给虚拟机加个新硬盘&lt;/p&gt;&lt;p&gt;b.在系统上新建个文件夹作为挂载点,把新硬盘挂在这上边&lt;/p&gt;&lt;p&gt;c.把原来系统上占空间比较大的某个文件夹的内容都move这个新的硬盘上来&lt;/p&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/1950277.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950277.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950269.html</id><title type="text">运行Android的emulator</title><summary type="text">打算运行emulator来加载刚刚编译好img,但是遇到了好多问题，基本问题和下边这个链接差不多：http://hi.baidu.com/god_sperm/blog/item/ca49aeee19df755e79f055e6.html1.首先是ANDROID_SWT 不存在的问题，解决办法参：http://hi.baidu.com/thinke365/blog/item/202733aef773d6f1fbed50c9.html2.再次运行emulator的时候发现必须要在emulator的命令行下指定avd，那就让我们来创建一个新的avd：./android create avd -n m</summary><published>2011-02-09T08:11:00Z</published><updated>2011-02-09T08:11:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950269.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950269.html"/><content type="html">&lt;p&gt;打算运行emulator来加载刚刚编译好img,但是遇到了好多问题，基本问题和下边这个链接差不多：&lt;/p&gt;&lt;p&gt;&lt;a href="http://hi.baidu.com/god_sperm/blog/item/ca49aeee19df755e79f055e6.html"&gt;http://hi.baidu.com/god_sperm/blog/item/ca49aeee19df755e79f055e6.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;1.首先是&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;span  style="font-family: Arial; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "&gt;&lt;span style="line-height: 26px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; padding-bottom: 14px; "&gt;ANDROID_SWT 不存在的问题，解决办法参：&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://hi.baidu.com/thinke365/blog/item/202733aef773d6f1fbed50c9.html"&gt;http://hi.baidu.com/thinke365/blog/item/202733aef773d6f1fbed50c9.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;2.再次运行&amp;nbsp;emulator的时候发现必须要在emulator的命令行下指定avd，那就让我们来创建一个新的avd：&lt;/p&gt;&lt;p&gt;./&lt;span  style="color: #007000; font-family: monospace; font-size: 13px; white-space: pre; line-height: normal; "&gt;&lt;span style="color: #000000; "&gt;android create avd &lt;/span&gt;&lt;span style="color: #666600; "&gt;-&lt;/span&gt;&lt;span style="color: #000000; "&gt;n my_&lt;/span&gt;&lt;span style="color: #000000; "&gt;android2 &lt;/span&gt;&lt;span style="color: #000000; "&gt;-&lt;/span&gt;&lt;span style="color: #000000; "&gt;t &lt;/span&gt;&lt;span style="color: #000000; "&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;但是这时你会发现你会遇到类似下边的错误：&lt;/p&gt;&lt;div&gt;&lt;span style="font-family: Arial; line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;p style="line-height: normal; color: #555b6e; font-size: 12px; "&gt;&lt;span style="line-height: normal; "&gt;&lt;span style="line-height: normal; font-size: 16px; color: #000000; "&gt;Error: Error parsing the sdk.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: normal; color: #555b6e; font-size: 12px; "&gt;&lt;span style="line-height: normal; "&gt;&lt;span style="line-height: normal; font-size: 16px; color: #000000; "&gt;Error: /home/peipei/froyo/out/host/linux-x86/platforms is missing.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span  style="color: #555b6e; font-family: Arial; font-size: 12px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "&gt;&lt;span style="line-height: normal; "&gt;&lt;span style="line-height: normal; font-size: 16px; color: #000000; "&gt;Error: Unable to parse SDK content.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;解决办法是：我们不使用&lt;span  style="font-family: Arial; font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "&gt;/out/host/linux-x86/&lt;/span&gt;&amp;nbsp;下的android和emulator,也就是不使用我们先前编译出来的工具，而是使用sdk下的android和emulator，这是在&lt;a href="http://hi.baidu.com/god_sperm/blog/item/ca49aeee19df755e79f055e6.html"&gt;http://hi.baidu.com/god_sperm/blog/item/ca49aeee19df755e79f055e6.html&lt;/a&gt;&amp;nbsp;这个文章里没有解决的问题。我是自己编译的SDK：make sdk&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;3.我们就从上边编译好的SDK中运行emulator ，具体参数可以参见这个链接：&lt;/p&gt;&lt;p&gt;&lt;a href="http://iame.javaeye.com/blog/280666"&gt;http://iame.javaeye.com/blog/280666&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;当然，更详细的官方参考在这里：&lt;a href="http://developer.android.com/guide/developing/tools/emulator.html"&gt;http://developer.android.com/guide/developing/tools/emulator.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;4.有时还需要设定一个环境变量。。。。&lt;/div&gt;&lt;/div&gt;&lt;p&gt;export &amp;nbsp; ANDROID_PRODUCT_OUT=/root/dsk/android/out/target/product/generic .&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/1950269.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/02/09/1950269.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/liuyuer/archive/2011/02/07/1949644.html</id><title type="text">如何编译Android源代码</title><summary type="text">0.准备操作系统如果需要编译的版本&amp;amp;lt;=2.2 可以用32位的linux，如果是&amp;amp;gt;2.2的版本，要用64位的linux推荐Ubuntu1. 安装需要的工具参考这个链接：http://source.android.com/source/download.html点Source &amp;amp;gt; Getting the source你可能会纠结于使用java1.5还是1.6， 当你想编译Android比较早的版本时，会发现其实java1.5已经不被支持了，所以你在Ubuntu下直接apt-get是找不到的，这时你需要参考这个链接：http://blog.enea.com/</summary><published>2011-02-07T05:52:00Z</published><updated>2011-02-07T05:52:00Z</updated><author><name>刘誉儿</name><uri>http://www.cnblogs.com/liuyuer/</uri></author><link rel="alternate" href="http://www.cnblogs.com/liuyuer/archive/2011/02/07/1949644.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/liuyuer/archive/2011/02/07/1949644.html"/><content type="html">&lt;p&gt;0.准备操作系统&lt;/p&gt;&lt;p&gt;如果需要编译的版本&amp;lt;=2.2 可以用32位的linux，如果是&amp;gt;2.2的版本，要用64位的linux&lt;/p&gt;&lt;p&gt;推荐Ubuntu&amp;nbsp;&lt;/p&gt;&lt;p&gt;1. 安装需要的工具&lt;/p&gt;&lt;p&gt;参考这个链接：&lt;a href="http://source.android.com/source/download.html"&gt;http://source.android.com/source/download.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;点Source &amp;gt; Getting the source&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;你可能会纠结于使用java1.5还是1.6， 当你想编译Android比较早的版本时，会发现其实java1.5已经不被支持了，所以你在Ubuntu下直接apt-get是找不到的，这时你需要参考这个链接：&lt;a href="http://blog.enea.com/Blog/bid/32050/Ubuntu-9-10-Java-5-and-the-Android-Open-Source-Project"&gt;http://blog.enea.com/Blog/bid/32050/Ubuntu-9-10-Java-5-and-the-Android-Open-Source-Project&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;当你的系统中安装了多个版本的java时，你可以通过&amp;nbsp;&lt;span  style="color: #636563; font-family: 'Courier New'; font-size: 12px; line-height: 19px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;sudo update-alternatives --config java&lt;/span&gt;&amp;nbsp;来选择你需要用的java版本。&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;2.Android的编译主要是用git,当你会看到google主要是用的工具叫做repo,这个其实是个python脚本，你需要手动下载它：&lt;/p&gt;&lt;div&gt;&lt;span style="color: #333333; font-family: 宋体, Arial; line-height: 19px; "&gt;&lt;p&gt;下载repo脚本并使其可执行：&lt;/p&gt;&lt;p&gt;1 $ curl http://android.git.kernel.org/repo &amp;gt;~/bin/repo&lt;/p&gt;&lt;p&gt;2 $ chmod a+x ~/bin/repo&lt;/p&gt;&lt;p&gt;4）初始化repo&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span  style="color: #333333; font-family: 宋体, Arial; line-height: 19px; "&gt;repo是android对git的一个封装，简化了一些git的操作。&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;下一步就是使用repo去初始化代码，和下载代码：&lt;span  style="color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 16px; "&gt;repo init -u git://android.git.kernel.org/platform/manifest.git&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;这样默认是下载的代码树中的master,如果需要别的分支可以参考&amp;nbsp;&lt;a href="http://source.android.com/source/download.html"&gt;http://source.android.com/source/download.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;这里请注意，默认下载的时候是不包含kernel的源代码的，如果你需要kernel的源代码，你可以参考这个链接：&lt;/p&gt;&lt;p&gt;&lt;a href="http://elinux.org/Android_Kernel_Download"&gt;http://elinux.org/Android_Kernel_Download&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;3.一些奇怪的问题:&lt;/p&gt;&lt;p&gt;我安装的是32bit的Ubuntu,在编译主干的代码时，报错说我需要64位的系统，还说需要java1.6。&lt;/p&gt;&lt;p&gt;你可以这样解决：sudo apt-get install sun-java1.6-sdk&lt;/p&gt;&lt;p&gt;然后给自己修改源代码,具体方法可以参考：&lt;/p&gt;&lt;p&gt;&lt;a href="http://groups.google.com/group/android-platform/browse_thread/thread/b0bb991131589363"&gt;http://groups.google.com/group/android-platform/browse_thread/thread/b0bb991131589363&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;4.make&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/liuyuer/aggbug/1949644.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/liuyuer/archive/2011/02/07/1949644.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry></feed>
