<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Ios on The Dangling Pointer</title><link>https://aaron.blog/tags/ios/</link><description>Recent content in Ios on The Dangling Pointer</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 25 Nov 2016 14:55:15 +0000</lastBuildDate><atom:link href="https://aaron.blog/tags/ios/index.xml" rel="self" type="application/rss+xml"/><item><title>Preventing Spam iCloud Calendar Invites</title><link>https://aaron.blog/preventing-spam-icloud-calendar-invites/</link><pubDate>Fri, 25 Nov 2016 14:55:15 +0000</pubDate><guid>https://aaron.blog/preventing-spam-icloud-calendar-invites/</guid><description>&lt;figure&gt;&lt;img src="img_12241.png" class="kg-image" alt="IMG_1224.PNG" loading="lazy" width="583" height="228"&gt;&lt;/figure&gt;&lt;p&gt;I woke up this morning seeing two notifications of calendar appointments I just couldn't miss. [sarcasm]&lt;/p&gt;&lt;figure&gt;&lt;img src="img_1225.png" class="kg-image" alt="IMG_1225.PNG" loading="lazy" width="602" height="514"&gt;&lt;/figure&gt;&lt;p&gt;Annoying, right? Here's the best part. No matter what I do - Accept, Maybe, Decline - the sender of the spam appointment receives the notification of my action. There's no way to just simply delete the damn invitation from your calendar without sending the reply! Well I guess that means 章兴言 &amp;amp; 历昭 are going to get a sad decline from me.&lt;/p&gt;</description></item><item><title>Swizzling in AFNetworking somehow breaks iOS' NSDoubleLocalizedStrings</title><link>https://aaron.blog/swizzling-in-afnetworking-somehow-breaks-ios-nsdoublelocalizedstrings/</link><pubDate>Fri, 22 Jan 2016 14:09:31 +0000</pubDate><guid>https://aaron.blog/swizzling-in-afnetworking-somehow-breaks-ios-nsdoublelocalizedstrings/</guid><description>&lt;h1 id="tools-to-help-test-localization"&gt;Tools to Help Test Localization&lt;/h1&gt;&lt;p&gt;Apple provides some pretty slick tools to help with localization testing in your apps. I had completely forgotten about two launch parameters that make it possible to find those pesky layout problems early:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;NSDoubleLocalizedStrings&lt;/code&gt; - Any calls made to &lt;code&gt;NSLocalizedString&lt;/code&gt; will double the strings to simulate languages with longer words, like German.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NSShowNonLocalizedStrings&lt;/code&gt; - Replaces any text from &lt;code&gt;NSLocalizedString&lt;/code&gt; that doesn't have an entry in a strings file.&lt;/li&gt;&lt;li&gt;&lt;code&gt;AppleTextDirection&lt;/code&gt; - Simulates a Left to Right language.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In Xcode 7 there is an easier way to provide these options. Edit the scheme for your app, click on the Run section, then the Options tab. You'll see Application Language has two options - &lt;em&gt;Double Length Pseudolanguage&lt;/em&gt; and &lt;em&gt;Right to Left Pseudolanguage&lt;/em&gt;. There is also a check box for &lt;em&gt;Show non-localized strings&lt;/em&gt;. These three options are equivalent to the launch arguments above.&lt;/p&gt;</description></item><item><title>Rediscovering CouchDB</title><link>https://aaron.blog/rediscovering-couchdb/</link><pubDate>Wed, 11 Nov 2015 02:38:52 +0000</pubDate><guid>https://aaron.blog/rediscovering-couchdb/</guid><description>&lt;p&gt;I'm currently writing the materials for my presentation on Core Data &amp;amp; Synchronization of data for &lt;a href="http://www.rwdevcon.com"&gt;RWDevCon 2016&lt;/a&gt;. One of the requirements for the demonstration app is a web service that provides a REST API to sync with. One of the requirements of the talk is that I cannot rely upon an Internet connection. Every person going through the tutorial needs to be able to bring up a local web service to following along with while coding the iOS app on their machine.&lt;/p&gt;</description></item><item><title>iOS 9 Good Morning &amp; Afternoon Weirdness</title><link>https://aaron.blog/ios-9-good-morning-afternoon-weirdness/</link><pubDate>Mon, 05 Oct 2015 13:18:44 +0000</pubDate><guid>https://aaron.blog/ios-9-good-morning-afternoon-weirdness/</guid><description>&lt;p&gt;I had a user write in to get some help clarifying a behavior with the Migraine Diary app I wrote on iOS 9.&lt;/p&gt;&lt;p&gt;The user explained that every morning she turns on her phone and Migraine Diary shows on the screen and when she opens it, it tells her Good Morning. The little icon sounded like Continuation or App Suggestions neither of which Migraine Diary supports. I asked for a screenshot and got this:&lt;/p&gt;</description></item><item><title>Recording Your iOS Device with QuickTime Player</title><link>https://aaron.blog/recording-your-ios-8-device-with-quicktime-player/</link><pubDate>Thu, 02 Apr 2015 12:35:51 +0000</pubDate><guid>https://aaron.blog/recording-your-ios-8-device-with-quicktime-player/</guid><description>&lt;h2 id="the-task"&gt;The Task&lt;/h2&gt;&lt;p&gt;You need to record your iPhone or iPad's screen to show someone a bug or demo a feature to your customers. In the past the only method available was to use a program like &lt;a href="http://www.airsquirrels.com/reflector/" rel="noopener"&gt;Reflector&lt;/a&gt; to emulate an AirPlay/Apple TV and then record on your machine. This works fairly decently although the quality over WiFi isn't very good leaving you with a less-than-crisp recording. Reflector also isn't free which makes it difficult for users in the wild to record bugs.&lt;/p&gt;</description></item><item><title>Providing Emergency Contacts with iOS 8</title><link>https://aaron.blog/providing-emergency-contacts-with-ios-8/</link><pubDate>Mon, 03 Nov 2014 15:21:31 +0000</pubDate><guid>https://aaron.blog/providing-emergency-contacts-with-ios-8/</guid><description>&lt;h1 id="the-problem"&gt;The Problem&lt;/h1&gt;&lt;p&gt;Something that has been missing on iOS for a long time is a reliable way to provide emergency contact information.  Imagine you're out and about and you end up having an accident or have an acute attack from a known medical condition you have.  We all tend to carry our mobile phones with us.  Most emergency personnel are trained to review personal data in your wallet/purse and now mobile phones.  The issue is most of us have a lock code on our devices, preventing access to potential life-saving communication with a loved one about your medical condition.&lt;/p&gt;</description></item><item><title>Core Data Object IDs can change</title><link>https://aaron.blog/core-data-object-ids-can-change/</link><pubDate>Wed, 22 Oct 2014 14:17:22 +0000</pubDate><guid>https://aaron.blog/core-data-object-ids-can-change/</guid><description>&lt;p&gt;I thought I knew a lot about Core Data with having used it a lot over the past years.  Today, I learned something new that I feel like I should have known for a long time.  NSManagedObjectIDs can change.  Seriously.&lt;/p&gt;&lt;blockquote&gt;If you want a different notion of identity, you can just add an UUID string as an attribute to your entity. A separate mapping table is not recommend. The 2 apps should agree to use the same UUIDs for the same identities.&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Ben&lt;/li&gt;&lt;/ul&gt;&lt;!--kg-card-begin: html--&gt;&lt;p style="padding-left:30px;"&gt;Ref:&amp;nbsp;&lt;a href="https://devforums.apple.com/message/480640#480640" target="_blank" rel="noopener"&gt;https://devforums.apple.com/message/480640#480640&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Live Storm Chasing App</title><link>https://aaron.blog/live-storm-chasing-app/</link><pubDate>Mon, 28 Apr 2014 02:23:43 +0000</pubDate><guid>https://aaron.blog/live-storm-chasing-app/</guid><description>&lt;p&gt;Enjoy chasing storms from your couch like me?  There's a great app called "TVNweather Live Storm Chasing" that I've been using to watch live streams from actual storm chasers out in the field.  You'll see names like Reed Timmer (&lt;a href="http://www.tornadovideos.net" rel="noopener"&gt;TornadoVideos.net&lt;/a&gt;) and the team running the &lt;a href="http://en.wikipedia.org/wiki/SRV_Dominator" rel="noopener"&gt;Dominator 2&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="https://itunes.apple.com/us/app/tvnweather-live-storm-chasing/id839867076?mt=8" rel="noopener"&gt;TVNweather Live Storm Chasing for iOS&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The app itself needs some work with stability, but the collection of active streams is incredibly handy and fun to watch.  An Android version is coming soon as well.  Until then you can also watch on their site at &lt;a href="http://tvnweather.com/live" rel="noopener"&gt;http://tvnweather.com/live&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>On the Importance of Glue</title><link>https://aaron.blog/on-the-importance-of-glue/</link><pubDate>Fri, 25 Apr 2014 19:51:58 +0000</pubDate><guid>https://aaron.blog/on-the-importance-of-glue/</guid><description>&lt;p&gt;Glue is the thing that ... well ... glues everything together.  You don't see glue (if the product is made right) but it plays an important role in the overall satisfaction with the product.  If you buy a bird house that has bad gluing technique or not enough glue, you will be upset when the first bird flattens the house.&lt;/p&gt;&lt;p&gt;The same hold trues for mobile apps as well as web and desktop applications.  For sake of this discussion, I'm limiting myself to mobile apps and mentioning some specific iOS technologies.&lt;/p&gt;</description></item><item><title>Stop Being Lazy with Accessibility</title><link>https://aaron.blog/stop-being-lazy-with-accessibility/</link><pubDate>Thu, 17 Apr 2014 16:52:10 +0000</pubDate><guid>https://aaron.blog/stop-being-lazy-with-accessibility/</guid><description>&lt;p&gt;I'm making  a pledge as a software developer to think of accessibility with every change I make.  My first step was to turn on iOS' VoiceOver and test everything I'm working on with it.  In the first five minutes of using it, I've discovered so many necessary improvements to make the app even useful for someone who has trouble seeing.  There are many more accessibility tools than VoiceOver (like Dynamic Type) that should also be on your list to try.  Baby steps.&lt;/p&gt;</description></item><item><title>iOS Background Refresh &amp; Force Killing</title><link>https://aaron.blog/ios-background-refresh-force-killing/</link><pubDate>Mon, 31 Mar 2014 15:30:36 +0000</pubDate><guid>https://aaron.blog/ios-background-refresh-force-killing/</guid><description>&lt;p&gt;If you've done any work with background refresh (application:didReceiveRemoteNotification:fetchCompletionHandler:) on iOS 7 you know that it can be a pain to debug your code with.  Some things I've discovered:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Background refresh will start your app if it's not running.&lt;/li&gt;&lt;li&gt;If you force-quit an application, it's not eligible to be started by a push notification.  Restarting the app or rebooting is the only way to again receive background push wakes.&lt;/li&gt;&lt;li&gt;You can't really debug wake by push other than with logging.&lt;/li&gt;&lt;li&gt;Touching UI code in application:willFinishLaunchingWithOptions: is risky with background push since it fires but didFinishLaunchingWithOptions won't if it's immediately backgrounded.  If you're using UIStateRestoration, make sure you're limiting UI code in willFinishLaunchingWithOptions to setting up the root view controller.&lt;/li&gt;&lt;li&gt;Don't arbitrarily reset the badge count when your app is presented - you should really reset the badge count when the notification is viewed/considered no longer relevant.&lt;/li&gt;&lt;li&gt;Update your push service to send "all clear" or zero count badges when things are read via other instances of your app (web, other iOS device, Android too).  Your users will thank you that they're cleared everywhere.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Take a look at &lt;a href="https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html" rel="noopener"&gt;Apple's documentation on app lifecycle&lt;/a&gt; - there is an excellent set of graphics to demonstrate where things hook in.&lt;/p&gt;</description></item><item><title>NSNotificationCenter Block-based Observer</title><link>https://aaron.blog/nsnotificationcenter-block-based-observer-2/</link><pubDate>Tue, 17 Dec 2013 15:22:37 +0000</pubDate><guid>https://aaron.blog/nsnotificationcenter-block-based-observer-2/</guid><description>&lt;p&gt;Back in iOS 4, a nifty block-based observer method was added to NSNotificationCenter:&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;(id)addObserverForName:(NSString *)name object:(id)obj queue:(NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *))block;&lt;/code&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Super convenient, right? I love using blocks to pass simple callbacks to controllers instead of creating a delegate protocol. There is a catch with this method, and it's not terribly obvious unless you're looking closely. The method returns (id) - according to Apple's documentation the return object is "An opaque object to act as the observer".  What does this mean?&lt;/p&gt;</description></item><item><title>Fixing Layer Transparency Issues in Xcode</title><link>https://aaron.blog/fixing-layer-transparency-issues-in-xcode/</link><pubDate>Mon, 30 Jan 2012 15:23:18 +0000</pubDate><guid>https://aaron.blog/fixing-layer-transparency-issues-in-xcode/</guid><description>&lt;p&gt;If you're looking to get higher frame rates and general application performance tweaks from your iOS application, you may need to take a look at transparent settings on your subviews. Any time you set a subview to be transparent, the OS has to blend multiple layers together to figure out the end flattened result. This blending takes CPU cycles and can impact performance of your app - especially in something as simple as a UITableViewCell.&lt;/p&gt;</description></item><item><title>iOS Basics: nil vs NULL vs NSNull</title><link>https://aaron.blog/ios-basics-nil-vs-null-vs-nsnull/</link><pubDate>Wed, 23 Nov 2011 13:43:28 +0000</pubDate><guid>https://aaron.blog/ios-basics-nil-vs-null-vs-nsnull/</guid><description>&lt;p&gt;Yes, there are three ways to represent a null value in Objective-C.&lt;/p&gt;&lt;p&gt;NULL = Absence of a value with C-style pointers&lt;br&gt;nil = Absence of value with Objective-C object variables&lt;br&gt;NSNull = A nil boxed as an object for storage in a collection&lt;/p&gt;&lt;p&gt;If you try adding nil to a NSDictionary or NSArray, you will find out it doesn't perform as expected.  If you absolutely need to store a null value in a collection, you can use NSNull to represent the lack of a value.  For example:&lt;/p&gt;</description></item><item><title>iOS - Customize Table View Cells</title><link>https://aaron.blog/ios-customize-table-view-cells/</link><pubDate>Thu, 07 Jul 2011 20:02:48 +0000</pubDate><guid>https://aaron.blog/ios-customize-table-view-cells/</guid><description>&lt;p&gt;Ever wanted to have alternated colors on your table view cells? If so, you've probably done something inside of cellForRowAtIndexPath and applied a background color to your cell there.&lt;/p&gt;&lt;p&gt;Would you be surprised to know that's completely wrong?  Yup.  Wrong.  WRONG WRONG WRONG.&lt;/p&gt;&lt;p&gt;I didn't know this, but any styles applied to cells based on state or whatever should really be in willDisplayCell - NOT when you configure the cell itself!  Per &lt;a href="http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableViewDelegate_Protocol/Reference/Reference.html" rel="noopener"&gt;Apple's documentation&lt;/a&gt; for the Table View delegate -&lt;/p&gt;</description></item><item><title>iOS - Pull App Version From Bundle Configuration</title><link>https://aaron.blog/ios-pull-app-version-from-bundle-configuration/</link><pubDate>Thu, 07 Jul 2011 13:46:42 +0000</pubDate><guid>https://aaron.blog/ios-pull-app-version-from-bundle-configuration/</guid><description>&lt;p&gt;We all like to put the current application version number in an "about" screen somewhere for users to reference.  It's a pain, however, to have to update that screen every time we do a release as well as the version in the target configuration for the bundle.  So why not pull the version number from the bundle?  Here's how to do it:&lt;br&gt;NSString &lt;em&gt;version = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString&lt;/em&gt;)kCFBundleVersionKey];&lt;/p&gt;&lt;p&gt;NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];&lt;/p&gt;</description></item><item><title>iTunes Connect - Invalid Binary</title><link>https://aaron.blog/itunes-connect-invalid-binary/</link><pubDate>Thu, 26 May 2011 13:11:51 +0000</pubDate><guid>https://aaron.blog/itunes-connect-invalid-binary/</guid><description>&lt;p&gt;I spent the past week pulling out my hair trying to submit an update for Centare's EyeOnWeather application to iTunes Connect.  I kept getting a reject from the system and all I got for an error message was "Invalid Binary."  THANKS, THAT'S SOOPER.&lt;/p&gt;&lt;p&gt;Eventually I ended up attempting to contact iTunes Connect Support for further details.  I thought it might have been missing icons, malformed Info.plist, something.  I haven't changed anything in the project drastically with how it builds, so I was at a loss.  Turns out, I was picking the wrong provisioning profile in my setup.  Man I felt stupid.  Ends up that I'm not crazy - Apple's documentation on how to set up your project for building still only references Xcode 3.  Awesome for the rest of the world using Xcode 4.  Here are some tips I got from Apple iTunes Connect support for pulling in information to submit to their developer team:&lt;/p&gt;</description></item><item><title>UITextView having rounded corners</title><link>https://aaron.blog/uitextview-having-rounded-corners/</link><pubDate>Tue, 26 Apr 2011 01:35:49 +0000</pubDate><guid>https://aaron.blog/uitextview-having-rounded-corners/</guid><description>&lt;p&gt;I've been using a UITextView in an app and realized that it didn't have any rounded edges like the default behavior exhibited by the built-in iOS apps.  For example in the calendar app, setting the Notes field shows:&lt;/p&gt;&lt;figure&gt;&lt;img src="http://www.artin.org/geekblog/wp-content/uploads/2011/04/Photo-Apr-25-8-28-43-PM.png" class="kg-image" alt loading="lazy" title="Photo Apr 25, 8 28 43 PM" width="200" height="300"&gt;&lt;/figure&gt;&lt;p&gt;Inside of Apple's Human Interface guidelines it specifically states "A text view is a rounded rectangle of any height. A text view supports  scrolling when the content is too large to fit inside its bounds."  Adding a UITextView to a view shows square corners by default.  So how the hell do you get rounded corners?  Interface Builder doesn't show anything about corners.  Seems like the only way to get this behavior is by doing the following in code:&lt;/p&gt;</description></item><item><title>Xcode 4 - Problem submitting App with Static Library</title><link>https://aaron.blog/xcode-4-problem-submitting-app-with-static-library/</link><pubDate>Mon, 28 Mar 2011 01:12:16 +0000</pubDate><guid>https://aaron.blog/xcode-4-problem-submitting-app-with-static-library/</guid><description>&lt;p&gt;I'm submitting a new version of my Migraine Diary App to the App Store and was running into problems with Xcode 4 giving me the following error: "[Your App Name] does not contain a single-bundle application or contains multiple products. Please select another archive, or adjust your scheme to create a single-bundle application."&lt;/p&gt;&lt;figure&gt;&lt;img src="http://www.artin.org/geekblog/wp-content/uploads/2011/03/MigraineDiaryCannotBeSubmitted.png" class="kg-image" alt loading="lazy" title="MigraineDiaryCannotBeSubmitted" width="420" height="148"&gt;&lt;/figure&gt;&lt;p&gt;There is an issue or maybe it's an intentional design thing with Xcode 4 and how it handles statically built libraries being included in your project.  I'm specifically using Core Plot and it's instruction set hasn't been updated for Xcode 4 yet.  Here are the things I had to do to get Core Plot to bundle correctly with my App to submit it:&lt;/p&gt;</description></item><item><title>iOS Basics - UINavigation Controller &amp; Back Button Text</title><link>https://aaron.blog/ios-basics-uinavigation-controller-back-button-text/</link><pubDate>Sun, 20 Mar 2011 15:16:09 +0000</pubDate><guid>https://aaron.blog/ios-basics-uinavigation-controller-back-button-text/</guid><description>&lt;p&gt;I've brought an old project out of the moth balls recently, the &lt;a href="http://itunes.apple.com/us/app/migraine-diary/id348561271?mt=8" rel="noopener"&gt;Migraine Diary&lt;/a&gt; application I wrote as part of my master's thesis.  It was my first "real" iPhone app and I call tell I didn't know what I was doing entirely looking through the code.  What this has forced me to do, however, is re-learn some of the basics of iOS development and of Apple design patterns.  I have been spending some time back in the Apple developer documentation and will probably be posting some of the gotchas that tripped me up two years ago and I'm solving now with the better, more elegant solution.&lt;/p&gt;</description></item></channel></rss>