Large files in your app documents folder can earn you a rejection
There’s nothing worse than submitting your first app to the iTunes app store, and having it get rejected. Well, OK, there are plenty of things that are worse, but it still isn’t pleasant. Bounces can happen for a variety of reasons, from Apple not liking your app’s functionality to poorly written product descriptions and everything in between. But one recently new reason for rejections may catch you off guard, I know I was.
Now that iCloud can be used to back up app contents, Apple has become sensitive to apps that produce large amounts of documents in the app document folder. After all, if you dump 50MB of files into that folder, iCloud is going to try to back it all up, and it may suck up the user’s data plan usage. So, if you’re downloading and storing content as part of your app, you have to make sure that you mark it as not requiring backup to iCloud.
Here’s a nice little function that will do just that, courtesy of Apple:
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
NSError *error = nil;
BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
forKey: NSURLIsExcludedFromBackupKey error: &error];
NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
Back to Top
NSURLIsExcludedFromBackupKey flags the file as not requiring backup to iCloud. One important set of files that you should make sure you flag this way is any Core Data SQLite files that store significant amounts of data. For example, if you are storing images as blobs in your database, the file can get pretty big pretty fast.
It doesn't take many lines of code to make a snazzy animated background in iOS
One of nicest features of iOS development is that, frequently, you can pull off visual effects that look amazing without having to write a lot of code. It may be about to start the spring season here, but Down Under it’s heading into fall, so to honor those folks, we’ll animate some falling leaves. We’ll use a simple piece of code that will animate objects drifting down the screen.
I say drifting, because this trick only works for objects that are going to maintain a constant velocity as they descend through the space. Thus, it works well for things like leaves, pieces of paper, or other light objects that the mind will immediately accept as having reached their terminal velocity. In my case, I developed the code to handle confetti streaming down a “You’ve won” screen. Heavier or more streamlined objects require a bit more work to animate, because you need to simulate the effects of gravity and acceleration, otherwise the animation doesn’t look right.
So, to begin, we need some image assets. For this example, I’m going to use 3 leaf images I grabbed from a public clip art site, and cleverly renamed to leaf1.png, leaf2.png, and leaf3.png. I created a simple single-view storyboard project, and added a label in the center of the view. Now, all that’s left is to plop in the code:
Part One: Easily find Chromecast devices on your local network
Now that Google has opened up the Chromecast API for anyone to play with, it’s possibile to create iOS applications that can leverage the $35 device as a way to display to HDMI devices wirelessly. In this series of tutorials, we’ll go over the API, starting with configuring your project to use the framework, and finding devices out on your local network to play with.
Let’s assume you’ve set up a Chromecast device attached to an HDMI TV and have it configured for your local network. Now it’s time to get an App set up to use it. We’ll use the iPhone Simulator in these examples, since it can talk to Chromecast devices just like a physical device, as long as the Mac you are developing on is on the same LAN as the Chromecast dongle.
Begin by creating a project, as usual. For this example, I used a single-view Storyboarded app. I set up an
UITableView inside the default
UIView, hooking it’s datasource and delegate to the default view controller the wizard had created. Next, I went to the Google Google Cast API page and downloaded the iOS framework, then used the “Add Files…” project option to add the framework to the project, copying in the files.
Rosie the Robot may feel more comfortable talking to Siri than to you
Recently, Glenn Martin wrote an article describing how robotics in moving out of the factory and into the house. And while Glenn restricted himself mainly to the type of robots that pop into your head when someone says the word (either the anthropomorphic variety or the industrial flavor), the reality is that there are a lot of robots already in the hands of consumers, although it might take a moment to recognize them as such.
I’m speaking of drones, and especially quadcopters, which are proliferating at an enormous rate, and are being used to do everything from documenting a cool skateboard move to creating a breathtaking overflight of a horrific disaster site.
Mobile developers to gain a new set of platforms for their apps
One of the perennial technologies that regularly appears at the Consumer Electronics Show is the smart TV set, but they never seem to gain the kind of traction that the manufacturers hope that they will. This may finally be coming to a end, however, as a new generation of smart TVs are poised to enter the market. Even Apple is finally supposed to release their own products in this space this year. And when these hyper-aware TV sets enter the Internet of Things, they are likely to do it running mobile operating systems.
The reasons for this are several. From a purely economic standpoint, the margins on televisions don’t really afford room to pay for a full-blown desktop operating system license, nor the hardware required to support a rich desktop environment. It’s also unclear that anyone would want to run Microsoft Word or other general types of software on their TV. While a free operating system such as a desktop Linux OS might fit the bill, especially since it is famous for being able to run on a meager amount of hardware, it is equally unclear if it will be able to run the software that manufacturers and users are going to want to see on a TV.
All predictions are for entertainment purposes only!
It is a generally accepted requirement that all technology pundits attempt a yearly prognostication of the coming 12 months. Having consulted my crystal ball, scryed the entrails of a falcon, and completed a 3 day fasting ritual in a sweat lodge set up inside a Best Buy, I will now tempt the Gods of Hubris and make my guesses for the year in mobile.
Plus ça change, plus c'est la même chose.
As the end of December approaches, it’s time to take a look at the year that was. In a lot of ways, 2013 was a status quo year for mobile, with nothing earthshaking to report, just a steady progression of what already is getting more, um, is-y?
We started the year with Apple on top in the tablet space, Android on top in the handset space, and that’s how we ended the year. Microsoft appears to have abandoned the handset space after a decade of attempts to take market-share, and made their move on the tablet space instead with the Surface. In spite of expensive choreographer board room commercials, the Surface didn’t make a huge dent in Apple’s iPad dominance. But Microsoft did better than Blackberry, whose frantic flailing in the market has come to represent nothing so much as a fish out of water.
Here's a couple of Big Questions that may take generations to answer
I spend a lot of time on this blog focused on the very short term issues regarding mobile. Is Apple better than Android. Will Blackberry survive? What’s the best strategy in Candy Crush? But sometimes you need to pull up to 30,000 feet and look at some of the bigger questions, such as:
What are the real long-term health effects of cell-phones? Wearable mobile technology has only been around for a few decades, and in true widespread use for less than 10. Are there health risks to having an RF transmitter that close to your head for long periods of time? More importantly, are there effects on offspring to carrying a two watt transmitter in close proximity to your reproductive organs for 18 hours a day? This is even more significant for women, where the effect would be cumulative from birth, since eggs are carried for a woman’s entire lifetime. Short term studies have shown mixed results, but lifetime exposure hazards are hard to gauge when the technology itself is so new. We really didn’t understand the cost to society of lead in our gasoline until half-a-century after its introduction. A decade of data on cell phones is unlikely to hold all the answers to the scope of the potential problems.
Brace yourself: Address exhaustion is coming
IPv6 is the global warming of the computer industry, an impending disaster that most folks don’t seem to be taking as seriously as they should be. We’re well into the exhaustion phase of the IPv4 address space, but most ISPs are still dragging their heels on supplying the wider protocol to the end user.