<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-407622661378233124</id><updated>2014-01-03T18:42:19.100+08:00</updated><category term="IOS"/><category term="Android"/><category term="Javascript"/><category term="Mobile"/><category term="iphone"/><category term="軟體設計"/><category term="Java"/><category term="Web Design"/><category term="Xcode4"/><category term="mac"/><category term="xcode"/><category term="A2SD+"/><category term="Debug"/><category term="Decompiler"/><category term="GIT"/><category term="JAD"/><category term="JD"/><category term="app id"/><category term="apple"/><category term="application id"/><category term="bundle id"/><category term="bundle seed id"/><category term="extension points"/><category term="ipad"/><category term="library"/><category term="reengineering"/><category term="s-off"/><category term="static library"/><category term="uml"/><category term="使用者案例"/><category term="元件"/><category term="壓縮"/><category term="應用軟體"/><category term="解壓縮"/><title type='text'>夏季數位</title><subtitle type='html'>Web . Mobile . 軟體設計與開發&#xa;WordPress : http://appworker.wordpress.com/portfolio/</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-7838945514080652687</id><published>2013-01-18T14:25:00.000+08:00</published><updated>2013-01-18T14:26:23.404+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IOS"/><title type='text'>取得 Apple Device 的 Device ID</title><content type='html'>&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;header style=&quot;background-color: white; border: 0px; color: #888888; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-size: 48px; letter-spacing: -2px; line-height: 50px;&quot;&gt;取得 Apple Device 的 Device&amp;nbsp;ID&lt;/span&gt;&lt;/header&gt;&lt;br /&gt;&lt;div class=&quot;content&quot; style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 22px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; zoom: 1;&quot;&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;在開發 APP 階段我們時常需要進行測試，測試的時候因為不是正式的版本所以我們並不會將軟體發佈上 App Store。這時候我們會使用 Apple提供的 AD Hoc 機制來加入指定的特定人員的裝置可以使用 iTune 安裝尚未發佈的測試版本 APP。&lt;/div&gt;&lt;h1 style=&quot;background-color: transparent; border: 0px; color: black; font-size: 48px; letter-spacing: -2px; line-height: 50px; margin: 0px 0px 20px; outline: 0px; padding: 5px 0px 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;取得裝置識別碼的方式&lt;/h1&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;要使用者樣的方法開發人員則需要使用者提供 Device ID，而這有兩種方式可以取得：&lt;/div&gt;&lt;ol style=&quot;background-color: transparent; border: 0px; list-style-image: initial; list-style-position: inside; margin: 0px 0px 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; border: 0px; line-height: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;安裝第三方的軟體到你的裝置上，然後輕鬆地點一個按鍵就可以自動地將你的裝置識別碼寄到你指定的郵件信箱去&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;連接你的裝置到電腦上 &amp;gt; 打開你的 iTune &amp;gt; 開啓你要的裝置 &amp;gt; 複製你的裝置識別碼 &amp;gt; 自己手動寄給對方&lt;/li&gt;&lt;/ol&gt;&lt;h1 style=&quot;background-color: transparent; border: 0px; color: black; font-size: 48px; letter-spacing: -2px; line-height: 50px; margin: 0px 0px 20px; outline: 0px; padding: 5px 0px 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;不同方法的風險&lt;/h1&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;當然第一種方式是最方便的，不過這個方式之前曾經出現漏洞，這種漏洞會讓軟體開發人員可以取得你的特殊權限所以一般使用者很擔心這樣的方式會帶來的風險。&lt;/div&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;第二種方式說穿了簡單，步驟很多但是無痛也安全，所以如果需要的話可以參照下面的步驟操作。&lt;/div&gt;&lt;h1 style=&quot;background-color: transparent; border: 0px; color: black; font-size: 48px; letter-spacing: -2px; line-height: 50px; margin: 0px 0px 20px; outline: 0px; padding: 5px 0px 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;使用 iTune 取得你的 Apple 裝置識別碼&lt;/h1&gt;&lt;h2 style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: black; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;連接你的裝置到電腦上並且開啟 iTune (MAC可以點右上角的放大鏡在上面打上 iTune 可以快速開啓)&lt;/h2&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://appworker.files.wordpress.com/2013/01/1.png&quot; style=&quot;-webkit-tap-highlight-color: rgb(254, 119, 147); background-color: transparent; color: #2e6eb0; margin: 0px; padding: 0px; vertical-align: baseline;&quot; target=&quot;_parent&quot;&gt;&lt;img alt=&quot;1&quot; class=&quot;alignleft size-full wp-image-333&quot; src=&quot;http://appworker.files.wordpress.com/2013/01/1.png?w=830&quot; style=&quot;background-color: transparent; border: 0px; float: left; height: auto; margin: 0px 20px 0px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;點選&lt;/div&gt;&lt;h2 style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: black; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;iTune 右上角的 Device 按鈕會顯示你電腦偵測到的所有 iDevice，點選你要的裝置&lt;/h2&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://appworker.files.wordpress.com/2013/01/2.png&quot; style=&quot;-webkit-tap-highlight-color: rgb(254, 119, 147); background-color: transparent; color: #2e6eb0; margin: 0px; padding: 0px; vertical-align: baseline;&quot; target=&quot;_parent&quot;&gt;&lt;img alt=&quot;2&quot; class=&quot;alignleft size-large wp-image-334&quot; height=&quot;474&quot; src=&quot;http://appworker.files.wordpress.com/2013/01/2.png?w=830&amp;amp;h=474&quot; style=&quot;background-color: transparent; border: 0px; float: left; height: auto; margin: 0px 20px 0px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;&quot; width=&quot;830&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h2 style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: black; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;如果左邊出現的是 Serial Number則將你的滑鼠移到序號上面點一下滑鼠左鍵，Serial Number 會變成 identifier (UDID)&lt;/h2&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://appworker.files.wordpress.com/2013/01/3.png&quot; style=&quot;-webkit-tap-highlight-color: rgb(254, 119, 147); background-color: transparent; color: #2e6eb0; margin: 0px; padding: 0px; vertical-align: baseline;&quot; target=&quot;_parent&quot;&gt;&lt;img alt=&quot;3&quot; class=&quot;alignleft size-large wp-image-335&quot; height=&quot;473&quot; src=&quot;http://appworker.files.wordpress.com/2013/01/3.png?w=830&amp;amp;h=473&quot; style=&quot;background-color: transparent; border: 0px; float: left; height: auto; margin: 0px 20px 0px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;&quot; width=&quot;830&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h2 style=&quot;background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: black; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;滑鼠移動到&amp;nbsp;identifier (UDID)右邊的識別碼上點選滑鼠右鍵就可以複製了&lt;/h2&gt;&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://appworker.files.wordpress.com/2013/01/4.png&quot; style=&quot;-webkit-tap-highlight-color: rgb(254, 119, 147); background-color: transparent; color: #2e6eb0; margin: 0px; padding: 0px; vertical-align: baseline;&quot; target=&quot;_parent&quot;&gt;&lt;img alt=&quot;4&quot; class=&quot;alignleft size-large wp-image-336&quot; height=&quot;484&quot; src=&quot;http://appworker.files.wordpress.com/2013/01/4.png?w=830&amp;amp;h=484&quot; style=&quot;background-color: transparent; border: 0px; float: left; height: auto; margin: 0px 20px 0px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;&quot; width=&quot;830&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;footer style=&quot;background-color: white; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-width: 1px 0px 0px; clear: both; color: #999999; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 22px; margin: 20px 0px 0px; outline: 0px; padding: 5px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;edit&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/footer&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/7838945514080652687/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2013/01/1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/7838945514080652687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/7838945514080652687'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2013/01/1.html' title='取得 Apple Device 的 Device ID'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-6786201166088955803</id><published>2013-01-11T14:35:00.000+08:00</published><updated>2013-01-11T14:35:05.375+08:00</updated><title type='text'>Xcode 無法調整 Base SDKs 的解決方式</title><content type='html'>&lt;br /&gt;&lt;header style=&quot;border: 0px; color: #888888; font-size: 15px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;h1 style=&quot;border: 0px; color: black; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 48px; letter-spacing: -2px; line-height: 50px; margin: 0px 0px 20px; outline: 0px; padding: 5px 0px 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;a href=&quot;http://appworker.files.wordpress.com/2013/01/xcode.jpg&quot; style=&quot;color: black; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;xcode&quot; class=&quot;alignleft size-full wp-image-309&quot; src=&quot;http://appworker.files.wordpress.com/2013/01/xcode.jpg?w=830&quot; style=&quot;border: 0px; float: left; height: auto; margin: 0px 20px 0px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;&quot; /&gt;&lt;/a&gt;&lt;/h1&gt;&lt;/header&gt;&lt;div class=&quot;content&quot; style=&quot;border: 0px; font-size: 15px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; zoom: 1;&quot;&gt;&lt;pre style=&quot;border: 0px; font-family: monospace, sans-serif; line-height: 22px; outline: 0px; padding: 10px; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;IOS 藉由更新 Xcode 來提供最新的 IOS SDK 開發，對於開發者收到了更新通知很理所當然地會更新來取得最新的編輯器跟最新的SDK，而新版的 Xcode 也只會包含最新的 SDK，假設你下載4.5 版本的 Xcode 它只會包含最新的 IOS 6。 不過這遇到了一個很關鍵問題就是對於一個開發人員來說需要維護的版本不一定只有 IOS 6，在IOS 6推出的時候我們的客戶並不會馬上更新版本，所以我們還是需要維護 IOS 5 的APP，這時候我們需要的是調整設定中的Base SDK 這個項目，不能使用相融模式的原因是因為不同版本的SDK在 compiler階段有所不同，當然這也是有解不過這裡就不說明。 Xocde 在專案設定理提供了可以選擇 Base SDK 的項目，但是這時候你只會看到內建的一個版本的 IOS SDK，依照Xcode 4.5來說就是IOS，那如何安裝 IOS 5 或是 IOS 4 呢? 這個問題讓人就讓人很困擾，因為文件並沒有明白告訴我們這件事情，所以我們就來說一下怎樣安裝舊版的 SDK 到 Xcode裡。&lt;/pre&gt;&lt;h1 style=&quot;border: 0px; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 48px; letter-spacing: -2px; line-height: 50px; margin: 0px 0px 20px; outline: 0px; padding: 5px 0px 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;自己手動的解決方式&lt;/h1&gt;&lt;pre style=&quot;border: 0px; font-family: monospace, sans-serif; line-height: 22px; outline: 0px; padding: 10px; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;需要的步驟如下，至於怎樣做文章最下方有個別的詳細方法可以參考：&lt;/pre&gt;&lt;ol style=&quot;border: 0px; list-style-image: initial; list-style-position: inside; margin: 0px 0px 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre style=&quot;border: 0px; font-family: monospace, sans-serif; line-height: 22px; outline: 0px; padding: 10px; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;border: 0px; line-height: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;取得舊版的 SDK&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre style=&quot;border: 0px; font-family: monospace, sans-serif; line-height: 22px; outline: 0px; padding: 10px; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;將舊版的SDK複製到當前的 Xcode 目錄下的SDKs中&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre style=&quot;border: 0px; font-family: monospace, sans-serif; line-height: 22px; outline: 0px; padding: 10px; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;重新開啓 Xcode&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;pre style=&quot;border: 0px; font-family: monospace, sans-serif; line-height: 22px; outline: 0px; padding: 10px; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;取得舊版SDK的兩種方式&lt;/h2&gt;&lt;ol style=&quot;border: 0px; list-style-image: initial; list-style-position: inside; margin: 0px 0px 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre style=&quot;border: 0px; font-family: monospace, sans-serif; line-height: 22px; outline: 0px; padding: 10px; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;如果還保留舊版的 Xcode 可以從目錄中複製出來&lt;span style=&quot;border: 0px; line-height: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;使用 Find 或是 Terminal 下指令，目錄位置在&amp;nbsp;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre style=&quot;border: 0px; font-family: monospace, sans-serif; line-height: 22px; outline: 0px; padding: 10px; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;從官方網站下載特定版本的 Xcode DMG 檔案後 Mount 起來然後再從 Xcode.app 中複製出來 下載網址&amp;nbsp;&lt;a href=&quot;https://developer.apple.com/downloads/index.action#&quot; style=&quot;color: #2e6eb0; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;https://developer.apple.com/downloads/index.action &lt;/a&gt;&lt;a href=&quot;http://appworker.files.wordpress.com/2013/01/apple-download-site1.png&quot; style=&quot;color: #2e6eb0; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;apple-download-site&quot; class=&quot;alignleft  wp-image-306&quot; height=&quot;362&quot; src=&quot;http://appworker.files.wordpress.com/2013/01/apple-download-site1.png?w=664&amp;amp;h=362&quot; style=&quot;border: 0px; float: left; height: auto; margin: 0px 20px 0px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;&quot; width=&quot;664&quot; /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;&lt;/h2&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;Xcode SDKs 的目錄位置在哪裡&lt;/h2&gt;&lt;pre style=&quot;border: 0px; font-family: monospace, sans-serif; line-height: 22px; outline: 0px; padding: 10px; vertical-align: baseline; white-space: pre-line; word-wrap: break-word;&quot;&gt;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs&lt;/pre&gt;&lt;h2 style=&quot;border: 0px; font-size: 18px; line-height: 24px; margin: 0px 0px 20px; outline: 0px; padding: 20px 0px 0px; vertical-align: baseline;&quot;&gt;重新啓動後 Xcode 的 Base SDKs 可以選擇了&lt;/h2&gt;&lt;div style=&quot;border: 0px; margin-bottom: 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://appworker.files.wordpress.com/2013/01/base_sdk_options.png&quot; style=&quot;color: #2e6eb0; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;base_sdk_options&quot; class=&quot; wp-image-304 alignleft&quot; height=&quot;306&quot; src=&quot;http://appworker.files.wordpress.com/2013/01/base_sdk_options.png?w=560&amp;amp;h=306&quot; style=&quot;border: 0px; float: left; height: auto; margin: 0px 20px 0px 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;&quot; width=&quot;560&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;sharedaddy sd-like-enabled sd-sharing-enabled&quot; id=&quot;jp-post-flair&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; clear: both; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; zoom: 1;&quot;&gt;&lt;div class=&quot;sharedaddy sd-sharing-enabled&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; clear: both; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; zoom: 1;&quot;&gt;&lt;div class=&quot;robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing&quot; style=&quot;border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-color: rgba(0, 0, 0, 0.125); border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; outline: 0px; padding: 10px 0px 5px; vertical-align: baseline; width: 720px; zoom: 1;&quot;&gt;&lt;h3 class=&quot;sd-title&quot; style=&quot;background-color: white; background-image: none; border: none; float: left; font-size: 12px; line-height: 1; margin: 3px 0px; outline: 0px; padding: 0px; position: static; vertical-align: baseline; width: 112px;&quot;&gt;Share this:&lt;/h3&gt;&lt;div class=&quot;sd-content&quot; style=&quot;background-color: white; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px; color: #444444; float: right; line-height: 22px; margin: -2px 0px 0px; outline: 0px; padding: 0px; vertical-align: baseline; width: 591px;&quot;&gt;&lt;ul style=&quot;background-image: none; border: none; list-style: none; margin: 0px; outline: 0px; padding: 0px !important; vertical-align: baseline; zoom: 1;&quot;&gt;&lt;li class=&quot;share-press-this&quot; style=&quot;background-image: none; border: none; display: block; float: left; list-style: none; margin: 0px 5px 5px 0px !important; outline: 0px; padding: 0px !important; vertical-align: baseline;&quot;&gt;&lt;a class=&quot;share-press-this sd-button share-icon&quot; href=&quot;http://appworker.wordpress.com/2013/01/11/xcode-add-sdk-to-base-sdks-option/?share=press-this&amp;amp;nb=1&quot; rel=&quot;nofollow&quot; style=&quot;background-image: -webkit-linear-gradient(top, rgb(247, 247, 247) 0%, rgb(239, 239, 239) 100%); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221) !important; box-shadow: rgb(255, 255, 255) 0px 1px 0px inset; color: rgb(0, 0, 0) !important; display: inline-block; line-height: 1; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; title=&quot;Click to Press This!&quot;&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/6786201166088955803/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2013/01/xcode-base-sdks.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/6786201166088955803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/6786201166088955803'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2013/01/xcode-base-sdks.html' title='Xcode 無法調整 Base SDKs 的解決方式'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-3513018333473492656</id><published>2012-10-01T18:58:00.001+08:00</published><updated>2012-10-01T19:01:18.995+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IOS"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode"/><category scheme="http://www.blogger.com/atom/ns#" term="Xcode4"/><title type='text'>IOS多國語系規劃與開發-ios multi language design and imeplementation</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-CA8uyj6AXYU/UGl38gLoihI/AAAAAAAAVWY/qpXmtOG0AzE/s1600/multi-language.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;187&quot; src=&quot;http://4.bp.blogspot.com/-CA8uyj6AXYU/UGl38gLoihI/AAAAAAAAVWY/qpXmtOG0AzE/s320/multi-language.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;多國語系是在APP的規劃與開發設計中是一個很重要的一環，很簡單的一個原因就是「市場」！其實說簡單也算是簡單，因為 SDK 本身就提供了多國語系的功能，我們只需要簡單的幾個步驟就可以達到，下面是簡單的步驟：&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;多國語系的規劃&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;規劃好哪些產出需要多國語系: UI, Message, Mail Template ..ext&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;決定好上面的東西要怎樣做，例如：是否要將XIB, infos.plist 變成多國語系, 是否要對圖檔做多國語系, 是否要將 Strings 與 Template 做成多國語系&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;作出一個 POC Template 與 Design Guideline for Multi-language 給 UI Design , Designer (Technical Designer), Programmer。&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;一個方式&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;個人喜歡的方式是將所有文字抽出來做成多國語系檔，因為這樣你只需要維護的是各種語系的文字檔案，但是這樣需要考慮到的是：&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;所有圖片不能含有文字，UI設計師只能使用IOS內建的字型，並且必續要產出 Design Guideline 讓開發人員清楚地知道每個UI的字形大小, 字型種類, 文字的色碼, 最多支援行數&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;UI設計師必須在設計的時候清楚知道有多少種語言需要被支援，並且在設計所有 UI 元件的時候考慮到「文字長度」，並且在視覺設計上儘量在不破壞美觀下定義長寬的最大值&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Designer必須要將所有文字的 KEY 值作名稱規劃，並且需要讓所有 Programmer能藉由KEY值就能知道文字的用途。&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;這樣的設計方式可以達到多國語系的設計而且可以將所有語系的內容框在&amp;nbsp;Localizable.strings 與 Template File 裡，解由修改修改語系檔案或是 Mail or Publish template就可以快速地達到修改多國語內容的目的。&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;SDK也支援 XIB的多國語系設計方式，只是當 View component 跟多國語系攪在一起，那可想而知的是修改的 Effort 太大了。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;開發步驟&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;建立&amp;nbsp;Localizable.strings Files， New 一個 File , 選擇 Resource &amp;gt; Strings File, 將它命名為&amp;nbsp;Localizable.strings&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;點選左側 Navigator 中的「專案名字」&amp;gt; 右側點選 Info , 右邊的 Localizations 可以增加你要支援的語言, 點選後會有詢問你哪些檔案要變成多國語系，以上面的例子因為我的方式只有用到&amp;nbsp;Localizable.strings 所以只要選擇&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Localizable.strings就可以&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;編輯 Localizable.strings , 基本我將所有的 strings 分為下面幾個類別&lt;br /&gt;&lt;div style=&quot;color: #008f00; font-family: Menlo; font-size: 11px;&quot;&gt;// button&lt;/div&gt;&lt;div style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&quot;Done&quot;&lt;span style=&quot;color: black;&quot;&gt; = &lt;/span&gt;&quot;Done&quot;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&quot;Close&quot;&lt;span style=&quot;color: black;&quot;&gt; = &lt;/span&gt;&quot;Close&quot;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&quot;Tutorials&quot;&lt;span style=&quot;color: black;&quot;&gt; = &lt;/span&gt;&quot;Tutorial&quot;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #008f00; font-family: Menlo; font-size: 11px;&quot;&gt;// message&lt;/div&gt;&lt;div style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&quot;Please insert valid information&quot;&lt;span style=&quot;color: black;&quot;&gt; = &lt;/span&gt;&quot;Please insert valid information&quot;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #008f00; font-family: Menlo; font-size: 11px;&quot;&gt;// label string&lt;/div&gt;&lt;div style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&quot;You’ve traveled&quot;&lt;span style=&quot;color: black;&quot;&gt; = &lt;/span&gt;&quot;You’ve traveled&quot;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color: #008f00; font-family: Menlo; font-size: 11px;&quot;&gt;// exception string&lt;/span&gt;&lt;div style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&quot;The hardware does not support&quot;&lt;span style=&quot;color: black;&quot;&gt; = &lt;/span&gt;&quot;The hardware does not support&quot;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;在程式裡取用所有的 strings 只需要如下的寫法&lt;br /&gt;&lt;span style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;cell.&lt;/span&gt;&lt;span style=&quot;color: #3495af; font-family: Menlo; font-size: 11px;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #3495af; font-family: Menlo; font-size: 11px;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0433ff; font-family: Menlo; font-size: 11px;&quot;&gt;NSLocalizedString&lt;/span&gt;&lt;span style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;@&quot;&lt;/span&gt;&lt;span style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;You’ve traveled&lt;/span&gt;&lt;span style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0433ff; font-family: Menlo; font-size: 11px;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;若需要在 UI 上顯示現在使用者所選用的語言, 你可以使用下面的方法顯示出各國語言表現的語言文字, 像當選擇日文時會顯示「日本語」&lt;div style=&quot;color: #3495af; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;NSLocale&lt;span style=&quot;color: black;&quot;&gt; *locale=[&lt;/span&gt;NSLocale&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;currentLocale&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3495af; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;NSString&lt;span style=&quot;color: black;&quot;&gt; *langName= [locale &lt;/span&gt;displayNameForKey&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;NSLocaleIdentifier&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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 style=&quot;color: #3495af;&quot;&gt;value&lt;/span&gt;:[[&lt;span style=&quot;color: #3495af;&quot;&gt;NSLocale&lt;/span&gt; &lt;span style=&quot;color: #3495af;&quot;&gt;preferredLanguages&lt;/span&gt;] &lt;span style=&quot;color: #3495af;&quot;&gt;objectAtIndex&lt;/span&gt;:0]];&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;結論&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;很多種方式可以達道不同程度的多國語系方式，只是需要注意的層面不同，這樣做法上很簡單，但是對於設計來說會需要注意的地方很多，一不注意就會讓文字超出UI或是變成...。在開發上唯一需要注意的是 Key 的命名規則，否則平行開發下 Programmer 若看不懂語系檔那只會有兩種情形：一種是花很多時間去搞清楚什麼是什麼，第二種就是會多出很多同樣的文字參數。&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/3513018333473492656/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2012/10/ios-ios-multi-language-design-and.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/3513018333473492656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/3513018333473492656'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2012/10/ios-ios-multi-language-design-and.html' title='IOS多國語系規劃與開發-ios multi language design and imeplementation'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-CA8uyj6AXYU/UGl38gLoihI/AAAAAAAAVWY/qpXmtOG0AzE/s72-c/multi-language.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>115台湾 台北市南港区玉成街42巷</georss:featurename><georss:point>25.0484252 121.5805431</georss:point><georss:box>24.9908787 121.5015791 25.1059717 121.6595071</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-5585397604163388775</id><published>2012-08-21T17:48:00.001+08:00</published><updated>2012-08-21T18:28:21.153+08:00</updated><title type='text'>ios : the best way to implement rotation 實現 rotation 的好方式</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-vJzItmf5eV8/UDNio-eUkkI/AAAAAAAAUZ8/6xLs6Ad5O4s/s1600/ios-device-rotated.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-vJzItmf5eV8/UDNio-eUkkI/AAAAAAAAUZ8/6xLs6Ad5O4s/s1600/ios-device-rotated.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;在開發 app 時候不免需要對翻轉效果做很多克制化，有的需要換掉整個界面，有的需要換背景，一般來說通常都需要針對那種看起來很簡單的東西寫很多程式，做起來很麻煩，真的是件很苦的差事。&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;下面是幾個我試過的方法&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;在 翻轉的時候去重新配置所有元件的位置&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;直接在翻轉後去換一個特定方向的 UIViewController&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;這兩種方法都很麻煩而且費工，簡直就是大茶包一個。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;今天發現一個新的方法！&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;不僅簡單又方便，可以大大省去很多時間，下面這個 Method 是關鍵。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NSBundle UIKit Additions Reference&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier, Consolas, monospace; font-size: 13px;&quot;&gt;- (&lt;/span&gt;&lt;a href=&quot;http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html#//apple_ref/doc/c_ref/NSArray&quot; style=&quot;background-color: white; color: #003366; font-family: Courier, Consolas, monospace; font-size: 13px; text-decoration: none;&quot;&gt;NSArray&lt;/a&gt;&lt;span style=&quot;background-color: white; font-family: Courier, Consolas, monospace; font-size: 13px;&quot;&gt;&amp;nbsp;*)loadNibNamed:(&lt;/span&gt;&lt;a href=&quot;http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/doc/c_ref/NSString&quot; style=&quot;background-color: white; color: #003366; font-family: Courier, Consolas, monospace; font-size: 13px; text-decoration: none;&quot;&gt;NSString&lt;/a&gt;&lt;span style=&quot;background-color: white; font-family: Courier, Consolas, monospace; font-size: 13px;&quot;&gt;&amp;nbsp;*)&lt;/span&gt;&lt;em style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Geneva, Helvetica, Arial, sans-serif; font-size: 13px;&quot;&gt;name&lt;/em&gt;&lt;span style=&quot;background-color: white; font-family: Courier, Consolas, monospace; font-size: 13px;&quot;&gt;&amp;nbsp;owner:(id)&lt;/span&gt;&lt;em style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Geneva, Helvetica, Arial, sans-serif; font-size: 13px;&quot;&gt;owner&lt;/em&gt;&lt;span style=&quot;background-color: white; font-family: Courier, Consolas, monospace; font-size: 13px;&quot;&gt;&amp;nbsp;options:(&lt;/span&gt;&lt;a href=&quot;http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSDictionary&quot; style=&quot;background-color: white; color: #003366; font-family: Courier, Consolas, monospace; font-size: 13px; text-decoration: none;&quot;&gt;NSDictionary&lt;/a&gt;&lt;span style=&quot;background-color: white; font-family: Courier, Consolas, monospace; font-size: 13px;&quot;&gt;&amp;nbsp;*)&lt;/span&gt;&lt;em style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Geneva, Helvetica, Arial, sans-serif; font-size: 13px;&quot;&gt;options&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;em style=&quot;background-color: white; font-family: &#39;Lucida Grande&#39;, Geneva, Helvetica, Arial, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://developer.apple.com/library/ios/#documentation/UIKit/Reference/NSBundle_UIKitAdditions/Introduction/Introduction.html&quot; target=&quot;_blank&quot;&gt;原文說明連結&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;不囉唆來一段簡單的範例程式，相信簡單幾行大家就會很快地瞭解了。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;- (&lt;span style=&quot;color: #0433ff;&quot;&gt;void&lt;/span&gt;)willAnimateRotationToInterfaceOrientation:(&lt;span style=&quot;color: #3495af;&quot;&gt;UIInterfaceOrientation&lt;/span&gt;)interfaceOrientation&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; duration:(&lt;span style=&quot;color: #3495af;&quot;&gt;NSTimeInterval&lt;/span&gt;)duration&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3495af;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot; do rotation of the view controller&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px; min-height: 13px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div style=&quot;color: #0433ff; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;if&lt;span style=&quot;color: black;&quot;&gt;( &lt;/span&gt;UIInterfaceOrientationIsLandscape&lt;span style=&quot;color: black;&quot;&gt;(interfaceOrientation) )&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #3495af; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #0433ff;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;viewDidUnload&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3495af; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[&lt;/span&gt;NSBundle&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;mainBundle&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;loadNibNamed&lt;span style=&quot;color: black;&quot;&gt;: [&lt;/span&gt;NSString&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;stringWithFormat&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #b4261a;&quot;&gt;@&quot;%@-landscape&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;, &lt;/span&gt;NSStringFromClass&lt;span style=&quot;color: black;&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color: #0433ff;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;class&lt;span style=&quot;color: black;&quot;&gt;])]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #3495af;&quot;&gt;owner&lt;/span&gt;: &lt;span style=&quot;color: #0433ff;&quot;&gt;self&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #3495af;&quot;&gt;options&lt;/span&gt;: &lt;span style=&quot;color: #0433ff;&quot;&gt;nil&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;span style=&quot;color: #0433ff;&quot;&gt;self&lt;/span&gt; &lt;span style=&quot;color: #3495af;&quot;&gt;viewDidLoad&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3495af;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot; landscape&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0433ff;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #3495af; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #0433ff;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;viewDidUnload&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3495af; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[&lt;/span&gt;NSBundle&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;mainBundle&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;loadNibNamed&lt;span style=&quot;color: black;&quot;&gt;: [&lt;/span&gt;NSString&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;stringWithFormat&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #b4261a;&quot;&gt;@&quot;%@&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;, &lt;/span&gt;NSStringFromClass&lt;span style=&quot;color: black;&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color: #0433ff;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;class&lt;span style=&quot;color: black;&quot;&gt;])]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #3495af;&quot;&gt;owner&lt;/span&gt;: &lt;span style=&quot;color: #0433ff;&quot;&gt;self&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #3495af;&quot;&gt;options&lt;/span&gt;: &lt;span style=&quot;color: #0433ff;&quot;&gt;nil&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;span style=&quot;color: #0433ff;&quot;&gt;self&lt;/span&gt; &lt;span style=&quot;color: #3495af;&quot;&gt;viewDidLoad&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;color: #b4261a; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3495af;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot; portrait&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;利用 NSBundle loadNibNamed 的方法在 Rotation 的後去替換掉 Views，如此可以快速地在 NIB 上面拉UI 不需要再去用程式算出每個UIs的位置，這樣的話方便很多。&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;當然別忘記在 Reload Views之後重新 init 所有的 values與行為，不過我想這應該原本設計客制化的 UIs 的時候就已經做好了。&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;font-family: Menlo; font-size: 11px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/5585397604163388775/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2012/08/ios-best-way-to-implement-rotation.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/5585397604163388775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/5585397604163388775'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2012/08/ios-best-way-to-implement-rotation.html' title='ios : the best way to implement rotation 實現 rotation 的好方式'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-vJzItmf5eV8/UDNio-eUkkI/AAAAAAAAUZ8/6xLs6Ad5O4s/s72-c/ios-device-rotated.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-7629964545151372662</id><published>2011-12-29T23:52:00.000+08:00</published><updated>2011-12-29T23:53:24.793+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Javascript build function prototype 不同的函示寫法</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-rJSSBN-Bd0U/TvyMeADq84I/AAAAAAAARZQ/i4I1nXawFKQ/s1600/You-Design-I-Code.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://3.bp.blogspot.com/-rJSSBN-Bd0U/TvyMeADq84I/AAAAAAAARZQ/i4I1nXawFKQ/s320/You-Design-I-Code.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;問題&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;JavaScript 的寫法很多，端看開發者的喜好（這不是個好現象），今天看到了一個寫 function call 的方式，因為是第一次看到這樣的寫法所以就稍稍的研究了一下。&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;var id = that.profile.id;&lt;br /&gt;(function(id){&lt;br /&gt;&amp;nbsp; &amp;nbsp;// do business logic&lt;br /&gt;})(id);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;寫 Web 寫了非常久了是第一次看到這樣的寫法所以一開始看到覺得非常的困惑。&lt;br /&gt;用 chrome developer tool 的 console 研究了一下後才知道原來這是一種 function call 的寫法，&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;解答&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;這段程式告訴 browser 的是：&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;var id = that.profile.id;&lt;br /&gt;宣告一個 id 變數&lt;/li&gt;&lt;li&gt;(function(id) { // do business logic })(id);&lt;br /&gt;建立一個 &amp;nbsp;function call，可以將上面的 code 看成 function(id);&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;所以第一個 function(id) 這個 id 的參數是由最後面的 (id) 傳遞進來的，等於：&lt;/div&gt;&lt;div&gt;(id) &amp;nbsp;-&amp;gt; function(id) ，也就是說 function(id) 參照的不是 var id = that.profile.id 。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;結論&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;個人覺得，這樣的寫法容易讓人混淆，因為第一個無法讓人一目瞭然地看出程式邏輯，上面只是我截出來的程式語法重點，其實這是一個 70 line 的 function call。&lt;/div&gt;&lt;div&gt;再來就是 that，這個是變數，但是第一眼會想到的是 this。也因此會容易混淆看 code 的人。&lt;/div&gt;&lt;div&gt;變數應該要取得明確且清晰，像是 personalSession 。&lt;/div&gt;&lt;div&gt;function call 獨立出來會讓開發人員可以快速的瞭解程式碼， (function(id){})(id) 跟 parser(id) 我想兩個比較起來很明顯了。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;很多小地方多注意，可以減少自己與其它開發人員的維護時間與 survey code 的速度，有時候簡單了當下換來的只是未來的加倍的償還。&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/7629964545151372662/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/javascript-build-function-prototype.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/7629964545151372662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/7629964545151372662'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/javascript-build-function-prototype.html' title='Javascript build function prototype 不同的函示寫法'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-rJSSBN-Bd0U/TvyMeADq84I/AAAAAAAARZQ/i4I1nXawFKQ/s72-c/You-Design-I-Code.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Neihu Dapi, Neihu District, Taipei City, Taiwan 114</georss:featurename><georss:point>25.081168 121.583532</georss:point><georss:box>25.066786500000003 121.56379100000001 25.0955495 121.603273</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-1377031833710605659</id><published>2011-12-23T22:35:00.000+08:00</published><updated>2011-12-24T11:27:02.782+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GIT"/><category scheme="http://www.blogger.com/atom/ns#" term="IOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Xcode4"/><title type='text'>Xcode 4 建立你的 git 專案</title><content type='html'>版本控管對於個人開發或是 Team work 都非常非常重要，開發常遇到下面的情況&lt;br /&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;不小心刪除掉了 class&lt;/li&gt;&lt;li&gt;需要救回以前的檔案&lt;/li&gt;&lt;li&gt;需要做版本比對&lt;/li&gt;&lt;li&gt;Team work 時需要同步每個人的 source code&lt;/li&gt;&lt;li&gt;還有很多，不過這篇不是介紹版本控管好處的&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;xcode 4 支援 subversion and git 兩種版本控管軟體，個人覺得整合的算是不錯，只是有時候難免需要到 Terminal 打一下指令。&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;教學案例情節&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;今天就寫一篇簡單的入門文章介紹一下 git 使用方式，情節很簡單：建立local repository &amp;gt; 將專案新增進去 &amp;gt; 建立 local repository 跟 remote repository 連結 &amp;gt; push 到 remote repository。&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;情節設計概念&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;這個情節是針對一個新的開發人員設計的，進入一個專案 &amp;gt; 拿到 source code &amp;gt; 建立環境 &amp;gt; 開始工作。所以這裡沒有太深奧的概念，只想給入門者一個快速地學習方式，然後在自己深入研究，我也會找時間介紹 git 的設計概念與應用實例。&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;基本上所有動作可以全部透過 xcode 作，當然也全部都可以透過指令去做。不過步驟就以我覺得最順的方式去做。&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;git 基本觀念概述&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;git 的概念是將 source control 區分為本地端跟 server 端，在本地端開發者可以自行控管自己的版本然後在&quot;push&quot;到伺服器端集中控管，&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;踏出開工的第一步&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;1.建立專案目錄&lt;br /&gt;&lt;pre&gt;&lt;code&gt;justinlin$ mkdir projects/ios_ebook&lt;br /&gt;justinlin$ cd projects/ios_ebook&lt;/code&gt;&lt;/pre&gt;2.設定 git 賬號 &lt;br /&gt;&lt;pre&gt;&lt;code&gt;justinlin$ git config --global user.name &quot;justin&quot;&lt;br /&gt;jstinlin$ git config --global user.email &quot;sunny.justin@gmail.com&quot;&lt;/code&gt;&lt;/pre&gt;3.從 git server 複製專案目錄到 local &lt;br /&gt;&lt;pre&gt;&lt;code&gt;justinlin$ git clone gitolite@git.object2.com:ios_ebook&lt;/code&gt;&lt;/pre&gt;4.使用 xocde 4 打開專案檔案&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-Cwr4hsopx-g/TvVEELzMFbI/AAAAAAAARXU/OpJRuUvwdXo/s1600/Screen+Shot+2011-12-24+at+%25E4%25B8%258A%25E5%258D%258811.07.44+copy.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;348&quot; src=&quot;http://3.bp.blogspot.com/-Cwr4hsopx-g/TvVEELzMFbI/AAAAAAAARXU/OpJRuUvwdXo/s640/Screen+Shot+2011-12-24+at+%25E4%25B8%258A%25E5%258D%258811.07.44+copy.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;5.打開 Organizer 切換到 Repositories，左側會出現剛才 clone 的專案，專案目錄下會出現 Branches (local 的 branch list), Remotes ( branch list on the remote server), ios_ebook (專案資源）&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-YR2vgX1IXb4/TvVGEh4lUXI/AAAAAAAARYc/UfCnOTzwxis/s1600/organizer.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;420&quot; src=&quot;http://2.bp.blogspot.com/-YR2vgX1IXb4/TvVGEh4lUXI/AAAAAAAARYc/UfCnOTzwxis/s640/organizer.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6.在 xcode 裡頭編輯 source code 後檔案右側會出現 M 的字樣，這代表的是檔案被修改過，這時候點選滑鼠右鍵 &amp;gt; source control 就會出現 Commit Selected Files 與 Discard Changes兩個選項。如果點選 Commit Selected Files 的話就會將檔案同步到 Local repository。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-XIg-DgVFCBY/TvVEQ3ylptI/AAAAAAAARXg/44tGEMHeZcU/s1600/commit.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;340&quot; src=&quot;http://1.bp.blogspot.com/-XIg-DgVFCBY/TvVEQ3ylptI/AAAAAAAARXg/44tGEMHeZcU/s640/commit.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;7.點選 File &amp;gt; Source Control &amp;gt; Push 後會把 Local repository 裡的修改 Push 到 Remote repository 中進行同步&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-drLcw_HAltw/TvVE4amZL8I/AAAAAAAARXs/-fzLLVVwvbY/s1600/push.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;406&quot; src=&quot;http://3.bp.blogspot.com/-drLcw_HAltw/TvVE4amZL8I/AAAAAAAARXs/-fzLLVVwvbY/s640/push.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;8.這是一個從 git 主機複製出檔案到修改檔案後 commit 到 local repository，再 push 到 remote repository 的基本流程。&lt;br /&gt;&lt;ol&gt;&lt;/ol&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;補充說明&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;git 與 subversion 的概念最大不同在於，subversion 只有一個 repository而且是大家共用，這沒甚麼不好，只是因為是共用所以需要好的規劃以防止發生錯誤造成版本問題。&lt;/div&gt;&lt;div&gt;git 將 repository 分離，開發人員擁有自己完整的 repository，你可以自行管理跟規劃 local repository，當一切開發確認後在 push 到 git server。&lt;/div&gt;&lt;div&gt;不過不管那一套，還是需要良好的規劃管理跟版本控管知識，否則不斷地亂 Push 問題依然會發生的。&lt;/div&gt;&lt;ol&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/1377031833710605659/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/y94.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/1377031833710605659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/1377031833710605659'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/y94.html' title='Xcode 4 建立你的 git 專案'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-Cwr4hsopx-g/TvVEELzMFbI/AAAAAAAARXU/OpJRuUvwdXo/s72-c/Screen+Shot+2011-12-24+at+%25E4%25B8%258A%25E5%258D%258811.07.44+copy.png" height="72" width="72"/><thr:total>1</thr:total><georss:featurename>Neihu Dapi, Neihu District, Taipei City, Taiwan 114</georss:featurename><georss:point>25.081168 121.583532</georss:point><georss:box>25.0667875 121.56379100000001 25.095548500000003 121.603273</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-773235422094915983</id><published>2011-12-19T23:30:00.000+08:00</published><updated>2011-12-19T23:30:26.485+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debug"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Design"/><title type='text'>Chrome 使用 Developer Tools 來抓出臭蟲</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-_Cd0i0OSgCY/TuTjoLR_l0I/AAAAAAAAROo/Xi7xQ-Amwqg/s1600/google-chrome-extensions.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;216&quot; src=&quot;http://4.bp.blogspot.com/-_Cd0i0OSgCY/TuTjoLR_l0I/AAAAAAAAROo/Xi7xQ-Amwqg/s320/google-chrome-extensions.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;回想當年&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;早期寫 JavaScript 時因為缺少工具所以都只能仰賴人工的判斷來作除錯，雖然這是個訓練眼力與系統化的分析思考能力的好機會，但是卻讓開發人員在開發 JavaScript 的時候老是需要花很多時間。&lt;br /&gt;不過現在不一樣了，打從 Web 2.0 之後 JavaScript 在系統開發上已經變成標配而不再是選配。所以企業開始要求，使用者開始喜歡，開發人員開始學習，於是各家瀏覽器跟軟體開發商就不斷的推出許多媲美專業編輯器的除錯工具來造福這世界上的開發人員與 Web Master。&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;隨口介紹一點&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;今天要介紹的是 Chrome 的 Developer tools，這個 extensions 是由 Google Chrome tools 所提供的。使用它可以做到幾件 Web developer and Web Master 幾乎天天都需要做的工作：&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;開發除錯，協助我們快速地找到 Bug 或在 Reengineering 的時候協助分析 Source code&lt;/li&gt;&lt;li&gt;分析網站的資源，可以分析網頁中所有資源的清單與下載所需的時間與資源大小，以利我們做 Optimise&lt;/li&gt;&lt;li&gt;分析網頁的 Request and Response，協助我們分析 Performance 的瓶頸&lt;/li&gt;&lt;li&gt;JavaScript Console，提供我們能供快速的驗證與法的地方，不用在每次都要編輯 &amp;gt; 開啟瀏覽器 &amp;gt; Reload &amp;gt; 驗證，大大節省很多時間&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Chrome developer tools panel 介紹&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-Ifaqnc09hT4/TuTjuVgyEfI/AAAAAAAAROw/h0Hc7B5AdIM/s1600/Screen+Shot+2011-12-11+at+%25E4%25B8%258A%25E5%258D%258811.49.10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;188&quot; src=&quot;http://1.bp.blogspot.com/-Ifaqnc09hT4/TuTjuVgyEfI/AAAAAAAAROw/h0Hc7B5AdIM/s640/Screen+Shot+2011-12-11+at+%25E4%25B8%258A%25E5%258D%258811.49.10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Elements&lt;/b&gt;&lt;br /&gt;顯示 Page 中所有的 HTML 資訊，透過這個 Panel 與左下方的放大鏡可以協助快速找到 Page 元素相關的 source code。&lt;/li&gt;&lt;li&gt;&lt;b&gt;Resources&lt;/b&gt;&lt;br /&gt;主要列出 Page 中所有的資源清單，除了 CSS, Script, Images 之外也會列出 Local Database Session, Cookies 等的一些瀏覽器端的資訊。&lt;/li&gt;&lt;li&gt;&lt;b&gt;Network&lt;/b&gt;&lt;br /&gt;收集所有透過瀏覽器對外的網路連線資訊，像是 Page 中的 AJAX 動作都會被詳細記錄&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Scripts&lt;/b&gt;&lt;br /&gt;收集 Page 所使用到的 JavaScript 資訊，UI 設計了下拉式的選單列可以快速地選取所要瀏覽的 Script File。&lt;/li&gt;&lt;li&gt;&lt;b&gt;Timeline&lt;/b&gt;&lt;br /&gt;Page 所有 Request, Response 的詳細資訊&lt;/li&gt;&lt;li&gt;&lt;b&gt;Profiles&lt;/b&gt;&lt;br /&gt;收集並統計 Page 中所有物件(Object)的記憶體使用量，從這裡可以看到 Single Object 所使用的記憶體之外，也可以看到關聯使用的記憶體使用量，也就是 Object GC 後會歸還的總記憶體。 &amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Audits&lt;/b&gt;&lt;br /&gt;Best practices analysis，執行後可以得到一些建議的改善做法，”只是建議“因為不同的 scenario 有不同的設計模式，不過這裡列出的資訊非常有參考價值，善用的話可以快速的 review code 節省不少的人力。&lt;/li&gt;&lt;li&gt;&lt;b&gt;Console&lt;/b&gt;&lt;br /&gt;開發時如果沒有工具的話總是要在編輯器上寫好 code 然後再開 browser 去測試，在這個 panel 中，你可以直接在 console 裡頭打上 JavaScript 語法直接測試，是個超有用的 panel。&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Debug 的方式&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;習慣開發 Java, C++, Objective-c, Dot Net 的工程師對於 Debug &amp;nbsp;process 應該都非常熟悉：插中斷點(breakpoint) &amp;gt; 執行程式 &amp;gt; 停止在中斷點上 &amp;gt; &amp;nbsp;觀察程式流程與 Parameter value。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;再多說一點好了！&lt;/div&gt;&lt;div&gt;一般來說我們在研究 Source code 或是在做 debug 的時候我們會先以程式出現在的錯誤訊息或是經驗判斷來判斷錯誤發生的那個地方然後再慢慢地往下去找出問題，像捕魚一樣，先鎖定一個區域，然後撒網，慢慢地收網。&lt;/div&gt;&lt;div&gt;中斷點就是這樣的工具，在可能出現錯誤的程式設定中斷點，然後一行行執行程式，一邊執行一邊觀察程式跑的流程與參數的值是否正確，藉以找出問題的源頭。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;找個網站來示範&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;打開 Chrome&amp;nbsp;&amp;gt; 開啟 &lt;a href=&quot;http://www.kimo.com.tw/&quot;&gt;http://www.kimo.com.tw&lt;/a&gt;&lt;/div&gt;&lt;div&gt;開啟 Developer Tools&lt;/div&gt;&lt;div&gt;點選 Chrome 右上方的板手圖示( Customize and control Google Chrome) &amp;gt; &amp;nbsp;Tools &amp;gt; Developer Tools&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/--JzdQxpuahA/Tu9W5BLwyfI/AAAAAAAARV0/ayfItIDRzqE/s1600/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.22.46.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;350&quot; src=&quot;http://3.bp.blogspot.com/--JzdQxpuahA/Tu9W5BLwyfI/AAAAAAAARV0/ayfItIDRzqE/s640/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.22.46.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;點選下方 Panel 上的 Scripts&lt;/div&gt;&lt;div&gt;左側是 JavaScript 檔案內容，左上方可以下拉選則你要看得 JavaScript 檔案&lt;/div&gt;&lt;div&gt;右側的 Breakpoints 裡頭所有中斷點的清單&lt;/div&gt;&lt;div&gt;右側的 XHR Breakpoints 裡頭是針對 Ajax 的中斷點設定，可以設定 URL 來做判斷&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-LcR8oDdEKrU/Tu9WrHsPtnI/AAAAAAAARVs/kd2uyVHmjQM/s1600/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.21.57.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;348&quot; src=&quot;http://4.bp.blogspot.com/-LcR8oDdEKrU/Tu9WrHsPtnI/AAAAAAAARVs/kd2uyVHmjQM/s640/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.21.57.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;選擇 tongwen_core.js，移動到 290 行然後點選左邊的數字，成功的話行號會出現藍色標簽，右側的 Breakpoints 清單會出現一筆資料&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-VYRc3JlQXJQ/Tu9XJC_xKEI/AAAAAAAARV8/LHcMCxA9tD4/s1600/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.24.01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;352&quot; src=&quot;http://4.bp.blogspot.com/-VYRc3JlQXJQ/Tu9XJC_xKEI/AAAAAAAARV8/LHcMCxA9tD4/s640/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.24.01.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Reload 網頁，此時下方程式會停留在 276 行，這表示程式執行到這裡停止並等待你的指示。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-VvZrMzbl0Xk/Tu9XWfXAJsI/AAAAAAAARWE/spos9bhvDtM/s1600/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.24.59.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;348&quot; src=&quot;http://3.bp.blogspot.com/-VvZrMzbl0Xk/Tu9XWfXAJsI/AAAAAAAARWE/spos9bhvDtM/s640/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.24.59.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;回到 Scripts panel 選單右側的上方，這裡有幾個小 icon 是我們可以控制程式要如何進行下一步的按鈕。&amp;nbsp;這裡我們有幾個選擇&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-Ny9IpgZKB8o/Tu9Xi5gvHWI/AAAAAAAARWM/UPofwwlBPuw/s1600/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.25.26.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-Ny9IpgZKB8o/Tu9Xi5gvHWI/AAAAAAAARWM/UPofwwlBPuw/s1600/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.25.26.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;pause script execution (F8)：點選後程式會正常執行一次的完整程式流程&lt;/li&gt;&lt;li&gt;Step over next function call (F10)：點選後會執行到下一個判斷點，這裡點選後程式會執行 switch 的判斷式&lt;/li&gt;&lt;li&gt;Step into next function call (F11)：點選後會進入功能，假設你的程式執行停留在一個 function 上的話，點了這個按鈕就會進入這個 function 的內部並停在第一行程式&lt;/li&gt;&lt;li&gt;Step out of current function：跳出這個 function 後停在 function 後的第一行程式&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;點選 Step over next function 直到 369 行，然後將鼠標移動到node.childNodes.length 的 length 上，這時候會出現 length的值，可以透過這個方式來觀察參數值是否正確或是參數的值來判斷用途&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-d9zI2JlRsFE/Tu9XzpgnIGI/AAAAAAAARWU/mgIvRW13U2A/s1600/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.26.42.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;350&quot; src=&quot;http://4.bp.blogspot.com/-d9zI2JlRsFE/Tu9XzpgnIGI/AAAAAAAARWU/mgIvRW13U2A/s640/Screen+Shot+2011-12-19+at+%25E4%25B8%258B%25E5%258D%258811.26.42.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;然後自己試看看吧！&lt;/div&gt;&lt;div&gt;工具很簡單但是卻非常好用，鎖定範圍 &amp;gt; 設定中斷點 &amp;gt; 逐行執行程式 &amp;gt; 觀察流程與參數是否正確 &amp;gt; 找出問題！&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/773235422094915983/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/chrome-developer-tools.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/773235422094915983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/773235422094915983'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/chrome-developer-tools.html' title='Chrome 使用 Developer Tools 來抓出臭蟲'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-_Cd0i0OSgCY/TuTjoLR_l0I/AAAAAAAAROo/Xi7xQ-Amwqg/s72-c/google-chrome-extensions.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Neihu Dapi, Neihu District, Taipei City, Taiwan 114</georss:featurename><georss:point>25.081168 121.583532</georss:point><georss:box>25.066786500000003 121.56379100000001 25.0955495 121.603273</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-3387200921028148344</id><published>2011-12-14T15:47:00.000+08:00</published><updated>2011-12-15T01:21:18.214+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><title type='text'>TestFlight : 讓我們簡化 IOS App 測試流程吧 !</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-z95EEX3KjfY/TujaQBebgDI/AAAAAAAARSQ/UHeE4qAASZQ/s1600/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%25881.17.30.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;244&quot; src=&quot;http://1.bp.blogspot.com/-z95EEX3KjfY/TujaQBebgDI/AAAAAAAARSQ/UHeE4qAASZQ/s640/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%25881.17.30.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;測試 IOS App 遭遇的問題&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;當我們開發 IOS 專案到後期時總是需要做一堆頻繁的測試，像是：&lt;br /&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;SIT&lt;/li&gt;&lt;li&gt;Stress Testing&lt;/li&gt;&lt;li&gt;Monkey Testing&lt;/li&gt;&lt;li&gt;UAT&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;測試的時候通常有幾個非常基本的測試條件：&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;測試不同 OS ( IOS3, IOS 4, IOS 5)&lt;/li&gt;&lt;li&gt;測試不同硬體 (iPhone 3G, iPhone 3GS, iPhone 4, iPad )&lt;/li&gt;&lt;li&gt;測試不同的頻寬 (3G, WI-FI)&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;然而這就代表我們需要不只一兩隻的測試手機。&lt;/div&gt;&lt;/div&gt;&lt;div&gt;目前Apple 官方提供的測試方式是能讓測試人員藉由iTune安裝測試軟體。不過依照我的經驗是「總會遇到很多一般的User」，而且很多 User 連同步這種事情都不太懂，而這個流程會如下：&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;收集各使用者的UDID&lt;/li&gt;&lt;li&gt;將各使用者的UDID加入 Distribution Provisioning Profie&lt;/li&gt;&lt;li&gt;將程式打包成 IPA&lt;/li&gt;&lt;li&gt;使用網路(Mail, FTP, Http)等方式設法將檔案丟給 Tester&lt;/li&gt;&lt;li&gt;Tester 收到後使用跟設備同步的那台電腦安裝 IPA(常常這台電腦都是在家裡)&lt;/li&gt;&lt;li&gt;測試!&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;這些繁瑣的流程讓人非常的頭痛也非常浪費時間，如果版本 build 錯了又要再來一次，這個痛苦的經驗真是讓人想罵三字經。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;解決方案：TestFlight&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;這個網路服務讓一切變得簡單，你只需要將程式打包上傳到網路上，系統會通知測試人員有新的測試邀請，並附上更新連結提供測試人員下載。而往後的更新只要上傳更新的 IPA 就可以，其他的就由系統幫你做吧。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;測試人員安裝步驟&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;須確定負責的發佈人員已經將測試用的 iDevice UDID 加入到發佈&lt;/div&gt;&lt;div&gt;1. 開啟 TestFlight 寄出的郵件或是請開發人員寄安裝短網址給你，開啓郵件點選上頭的 Install&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-jjEDqETeT3o/TujSDTrbC-I/AAAAAAAARQg/VuCyH8w_5hU/s1600/%25E7%2585%25A7%25E7%2589%25871.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;http://1.bp.blogspot.com/-jjEDqETeT3o/TujSDTrbC-I/AAAAAAAARQg/VuCyH8w_5hU/s640/%25E7%2585%25A7%25E7%2589%25871.PNG&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;2. 點選後會令開視窗到軟體安裝的網頁，點選 Install 開始安裝軟體&lt;br /&gt;&lt;ol&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-8HEf4NsGiOM/TujSjwwEPJI/AAAAAAAARQo/Qhq8zI8YrHU/s1600/%25E7%2585%25A7%25E7%2589%25872.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;http://4.bp.blogspot.com/-8HEf4NsGiOM/TujSjwwEPJI/AAAAAAAARQo/Qhq8zI8YrHU/s640/%25E7%2585%25A7%25E7%2589%25872.PNG&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. 安裝成功後就可以開始測試&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. 結束&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;開發者上傳步驟&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;1. 將測試設備的 UDID 加入 IOS Provisioning Portal&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-IZR-ZC-PKjE/TujUIv2S8PI/AAAAAAAARQ4/96U485Xubh4/s1600/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.51.22.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;182&quot; src=&quot;http://2.bp.blogspot.com/-IZR-ZC-PKjE/TujUIv2S8PI/AAAAAAAARQ4/96U485Xubh4/s640/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.51.22.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;2. 確認 Distribution Provisioning Profile 裡有將測試設備打勾&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-TYF_xwOaOfA/TujTzdt0BSI/AAAAAAAARQw/SRVRX-LHyco/s1600/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.49.42.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;118&quot; src=&quot;http://3.bp.blogspot.com/-TYF_xwOaOfA/TujTzdt0BSI/AAAAAAAARQw/SRVRX-LHyco/s640/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.49.42.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;3. 修改 Xcode 的 Build Settings &amp;gt; Code Sign Identity 中將 Distribution 的憑證設定成你的發佈憑證&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-nZR7A4EMm98/TujUYq0tCRI/AAAAAAAARRA/jld24Y4oad4/s1600/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.52.27.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;348&quot; src=&quot;http://3.bp.blogspot.com/-nZR7A4EMm98/TujUYq0tCRI/AAAAAAAARRA/jld24Y4oad4/s640/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.52.27.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;4. 點選 Product &amp;gt; Archive&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-Xp9KOvakcHI/TujUtlWKmKI/AAAAAAAARRI/ktTSJqNjgX0/s1600/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.53.55.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;434&quot; src=&quot;http://1.bp.blogspot.com/-Xp9KOvakcHI/TujUtlWKmKI/AAAAAAAARRI/ktTSJqNjgX0/s640/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.53.55.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;5. 點選 Window &amp;gt; Organizer 選擇剛才 Build 出來的 Archive 然後點選右側的 share&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-IgaPpnkHdkc/TujU6J1R-8I/AAAAAAAARRQ/gSg66z-gkD4/s1600/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.54.47.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;http://1.bp.blogspot.com/-IgaPpnkHdkc/TujU6J1R-8I/AAAAAAAARRQ/gSg66z-gkD4/s640/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.54.47.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;6. 選擇 iOS App Store Package (.ipa), Identity 選擇你的發佈憑證 &amp;gt; 點選 Next&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-ggLh8eNPdqs/TujVHg4LI5I/AAAAAAAARRY/PA6A_WmEA_4/s1600/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.55.41.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;434&quot; src=&quot;http://3.bp.blogspot.com/-ggLh8eNPdqs/TujVHg4LI5I/AAAAAAAARRY/PA6A_WmEA_4/s640/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.55.41.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;7. 選擇要儲存的地方，點選 Save&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-oe6dXThul6c/TujVbbv5zOI/AAAAAAAARRg/vVUh5AF70Vw/s1600/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.56.58.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;478&quot; src=&quot;http://4.bp.blogspot.com/-oe6dXThul6c/TujVbbv5zOI/AAAAAAAARRg/vVUh5AF70Vw/s640/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%258812.56.58.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;8. 到 TestFlight 申請賬號後登入&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-3ypurn2viG8/TujWpBBcMlI/AAAAAAAARR4/TPJUbOupiJc/s1600/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%25881.01.39.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;334&quot; src=&quot;http://2.bp.blogspot.com/-3ypurn2viG8/TujWpBBcMlI/AAAAAAAARR4/TPJUbOupiJc/s640/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%25881.01.39.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;9.&amp;nbsp;點選 Upload Build &amp;gt;&amp;nbsp;將剛才 Build 出來的 IPA 拖曳到網頁上( HTML 5) &amp;nbsp;&amp;gt; 上傳完後點選&amp;nbsp;Next: Confirm Testers&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-i46DYv5SUb8/TujWHUsAJwI/AAAAAAAARRo/72akRPDPaOA/s1600/TestFlight+%25C2%25BB+Upload+a+build.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;330&quot; src=&quot;http://4.bp.blogspot.com/-i46DYv5SUb8/TujWHUsAJwI/AAAAAAAARRo/72akRPDPaOA/s640/TestFlight+%25C2%25BB+Upload+a+build.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;11. 將 Anonymous 打勾以允許 UDID 有加入 Distribution Provisioning 的測試人員可以下載，旁邊的數字代表有多少人可以參加這次測試。左邊有 Icon 的使用者是已經加入 TestFlight 才會出現。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;如果勾選&amp;nbsp;Notify the permitted teammates about this build ，完成後系統會計出安裝通知與連結給所有測試人員，但只有已經加入 TestFlight 的使用者會收到。&lt;/li&gt;&lt;li&gt;最下方的短網址就是安裝網址，可以將這個網址傳給所有參加這次測試的測試人員進行測試版安裝。&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-MMfSxwpx82g/TujXxin-VJI/AAAAAAAARSA/k7eygn43w9k/s1600/TestFlight+%25C2%25BB+Confirm+Testers.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;348&quot; src=&quot;http://1.bp.blogspot.com/-MMfSxwpx82g/TujXxin-VJI/AAAAAAAARSA/k7eygn43w9k/s640/TestFlight+%25C2%25BB+Confirm+Testers.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;12. 完成&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;結論&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Apple 原先設計的測試流程太過繁複而且麻煩，當測試人員有 User 的話就會嚐嚐造成測試效率趴在地上，畢竟誰會把自己心愛的 iDevice 跟公司電腦作同步！而且透過網路與系統可以及時通知與跳過 iTune 的部署方式並且大大提升測試版本不屬的速度。&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/3387200921028148344/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/testflight-other-way-to-test-your-app.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/3387200921028148344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/3387200921028148344'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/testflight-other-way-to-test-your-app.html' title='TestFlight : 讓我們簡化 IOS App 測試流程吧 !'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-z95EEX3KjfY/TujaQBebgDI/AAAAAAAARSQ/UHeE4qAASZQ/s72-c/Screen+Shot+2011-12-15+at+%25E4%25B8%258A%25E5%258D%25881.17.30.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-5089334374080783690</id><published>2011-12-12T18:55:00.001+08:00</published><updated>2011-12-13T23:57:11.199+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><title type='text'>在 Xcode 3.2.6 安裝在 Mac Lion 上</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-gwbHsGj2cOI/TuXvV0Sv7mI/AAAAAAAARQY/NAGanmd-g5s/s1600/1307911408661.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;http://1.bp.blogspot.com/-gwbHsGj2cOI/TuXvV0Sv7mI/AAAAAAAARQY/NAGanmd-g5s/s320/1307911408661.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Xcode 3 的專案檔案雖然 Xcode 4 可以開啓，但是問題很多。所以如果是 Xcode 3 建立的專案用 Xcode 4 去開基本上是無法順利開發的。但是現在市面上還是充斥著很多的 Xcode 3 的專案，這造成很多困擾。因為很抱歉的是 Xcode 3 是預設是無法順利地安裝在 Lion 上的。&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;那要萬一已經升級到了 Lion 了怎麼辦?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;還是可以安裝 Xcode 3 的，只是比較麻煩，下面我就說明一下怎解決 Xcode 3 無法安裝到 Lion 的方式。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;安裝環境規格&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Mac Pro 13&quot;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;OS: Lion Mac OSX 10.7.2&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;安裝所需檔案&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;xcode_3.2.6_and_ios_sdk_4.3, [&lt;a href=&quot;https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg&quot; target=&quot;_blank&quot;&gt;download link&lt;/a&gt;]&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;安裝步驟&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;下面最重要的部分是使用 Disk Utility(這個工具是 Mac 內建的) 將 Disk Image 轉存成 Read-Write Image 然後修改安裝參數，開始吧！&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;1. 在 spotlight 打上 Disk Utility 然後 File &amp;gt; Open Disk Image 選擇&amp;nbsp;xcode_3.2.6_and_ios_sdk_4.3.dmg&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-RMWJHtP-v7M/TuXnKaXjYGI/AAAAAAAARPk/BWOGgPY6a8g/s1600/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.35.50.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;556&quot; src=&quot;http://3.bp.blogspot.com/-RMWJHtP-v7M/TuXnKaXjYGI/AAAAAAAARPk/BWOGgPY6a8g/s640/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.35.50.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;2. 點選上面選單的 Convert， Image Format 選擇 read/write &amp;gt; save&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-zS3gGfZ1UM4/TuXnTginhrI/AAAAAAAARPs/C035KBHsaiI/s1600/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.36.31.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;550&quot; src=&quot;http://3.bp.blogspot.com/-zS3gGfZ1UM4/TuXnTginhrI/AAAAAAAARPs/C035KBHsaiI/s640/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.36.31.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;3. 儲存完畢後, 連點兩下將新的 image 檔案 mount 起來&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-OScFRG-HalE/TuXneCVq7NI/AAAAAAAARP0/xkXis59vCX8/s1600/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.37.14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;394&quot; src=&quot;http://3.bp.blogspot.com/-OScFRG-HalE/TuXneCVq7NI/AAAAAAAARP0/xkXis59vCX8/s640/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.37.14.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;4. 打開 Finder 開啟 mount device，&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;在右邊視窗的 Xcode and iOS SDK 點選右鍵開啓選單並點選 Show Package Contents&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-73cJBKyn90Y/TuXnp6oZiEI/AAAAAAAARP8/uCNTB-b6nSQ/s1600/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.38.01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;450&quot; src=&quot;http://4.bp.blogspot.com/-73cJBKyn90Y/TuXnp6oZiEI/AAAAAAAARP8/uCNTB-b6nSQ/s640/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.38.01.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;5. 使用 TextEdit 編輯 Contents/iPhoneSDKSL.dist，然後找到&amp;nbsp;&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;isDevToolsCompatible 後將 10.7 改為 10.8 後儲存&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-gb0YCZA1le8/TuXn_jjrq8I/AAAAAAAARQE/r_s60zsaMOI/s1600/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.39.23.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;466&quot; src=&quot;http://2.bp.blogspot.com/-gb0YCZA1le8/TuXn_jjrq8I/AAAAAAAARQE/r_s60zsaMOI/s640/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.39.23.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;strong style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;strong style=&quot;background-color: white; font-size: 14px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;6. 回到 Finder 連點兩下&amp;nbsp;Xcode and iOS SDK 開始進行安裝&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-tOQiVJoyFAQ/TuXoQIXyaUI/AAAAAAAARQM/2j6DPBTNC68/s1600/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.40.32.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;378&quot; src=&quot;http://2.bp.blogspot.com/-tOQiVJoyFAQ/TuXoQIXyaUI/AAAAAAAARQM/2j6DPBTNC68/s640/Screen+Shot+2011-12-12+at+%25E4%25B8%258B%25E5%258D%25887.40.32.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;b&gt;7. 完成！！！&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;附註說明&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;基本上我還是鼓勵開發人員更新你的 Xcode 吧，雖然必須要去熟悉適應新的使用者界面，但是確實讓開發快速也順利很多。而且除非你要繼續拒絕升級 Lion，並且要很麻煩的去更新 IOS SDK 來支援最新的系統。並且身為一個走在時代前端的開發人員，拒絕更新自己是一件很不好的習慣。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/5089334374080783690/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/install-xcode-3-on-lion.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/5089334374080783690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/5089334374080783690'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/install-xcode-3-on-lion.html' title='在 Xcode 3.2.6 安裝在 Mac Lion 上'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-gwbHsGj2cOI/TuXvV0Sv7mI/AAAAAAAARQY/NAGanmd-g5s/s72-c/1307911408661.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-1374156296990119910</id><published>2011-12-10T08:20:00.001+08:00</published><updated>2011-12-10T10:38:55.619+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Design"/><title type='text'>了解 jQuery .bind .live .delegate 的差異</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-tIsBb4O7OlM/TuK6bYxL1YI/AAAAAAAAROg/D32Jz_brQrQ/s1600/img_1297508783_0.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;109&quot; src=&quot;http://2.bp.blogspot.com/-tIsBb4O7OlM/TuK6bYxL1YI/AAAAAAAAROg/D32Jz_brQrQ/s320/img_1297508783_0.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;一般在使用事件綁定的時候我們會使用 .bind .live .delegate，在某些案例上使用感覺不出差別。但實際上這三個方式是不同的，下面我舉例說明一下有甚麼不同，最後做一個結論分享一下校能與使用情境的感想。&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-size: large;&quot;&gt;&lt;b&gt;案例說明&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;我們需要 handle 整個 #container 中所有 a tag 的 click event，下面有三種寫法分別使用了 .bind .live .delegate。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-size: large;&quot;&gt;&lt;b&gt;HTML Example&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Menlo, monospace; font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html&amp;gt; &amp;lt;head&amp;gt;   &amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&amp;gt;   &amp;lt;meta http-equiv=&quot;Content-Style-Type&quot; content=&quot;text/css&quot;&amp;gt;   &amp;lt;title&amp;gt;what&#39;s different?&amp;lt;/title&amp;gt;   &amp;lt;script language=&quot;javascript&quot; src=&quot;http://code.jquery.com/jquery-1.7.1.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;body&amp;gt;     &amp;lt;div id=&quot;container&quot;&amp;gt;         &amp;lt;a id=&quot;a1&quot; href=&quot;#&quot;&amp;gt;link1&amp;lt;/a&amp;gt;         &amp;lt;a id=&quot;a2&quot; href=&quot;#&quot;&amp;gt;link2&amp;lt;/a&amp;gt;         &amp;lt;a id=&quot;a3&quot; href=&quot;#&quot;&amp;gt;link3&amp;lt;/a&amp;gt;     &amp;lt;/div&amp;gt; &amp;lt;/body&amp;gt; &amp;lt;/html&amp;gt; &lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-size: large;&quot;&gt;&lt;b&gt;.bind&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Menlo, monospace; font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;code&gt;$(&quot;#container a&quot;).bind(&quot;click&quot;, function(){alert(&quot;what&#39;s different?&quot;);}); $(&quot;#container&quot;).append(&quot;&amp;lt;a id=&#39;add&#39; href=&#39;#&#39;&amp;gt;link spec&amp;lt;/a&amp;gt;&quot;); &lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;每次新增一個 Dom element 後需要重新 bind 才能夠讓該 Dom element 擁有 click 的 handle能力。 &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;所以當執行了上面的 script 後，jQuery 會立即尋訪所有符合條件的 Dom element 並且 bind 上 click event handler。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-size: large;&quot;&gt;&lt;b&gt;.live&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: Menlo, monospace; font-size: 11px; white-space: pre-wrap;&quot;&gt; &lt;code&gt;$(&quot;#container a&quot;).live(&quot;click&quot;, function(){alert(&quot;what&#39;s different?&quot;);}); $(&quot;#container&quot;).append(&quot;&amp;lt;a id=&#39;add&#39; href=&#39;#&#39;&amp;gt;link spec&amp;lt;/a&amp;gt;&quot;); &lt;/code&gt; &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Menlo, monospace; font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;在 event bubbling 發生的時候去做參數比對，bubbling 是當事件發生的時候會由 root 發出然後送到每個 children element，每個 children element 會決定是否該對這個做回應。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;所以當你觸發了一次 live method 後，往後加入到 #container 的 Dom element 只要符合條件的都會在 event bubbling 的時候被觸發。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Menlo, monospace; font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre-wrap;&quot;&gt;&lt;b&gt;.delegate&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #444444; font-family: Menlo, monospace; font-size: 11px; white-space: pre-wrap;&quot;&gt; &lt;code&gt;$(&quot;#container&quot;).delegate(&quot;a&quot;, &quot;click&quot;, function(){alert(&quot;what&#39;s different?&quot;);}); $(&quot;#container&quot;).append(&quot;&amp;lt;a id=&#39;add&#39; href=&#39;#&#39;&amp;gt;link spec&amp;lt;/a&amp;gt;&quot;); &lt;/code&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Menlo, monospace; font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;這個方法跟 live 不同的地方是除了 live 的條件之外，他會比對父物件也就是 delegate 某一個 Dom element。他會比對 parent dom element + css selector + event type 三個條件成立才會觸發。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre-wrap;&quot;&gt;效能問題&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;.bind .live .delegate 因為方式不同所以在效能上也不同。&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;.bind 是在 script 執行後就執行完 event bind的動作，因此效能最好。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;.live 會在 event bubbling 的時候對每個 dom element 做條件比對&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;.delegate 跟 live 的原理相同，但是會額外多比對 parent element 所以效能會比 live 好。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre-wrap;&quot;&gt;&lt;b&gt;結論&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;live 可以一次控制所有元件並且不需要在意 dom element 新增的時間，但是會犧牲效能。.bind 會針對指定的 dom element 做處理，只會處理一次，因此指定範圍明確，所以效能最好。 .delegate 改善了 live 的缺點，可以將檢查範圍規範在特定的範圍內。不過每個開發的 usecase 不同，每個情況也不同，至於要使用怎樣的方法沒有絕對值，只能依照情況來做取捨，犧牲效能換取彈性? 這自己搞定吧！&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0080ff; font-family: Menlo, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/1374156296990119910/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/jquery-different-between-live-and.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/1374156296990119910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/1374156296990119910'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/jquery-different-between-live-and.html' title='了解 jQuery .bind .live .delegate 的差異'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-tIsBb4O7OlM/TuK6bYxL1YI/AAAAAAAAROg/D32Jz_brQrQ/s72-c/img_1297508783_0.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-1752111501530700753</id><published>2011-12-06T11:19:00.001+08:00</published><updated>2011-12-10T10:23:52.998+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="A2SD+"/><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Mobile"/><title type='text'>換一個自己喜歡的 Android ROM 吧！</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-ZrvPjnzqBps/Tt7W7sp_CTI/AAAAAAAARNc/KDPmX6-mg44/s1600/Android-Gingerbread-3.0.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-ZrvPjnzqBps/Tt7W7sp_CTI/AAAAAAAARNc/KDPmX6-mg44/s1600/Android-Gingerbread-3.0.jpg&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;iPhone 與 Android 的手機愛用族群不同，對兩種 App 都開發的我來說我倒是比較喜歡 iPhone 的細緻與整合性，但是我也愛 Android 的高度可掌握性。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;拜 open source 的強大社群，Android 除了官方的 Rom 之外可選擇的非常多，也不乏一些效能與功能都很強大的 Rom。只是要享受這些就必須要學一下如何刷，這幾篇我打算詳解一下刷 Rom，也希望大家都可以享受到 open source 的好處。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;b&gt;硬體與 Rom 的規格&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Phone : HTC Bravo (GSM) = HTC Desire&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Rom : Cyanogenmod 7.1 (你可以選擇你喜歡的 Rom)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;A2SD+ : 能夠將 SD card 畫出一塊磁區提供給手機使用，突破總是空間不夠的困境&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;b&gt;安裝所需要檔案&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;最新的 Cyanogenmod Rom [&lt;a href=&quot;http://download.cyanogenmod.com/?type=stable&amp;amp;device=bravo&quot;&gt;Download&lt;/a&gt;]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;A2SDKillerV11_GB.zip,&amp;nbsp;Data2SDInstallerv1.3_GB.zip, 置A2SD+ 工具 [&lt;a href=&quot;http://forum.xda-developers.com/showpost.php?p=12328033&amp;amp;postcount=2938&quot;&gt;Download&lt;/a&gt;]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Google Apps [&lt;a href=&quot;http://goo-inside.me/gapps/&quot;&gt;Download&lt;/a&gt;]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;MiniTool Partition Wizard Home Edition, 分割 Ext 磁區工具 [&lt;a href=&quot;http://www.partitionwizard.com/free-partition-manager.html&quot;&gt;Download&lt;/a&gt;]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;AlphaRev, S-OFF工具, 這次不作磁區修改因此不需使用 [&lt;a href=&quot;http://alpharev.nl/&quot;&gt;Download&lt;/a&gt;]&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;b&gt;安裝前說明&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;A2SD+ 是 XDA 社群未解決總是發現 SD card 空間很多但是不斷出現空間不足的問題，使用的話需要再 SD card 上分割出 Ext2, Ext3 or Ex4 的磁區以供 Android 使用，這裡我們安裝步驟裡頭會使用 MiniTool Partition Wizard 來作。&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Google &amp;nbsp;Apps 是 Google Android 套件，沒有他的話連 Market 都不能使用。Cyanogenmod 沒有將 Google Apps 放進 Android Rom 裡頭是因為版權的問題，因此在安裝完 Cyanogenmod 後還需要安裝 Google Apps。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;b&gt;安裝步驟&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;分割SD card, &lt;br /&gt;先預先切割一個 Ex4 磁區提供給 Android 使用來放置 App 與 Data，再安裝完後可以到[設定] &amp;gt; [儲存空間] 檢查 [內部儲存空間] 大小就可以知道是否成功。這裡我們切割 1.5G 給 Android 使用。 NOTE: SD Card 的速度會影響執行速度。&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;安裝 Rom Manager&lt;br /&gt;這是一個可以刷 Rom 的好用工具，可以簡單的安裝 Recovery，快速的 Root 系統與下載與安裝一些比較 Common 的 Rom&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;安裝 ClockworkMod Recovery&lt;br /&gt;這個工具用來刷 Rom , 安裝 Google Apps package 與製作 A2SD+&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;執行權限修正&lt;br /&gt;取得系統 Root 權限&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;將所有安裝所需檔案放到 SD &amp;nbsp;card 中&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;開始安裝 Rom 步驟,&amp;nbsp;先關機然後按住手機左側的條小音量鍵 + 左上方Power進行開機&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;使用音量按鍵調整光棒去選取 Recovery，然後點選 Power 進入 Recovery 模式&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;使用音量按鍵調整光棒選取 mounts and storage 然後分別執行 format /cache, format &amp;nbsp;/data, format /system&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;點選 back 然後點選 install zip from sdcard 安裝 Rom&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;選擇 install zip from sdcard 安裝&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fbf8f4; line-height: 19px;&quot;&gt;A2SDKillerV11_GB.zip&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fbf8f4; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;點選 reboot system now 進行重開機&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fbf8f4; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;進行手機設定，設定完後重開機進入 Recovery 模式&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fbf8f4; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;選擇 install zip from sdcard 安裝&amp;nbsp;Data2SDInstallerv1.3_GB.zip&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fbf8f4; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;點選 reboot system now 進行重開機&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;開機後進入設定 &amp;gt; &amp;nbsp;可以看到內部記憶體空間已經變大&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;重開機進入 Recovery 模式&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;點選 install zip from sdcard 安裝 Google Apps&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;點選 reboot system now&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;完成刷機&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;驗證一下&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-8x3DIqUkwUw/Tt7ZJsiYkFI/AAAAAAAARNs/145ue2cvPNs/s1600/os+version.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://1.bp.blogspot.com/-8x3DIqUkwUw/Tt7ZJsiYkFI/AAAAAAAARNs/145ue2cvPNs/s320/os+version.png&quot; width=&quot;192&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Add caption&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-N36t3Di88iY/Tt7YjqIBFyI/AAAAAAAARNk/NTWgHwLLxkc/s1600/device+space.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-N36t3Di88iY/Tt7YjqIBFyI/AAAAAAAARNk/NTWgHwLLxkc/s320/device+space.png&quot; width=&quot;192&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;這些步驟通用於所有的 Rom，不過有些 Rom 基本上不需要安裝 A2SD+ 的Script，只要把 SD card 切割出一塊 Ext 2, 3 or 4 的磁區就會自動的進行 A2SD+ 的安裝部屬。所以再安裝不同的 Rom 時還是看一下作者的詳細說明。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;補充&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;若是使用 A2SD+ 或是 Data++ 的話 SD card 的效能很重要，因為東西放在 SD card 跟放在內建記憶體的速度有很大的差異。如果速度太慢的話會導致再使用 App 的時候嚴重的 Delay。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;/ol&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/1752111501530700753/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/android-change-your-rom.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/1752111501530700753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/1752111501530700753'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/android-change-your-rom.html' title='換一個自己喜歡的 Android ROM 吧！'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-ZrvPjnzqBps/Tt7W7sp_CTI/AAAAAAAARNc/KDPmX6-mg44/s72-c/Android-Gingerbread-3.0.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-1698033712192107137</id><published>2011-12-05T01:13:00.001+08:00</published><updated>2011-12-07T11:37:29.112+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="s-off"/><title type='text'>Android S-OFF (HTC Desire)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-UPgikpDuHC8/Tt7fESgBiVI/AAAAAAAARN0/c6HhYKdWG4c/s1600/alpharev-logo18.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;291&quot; src=&quot;http://1.bp.blogspot.com/-UPgikpDuHC8/Tt7fESgBiVI/AAAAAAAARN0/c6HhYKdWG4c/s320/alpharev-logo18.png&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;alpharev.iso幾乎大部分的程式開發人員都很喜歡可以控制在自己手上的手機，我也是!&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Android於是就成為我的手機，當然喜歡可以控制就難免會刷來刷去的，試驗一下這個Rom試驗一下那個Rom。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;iPhone的一體成型讓使用者在安裝App的時候完全不需要care記憶體的問題，16G就是16G的作法非常的方便，但是在Android上頭就區分了兩塊主要的記儲存空間，一是Rom一是SD Card。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Android將所有作業系統所需要的檔案全部放在Rom上，再Froyo 2.2之前所有的App只能安裝再Rom上頭，所以常常裝沒幾個App就沒空間了。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;幸好! Google 也算是很快的看到了這個嚴重的問題(有時候我覺得工程師思維真的是有很多缺點的)，因此在2.3之後使用者可以選擇將App安裝到SD上去了。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;不過問題依然沒有解決，App to SD的模式只是簡單的將程式搬移到SD上，而App的資料依然在Rom上頭，所以當使用了太多的App之後還是會出現空間不足而SD還剩下10幾G的情形發生。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;那有沒有辦法讓Android跟iPhone一樣可以讓使用者不需要老是去被空間不足給干擾嗎! 答案是可以。客製化的Rom提供幾個更好的解決方案: A2SD+, Data++。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;A2SD+ 的技術會將 /data/app與/data/dalvik-cache&amp;nbsp;這兩個路徑儲存到SD卡上，這兩個路徑分別是軟體安裝路徑與程式碼優化的目錄&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Data++ 的技術則選擇將dalvik-cache保留在Rom上頭以保持效率&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;不過如果要使用A2SD+ 或是Data++的話就必須要s-off (這裡指的是HTC的手機)。而s-ff的步驟很簡單，幾個步驟:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;到(&lt;a href=&quot;http://alpharev.nl/&quot;&gt;http://alpharev.nl/&lt;/a&gt;)下載最新的alpharev.iso&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;將iso燒錄成cd&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;使用alpharev.iso開機&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;依照著螢幕步驟作就可以搞定了&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;注意事項&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;執行過程中需要注意閱讀題是訊息，步驟三的時候會提醒切勿隨意關機。請遵守否則變磚就不好了&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/1698033712192107137/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/android-s-off-htc-desire.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/1698033712192107137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/1698033712192107137'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/android-s-off-htc-desire.html' title='Android S-OFF (HTC Desire)'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-UPgikpDuHC8/Tt7fESgBiVI/AAAAAAAARN0/c6HhYKdWG4c/s72-c/alpharev-logo18.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-8959154473311884033</id><published>2011-12-02T12:10:00.001+08:00</published><updated>2011-12-02T13:02:22.978+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="app id"/><category scheme="http://www.blogger.com/atom/ns#" term="apple"/><category scheme="http://www.blogger.com/atom/ns#" term="application id"/><category scheme="http://www.blogger.com/atom/ns#" term="bundle id"/><category scheme="http://www.blogger.com/atom/ns#" term="bundle seed id"/><category scheme="http://www.blogger.com/atom/ns#" term="IOS"/><category scheme="http://www.blogger.com/atom/ns#" term="ipad"/><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="Mobile"/><title type='text'>IOS Bundle Id or Bundle Seed Id 解說</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;今天被問到了甚麼是 bundle id , bundle seed id , application id。&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;我想寫一篇文章來分享一下。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;對於IOS來說每個應用程式都需要有一個唯一的ID來識別，這就像是資料庫裡頭的Primary&amp;nbsp;key一樣，Apple的設計就是使用bundle seed id + application id 產生 application id。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-LC2nHtIpcms/TthbSUFx_kI/AAAAAAAAQ54/ENvcZ-FkaYM/s1600/Add+App+IDs+++iOS+Provisioning+Portal+++Apple+Developer.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;328&quot; src=&quot;http://1.bp.blogspot.com/-LC2nHtIpcms/TthbSUFx_kI/AAAAAAAAQ54/ENvcZ-FkaYM/s640/Add+App+IDs+++iOS+Provisioning+Portal+++Apple+Developer.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;b&gt;舉個例子說明一下&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;以開發人員角度進入IOS Development Center後，我們到Provisioning Portal下可以看到App Ids這個項目，裡頭會列出所有的隸屬這個賬號的Application Id，我們看下面這個Application Id範例：&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #f3f3f3; line-height: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;33LE83RVLQ.com.infinitystudio.apps.*&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #f3f3f3; color: #666666; line-height: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;&lt;b&gt;33LE83RVLQ&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;這個數值總共是10個字稱作bundle seed id，這會在建立一個新的App Id的時候由Apple自動產生給你。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;&lt;b&gt;com.infinitystudio&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;這串文字代表的是公司名稱，一般來說我們會使用domain name來呈現，不過當然也可以不需要。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;&lt;b&gt;.*&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 15px;&quot;&gt;這個意思代表這是一個廣域的定義，你可以依據在這個App Ids下面開發多個應用程式，&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;例如&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; line-height: 15px;&quot;&gt;33LE83RVLQ.com.infinitystudio.apps.erp &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; line-height: 15px;&quot;&gt;或是&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; line-height: 15px;&quot;&gt;33LE83RVLQ.com.infinitystudio.apps.crm，但是要注意的就是&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; line-height: 15px;&quot;&gt;33LE83RVLQ.com.infinitystudio.apps 這就不包括在這個廣域設定裡頭。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #f3f3f3; color: #666666; line-height: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #666666; line-height: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;b&gt;結論&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;由上面的說明可以知道，Apple為了確保應用程式的Id是唯一值，所以他控管了前面十個字元也就是bundle seed id來確保每個帳號下面的每個應用程式都是唯一。而在bundle seed id 後面叫交給開發人員來自行決定自己的產品要如何分類規劃。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;&lt;b&gt;補充&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;application id 與 bundle seed id對於開發純軟體應用app限制並不大，但是對於開發應體與ios設備連接的設計來說就需要注意一下不要使用廣域的app id像是 843EIDJQUJ.com.infinitystudio.*，因為這樣子在附加設備與IOS設備溝通的時候將不能自動啓動軟體。下面說明一下IOS設備與附加硬體設備溝通的流程：&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;附加設備連接上IOS設備&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;附加設備送出預先燒錄在ROM上的bundle seed id給IOS設備&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;IOS使用bundle seed id搜尋符合的軟體&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;開啓應用軟體&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 15px;&quot;&gt;如果使用廣域的app id的話，IOS會跳出提示要你去app store搜尋，所以要注意的是！如果你開發的軟體需要連結硬體，那就要使用完整的唯一的才有辦法自動開啓。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/8959154473311884033/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/what-is-ios-bundle-id-or-bundle-seed-id.html#comment-form' title='5 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/8959154473311884033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/8959154473311884033'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/12/what-is-ios-bundle-id-or-bundle-seed-id.html' title='IOS Bundle Id or Bundle Seed Id 解說'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-LC2nHtIpcms/TthbSUFx_kI/AAAAAAAAQ54/ENvcZ-FkaYM/s72-c/Add+App+IDs+++iOS+Provisioning+Portal+++Apple+Developer.png" height="72" width="72"/><thr:total>5</thr:total><georss:featurename>106, Taiwan, Taipei City, Daan District, 台灣大學</georss:featurename><georss:point>25.019943 121.5423525</georss:point><georss:box>25.005554500000002 121.52261150000001 25.0343315 121.5620935</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-7727631298368854118</id><published>2011-11-30T11:22:00.001+08:00</published><updated>2011-11-30T11:41:26.745+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="extension points"/><category scheme="http://www.blogger.com/atom/ns#" term="IOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="uml"/><category scheme="http://www.blogger.com/atom/ns#" term="使用者案例"/><category scheme="http://www.blogger.com/atom/ns#" term="軟體設計"/><title type='text'>UML - Extension point in Usecase diagram 說明</title><content type='html'>&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;甚麼是 Extension point&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;定義一個使用者案例的例外事件，可以將看它看成一到多個 exception path。以「使用者登入」這個使用這案例來舉例的話，這個使用者案例會有下面幾個extension point：&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Invalid Username&lt;/li&gt;&lt;li&gt;Invalid Password&lt;/li&gt;&lt;li&gt;Account has been blocked&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;而這幾個extension point需要被對應到相對處理的使用者案例&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;handle invalid username&lt;/li&gt;&lt;li&gt;handle invalid password&lt;/li&gt;&lt;li&gt;handle account block&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;下面是完整的使用者案例圖，說明了使用者使用「login」這個使用者案例，而這個案例會有三個extension points，而這三個extension points分別有各自的使用者案例處理。&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-N5JMAuC_u3w/TtWkhLRZeRI/AAAAAAAAQ48/bTvBSSL2iRo/s1600/example+-+user+login.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;496&quot; src=&quot;http://1.bp.blogspot.com/-N5JMAuC_u3w/TtWkhLRZeRI/AAAAAAAAQ48/bTvBSSL2iRo/s640/example+-+user+login.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/7727631298368854118/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/uml-extension-point-in-usecase-diagram.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/7727631298368854118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/7727631298368854118'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/uml-extension-point-in-usecase-diagram.html' title='UML - Extension point in Usecase diagram 說明'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-N5JMAuC_u3w/TtWkhLRZeRI/AAAAAAAAQ48/bTvBSSL2iRo/s72-c/example+-+user+login.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Section 1, Kāngníng Rd, Neihu District, Taipei City, Taiwan 114</georss:featurename><georss:point>25.0783213 121.5960692</georss:point><georss:box>25.071129799999998 121.5861987 25.0855128 121.60593970000001</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-2654528533696511665</id><published>2011-11-24T11:12:00.001+08:00</published><updated>2011-11-24T23:30:48.691+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="reengineering"/><category scheme="http://www.blogger.com/atom/ns#" term="軟體設計"/><title type='text'>Android aapt 指令應用</title><content type='html'>Android asset packaging tool 是 aapt 的全名，就像名字一樣這個工具是用來進行 apk (Android package )檔案的管理，最常用到的是當程式開發完成後就會使用它來將所有的 application asset 打包成最後能夠安裝的程式。&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;除了這個功能之外也可使用來進行 apk 檔案的管理，例如：檔案刪除, 新增, 更新, 取出。&lt;/div&gt;&lt;div&gt;這個工具在進行 reengineering 的時候更是不可或缺的工具，不過現在也有很多開發好的 open source 工具可以使用，像是 apktool。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;指令位置&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;{android-sdk location}/tools/aapt&lt;/div&gt;&lt;div&gt;簡單的使用指令說明&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;查看使用方式很簡單，只要不帶參數執行便會顯示詳細的使用說明&lt;br /&gt;aapt &lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;下面來說一下怎樣使用這個程式來進行 apk 的管理，下面只介紹基本的操作其餘參數請自行參照說明，文件執行環境：&lt;br /&gt;&lt;ul&gt;&lt;li&gt;MAC OSX 10.7.2&lt;/li&gt;&lt;li&gt;Android Asset Packaging Tool, v0.2&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;打包安裝檔&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;aapt p -v -z -x -u -M {AndroidManifest.xml 檔案位置} -A {asset 目錄位置} -S {res 目錄位置} -F {產生的 apk 儲存路徑包含路徑}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;查看檔案內容清單 &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;aapt l -v {apk 檔案完整路徑}&lt;br /&gt;可搭配 grep 快速地查找自己所要的結果&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;刪除檔案&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;aapt r -v {apk 檔案完整路徑} {刪除的檔案所在 apk 內的完整路徑，若多檔則使用逗號分隔}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;新增檔案&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;aapt a -v {apk 檔案完整路徑} {所要新增的檔案，若多檔則使用逗號分隔}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;更新檔案 &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;aapt r -f -v {apk 檔案完整路徑} {所要新增的檔案，若多檔則使用逗號分隔}&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;相關聯結&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Android developer guide - Building and Running &lt;i&gt;(&lt;a href=&quot;http://developer.android.com/guide/developing/building/index.html#detailed-build&quot;&gt;http://developer.android.com/guide/developing/building/index.html#detailed-build&lt;/a&gt;)&lt;/i&gt;&lt;br /&gt;Android-apktool&lt;i&gt; (&lt;a href=&quot;http://code.google.com/p/android-apktool/&quot;&gt;http://code.google.com/p/android-apktool/&lt;/a&gt;)&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/2654528533696511665/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/android-aapt.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/2654528533696511665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/2654528533696511665'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/android-aapt.html' title='Android aapt 指令應用'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><thr:total>0</thr:total><georss:featurename>Neihu Dapi, Neihu District, Taipei City, Taiwan 114</georss:featurename><georss:point>25.081168 121.583532</georss:point><georss:box>25.066786500000003 121.56379100000001 25.0955495 121.603273</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-5394189424195251086</id><published>2011-11-23T10:15:00.001+08:00</published><updated>2011-11-24T09:50:19.334+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IOS"/><category scheme="http://www.blogger.com/atom/ns#" term="library"/><category scheme="http://www.blogger.com/atom/ns#" term="static library"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode"/><category scheme="http://www.blogger.com/atom/ns#" term="元件"/><category scheme="http://www.blogger.com/atom/ns#" term="軟體設計"/><title type='text'>IOS Cocoa Touch Static Library 開發教學</title><content type='html'>提升軟體開發效率最有效的方式就是建立可重用的元件，基本上只要在一個專案中被重復使用兩次以上的功能都可以被納入元件設計的範圍中，這樣的概念是通用於所有開發語言的。&lt;br /&gt;&lt;br /&gt;在IOS的開發中這樣的概念在XCode中就已經有支援了，因此今天這篇文章就使用一個簡單的範例來展示一下如何達到。&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;開發環境&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;XCode 4.1 build 4B110&lt;/li&gt;&lt;li&gt;iPhone 4.3 Simulator&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;下面會使用XCode建立一個 Cocoa Touch Static Library Project 與一個 View-based Application，先建立一個static library然後引入到 view-based application中進行開發使用。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;建立靜態元件(Static Library)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;建立Cocoa Touch Static Library Project&lt;/div&gt;&lt;div&gt;File &amp;gt; New &amp;gt; New Project &amp;gt; Framework &amp;amp; Library &amp;gt;&amp;nbsp;Cocoa Touch Static Library&lt;/div&gt;&lt;div&gt;(這裡建立的專案名稱為: BikeLibrary)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-QnxinLZK2nY/TsyIPQUEdNI/AAAAAAAAQ14/bQ5IDgy8b0I/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.44.10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;270&quot; src=&quot;http://4.bp.blogspot.com/-QnxinLZK2nY/TsyIPQUEdNI/AAAAAAAAQ14/bQ5IDgy8b0I/s400/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.44.10.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;編輯BikeLibrary.h 加入功能宣告&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/--f-_Udbj9Lc/TsyIUuBtDFI/AAAAAAAAQ2A/OaPJbdRvLBM/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.36.10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;http://3.bp.blogspot.com/--f-_Udbj9Lc/TsyIUuBtDFI/AAAAAAAAQ2A/OaPJbdRvLBM/s640/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.36.10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;編輯BikeLibrary.h 並實作功能&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-vYo-z-6RRqo/TsyIg0jh6LI/AAAAAAAAQ2I/P3AEhHDXeoQ/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.45.22.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;478&quot; src=&quot;http://1.bp.blogspot.com/-vYo-z-6RRqo/TsyIg0jh6LI/AAAAAAAAQ2I/P3AEhHDXeoQ/s640/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.45.22.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;選擇目標裝置 iPhone 4.3 Simulator &amp;amp; 編譯 (Product &amp;gt; Build)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-ctibD7SSmIs/TsyJNZcOM3I/AAAAAAAAQ2Q/50Yp1xPE1CQ/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.47.07.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;408&quot; src=&quot;http://4.bp.blogspot.com/-ctibD7SSmIs/TsyJNZcOM3I/AAAAAAAAQ2Q/50Yp1xPE1CQ/s640/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.47.07.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;建立一個新的資料夾 BikeLibrary 將 libBikeLibrary.a +&amp;nbsp;BikeLibrary.h 複製到目錄中就完成了共用元件的製作。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-gOBkH30tkWI/TsyJdDKAU5I/AAAAAAAAQ2Y/cjdYFLiiVRI/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.49.22.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://3.bp.blogspot.com/-gOBkH30tkWI/TsyJdDKAU5I/AAAAAAAAQ2Y/cjdYFLiiVRI/s320/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.49.22.png&quot; width=&quot;271&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;建立專案並使用靜態元件&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;建立一個View-based Application Project&lt;/div&gt;&lt;div&gt;File &amp;gt; New &amp;gt; New Project &amp;gt; Application &amp;gt; View-based Application&lt;/div&gt;&lt;div&gt;(這裡建立的專案名稱為: BikeController)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-PFgEFlnpE6Q/TsyJpzEGwRI/AAAAAAAAQ2g/qA2R_Hfq7Kg/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.50.11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;http://4.bp.blogspot.com/-PFgEFlnpE6Q/TsyJpzEGwRI/AAAAAAAAQ2g/qA2R_Hfq7Kg/s640/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.50.11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;複製靜態元件到專案目錄中&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-0ZhraLeaoIA/TsyJ1a1y64I/AAAAAAAAQ2o/oTGzgmXQnDY/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.50.59.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-0ZhraLeaoIA/TsyJ1a1y64I/AAAAAAAAQ2o/oTGzgmXQnDY/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.50.59.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;編輯 BikeControllerViewController.h 加入&amp;nbsp;BikeLibrary.h&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-6y5BYpyOvK8/TsyKIE7ItuI/AAAAAAAAQ2w/Rd6Zi_QoaDw/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.52.12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://4.bp.blogspot.com/-6y5BYpyOvK8/TsyKIE7ItuI/AAAAAAAAQ2w/Rd6Zi_QoaDw/s640/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.52.12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;編輯&amp;nbsp;BikeControllerViewController.m 呼叫靜態元件&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-kGXrTNqRdY0/TsyKZz9yM6I/AAAAAAAAQ24/Dy8Dbo2x-NY/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.53.22.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;278&quot; src=&quot;http://2.bp.blogspot.com/-kGXrTNqRdY0/TsyKZz9yM6I/AAAAAAAAQ24/Dy8Dbo2x-NY/s640/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.53.22.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;執行模凝器 iPhone 4.3 Simulator 並且觀察 Output Console 是否正確輸出 debug訊息&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-7rO08c-LYMU/TsyKoqzPhZI/AAAAAAAAQ3A/WszyGuJWrXc/s1600/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.54.20.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;273&quot; src=&quot;http://2.bp.blogspot.com/-7rO08c-LYMU/TsyKoqzPhZI/AAAAAAAAQ3A/WszyGuJWrXc/s640/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.54.20.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Comment&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;好的元件設計能夠替開發人員省去寶貴的開發時間，在面臨需求變更與效能調教時也能夠很快速地達成。省下來的時間拿來增進自己的知識或是研究更好的技術這才是根本的解決之道。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/5394189424195251086/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/ios-reusable-static-library.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/5394189424195251086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/5394189424195251086'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/ios-reusable-static-library.html' title='IOS Cocoa Touch Static Library 開發教學'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-QnxinLZK2nY/TsyIPQUEdNI/AAAAAAAAQ14/bQ5IDgy8b0I/s72-c/Screen+Shot+2011-11-23+at+%25E4%25B8%258B%25E5%258D%25881.44.10.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>No. 325, Section 2, Chénggōng Rd, Neihu District, Taipei City, Taiwan 114</georss:featurename><georss:point>25.071538 121.590019</georss:point><georss:box>25.06974 121.5875515 25.073336 121.59248649999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-6326762255840480648</id><published>2011-11-22T20:50:00.001+08:00</published><updated>2011-11-24T09:51:00.432+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="壓縮"/><category scheme="http://www.blogger.com/atom/ns#" term="應用軟體"/><category scheme="http://www.blogger.com/atom/ns#" term="解壓縮"/><title type='text'>MAC 下的解壓縮軟體 The Unarchiver</title><content type='html'>一直以來我在MAC上都用command在做壓縮跟解壓縮，可能自己也用習慣了也就這樣活到現在。不過今天看到一個很不錯的open source軟體很好用，因此就推一下。&lt;br /&gt;&lt;br /&gt;這個軟體可以解壓縮絕大多數的壓縮檔案諸如：&amp;nbsp;Zip, Tar-GZip, Tar-BZip2, RAR, 7-zip, LhA, StuffIt等還有更多。&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;下載與安裝&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;在安裝上很方便，你只要打開App Store輸入搜尋 [ The Unarchiver ]然後點選安裝就可以。&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-cv1t5R7osfY/Tsue8cosGJI/AAAAAAAAQ1o/NpBuXJDhMik/s1600/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25889.07.59.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;276&quot; src=&quot;http://1.bp.blogspot.com/-cv1t5R7osfY/Tsue8cosGJI/AAAAAAAAQ1o/NpBuXJDhMik/s400/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25889.07.59.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;使用與設定&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;使用上也很簡單，只要打開軟體並且設定後就可以直接點選壓縮檔使用了。&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-SYTp1P8SEJA/TsufKHu5PQI/AAAAAAAAQ1w/J1HNNOJVcEU/s1600/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25889.09.42.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;315&quot; src=&quot;http://2.bp.blogspot.com/-SYTp1P8SEJA/TsufKHu5PQI/AAAAAAAAQ1w/J1HNNOJVcEU/s400/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25889.09.42.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/6326762255840480648/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/mac-rar-zip-gz-gz2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/6326762255840480648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/6326762255840480648'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/mac-rar-zip-gz-gz2.html' title='MAC 下的解壓縮軟體 The Unarchiver'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-cv1t5R7osfY/Tsue8cosGJI/AAAAAAAAQ1o/NpBuXJDhMik/s72-c/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25889.07.59.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Nèihú Rd, Siangshan District, Hsinchu City, Taiwan 300</georss:featurename><georss:point>24.7427239 120.906034</georss:point><georss:box>24.739137900000003 120.90112 24.7463099 120.910948</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-4702644821659297265</id><published>2011-11-22T19:33:00.001+08:00</published><updated>2011-11-24T09:51:24.479+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Decompiler"/><category scheme="http://www.blogger.com/atom/ns#" term="JAD"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JD"/><title type='text'>Java 反組譯工具 JD 與 JAD</title><content type='html'>最近接了幾個奇怪的案子，清一色的就是沒有原始碼，看來這是台灣軟體界的抬頭了！畢竟在這十幾年的資訊生涯裡每個專案的原始碼都是在合約中寫明的是屬於甲方的，不過我想專案吧，開發出來的東西我想歸屬於客戶也沒甚麼關係，要改也要有個功力好的人才有辦法做reengineering。&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;不過接了這些案子但是又需要測試的時候只好進行decompiler了，在java domain有個很棒的好處就是open source的精神，全世界的設計師開發出很多很好用的tool可以快速地達到這點。&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Java Decompiler 工具&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;下面幾個是比較受歡迎的Decompiler tool：&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;JD&amp;nbsp;&lt;/li&gt;&lt;li&gt;JAD&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;試用後發現JD的正確性比較高，不過下面還是針對這兩個Decompiler的安裝與使用方式做一個介紹。&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Eclipse plugin installation&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;我的方式是直接使用eclipse，比較方便也比較快速，我的eclipse version 為&amp;nbsp;indigo&amp;nbsp;3.7.1 mac 64x。&lt;/div&gt;&lt;div&gt;兩種Tool在eclipse上的安裝方式都是：&lt;/div&gt;&lt;div&gt;Help -&amp;gt; Install New Software &amp;gt; Add : 然後輸入名字與網址後點選Add。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-ApYoNkqcEzA/TsuWv0qAB2I/AAAAAAAAQ1I/E_M5rMYVEl4/s1600/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25888.33.36.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;308&quot; src=&quot;http://4.bp.blogspot.com/-ApYoNkqcEzA/TsuWv0qAB2I/AAAAAAAAQ1I/E_M5rMYVEl4/s400/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25888.33.36.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;JD for Eclipse&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Name:&amp;nbsp;jd-decompiler&lt;/div&gt;&lt;div&gt;Location:&amp;nbsp;http://java.decompiler.free.fr/jd-eclipse/update&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;JAD for Eclipse&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Name: J2D&lt;/div&gt;&lt;div&gt;Location: http://jadclipse.sf.net/update&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Plugin setting&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;安裝好後必須設定關聯檔案，如此我們可以在IDE裡頭開啟class檔案時直接呼叫Decompiler看到原始碼，設定方式如下。&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;設定檔案關聯性，將class檔案關聯到decompiler tool。&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Open Eclipse &amp;gt; Preferences &amp;gt; General &amp;gt; Editors &amp;gt; File Associations&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-uzuqiI4Zc9I/TsuXzANZpHI/AAAAAAAAQ1g/uF9XW-aXdaU/s1600/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25888.38.14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;373&quot; src=&quot;http://1.bp.blogspot.com/-uzuqiI4Zc9I/TsuXzANZpHI/AAAAAAAAQ1g/uF9XW-aXdaU/s400/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25888.38.14.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;在右側的 [File types] 中選擇*.class，在下面的[Associated editors] 選擇Add然後：&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;如果是想要使用JAD則選擇[Decompiled Class File Viewer]&lt;/li&gt;&lt;li&gt;如果是想要使用JD的話則選擇[Class File Editor]&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open Eclipse &amp;gt; Preferences &amp;gt; Java &amp;gt; Decompilers&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/--vyHervIxuo/TsuXMgsBtTI/AAAAAAAAQ1Q/pPNErvlW-Pc/s1600/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25888.35.44.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://4.bp.blogspot.com/--vyHervIxuo/TsuXMgsBtTI/AAAAAAAAQ1Q/pPNErvlW-Pc/s400/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25888.35.44.png&quot; width=&quot;373&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;在[Decompiler]右側可以選擇所要使用的Decompiler Tool，&lt;/div&gt;&lt;div&gt;若勾選[Use Eclipse code formmatter (reformats decompiler output.]的話則在decompiler之後會進行原始碼的格式化。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;如果使用的是JAD的話需要額外的設定。&lt;/div&gt;&lt;div&gt;Open JAD 右側的&lt;/div&gt;&lt;div&gt;[Path to decompiler] 必須設定jad指令檔的完整路徑&lt;/div&gt;&lt;div&gt;[Directory for temporary files] 若有預設值則不需修改，若無的話你則需要設定一個目錄作暫存用&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-5DMjYvRNl2k/TsuXmo5GBoI/AAAAAAAAQ1Y/5xaDnuN2qRA/s1600/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25888.37.24.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;373&quot; src=&quot;http://2.bp.blogspot.com/-5DMjYvRNl2k/TsuXmo5GBoI/AAAAAAAAQ1Y/5xaDnuN2qRA/s400/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25888.37.24.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;到此為止設定完成後便可以在eclipse快速度進行decompiler的動作，對於JAD來說有其他的相關設定在[Debug] [Directives] [Formatting] [Misc]中。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/4702644821659297265/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/reengineering-decompilerjava-domainopen.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/4702644821659297265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/4702644821659297265'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/reengineering-decompilerjava-domainopen.html' title='Java 反組譯工具 JD 與 JAD'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-ApYoNkqcEzA/TsuWv0qAB2I/AAAAAAAAQ1I/E_M5rMYVEl4/s72-c/Screen+Shot+2011-11-22+at+%25E4%25B8%258B%25E5%258D%25888.33.36.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Nèihú Rd, Siangshan District, Hsinchu City, Taiwan 300</georss:featurename><georss:point>24.7427239 120.906034</georss:point><georss:box>24.7391189 120.9010985 24.7463289 120.91096950000001</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-2613432881785018415</id><published>2011-11-15T19:06:00.001+08:00</published><updated>2011-11-24T23:44:26.980+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Mobile"/><title type='text'>Android APK 逆向工程</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit; font-size: large;&quot;&gt;&lt;b&gt;前言&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;最近接到了一個神奇的Android App開發專案，也就是沒有原始碼的使用者介面修改專案。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;這也看出了現在台灣Mobile專案開發的火熱程度{企業竟然接受了不包含SOURCE CODE}的開發條件，一點點的心得感想。&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit; font-size: large;&quot;&gt;&lt;b&gt;甚麼是APK&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;APK (全名Android Package)是利用ZIP的壓縮技術將所有軟體執行所需要的檔案打包成一個安裝包裹，如果解開的話會看到這幾個主要的部分：&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;XML File：Android 的View與Global軟體設定檔&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;Classes.dex：編譯過的原始碼，若使用apktools作解壓縮的話產生的所有的原始碼會被解開成smali，smali檔案是dalvik的assemble檔案。&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit; font-size: large;&quot;&gt;&lt;b&gt;逆向工程的開始&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;我們透過幾個簡單的方式記型逆向工程&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;使用ZIP解壓縮APK檔案，以取出classes.dex&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;使用APKTOOL解壓縮APK取出XML File&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;使用JD-GUI反解譯class assemble&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;建立新的Android Project將XML File與classes放進新的專案&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;完成逆向&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit; font-size: large;&quot;&gt;&lt;b&gt;Content Reference&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/android-apktool/&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;APKTOOL&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://java.decompiler.free.fr/?q=jdgui&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: inherit;&quot;&gt;JD-GUI&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/2613432881785018415/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/android-package-deassembler.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/2613432881785018415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/2613432881785018415'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/android-package-deassembler.html' title='Android APK 逆向工程'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><thr:total>0</thr:total><georss:featurename>Nèihú Rd, Siangshan District, Hsinchu City, Taiwan 300</georss:featurename><georss:point>24.7427239 120.906034</georss:point><georss:box>24.7391189 120.9010985 24.7463289 120.91096950000001</georss:box></entry><entry><id>tag:blogger.com,1999:blog-407622661378233124.post-4293927422995530488</id><published>2011-11-15T18:33:00.001+08:00</published><updated>2011-11-15T18:35:21.654+08:00</updated><title type='text'>@開始</title><content type='html'>一個星期過去了，開始的進度太慢。&lt;div&gt;這是執行力的問題，忙東忙西的! 當然也包括自己思考太多降低了很多事情的完成線。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;一個下雨的傍晚，是傍晚、是冬天的傍晚。&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://infinite-studio.blogspot.com/feeds/4293927422995530488/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/4293927422995530488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/407622661378233124/posts/default/4293927422995530488'/><link rel='alternate' type='text/html' href='http://infinite-studio.blogspot.com/2011/11/blog-post.html' title='@開始'/><author><name>Justin Lin</name><uri>https://plus.google.com/102370720548836126712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-kHRV7BQjs1k/AAAAAAAAAAI/AAAAAAAAbJk/YWXsWnIyFhw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>