<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Lazy Sys Admin&#187; iPhone</title>
	<atom:link href="http://www.thelazysysadmin.net/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thelazysysadmin.net</link>
	<description>Why do things the hard way?</description>
	<lastBuildDate>Mon, 07 Jun 2010 22:24:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>APNS error &#8211; No Valid aps-environment entitlement</title>
		<link>http://www.thelazysysadmin.net/2009/07/apns-error-no-valid-aps-environment-entitlement/</link>
		<comments>http://www.thelazysysadmin.net/2009/07/apns-error-no-valid-aps-environment-entitlement/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 11:33:29 +0000</pubDate>
		<dc:creator>Jon Smith</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[APNS]]></category>

		<guid isPermaLink="false">http://www.thelazysysadmin.net/?p=555</guid>
		<description><![CDATA[If you get the following error when trying to register for a device token, firstly ensure you have correctly followed the directions within the iPhone Developers Portal. Error Domain=NSCocoaErrorDomain &#34;no valid 'aps-environment' entitlement string found for application&#34; If after you have verified your Provisioning Profile and application settings you still get the error, try the [...]]]></description>
			<content:encoded><![CDATA[<p>If you get the following error when trying to register for a device token, firstly ensure you have correctly followed the directions within the iPhone Developers Portal.</p>
<pre class="brush: plain;">
Error Domain=NSCocoaErrorDomain &quot;no valid 'aps-environment' entitlement string found for application&quot;
</pre>
<p><span id="more-555"></span>If after you have verified your Provisioning Profile and application settings you still get the error, try the following:</p>
<p>Go to the Project Settings in the Project Menu</p>
<p><a href="http://www.thelazysysadmin.net/wp-content/uploads/2009/07/APNS-Error-1.png"><img class="alignnone size-full wp-image-559" title="APNS Error 1" src="http://www.thelazysysadmin.net/wp-content/uploads/2009/07/APNS-Error-1.png" alt="APNS Error 1" width="600" height="400" /></a></p>
<p>Select the exact Code Signing identity for your application rather then the automatic selection.</p>
<p><a href="http://www.thelazysysadmin.net/wp-content/uploads/2009/07/APNS-Error-2.png"><img class="alignnone size-full wp-image-560" title="APNS Error 2" src="http://www.thelazysysadmin.net/wp-content/uploads/2009/07/APNS-Error-2.png" alt="APNS Error 2" width="600" height="536" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thelazysysadmin.net/2009/07/apns-error-no-valid-aps-environment-entitlement/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>APNS Send Device Token to Provider</title>
		<link>http://www.thelazysysadmin.net/2009/07/apns-send-device-token-to-provider/</link>
		<comments>http://www.thelazysysadmin.net/2009/07/apns-send-device-token-to-provider/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 05:38:37 +0000</pubDate>
		<dc:creator>Jon Smith</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[APNS]]></category>
		<category><![CDATA[Obj-C]]></category>

		<guid isPermaLink="false">http://www.thelazysysadmin.net/?p=493</guid>
		<description><![CDATA[I am currently in the middle of designing and developing an application based on the Apple Push Notification Service. There is alot of information about the client side registration and plenty of server side code examples, but I haven&#8217;t found anything that simple demonstrates how to send your device token to the provider service. The [...]]]></description>
			<content:encoded><![CDATA[<p>I am currently in the middle of designing and developing an application based on the Apple Push Notification Service. There is alot of information about the client side registration and plenty of server side code examples, but I haven&#8217;t found anything that simple demonstrates how to send your device token to the provider service.</p>
<p><span id="more-493"></span>The following code is simple (but as a newcomer to Obj-C took me ages to put together). Just press the View Source button on the following panel to see all the code (I am having trouble getting code wrapping to work, so this will be the case until I find a decent syntax highlighter plugin).</p>
<pre class="brush: cpp;">
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {

	NSLog(@&quot;devToken=%@&quot;,deviceToken);

	NSString *host = @&quot;yourhost&quot;;
	NSString *URLString = @&quot;/register.php?id=&quot;;
	URLString = [URLString stringByAppendingString:id];
	URLString = [URLString stringByAppendingString:@&quot;&amp;amp;amp;amp;amp;amp;devicetoken=&quot;];

	NSString *dt = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@&quot;&amp;lt;&amp;gt;&quot;]];
	dt = [dt stringByReplacingOccurrencesOfString:@&quot; &quot; withString:@&quot;&quot;];

	URLString = [URLString stringByAppendingString:dt];
	URLString = [URLString stringByAppendingString:@&quot;&amp;amp;amp;amp;amp;amp;devicename=&quot;];
	URLString = [URLString stringByAppendingString:[[UIDevice alloc] name]];

	NSURL *url = [[NSURL alloc] initWithScheme:@&quot;http&quot; host:host path:URLString];
	NSLog(@&quot;FullURL=%@&quot;, url);

	NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];

	NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
}
</pre>
<p>If you spot the above code and think &#8220;why the hell has he done it like that&#8221;, it is because I don&#8217;t know any better at the moment. If there is a better way please leave some constructive feedback via the comment form.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thelazysysadmin.net/2009/07/apns-send-device-token-to-provider/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>iPhone Development</title>
		<link>http://www.thelazysysadmin.net/2009/07/iphone-development/</link>
		<comments>http://www.thelazysysadmin.net/2009/07/iphone-development/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 03:32:40 +0000</pubDate>
		<dc:creator>Jon Smith</dc:creator>
				<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Alerts]]></category>
		<category><![CDATA[APNS]]></category>
		<category><![CDATA[Pager]]></category>
		<category><![CDATA[Push]]></category>

		<guid isPermaLink="false">http://www.thelazysysadmin.net/?p=482</guid>
		<description><![CDATA[For some strange, but unknown reason I decided to purchase a Mac Mini to try some iPhone Development. I have a few apps that I would like on my iPhone that are currently not available.]]></description>
			<content:encoded><![CDATA[<p>For some strange, but unknown reason I decided to purchase a Mac Mini to try some iPhone Development. I have a few apps that I would like on my iPhone that are currently not available.</p>
<p>My first app will be for a Nagios Pager service that will utilise the Push Notification features just released in iPhone OS 3.0. There will be two versions, Nagios Pager and Nagios Pager Pro. Nagios Pager will be a stand alone application that will talk to a backend service for delivering Push Notifications for Nagios alerts, Nagios Pager Pro will contain all the features of Nagios Pager as well as an iPhone based Nagios client.</p>
<p><span id="more-482"></span>The standard version will be released in the App Store for free and the Pro version will be for a small cost. There will also be various access methods for the backend service required for the Apple Push Notification Service (APNS). A free subscription to the backend will allow for one phone to access one nagios backend, while a paid subscription will allow for multiple phones access to multiple backends.</p>
<p>If you are interested in this service or you are interested in entering the beta program let me know via a comment and I will get in contact with you. Stay tuned for more development news.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thelazysysadmin.net/2009/07/iphone-development/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
