Posts Tagged tip

Submitting iPhone app to App Store

Finally, after two bounces and three weeks of waiting, our first app on App Store is available!

I’ll keep this post really short!

Pros

  • Great testing by the App Store review team.
  • Good and thorough feedback.
  • Cons

  • Time consuming! But, reasonable considering the amount of apps that is submitted to the App Store.
  • iTunes Connect
  • Some good to knows!

  • It takes approximately 5 working days before you hear anything from the review team.
  • If you reject (developer reject) your application and post a new version when an app is undergoing a review, then you will have to wait another 5 more days.
  • Conclusion

    The App Store review process: 4 stars out of 5

    Projectplace for iPhone

    If you are curious about our iPhone application, please visit our app section @ App Store.

    , , , , ,

    3 Comments

    iPhone tip #2 – What is my current location?

    The iPhone has GPS built-in, which makes the phone really powerful and enables developers to innovate cool and cutting edge applications!

    The iPhone devcenter has some sample code explaining how the CoreLocation framework works. But, I found that example a bit hard to understand…

    Here is an easier way of finding your current location from your iPhone.

    Let’s start with the interface/header file.
    CurrentLocationController.h

    #import <CoreLocation/CoreLocation.h>
     
    @interface CurrentLocationController : NSObject <CLLocationManagerDelegate> {
    	CLLocationManager *locationManager;
    }
     
    @property (nonatomic, retain) CLLocationManager *locationManager;
     
    - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation;
    - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error;
     
    @end

    Note: Our object “implements” the CLLocationManagerDelegate protocol. We “implement” two methods, locationManager:didUpdateToLocation:fromLocation: and locationManager:didFailWithErrorfrom :, from CLLocationManagerDelegate. The first method is invoked when a new location is available and the second one if an error has occurred.

    Here comes the implementation:

    #import "CurrentLocationController.h"
     
    @implementation CurrentLocationController
     
    @synthesize locationManager;
     
    - (id) init {
        self = [super init];
        if (self != nil) {
            self.locationManager = [[[CLLocationManager alloc] init] autorelease];
            self.locationManager.delegate = self;
        }
        return self;
    }
     
    - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {
        NSLog([newLocation description]);
    }
     
    - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
        NSLog([error description]);
    }
     
    - (void)dealloc {
        [self.locationManager release];
        [super dealloc];
    }
     
    @end

    The only important thing to note is the line

    self.locationManager.delegate = self;

    . Here we set our own object as the delegate, which means that all the location messages will be forwarded to CurrentLocationController.

    I hope this will give you more time innovating, instead of developing Trichotillomania.

    , , , , , , , ,

    5 Comments

    iPhone tip #1 – URL encoding in Objective-C

    If you are n00b when it comes to iPhone development, then you’ve come to the right place! We’ll be posting howtos, tips and tricks continuously.

    So, how do you URL enconde a string? It’s quite simple if you know how. :)

    + (NSString *)urlEncodeValue:(NSString *)str
    {
    NSString *result = (NSString *) CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)str, NULL, CFSTR(:/?#[]@!$&’()*+,;=”), kCFStringEncodingUTF8);
    return [result autorelease];
    }

    To create an URL object, do like this:

    [NSURL URLWithString:encodedUrlString]

    , , , , , , ,

    6 Comments