Florida Apple Store expands, Hong Kong construction begins, Ala Moana coming soon

When you’re one of the top retailers in the world, you need to stay on top of your game. There’s news of Apple Store expansion, new construction, and renovation coming from all around the world.

First, ifoAppleStore is reporting that the Mall at Millenia Apple Store in Orlando, Florida is going to be moving to a new, much larger location sometime in 2012. The existing store is long and narrow, and was constantly packed, so Apple outbid Z Gallerie on a space on the upper level of the mall that is over twice the size.

Next, 9 to 5 Mac provided intel that the flagship Apple Store being constructed at the IFC Center in Hong Kong is now hidden behind a large construction curtain (above). The store is expected to be Apple’s most expensive in the world, rent-wise, and might open as soon as this fall. Oddly enough, Apple is also expected to open a smaller store nearby at Pacific Place.

TUAW tipster E sent us three photos of the construction of the new Apple Store at the Ala Moana Center in Honolulu, Hawaii. The open storefront visible in one of the photos in the gallery below is a temporary store to keep those dollars flowing in while the construction is underway.

Considering the shaky state of the global economy, it’s wonderful to see that Apple is continuing to look to a more prosperous future.

Florida Apple Store expands, Hong Kong construction begins, Ala Moana coming soon originally appeared on TUAW – The Unofficial Apple Weblog on Tue, 12 Jul 2011 14:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

iOS 5 Beta 3 Enables AirPlay Mirroring for FaceTime! (Beam Video Calls on the Big Screen)

Apple seems to have enabled AirPlay mirroring for FaceTime in iOS 5 beta 3. It means that in iOS 5 beta 3, during a FaceTime Video call you can mirror your video call onto an Apple TV 2G hooked up…

[[ This is a content summary only. Visit my website for full links, other content, and more! ]]

Android App Development: Implementing remote Android Services with AIDL

In the last post we saw how to use Android services to do time consuming operations in the background. in this post we will see how can a client application call the methods of a service defined in another application. this is achieved through Android Interface Definition Language (AIDL).

AIDL is a java like language that enables you to define an interface that both the application defining the service and the client application implement it.

the interface defines the functions that are needed to be called in the client application.

Defining the AIDL file:

AIDL syntax is similar to that of Java, we can use the following data types in AIDL:

  1. primitive data types: int, long, char, boolean,….
  2. String.
  3. CharSequence.
  4. List (ArrayList,Vector,…).

 

  1. the AIDL file is defined as follows:
    open a notepad file and paste the following code in it:

    package com.mina.servicedemo;
    
    // service interface
    interface IRemoteService {
        //sample method
        String sayHello(String message);
    }

    take care of the package name com.mina.servicedemo.
    we defined a methods sayHello(String message) that returns a string.

     

  2. save the file with the name IRemoteService and change it’s extension to .aidl.
  3. copy the file to the src folder of your project.
  4. once you save and build the file, Android generates an interface java file with the name IRemoteService.java in the gen folder if the project.

Defining the Service:

now we want our service to expose this interface to client applications, so we return an implementation of the service in the onBind() method of our service:

package com.mina.servicedemo;

import com.mina.servicedemo.IRemoteService.Stub;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.widget.Toast;

public class DemoService extends Service {

	@Override
	public IBinder onBind(Intent arg0) {
		return mBinder;
	}

	// implementation of the aidl interface
	private final IRemoteService.Stub mBinder=new Stub() {

		@Override
		public String sayHello(String message) throws RemoteException {
			return "Hello "+message;

		}
	};

	}
}

the last thing to do in the service is to make its exported attribute in the AndroidManifest.xml file set to true like this:

<service android:name="DemoService" android:exported="true"></service>

our app structure can be like this:

 

Consuming the service at the client application:

now to our client application where we want to invoke methods from our service. the client application is a separate application with a different package name than that where the service is defined.

the client application needs a reference to the AIDL interface defined in the original applcation, this is done through the following steps:

  1. in the client applicatio create a package with the same package name of that the service is defined in: com.mina.servicedemo.
  2. copy the AIDL file in this package.
  3. save and build and a new file called IRemoteService.java is generated. your app structure should be like this:

and we invoke the servcice methods in our activity like this:

package com.mina.serviceclient;

import com.mina.servicedemo.IRemoteService;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;

public class MainActivity extends Activity {

	IRemoteService mRemoteService;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Intent serviceIntent=new Intent();
        serviceIntent.setClassName("com.mina.servicedemo", "com.mina.servicedemo.DemoService");
        boolean ok=bindService(serviceIntent, mServiceConnection,Context.BIND_AUTO_CREATE);
        Log.v("ok", String.valueOf(ok));
    }

    private ServiceConnection mServiceConnection=new ServiceConnection() {

		@Override
		public void onServiceDisconnected(ComponentName name) {
			// TODO Auto-generated method stub

		}

		@Override
		public void onServiceConnected(ComponentName name, IBinder service) {
			// get instance of the aidl binder
			mRemoteService = IRemoteService.Stub.asInterface(service);
			try {
				String message=mRemoteService.sayHello("Mina");
				Log.v("message", message);
			} catch (RemoteException e) {
				Log.e("RemoteException", e.toString());
			}

		}
	};
}

and that’s was all about calling remote services with AIDL, stay tuned for another Android tutorial

News: Cocos2D Game Engine v1.0.0 Released

As you may have noticed if you have been reading this site for awhile, I occasionally mention product updates. This one is pretty significant as after numerous release candidates the incredibly successful open source Cocos2D iPhone game engine has finally released v1.0.0.

There are an incredible amount of feature updates since the previous official release of Cocos2D. This update from the last release candidate itself even adds support for non-power of two PVR textures.

You can read the full feature list showing the updates included in v1.0.0 vs the last major release:
Cocos2D v1.0.0 Release Notes

You can find the Cocos2D source on Github here:
https://github.com/cocos2d

Exciting news for Cocos2D devs.

Read more: iPhone Dev News

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail


Open Source: Active Record For Core Data Library

If you’ve developed with Ruby On Rails or similar framework then you are familiar with ActiveRecord, and you are familiar with how useful ActiveRecord is.  I remember thinking how cool it was when I first played with RoR and began using ActiveRecord.

For those unfamiliar with RoR here’s the Wikipedia definition for Active Record:

Active record is an approach to accessing data in a database. A database table or view is wrapped into a class. Thus, an object instance is tied to a single row in the table. After creation of an object, a new row is added to the table upon save. Any object loaded gets its information from the database. When an object is updated the corresponding row in the table is also updated. The wrapper class implements accessor methods or properties for each column in the table or view.

I’ve come across an excellent open source library based on the Ruby On Rails implementation of ActiveRecord from Saul Mora for Core Data retrieval known as MagicalRecord.

You can find the Github for the project along with full instructions here:
https://github.com/magicalpanda/MagicalRecord

You can read Saul’s writeup on the project on his site here:
Magical Panda releases ActiveRecord Fetching for Core Data code library

If you want the full read on Active Record from Wikipedia here:
http://en.wikipedia.org/wiki/ActiveRecord

A very useful library indeed.

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail


Share and View Twitter Photos with Scopy

The amount of intriguing iOS Twitter apps has risen dramatically in the past year. There have been many popular development teams which have created some seriously killer user interfaces, not to mention beautifully artistic designs. The winners of this race to the App Store have been some of the most passionate apps written by very intelligent people.

Scopy is a newer release which focuses on the photo media found on Twitter. You’ll be able to view and share photos with all your followers while also refreshing your Twitter timeline with new content. The icon design and user interface are beautiful to experience and compliment the photographs wonderfully. After the break, I’ll go over how to use Scopy properly, and what you can do after connecting with your Twitter Account.

Getting Signed In

After launching the app you’ll be asked to provide the Twitter credentials for your account. If successful, you’ll be redirected to the app Timeline which loads all recent tweets with images only.

Note that Scopy isn’t a fully-fledged Twitter app since it only loads tweets containing photo content. So I wouldn’t say that Scopy could replace your main Twitter app, but for those who share a lot and enjoy viewing photos, this is perfect. Each tweet is given its own box with a reply and Like button. Likes aren’t posted to Twitter, but are shared between other Scopy users.

Logging In and Settings for Scopy

Login and Settings View – Scopy App

Their system is very intuitive at picking up on images. Even if you host an image on your own website and directly tweet the link, Scopy will pick up on this and pull the image inline for the app. I’ve shared direct image links from Tumblr and Reddit which have still displayed within Scopy. If you look beneath each photo there’s also a sticky containing the direct URL, making it very easy to copy and paste.

To refresh at any time, simply pull down the timeline as you would in any other Twitter app. There is also a small refresh button in the top right corner which does the same thing. The speed at which the app runs is incredible, especially for downloading content directly from multiple websites.

Going through the Tabs

Like most Twitter apps you’ll be working with a few different views. But unlike most Twitter apps, these don’t include the common @ replies, profiles, retweet lists, etc.

User Searches and Timeline

Scopy Timeline and Search View

Next to the timeline you’ll find a tab labeled “People.” This is similar to a contacts list customized for Scopy. The app will pull data from your Twitter account and list all the people you follow under Friends. The list is sorted alphabetically in a similar manner to the iOS Contacts app. Pressing each profile will open a page loading any tweets from the person containing photo media. The small search bar at the top of the page may help you narrow down what you’re looking for.

There are built-in star icons next to each person’s contact listing. With these icons you can favorite a person and create a small favorites list of the top tweeters you wish to follow. This can behave as a quick access list for friends who share a lot of photos that you want to keep up with.

Twitter - Scopy Saved Searches

Browsing the Scopy tweets timeline

Finally, the settings tab will hold your account settings for Scopy. These include how many tweets to download per update, photo sizes in your timeline (small/medium/large), credits and a logout button. If you have been using Twitter apps on an iPhone or iPad then none of these features should throw you off guard. But much of the functionality found in Scopy has been redesigned in a very clever layout.

Sharing New Photos

Moving back onto the timeline, you’ll notice a small camera icon in the top-left corner. This doesn’t directly open your camera, but instead brings up a new tweet dialog view. It contains the standard iOS keyboard with options for adding link URLs and location data. Next to these icons you will notice a character count for your current tweet, starting at the limit of 140 characters.

Scopy Writing a new Tweet

New Tweet and Upload View

First, add your text into the tweet window. This can be whatever you’d like, or you could even leave the field blank and let your photo do the talking. Afterwards, find the bird illustration on the left-hand side. You’ll notice a square portrait block with the text “Add Photo” which brings up two options to choose from. You may either take a new photo with your camera or alternatively choose something from your library.

Either way, after choosing the photo you’ll be taken to a new screen where you may apply one of many different filters. This is where Scopy really adds some beneficial features for photographers looking to spice up their work. You may choose from multiple filter effects including Vivid, Noir, Sakura, Vintage, and Golden. Of course, you also have the choice to leave your photo alone and apply no effects at all.

Photos with Scopy iPhone App

Editing Playstation 2 Controller Photo

It should only take a few seconds for your photo to fully upload and process. Scopy is versatile enough that you shouldn’t have a problem tweeting before it’s completed. Scopy will pull the URL and append this into your tweet while you’re waiting for the upload to process. You may change your upload service in the settings view, and there are plenty of choices including YFrog, Twitgoo, Posterous and TwitPic.

Benefits and Features

Ultimately, Scopy wasn’t built to replace your current fully-featured Twitter app. There are actually a lot of common features missing from Scopy, assuredly on purpose. But even though you can’t do a lot in Scopy, it’s made up for with incredible photographic functions found within the app. It’s almost similar to Instagram but connected directly into your Twitter stream. And the ability to @reply inline with others’ photos is also very useful feature.

Extra Benefits for Scopy Photo Uploads

Misc. Timeline and photo views in Scopy

Conclusion

This is a really good app for those looking to get into photo sharing and viewing on Twitter. You can even search by users or categories to locate specific photos. However, outside of this small niche you won’t find much interest in such features.

Where the app falls short is with interactivity and personal connections. There is no way to view private messages or even @replys to your profile. You can view lists of your followers and who you’re following, yet you aren’t able to pull all of their tweets, only the ones including photo media. This leaves Scopy a bit out of touch for creating a powerful connection between Twitter users. You also aren’t able to tie in more than one account at once, which is a bummer.

Check out the app if you’re a photo lover. It costs only $0.99 with unlimited updates and near-futuristic features. It’s not for everyone, but if you’re a fan of photos on Twitter, this app works out perfectly.

5 Apps to Green Up Your Act

Quick — can you name the closest recycling location in your neighborhood that accepts paint? How about all the greenhouse gases? And what’s your carbon footprint? I like to think people would be a lot more successful at making environmentally friendly choices on a daily basis if the options were convenient and the information was readily available.

With that in mind, here are five apps that make “greening” up your life much easier, and even a little fun. They can help you find recycling centers in a snap, identify safe foods and products, reduce your carbon footprint, and more. Hit the jump to take a look.

iRecycle

iRecycle

iRecycle

OK, maybe you already know you’re supposed to recycle batteries — but how? And where? iRecycle can help with situations like this one, plus save you the trouble of making a dozen phone calls or driving all over your city to find a place that accepts your stuff.

Powered by Earth911.com, the app makes it easy to find recycling and disposal locations for more than 240 different materials. Type in whatever you want to unload (your kid sister is not an option), and, with access to your current location, iRecycle sorts through 800,000-plus listings to find the nearest facilities or businesses that accept your discarded item(s). Find places to drop off things like cell phones, paint, motor oil, car batteries, plastics and more.

iRecycle also provides available phone numbers, websites, hours, restrictions, services, addresses and maps, so you don’t even have to leave the app to figure out where you’re going. Additional features include green event listings and the latest articles from Earth911.com, putting pretty much everything you need to know about recycling right in the palm of your hand.

Price:
Free
Requires: Compatible with iPhone, iPod touch, and iPad. Requires iOS 3.0 or later.
Developer: Earth911.com

iRecycle

iRecycle

My Carbon Footprint

My Carbon Footprint

My Carbon Footprint

My Carbon Footprint shows how your everyday choices impact the world around you, symbolized within the app by your own little slice of planet. Initially, you’ll answer 10 questions to personalize your My Carbon Footprint planet. Then you’ll answer one question per day, with your answers subtly impacting the world within the app, making it greener or more polluted as you go.

A big component of this app is the social networking integration. As you answer questions, you’ll earn badges, receive environment-related tips, and have the option to share your achievements on Facebook so your friends can see how your little planet is doing.

Criticism of this app usually includes complaints that it doesn’t assign a hard and fast figure as the user’s carbon footprint; however, the app doesn’t claim to be a carbon footprint calculator. Rather, the app’s goal is to get people talking about the impact of carbon emissions and provide users with visual reminders that our lifestyle choices affect the world around us. On the latter level, I’d say the app succeeds. Plus, having your own little virtual slice of planet is cool.

Price: Free
Requires: Compatible with iPhone, iPod touch, and iPad. Requires iOS 3.0 or later.
Developer: Blue Chip Marketing Worldwide

My Carbon Footprint

My Carbon Footprint

Zero Carbon

Zero Carbon

Zero Carbon

For individuals in search of an actual carbon footprint calculator, Zero Carbon is an excellent option. Answer some questions related to your daily habits in order to discover your carbon dioxide output.

Once you know the amount of greenhouse gases your lifestyle is producing, Zero Carbon will offer tips for how to reduce that number. Plus, you can use the offset tool within the app to create a user account and then financially support certified projects that reduce carbon emissions around the world — thereby, in theory, lowering your own impact. Similarly, you can give a gift of “avoided carbon tons” to another person if you want. (Ahem, your neighbor with the gas-guzzler, maybe?)

Additionally, Zero Carbon shows you how your statistics stack up against world averages, and it can be connected to Facebook, so you can share your results with friends and anyone else who might be keeping tabs on you via the Internet.

Price: Free
Requires: Compatible with iPhone, iPod touch, and iPad. Requires iOS 3.0 or later.
Developer: Mobitelio LTDA

Zero Carbon

Zero Carbon

GoodGuide

GoodGuide

GoodGuide

Having been featured already by The New York Times, Oprah, Newsweek and other media heavyweights, the Good Guide app aims to start a consumer revolution. This application enables users to browse through or search among more than 70,000 entries for safe, healthy and sustainable products before making a purchase.

Best of all, there’s a barcode-scanning capability as well, meaning you can use your iPhone’s camera to read a product’s barcode and bring up details like the product or company’s ratings for health, environment and social responsibility. Research everything from personal care and toy products to household chemicals and food products; in fact, you can even build personalized shopping lists in Good Guide of items you love and want to support, as well as lists of products you want to avoid in the future.

And like any good app that’s going to incite a movement, Good Guide allows you to share your recommended products on Facebook, Twitter and via email, as well as earn nifty badges for actively viewing, rating and sharing within the Good Guide community.

Price: Free
Requires: Compatible with iPhone, iPod touch, and iPad. Requires iOS 3.1.3 or later.
Developer: GoodGuide, Inc.

GoodGuide

GoodGuide

Green Map

Green Map

Green Map

If you’re looking to support more green places and things in your community, the Green Map nonprofit org can help you. Its app has information on more than 15,000 green sites, such as farmers markets, green buildings, bike lines, community gardens, public transportation hubs and more, thanks to 700-plus locally led mapping projects in 55 countries.

By taking advantage of the Green Map’s networked database of natural, cultural and social resources, you can opt for activities in your community that have a lower impact on the environment. Search by those closest to you, by naming a specific city, or by icon (which indicates the category the site falls into — sustainable living, nature, or culture and society).

Granted, the app is currently more useful in larger cities, where the number of users who have added green sites to the map is likely to be greater. But if you live in a smaller city, that shouldn’t stop you. Hey, why not get out there anyway and blaze the trail for Green Mapmakers who come after you?

Price:
$1.99
Requires: Compatible with iPhone, iPod touch, and iPad. Requires iOS 3.0 or later.
Developer: Green Map System

Green Map

Green Map

Which Apps Make Your Life Greener?

The apps above are good ones to add to your arsenal if you’re a newbie to the green movement. And even if you’re a bona fide greenie who’s already downloaded all five of these, it wouldn’t hurt to pass the info on to your friends, right?

Which green app is your favorite? Leave a comment below to let us know, whether we mentioned it here or not.

Quick Look: AppZapp

Quick Look posts are paid submissions offering only a brief overview of an app. Vote in the polls below if you think this app is worth an in-depth AppStorm review!

In this Quick Look, we’re highlighting AppZapp. The developer describes AppZapp as a way to easily guide you through the App Store that has more than 460,000 Apps and growing. You will never lose track of any App-activities, and in addition, the prices — SellerAlerts will always inform you about special promotions, so you can’t miss any of the great deals!

Read on for more information and screenshots!

Screenshots

AppZapp menu

AppZapp menu

AppZapp preview

AppZapp preview

About the App

Here are the top five features you can expect to see in the latest version:

  • Apps: Now Free & On Sale
  • Price & Seller Alerts
  • iPhone, iPad & Mac Apps
  • Videos & Pricecharts
  • Supporting 92 App Stores

Requirements: iOs 3.0 or higher

Price: Free

Developer: ConIT AG

Vote for a Review

Would you like to see us write a full review of AppZapp? Have your say in our poll:

Would you like to see AppZapp reviewed in-depth on AppStorm?survey software

Quick Look posts are paid submissions offering only a brief overview of an app. Vote in the poll if you think this app is worth an in-depth AppStorm review! If you’re a developer and would like to have your app profiled, you can submit it here.

For the Grammar Geeks: AP Stylebook 2011

A few years back, I picked up a job as a copy editor of a local publication. Although I had never done copy editing before, grammar was one of those things that came easily to me — or at least, so I thought. My savior in the first few weeks was my first copy of the Associated Press Stylebook, which up until recently held a permanent spot just to the left of my keyboard as my first area of reference. But now, I have no reason to have the handy reference guide nearby, because I’ll always have my iPhone.

That’s because now the AP has released a 2011 version of their publication, which came out even before the printed edition. It’s called the AP Stylebook 2011, and if you’re a journalist, writer or just someone who really gets excited by learning about grammar, this might just be the perfect app for you. Find out more after the break.

The What and Why

At the average publication, the head of the copy department establishes a universal style for all of their grammar. In the US, this breaks down into two major fields: The Chicago Manual of Style, and the AP Stylebook. There’s no real preferred way to go, it’s just all up to the editor in charge. For me, the AP Stylebook has been the main source for my work, and it’s what I use when I’m editing this site as well.

The AP Stylebook saves recent searches automatically.

The AP Stylebook saves recent searches automatically.

So why would you, the average man or woman on the street need this app? Well, you wouldn’t. There’s absolutely no reason for you to own this app unless you have anything to do with working with the written word. If you do, then having the app on your iPhone has multiple advantages over  the paper version, not the least of which being portability. If you’re like me, you’re usually lugging your laptop and your AP Stylebook with you everywhere you go (or at least between work spaces), and with the Stylebook available on your iPhone, it gives you one less thing to carry.

How it Works

At its core, the app is essentially the 2011 version of the AP Stylebook. It’s got all of the usual things, like briefings on media law, punctuation, editing tips and so on, but it’s the iOS part of it that really makes it shine. Searching for listings is quick and easy, and then saving them once you find them is even better.

Make a listing a favorite by just touching the star.

Make a listing a favorite by just touching the star.

Each listing has a little outline of a star in the upper right corner. If you’ve got a sore spot that you need to look up frequently — like state abbreviations and semicolons in my case —then you touch that star outline and it turns gold, making it appear on your Favorites list. Now anytime you need to refer to the listing, just go straight to your favorites and tap on the appropriate entry. It saves lots of time, and is a lot easier than flipping through dog-eared pages like I used to on my physical version.

Other Standouts

Although the Favorites feature is one of my, um, favorites, the other is Notes. I’m a bit OCD, so I don’t really like writing in my books if I can avoid it. Each listing in the iOS version of the AP Stylebook includes a little notes section at the bottom, where you can type away any little tips you may need here and there. Maybe it’s how you do something for one specific client, or just variations not listed in the guide. No matter what it is, just put it in the notes and you’ll be good.

Add notes by just typing them onto the yellow paper.

Add notes by just typing them onto the yellow paper.

Another nice feature is the ability to put in your own entries. Just touch the pencil on the bottom menu bar and then type away. The listings are stored in alphabetical order just like the regular Stylebook, meaning that you could enter your own specialized version in the app if need be.

View editing notes and more.

View editing notes and more.

Verdict

I found this app accidentally. I went to Barnes & Noble to get the latest version of the AP Stylebook to use with one of my clients, and I discovered that it was going to be another month or so before it was released in stores. I considered signing up for their online subscription service, but that just seemed like more of a pain than a book, plus I had to do that whole subscription thing. Then I remembered something about there being a 2010 version on the App Store, so I gave a peek and there the 2011 version was, ready to go.

Now it’s not perfect, but it’s pretty close. The app did crash on me a few times when I went to one of my favorites, and part of me wishes there were more to do other than use it as a reference guide. But thing is, that’s all you really need. Having the ability to input notes and put in your own entries is very much frosting on the cake, and just makes the app that much more valuable than the printed version. It’s a bit pricey at $24.99, but again, this is one step up from the printed version and it’s with you everywhere you have your iPhone. In comparison, it’s a bit of a bargain.

This app won’t save you money on coffee, and there’s no way it can find the closest gas station to your current location. But if you have anything to do the writing industry, having a copy of the Stylebook on you at all times sure is convenient, and it saves room in your laptop bag too. In my case, this app saves me time and money over the course of a year, and that alone makes it worth the $25.

Coding Conventions: iVars

Hey iCoders,

As we have worked together over the last three years, some of the other iCodeBlog writers and I have gotten some pretty good coding conventions going that we thought would be good to share with you guys. One of the toughest to read coding conventions on iPhone is the declaration and synthesis of iVars. I’m going to go through a quick example of the correct way to do this, and the advantages of using the practice. So lets dive in.

Let’s make a simple class

Today we are going to make a simple class to represent a Blog Post. We will call this object a BlogPost and it will have a name, date and author. Let’s first take a look at the declaration of these variables.

This first snippet declares the three instance variables (iVars) that will make up our class. Convention is to have all instance variables declared with _ prefixes. Don’t worry, you will be able to access them without the _, but this is useful so developers know when they are accessing the synthesized getters and setters of an iVar as opposed to the iVar itself. We will see specifically what this means in a minute.

The other interesting convention here is declaring the Author class as an @class. What this does is tell the compiler that the class exists and should not produce a compile error. It does not go look at the Author class in any way however. You could declare this class like this and not even have an Author class in your project and the code would compile fine. The reason we do this is to avoid circular referencing. We will actually import the Author header in the main of this file. For more info on circular referencing check out the Circular Reference Wiki.

Synthesizing our iVars

Next we are going to synthesize these iVars to provide getters and setters for these objects.

This is the point in which we will make the iVars we have declared with _ available through another name, in this case we simply remove the _. This is accomplished by declaring the @property for each iVar with the name you would like to use when accessing these variables from a self. context. This means that you can get to the postName by using self.postName or _postName. postName will not work and self._postName will not work. The final piece of the puzzle is equating the @property declared variable with the actual declared iVar in your @synthesize declarations in your main. You can also see that here we have imported our Author.h class. This will ensure that even if Author has a reference to BlogPost, the references will not be circularly infinite.

Overriding a setter

The final thing I want to take a look at is what is would look like to override a setter method for one of these iVars. Let’s say we want a BlogPost to have a default name of “Blog Post Temp Name” if no name is provided. We can accomplish this by overriding the setter for postName. Here’s what that looks like.

The first thing we do here is declare the method. I like to have the variable passed into the setter be newPostTitle although you could leave it as postTitle because that name is only meaningful to the self. context. I personally find this to be a bit confusing to read so I usually add a “new” prefix to passed in variables in my overridden setters. With this done we strip the whitespace from the title and check if it is an empty string. If it is then we manually set the rawName to our default title.

With this done the final step is being memory safe in our assignment. We will be accessing the raw instance variable here through the _ prefix. This means we are going to be responsible for our own retaining. The process here goes, retain the new object, release your iVar object and then assign your iVar to the new object. This makes sure that memory is always handled correctly. If your current _blogPost and the passed in newBlogPost are different, it releases the old one retains the new one and we are all good. If they are the same exact object then we add a retain to newPostName to bring the retain count to 2 and then release _postName bringing the retain count back to 1. This is commonly done incorrectly in code I have seen and can introduce memory leaks.

That’s all for today guys. Happy iCoding!

Follow me @curffenach

iPhone Development – Back To Basics

Wow, can you believe that it has been almost 3 years since I started iCodeblog!? It seems like just yesterday, That I wrote my very first tutorial in July of 2008. Now, iCodeBlog has multiple authors, hundreds of tutorials, and over 5,000 readers per day!

As you know, a few things (to say the least) have changed since we first launched iCodeBlog in 2008 with the way we develop for the iOS platform. With that being said, many of my early tutorials are now quite dated with old screenshots, old (deprecated) code, and no knowledge of memory management whatsoever. I have also evolved both in development as well as writing. Since beginning, I have published many tutorials, written over 30 iOS applications, and even published a book.

A New iOS Development Series

All that being said, I am proud to announce my next tutorial series called Back To Basics. This will be an ongoing series where I will revisit some of the core iOS development concepts for n00bs and experienced developers alike. I will focus heavily on conventions, clean and clear coding, and really try to aid the reader in developing a solid foundation in iOS development.

Here is a rough roadmap of where we are going (obviously incomplete).

  • Getting the tools
  • Overview of XCode
  • Basics of Objective-C
  • Hello iOS
  • MVC Design Patterns in Objective-C
  • View Controllers
  • Survey of Native Interface Components
    • Views
    • Table Views
    • Labels
    • Image Views
    • Pickers
    • Sliders
    • etc…
  • Then we start the good stuff…). iOS Frameworks
  • Image and Video
  • Audio Recording and Playback
  • Location
  • Maps
  • GameKit
  • Game Center
  • etc…

* Note that this list by no means is sorted or complete, it’s just to give you an idea of what I plan on working on going forward. At some point, I will have a formal method for submitting suggestions for tutorials to be considered.

But iCodeBlog Seems To Lack In The Post Frequency Department Lately

This is true, and I’m very sorry about that. Over the years iCodeBlog has gone through many transitions from being acquired by ELC Technologies to partnering with Velum Media. This has caused a lot of confusion and lack of motivation to create new content. We now have quite a few dedicated authors with some real incentives to write new content.

So make sure you subscribe to the RSS feed and stay tuned, because iCodeBlog is about to enter its best season yet.

Happy iCoding!

iTunes Connect down for maintenance for most of July 13

The Mac App Store, iTunes Store, and App Store have all been experiencing fairly serious connectivity issues over the past several hours. Many speculated this was a sign that OS X Lion was about to debut on the Mac App Store, despite plenty of evidence suggesting it won’t hit until July 14 at the earliest. Now MacRumors has heard from developers that Apple intends to take iTunes Connect down for most of July 13 for “scheduled maintenance.”

iTunes Connect will be undergoing scheduled maintenance on Wednesday, July 13 from 9 a.m. to 4 p.m. PDT.

During this time, iTunes Connect will still be available. However, pricing changes made between 9 a.m. and 4 p.m. PDT will cause the app to become unavailable for purchase until maintenance is complete, at which point the app will become available at the new price. To avoid interruptions to the availability of your apps, do not make price changes during this time.

Lastly, customers may not be able to purchase apps in the Mexico, U.K., Australia, Switzerland, Japan or Norway storefronts during the scheduled maintenance.

If this really is “scheduled maintenance,” it seems odd that we’re just now hearing about it, only nine hours ahead of the downtime. There’s no official link between this downtime and the issues Apple’s online storefronts have been experiencing today, but the timing certainly doesn’t appear to be coincidental.

This downtime will be an inconvenience to developers, just as today’s intermittent App Store issues have inconvenienced potential buyers. None of this makes for a particularly inspiring prelude to the OS X Lion launch; Lion is around 4 GB in size, and with at least tens of thousands of downloads likely on the first day of availability, the Lion launch day is likely to be Apple’s most bandwidth-intensive day ever. Here’s hoping the company can get its affairs in order tomorrow.

iTunes Connect down for maintenance for most of July 13 originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 13 Jul 2011 04:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

AOL’s Play app gets social with your music

Our corporate cousins at AOL have a new tool for enjoying and sharing your favorite songs: the free Play app. First introduced at SxSW as an Android-only offering, it’s now available in the App Store for iPhone.

Play meets the table stakes for a social music app by allowing you to play songs from your onboard music library; you can comment to Twitter or Facebook about what you’re listening to, complete with location info. If you want to keep track of your friends who use Play, their comments and song history will appear in the app’s Feed section.

For music discovery, you can sample your friends’ favorites by listening to excerpts on Rdio or iTunes; but there’s actual free music in there, too. The album play section includes songs from SHOUTcast Listening Party, MP3 of the Day and other sources.

If you’re in the mood to share and chat about your music, and Ping’s not your thing (nor Soundtracking), check out Play. If you want a more full-featured player without the social bits, take a look at Panamp.

Note: TUAW is an AOL brand.

Gallery: Play by AOL

AOL’s Play app gets social with your music originally appeared on TUAW – The Unofficial Apple Weblog on Tue, 12 Jul 2011 22:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

iPad as Kinect part 2: Air Touches

What can you do with an iPad 2 with its onboard cameras and it’s fairly able CPU? Quite a lot, it turns out. When TUAW first looked at Greg Hartstein’s Air Touch project, it required a completely dark room and could only handle a single measure of distance based on lighting levels.

Things have evolved since then. Hartstein provided this video that shows how using a tracking element attached to his hand (you can see it slightly in the video when his hand is at an angle to the camera) simplifies the interaction and provides a far greater range of possible interactions. Unfortunately, the YouTube video is slightly glitchy (the original version we received is not, but when we uploaded it to YouTube we got that weird pixelation in the beginning).

In addition to tracking distance and rotation, Hartstein has also been working on air-swipes and other motion-based gestures.

iPad as Kinect part 2: Air Touches originally appeared on TUAW – The Unofficial Apple Weblog on Tue, 12 Jul 2011 21:00:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments