<?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-3469040499108170459</id><updated>2024-09-20T16:35:54.801-07:00</updated><title type='text'>iPhone development</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://iphonedevupdates.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://iphonedevupdates.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>BUSINESS ISSUES</name><uri>http://www.blogger.com/profile/09071608534531607698</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio8-Fut2_2thw51XX3cn-qUDiZ3gAalYgZEDi6pHsmEgMbrG8GsPreY-U-ICJ7IECEOCnawNY0ervovll9g1sgKE9pPT6Z7kfnIrW2bLaW5Sj6E37ujWVfcBKuFmhx5X0/s220/2609491913_a1f1a6d121_o.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3469040499108170459.post-2064181410775420203</id><published>2011-02-25T05:44:00.000-08:00</published><updated>2013-09-02T10:18:53.792-07:00</updated><title type='text'>parsing HTML file for iPhone apps using xcode, obj-c</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hay,&lt;br /&gt;
&lt;br /&gt;
Recently I made a project where the application need to read the HTML file , parse it and display the data on the view.&lt;br /&gt;
&lt;br /&gt;
Before you start , get the below files from&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;a href=&quot;https://github.com/topfunky/hpple&quot;&gt;&lt;b&gt;https://github.com/topfunky/hpple&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;HTFpple.h&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;HTFpple.m&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;HTFppleElement.h&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;HTFppleElement.m&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;XPathQuery.h&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;XPathQuery.m&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Once you get that, just do the following modifications to your project settings:&lt;br /&gt;
&lt;br /&gt;
1) Goto Target on the left hand side tree. Right click on your project name and hit Get Info option from popup menu.&lt;br /&gt;
&lt;br /&gt;
2) Select All configurations from Configuration combo box.&lt;br /&gt;
&lt;br /&gt;
3) Search for &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;Header Search path&lt;/span&gt;&lt;/b&gt; and the bloodline with recursive option selected&lt;br /&gt;
&lt;br /&gt;
${SDKROOT}/usr/include/libxml2&lt;br /&gt;
&lt;br /&gt;
4) In the same way, search for &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;Other Linker Flag&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;add the below line to it:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;lxml2&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;Here is the code to parse the HTML file. [ This code works for reading local HTML file attached in your project ]&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #6f33a7; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;NSMutableArray&lt;span style=&quot;color: black;&quot;&gt; *array = [[&lt;/span&gt;NSMutableArray&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;alloc&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;init&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3e117f; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSString&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; *filePath = [[&lt;/span&gt;&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSBundle&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;mainBundle&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;pathForResource&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;myHTMLfileNameWithoutExtension&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;ofType&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;html&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSData&lt;/span&gt; *htmlData = [[&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSData&lt;/span&gt; &lt;span style=&quot;color: #3e117f;&quot;&gt;alloc&lt;/span&gt;] &lt;span style=&quot;color: #3e117f;&quot;&gt;initWithContentsOfFile&lt;/span&gt;:filePath];&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #558286;&quot;&gt;TFHpple&lt;/span&gt; *xpathParser = [[&lt;span style=&quot;color: #558286;&quot;&gt;TFHpple&lt;/span&gt; &lt;span style=&quot;color: #3e117f;&quot;&gt;alloc&lt;/span&gt;] &lt;span style=&quot;color: #37595d;&quot;&gt;initWithHTMLData&lt;/span&gt;:htmlData];&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSArray&lt;/span&gt; *chapterName&amp;nbsp; = [xpathParser &lt;span style=&quot;color: #37595d;&quot;&gt;search&lt;/span&gt;:&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;//html//h1&quot;&lt;/span&gt;]; &lt;span style=&quot;color: #1d8711;&quot;&gt;// get the page title&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #558286;&quot;&gt;chapterIndexData&lt;/span&gt; = chapterName;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[xpathParser &lt;span style=&quot;color: #3e117f;&quot;&gt;release&lt;/span&gt;];&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[htmlData &lt;span style=&quot;color: #3e117f;&quot;&gt;release&lt;/span&gt;];&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[array &lt;span style=&quot;color: #3e117f;&quot;&gt;release&lt;/span&gt;];&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;Above code reads all the H1 tags in the HTML page and put them in&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;display: inline !important; font: normal normal normal 11px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: #558286;&quot;&gt;chapterIndexData&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;which is of type NSArray *.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please let me know if you have any doubts regarding this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonedevupdates.blogspot.com/feeds/2064181410775420203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonedevupdates.blogspot.com/2011/02/parsing-html-file-for-iphone-apps-using.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/2064181410775420203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/2064181410775420203'/><link rel='alternate' type='text/html' href='http://iphonedevupdates.blogspot.com/2011/02/parsing-html-file-for-iphone-apps-using.html' title='parsing HTML file for iPhone apps using xcode, obj-c'/><author><name>BUSINESS ISSUES</name><uri>http://www.blogger.com/profile/09071608534531607698</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio8-Fut2_2thw51XX3cn-qUDiZ3gAalYgZEDi6pHsmEgMbrG8GsPreY-U-ICJ7IECEOCnawNY0ervovll9g1sgKE9pPT6Z7kfnIrW2bLaW5Sj6E37ujWVfcBKuFmhx5X0/s220/2609491913_a1f1a6d121_o.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469040499108170459.post-9141119889265845799</id><published>2011-01-11T04:13:00.000-08:00</published><updated>2013-09-02T11:07:05.665-07:00</updated><title type='text'>show text  box while typing from keyboard/keypad in iPhone</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Some times, while you try to enter the text in text field&#39;s , you might not be able to see the text which you are typing in the text box. It get hide with the popup keyboard. If you don&#39;t want to hide the text box while typing, just add the below 2 functions in your code.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)keyboardWasShown:(&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSNotification&lt;/span&gt; *)aNotification {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #558286; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; ( &lt;/span&gt;keyboardShown&lt;span style=&quot;color: black;&quot;&gt; )&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;return&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 13px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt;( &lt;span style=&quot;color: #558286;&quot;&gt;textView&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;text&lt;/span&gt; != &lt;span style=&quot;color: #340dd4;&quot;&gt;0&lt;/span&gt; ) {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;NSDictionary&lt;/span&gt; *info = [aNotification &lt;span style=&quot;color: #3e117f;&quot;&gt;userInfo&lt;/span&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #6f33a7; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;NSValue&lt;span style=&quot;color: black;&quot;&gt; *aValue = [info &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;objectForKey&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;UIKeyboardBoundsUserInfoKey&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;CGSize&lt;/span&gt; keyboardSize = [aValue &lt;span style=&quot;color: #3e117f;&quot;&gt;CGRectValue&lt;/span&gt;].&lt;span style=&quot;color: #6f33a7;&quot;&gt;size&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 13px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;NSTimeInterval&lt;/span&gt; animationDuration = &lt;span style=&quot;color: #340dd4;&quot;&gt;0.300000011920929&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;CGRect&lt;/span&gt; frame = &lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;view&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;frame&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; frame.&lt;span style=&quot;color: #6f33a7;&quot;&gt;origin&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;y&lt;/span&gt; -= keyboardSize.&lt;span style=&quot;color: #6f33a7;&quot;&gt;height&lt;/span&gt;-&lt;span style=&quot;color: #340dd4;&quot;&gt;44&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; frame.&lt;span style=&quot;color: #6f33a7;&quot;&gt;size&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;height&lt;/span&gt; += keyboardSize.&lt;span style=&quot;color: #6f33a7;&quot;&gt;height&lt;/span&gt;-&lt;span style=&quot;color: #340dd4;&quot;&gt;44&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3e117f; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&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: #6f33a7;&quot;&gt;UIView&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;beginAnimations&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;ResizeForKeyboard&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;context&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;span style=&quot;color: #6f33a7;&quot;&gt;UIView&lt;/span&gt; &lt;span style=&quot;color: #3e117f;&quot;&gt;setAnimationDuration&lt;/span&gt;:animationDuration];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;view&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;frame&lt;/span&gt; = frame;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3e117f; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&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: #6f33a7;&quot;&gt;UIView&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;commitAnimations&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 13px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #558286;&quot;&gt;viewMoved&lt;/span&gt; = &lt;span style=&quot;color: #b409a1;&quot;&gt;YES&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 13px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #558286; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;keyboardShown&lt;span style=&quot;color: black;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;YES&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)keyboardWasHidden:(&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSNotification&lt;/span&gt; *)aNotification {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt; ( &lt;span style=&quot;color: #558286;&quot;&gt;viewMoved&lt;/span&gt; ) {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;NSDictionary&lt;/span&gt; *info = [aNotification &lt;span style=&quot;color: #3e117f;&quot;&gt;userInfo&lt;/span&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #6f33a7; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;NSValue&lt;span style=&quot;color: black;&quot;&gt; *aValue = [info &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;objectForKey&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;UIKeyboardBoundsUserInfoKey&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;CGSize&lt;/span&gt; keyboardSize = [aValue &lt;span style=&quot;color: #3e117f;&quot;&gt;CGRectValue&lt;/span&gt;].&lt;span style=&quot;color: #6f33a7;&quot;&gt;size&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 13px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;NSTimeInterval&lt;/span&gt; animationDuration = &lt;span style=&quot;color: #340dd4;&quot;&gt;0.300000011920929&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;CGRect&lt;/span&gt; frame = &lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;view&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;frame&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; frame.&lt;span style=&quot;color: #6f33a7;&quot;&gt;origin&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;y&lt;/span&gt; += keyboardSize.&lt;span style=&quot;color: #6f33a7;&quot;&gt;height&lt;/span&gt;-&lt;span style=&quot;color: #340dd4;&quot;&gt;44&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; frame.&lt;span style=&quot;color: #6f33a7;&quot;&gt;size&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;height&lt;/span&gt; -= keyboardSize.&lt;span style=&quot;color: #6f33a7;&quot;&gt;height&lt;/span&gt;-&lt;span style=&quot;color: #340dd4;&quot;&gt;44&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3e117f; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&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: #6f33a7;&quot;&gt;UIView&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;beginAnimations&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;ResizeForKeyboard&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;context&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;span style=&quot;color: #6f33a7;&quot;&gt;UIView&lt;/span&gt; &lt;span style=&quot;color: #3e117f;&quot;&gt;setAnimationDuration&lt;/span&gt;:animationDuration];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;view&lt;/span&gt;.&lt;span style=&quot;color: #6f33a7;&quot;&gt;frame&lt;/span&gt; = frame;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3e117f; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&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: #6f33a7;&quot;&gt;UIView&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;commitAnimations&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 13px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #558286;&quot;&gt;viewMoved&lt;/span&gt; = &lt;span style=&quot;color: #b409a1;&quot;&gt;NO&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 13px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Georgia, Times New Roman, serif; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #558286; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;keyboardShown&lt;span style=&quot;color: black;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;NO&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Observe the screen shots below before and after the code:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&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;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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCIBc-I988Qp6uq4i-zxZvoDcSTxo3TiIyYEMk8l0P3Zos0RnYmdFFN7JB2J6SuaUUsoUzsNbs_Xsbb_qw3gjtS8eZEZ_ff3-96DiiZJeyYh5uL3fmA4LrtrDiz4Nztflj_m9OMQbmECc/s1600/prev.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCIBc-I988Qp6uq4i-zxZvoDcSTxo3TiIyYEMk8l0P3Zos0RnYmdFFN7JB2J6SuaUUsoUzsNbs_Xsbb_qw3gjtS8eZEZ_ff3-96DiiZJeyYh5uL3fmA4LrtrDiz4Nztflj_m9OMQbmECc/s320/prev.png&quot; width=&quot;176&quot; /&gt;&lt;/span&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;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Actual screen before typing&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9g8IeckuGfNhTjmcxf-dyHUXDanc9BTmkqNfIq1ss-284Di397ovUW_GUsrlr37vQIbjbB9N8kikBkdlkrBpluCbuC_Wmvn0_OFGL_sSzFqx10mdrqlkjhccBH39SBjZZVgj71GcPsg8/s1600/next.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9g8IeckuGfNhTjmcxf-dyHUXDanc9BTmkqNfIq1ss-284Di397ovUW_GUsrlr37vQIbjbB9N8kikBkdlkrBpluCbuC_Wmvn0_OFGL_sSzFqx10mdrqlkjhccBH39SBjZZVgj71GcPsg8/s320/next.png&quot; width=&quot;167&quot; /&gt;&lt;/span&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;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;While typing, entire screen will be moved to upwards&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Pleaes let me know if you have any questions or concerns.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Happy coding :)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iphonedevupdates.blogspot.com/feeds/9141119889265845799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonedevupdates.blogspot.com/2011/01/show-text-box-while-typing-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/9141119889265845799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/9141119889265845799'/><link rel='alternate' type='text/html' href='http://iphonedevupdates.blogspot.com/2011/01/show-text-box-while-typing-from.html' title='show text  box while typing from keyboard/keypad in iPhone'/><author><name>BUSINESS ISSUES</name><uri>http://www.blogger.com/profile/09071608534531607698</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio8-Fut2_2thw51XX3cn-qUDiZ3gAalYgZEDi6pHsmEgMbrG8GsPreY-U-ICJ7IECEOCnawNY0ervovll9g1sgKE9pPT6Z7kfnIrW2bLaW5Sj6E37ujWVfcBKuFmhx5X0/s220/2609491913_a1f1a6d121_o.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCIBc-I988Qp6uq4i-zxZvoDcSTxo3TiIyYEMk8l0P3Zos0RnYmdFFN7JB2J6SuaUUsoUzsNbs_Xsbb_qw3gjtS8eZEZ_ff3-96DiiZJeyYh5uL3fmA4LrtrDiz4Nztflj_m9OMQbmECc/s72-c/prev.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469040499108170459.post-8788899460931853107</id><published>2010-12-15T01:28:00.000-08:00</published><updated>2010-12-15T01:28:39.419-08:00</updated><title type='text'>Alert message sample</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;If you want to display a simple notification message like below, just copy paste the below code according your requirement.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK2YQhLEYv84z0pQefQMqusG-qgH0V6iiBEilJZIXoZpSmIGI9o5zz3Kd_GlpNpExv0QKr4GwL1RptROe7gS_ttFTf0y7sZSmUymv78WY1_L4tX5Ge-jAM1R2gcgdhmyK2UahuAC9ZSQc/s1600/notification.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK2YQhLEYv84z0pQefQMqusG-qgH0V6iiBEilJZIXoZpSmIGI9o5zz3Kd_GlpNpExv0QKr4GwL1RptROe7gS_ttFTf0y7sZSmUymv78WY1_L4tX5Ge-jAM1R2gcgdhmyK2UahuAC9ZSQc/s1600/notification.png&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;UIAlertView&lt;span style=&quot;color: black;&quot;&gt; *alert = [[&lt;/span&gt;UIAlertView&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;alloc&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;]&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #c81b28;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;initWithTitle&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;@&quot;Only one picture allowed&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;&amp;nbsp; &lt;span style=&quot;color: #3e117f;&quot;&gt;message&lt;/span&gt;:&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;&quot;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;delegate&lt;/span&gt;:&lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3e117f;&quot;&gt;cancelButtonTitle&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;OK&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3e117f;&quot;&gt;otherButtonTitles&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3e117f;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;[alert &lt;span style=&quot;color: #3e117f;&quot;&gt;show&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;[alert &lt;span style=&quot;color: #3e117f;&quot;&gt;release&lt;/span&gt;];&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;in the message:&quot;&quot; part, you can mentioned whatever you want to display within the double quotes.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Happy coding :)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphonedevupdates.blogspot.com/feeds/8788899460931853107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonedevupdates.blogspot.com/2010/12/alert-message-sample.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/8788899460931853107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/8788899460931853107'/><link rel='alternate' type='text/html' href='http://iphonedevupdates.blogspot.com/2010/12/alert-message-sample.html' title='Alert message sample'/><author><name>BUSINESS ISSUES</name><uri>http://www.blogger.com/profile/09071608534531607698</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio8-Fut2_2thw51XX3cn-qUDiZ3gAalYgZEDi6pHsmEgMbrG8GsPreY-U-ICJ7IECEOCnawNY0ervovll9g1sgKE9pPT6Z7kfnIrW2bLaW5Sj6E37ujWVfcBKuFmhx5X0/s220/2609491913_a1f1a6d121_o.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK2YQhLEYv84z0pQefQMqusG-qgH0V6iiBEilJZIXoZpSmIGI9o5zz3Kd_GlpNpExv0QKr4GwL1RptROe7gS_ttFTf0y7sZSmUymv78WY1_L4tX5Ge-jAM1R2gcgdhmyK2UahuAC9ZSQc/s72-c/notification.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469040499108170459.post-6767339971733812899</id><published>2010-12-07T05:26:00.000-08:00</published><updated>2010-12-07T05:26:03.105-08:00</updated><title type='text'>Implementing game center for leader boards / leaderboard on iPhone</title><content type='html'>If you want to implement game center related stuff in your iPhone application, go through the description mentioned below.&lt;br /&gt;
&lt;br /&gt;
In this post, I am proving you only the implementation part for leader board /leaderboard in game center on iPhone.&lt;br /&gt;
&lt;br /&gt;
Copy paste the below code in your .mm file :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;BOOL&lt;/span&gt;)isGameCenterAvailable {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Check for presence of GKLocalPlayer API.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;Class&lt;/span&gt; gcClass = (&lt;span style=&quot;color: #3e117f;&quot;&gt;NSClassFromString&lt;/span&gt;(&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;GKLocalPlayer&quot;&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;// The device must be running running iOS 4.1 or later.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;NSString&lt;/span&gt; *reqSysVer = &lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;4.1&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;NSString&lt;/span&gt; *currSysVer = [[&lt;span style=&quot;color: #6f33a7;&quot;&gt;UIDevice&lt;/span&gt; &lt;span style=&quot;color: #3e117f;&quot;&gt;currentDevice&lt;/span&gt;] &lt;span style=&quot;color: #3e117f;&quot;&gt;systemVersion&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;BOOL&lt;/span&gt; osVersionSupported = ([currSysVer &lt;span style=&quot;color: #3e117f;&quot;&gt;compare&lt;/span&gt;:reqSysVer &lt;span style=&quot;color: #3e117f;&quot;&gt;options&lt;/span&gt;:&lt;span style=&quot;color: #3e117f;&quot;&gt;NSNumericSearch&lt;/span&gt;] != &lt;span style=&quot;color: #3e117f;&quot;&gt;NSOrderedAscending&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;return&lt;/span&gt; (gcClass &amp;amp;&amp;amp; osVersionSupported);&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)initGameCenter {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Only continue if Game Center is available on this device&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Authenticate the local player&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;gameCenterAuthenticate&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Register the GKPlayerAuthenticationDidChangeNotificationName notification&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;NSNotificationCenter&lt;span style=&quot;color: black;&quot;&gt; *nc = [&lt;/span&gt;NSNotificationCenter&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;defaultCenter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3e117f; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[nc &lt;/span&gt;addObserver&lt;span style=&quot;color: black;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;selector&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;@selector&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;gameCenterAuthenticationChanged&lt;span style=&quot;color: black;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;GKPlayerAuthenticationDidChangeNotificationName&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &lt;span style=&quot;color: #3e117f;&quot;&gt;object&lt;/span&gt;:&lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)gameCenterAuthenticate {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Authenticate the local user&lt;/div&gt;&lt;div style=&quot;color: #c81b28; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;Game Center - Trying to authenticate...&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;/*if([GKLocalPlayer localPlayer].authenticated == NO) */&lt;span style=&quot;color: black;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;[[&lt;span style=&quot;color: #6f33a7;&quot;&gt;GKLocalPlayer&lt;/span&gt; &lt;span style=&quot;color: #3e117f;&quot;&gt;localPlayer&lt;/span&gt;] authenticateWithCompletionHandler:^(&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSError&lt;/span&gt; *&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt; == &lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;) {&lt;/div&gt;&lt;div style=&quot;color: #c81b28; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;Game Center - Authenticated successfully&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #558286; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;} &lt;span style=&quot;color: #b409a1;&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;color: #c81b28; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;Game Center - Failed to authenticate&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)gameCenterAuthenticationChanged {&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;gameCenterAuthenticate&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;) registerForAuthenticationNotification&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;NSNotificationCenter&lt;span style=&quot;color: black;&quot;&gt; *nc = [&lt;/span&gt;NSNotificationCenter&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;defaultCenter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3e117f; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; [nc &lt;/span&gt;addObserver&lt;span style=&quot;color: black;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #3e117f;&quot;&gt;selector&lt;/span&gt;:&lt;span style=&quot;color: #b409a1;&quot;&gt;@selector&lt;/span&gt;(authenticationChanged)&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;GKPlayerAuthenticationDidChangeNotificationName&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #3e117f;&quot;&gt;object&lt;/span&gt;:&lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)submitHighScore {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Report the high score to Game Center&lt;/div&gt;&lt;div style=&quot;color: #3e117f; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6f33a7;&quot;&gt;GKScore&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; *scoreReporter = [[[&lt;/span&gt;&lt;span style=&quot;color: #6f33a7;&quot;&gt;GKScore&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;alloc&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;initWithCategory&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;HIGHEST_SCORES&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;autorelease&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scoreReporter.&lt;span style=&quot;color: #6f33a7;&quot;&gt;value&lt;/span&gt; = &lt;span style=&quot;color: #558286;&quot;&gt;finalScore&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[scoreReporter reportScoreWithCompletionHandler:^(&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSError&lt;/span&gt; *&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt; == &lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;) {&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #c81b28; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;Game Center - High score successfully sent&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}];&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Show the Game Center leaderboard&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;viewLeaderboard&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)viewLeaderboard {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Show the leaderboard&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;showLeaderboardCategory&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #c81b28;&quot;&gt;@&quot;HIGHEST_SCORES&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)showLeaderboardCategory:(&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSString&lt;/span&gt; *)&lt;span style=&quot;color: #6f33a7;&quot;&gt;category&lt;/span&gt; {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Show leaderboard&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;GKLeaderboardViewController&lt;span style=&quot;color: black;&quot;&gt; *leaderboardController = [[&lt;/span&gt;GKLeaderboardViewController&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;alloc&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;init&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt; (leaderboardController != &lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;) {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;leaderboardController.&lt;span style=&quot;color: #6f33a7;&quot;&gt;category&lt;/span&gt; = &lt;span style=&quot;color: #6f33a7;&quot;&gt;category&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; leaderboardController.&lt;span style=&quot;color: #6f33a7;&quot;&gt;leaderboardDelegate&lt;/span&gt; = &lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;// Add the leaderboard view to the EAGLView&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt; &lt;span style=&quot;color: #3e117f;&quot;&gt;presentModalViewController&lt;/span&gt;:leaderboardController &lt;span style=&quot;color: #3e117f;&quot;&gt;animated&lt;/span&gt;: &lt;span style=&quot;color: #b409a1;&quot;&gt;YES&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;retrieveFriends&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)retrieveFriends&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;GKLocalPlayer&lt;span style=&quot;color: black;&quot;&gt; *lp = [&lt;/span&gt;GKLocalPlayer&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3e117f;&quot;&gt;localPlayer&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #6f33a7; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; (lp.&lt;/span&gt;authenticated&lt;span style=&quot;color: black;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [lp loadFriendsWithCompletionHandler:^(&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSArray&lt;/span&gt; *friends, &lt;span style=&quot;color: #6f33a7;&quot;&gt;NSError&lt;/span&gt; *&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt; == &lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;// use the player identifiers to create player objects.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;color: #b409a1; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;else&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;// report an error to the user.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;) loadPlayerData: (&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSArray&lt;/span&gt; *) identifiers&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; [&lt;span style=&quot;color: #6f33a7;&quot;&gt;GKPlayer&lt;/span&gt; loadPlayersForIdentifiers:identifiers withCompletionHandler:^(&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSArray&lt;/span&gt; *players, &lt;span style=&quot;color: #6f33a7;&quot;&gt;NSError&lt;/span&gt; *&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt; != &lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Handle the error.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt; (players != &lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// Process the array of GKPlayer objects.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)leaderboardViewControllerDidFinish:(&lt;span style=&quot;color: #6f33a7;&quot;&gt;GKLeaderboardViewController&lt;/span&gt; *)viewController {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Remove the leaderboard view from the EAGLView&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3e117f; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;dismissModalViewControllerAnimated&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;YES&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[viewController &lt;span style=&quot;color: #3e117f;&quot;&gt;release&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;) retrieveTopTenScores&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6f33a7;&quot;&gt;GKLeaderboard&lt;/span&gt; *leaderboardRequest = [[&lt;span style=&quot;color: #6f33a7;&quot;&gt;GKLeaderboard&lt;/span&gt; &lt;span style=&quot;color: #3e117f;&quot;&gt;alloc&lt;/span&gt;] &lt;span style=&quot;color: #3e117f;&quot;&gt;init&lt;/span&gt;];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt; (leaderboardRequest != &lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; leaderboardRequest.&lt;span style=&quot;color: #6f33a7;&quot;&gt;playerScope&lt;/span&gt; = &lt;span style=&quot;color: #3e117f;&quot;&gt;GKLeaderboardPlayerScopeGlobal&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; leaderboardRequest.&lt;span style=&quot;color: #6f33a7;&quot;&gt;timeScope&lt;/span&gt; = &lt;span style=&quot;color: #3e117f;&quot;&gt;GKLeaderboardTimeScopeAllTime&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; leaderboardRequest.&lt;span style=&quot;color: #6f33a7;&quot;&gt;range&lt;/span&gt; = &lt;span style=&quot;color: #3e117f;&quot;&gt;NSMakeRange&lt;/span&gt;(&lt;span style=&quot;color: #340dd4;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;color: #340dd4;&quot;&gt;10&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [leaderboardRequest loadScoresWithCompletionHandler: ^(&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSArray&lt;/span&gt; *scores, &lt;span style=&quot;color: #6f33a7;&quot;&gt;NSError&lt;/span&gt; *&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3e117f;&quot;&gt;error&lt;/span&gt; != &lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// handle the error.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt; (scores != &lt;span style=&quot;color: #b409a1;&quot;&gt;nil&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #1d8711; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;// process the score information.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}];&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;in your .h file, please add the following things:&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Declare the below methods:&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;BOOL&lt;/span&gt;)isGameCenterAvailable;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)initGameCenter;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)gameCenterAuthenticate;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)gameCenterAuthenticationChanged;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)submitHighScore;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)viewLeaderboard;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;) retrieveFriends;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;) loadCategoryTitles;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;) registerForAuthenticationNotification;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;) reportScore: (&lt;span style=&quot;color: #6f33a7;&quot;&gt;int64_t&lt;/span&gt;) score forCategory: (&lt;span style=&quot;color: #6f33a7;&quot;&gt;NSString&lt;/span&gt;*) &lt;span style=&quot;color: #6f33a7;&quot;&gt;category&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #b409a1;&quot;&gt;void&lt;/span&gt;)leaderboardViewControllerDidFinish:(&lt;span style=&quot;color: #6f33a7;&quot;&gt;GKLeaderboardViewController&lt;/span&gt; *)viewController;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Also add,&amp;nbsp;GKLeaderboardViewControllerDelegate in your class declaration.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Ex.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;@interface&lt;/span&gt; GameOverViewController : UIViewController &amp;lt;UITextFieldDelegate, &amp;nbsp;GKLeaderboardViewControllerDelegate &amp;gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Here is the hierarchy of calling these functions:&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;isGameCenterAvailable&lt;span style=&quot;color: black;&quot;&gt;])&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;initGameCenter&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;gameCenterAuthenticate&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;submitHighScore&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;retrieveTopTenScores&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #37595d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b409a1;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;retrieveFriends&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Include the header files,&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #c81b28;&quot;&gt;&lt;span style=&quot;color: #74482e;&quot;&gt;#import &lt;/span&gt;&amp;lt;GameKit/GameKit.h&amp;gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #c81b28;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;And add gamekit in the frameworks.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Here is the description for the above code:&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Before you send your score to the game center, you need to follow the below steps:&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;1) Check weather the device supports game center or not [ &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #37595d;&quot;&gt;isGameCenterAvailable&lt;/span&gt;&amp;nbsp;]&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;2) Check weather the current player has logged in or not.. i.e is this guy has registered with game center or not.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;3) Then submit your score.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;4) Then view the leader board :)&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;w.r.t the method,&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: cyan;&quot;&gt;submitHighScore&lt;/span&gt; , I have used a variable called &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;finalScore&lt;/span&gt; where I have my score which need to send to the game center.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;So,you use your own variable to send the score or you can also hardcode it for testing purpose. &amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #c81b28;&quot;&gt;HIGHEST_SCORES&amp;nbsp;&lt;/span&gt;is the one I registered the high score level in iTunesConnect.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;So, make sure you already configured your game in the iTunesConnect before you actually start implementing game center. If you don&#39;t configure it, it won&#39;t work.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;If you have any more doubts, please let me know.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Happy coding :)&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Pradeep Daram.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;pradeepfriend2000@gmail.com.&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphonedevupdates.blogspot.com/feeds/6767339971733812899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonedevupdates.blogspot.com/2010/12/implementing-game-center-for-leader.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/6767339971733812899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/6767339971733812899'/><link rel='alternate' type='text/html' href='http://iphonedevupdates.blogspot.com/2010/12/implementing-game-center-for-leader.html' title='Implementing game center for leader boards / leaderboard on iPhone'/><author><name>BUSINESS ISSUES</name><uri>http://www.blogger.com/profile/09071608534531607698</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio8-Fut2_2thw51XX3cn-qUDiZ3gAalYgZEDi6pHsmEgMbrG8GsPreY-U-ICJ7IECEOCnawNY0ervovll9g1sgKE9pPT6Z7kfnIrW2bLaW5Sj6E37ujWVfcBKuFmhx5X0/s220/2609491913_a1f1a6d121_o.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469040499108170459.post-5506188445849706364</id><published>2010-12-06T22:05:00.000-08:00</published><updated>2010-12-06T22:26:07.427-08:00</updated><title type='text'>Error Domain=GKErrorDomain Code=3 in game center - iphone gamekit [ game kit ]</title><content type='html'>When you are trying to submit your score to game center, sometimes you might get the below error:&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;An error occured reporting the score: Error Domain=GKErrorDomain Code=3 &quot;The requested operation could not be completed due to an error communicating with the server.&quot; UserInfo=0x1f98d0 {NSUnderlyingError=0x1f2c90 &quot;The operation couldn’t be completed. status = 5053&quot;, NSLocalizedDescription=The requested operation could not be completed due to an error communicating with the server.&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;font-family: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;br /&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt; There are couple of things you might forgot to do before you actually run your code. You can direct run your code with the code supplied by apple developer center. &lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;Below are the list of the things might be causing this error:&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;br /&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;1) The category name should exactly match to your itunesconnect category name. You have to use, leaderboard category ID . You should not use, Category reference name.&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;br /&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;2) Make sure you have 4.1 version of iOS. And, try to run the game on the device rather than, simulator. I heard that game center sandbox is not working properly some times with the simulator.&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;br /&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;3) Check weather you have configured the targets properly or not. On the left hand side in your xCode, you can see Groups &amp;amp; Files category. If go below in that solution explorer, you can see &quot;Targets&quot; module. Expand &quot;Targets&quot; and double click on the name which has your game name followed by the device type. [ Ex. myGameName - iPad ]. &lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;Double click on that and select properties module in the dialog which popped up.&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;br /&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;In that properties, make sure you have valid identifier name . Ex. &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-size: 16px; &quot;&gt;com.sampleCompany.sampleGame&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;4) &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; border-collapse: collapse; font-size: 14px; line-height: 18px; &quot;&gt;Project - Edit Active Target - iOS Deployment Target  and change its version to 3.0 . After this, select your device type to , 4.1 .&lt;/span&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; border-collapse: collapse; font-size: 14px; line-height: 18px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; border-collapse: collapse; font-size: 14px; line-height: 18px; &quot;&gt;Please let me know if you have any question or concerns :) &lt;/span&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; border-collapse: collapse; font-size: 14px; line-height: 18px; &quot;&gt;Happy coding&lt;/span&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; border-collapse: collapse; font-size: 14px; line-height: 18px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; border-collapse: collapse; font-size: 14px; line-height: 18px; &quot;&gt;Pradeep Daram.&lt;/span&gt;&lt;/span&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: Menlo; font-size: 11px; border-collapse: collapse; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: Georgia, serif; font-weight: normal; font-size: 16px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; border-collapse: collapse; font-size: 14px; line-height: 18px; &quot;&gt;pradeepfriend2000@gmail.com&lt;/span&gt;&lt;/span&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:Menlo;font-size:100%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 11px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iphonedevupdates.blogspot.com/feeds/5506188445849706364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonedevupdates.blogspot.com/2010/12/error-domaingkerrordomain-code3-in-game.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/5506188445849706364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/5506188445849706364'/><link rel='alternate' type='text/html' href='http://iphonedevupdates.blogspot.com/2010/12/error-domaingkerrordomain-code3-in-game.html' title='Error Domain=GKErrorDomain Code=3 in game center - iphone gamekit [ game kit ]'/><author><name>BUSINESS ISSUES</name><uri>http://www.blogger.com/profile/09071608534531607698</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio8-Fut2_2thw51XX3cn-qUDiZ3gAalYgZEDi6pHsmEgMbrG8GsPreY-U-ICJ7IECEOCnawNY0ervovll9g1sgKE9pPT6Z7kfnIrW2bLaW5Sj6E37ujWVfcBKuFmhx5X0/s220/2609491913_a1f1a6d121_o.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469040499108170459.post-8705604284003695078</id><published>2010-12-06T08:02:00.000-08:00</published><updated>2010-12-06T08:04:05.548-08:00</updated><title type='text'>Intro</title><content type='html'>Hay,&lt;br /&gt;&lt;br /&gt;I created this blog to share my opinions , tips and tricks in iPhone development. I hope this will be helpful for many developers :)&lt;br /&gt;&lt;br /&gt;Thanks for your time guyz :)&lt;br /&gt;&lt;br /&gt;Pradeep Daram&lt;br /&gt;pradeepfriend2000@gmail.com</content><link rel='replies' type='application/atom+xml' href='http://iphonedevupdates.blogspot.com/feeds/8705604284003695078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iphonedevupdates.blogspot.com/2010/12/intro.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/8705604284003695078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469040499108170459/posts/default/8705604284003695078'/><link rel='alternate' type='text/html' href='http://iphonedevupdates.blogspot.com/2010/12/intro.html' title='Intro'/><author><name>BUSINESS ISSUES</name><uri>http://www.blogger.com/profile/09071608534531607698</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio8-Fut2_2thw51XX3cn-qUDiZ3gAalYgZEDi6pHsmEgMbrG8GsPreY-U-ICJ7IECEOCnawNY0ervovll9g1sgKE9pPT6Z7kfnIrW2bLaW5Sj6E37ujWVfcBKuFmhx5X0/s220/2609491913_a1f1a6d121_o.jpg'/></author><thr:total>0</thr:total></entry></feed>