Absolute Ripple
  • Absolute Ripple
  • Contact

Diabling Automatic Reference Counting (ARC) in selected class files

15/2/2012

0 Comments

 
Scenario: You are using Automatic Reference Counting (ARC) in iOS 5 for your project, but you are also using some old class files or open-source libraries that are not ARC compliant. Your project won't compile.

Solution: Disable ARC on those files that are not ARC compliant by inserting a compiler flag. (Of course, the onus is then on you to ensure that those files adopt the appropriate memory management practice.)

To disable ARC on a per file basis:
1. Select the project in the Project Navigator
2. Select the relevant Targets (there should just be one if you have just created the project)
3. Click "Build Phases" tab along the top on the right hand side
4. Click the "Compile Sources" tab
5. Locate the implementation (.m) file you want to disable ARC and double click it
6. Type or paste in "-fno-objc-arc" on the dialog box that appears

0 Comments

Removing the icon gloss effect in iOS 5

14/2/2012

0 Comments

 
Simply, set "Icon already includes gloss effect" under "Primary Icon" under "Icon files (iOS 5)" in info.plist to YES.

Note:
- "Icon already includes gloss effect" MUST be under "Primary Icon" for this to work. I I was lost for awhile and unable to remove the gloss effect until I realize this!
- You may also need to delete the app from the Simulator/devices and perform a clean build (Product > Clean) for the changes to show up.
0 Comments

Link to app in the Apple app store from inside your app

13/2/2012

0 Comments

 
Create a helper method:
- (void)openWithLink:(NSString *)urlLink
{
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlLink]];
}

Call the method:
[self openWithLink:@"THE_LINK"];

Replaces THE_LINK with the actual link, which can take a number of forms:

1. (Link directly to the app - method 1) http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=YOUR_APP_ID        e.g. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=498871441
2. (Link directly to the app - method 2) http://itunes.apple.com/app/idYOUR_APP_ID
   e.g. http://itunes.apple.com/app/id488561581
3. (Link directly to the app - method 3) http://itunes.com/apps/YOUR_APP_NAME
    e.g. http://itunes.com/apps/memorable
4. (Link to your company) http://itunes.com/apps/YOUR_COMPANY_NAME
    e.g. http://itunes.com/apps/absoluterippleptyltd
5. (Link to the rating page of your app)
    NSString *str = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa";
    str = [NSString stringWithFormat:@"%@/wa/viewContentsUserReviews?", str];
    str = [NSString stringWithFormat:@"%@+Software&id=", str];
    //- replace the following with your app id from iTunes Connect
    str = [NSString stringWithFormat:@"%@YOUR_APP_ID", str];

One point to note about all these url scheme is that they can (and do) change. You must test the link out inside your app to make sure it is working.

Optional:
You can replace 'http' with 'items-apps'. e.g. itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=498871441
This will supposedly  open the App Store app directly, whereas the 'http' will first invoke Safari and then redirect to the App Store app. In practice, this doesn't seem to happen all the time.

See: Technical Q&A QA1633 Creating easy-to-read links to the App Store for your applications and company

0 Comments
Forward>>

    Archives

    August 2013
    July 2013
    June 2013
    May 2013
    January 2013
    October 2012
    September 2012
    March 2012
    February 2012

    Categories

    All
    Apple Policy
    In App Purchase
    Ios Programming
    Our Apps

    RSS Feed

    Disclaimers

    Here are some resources that I find useful in writing iOS apps. These are not necessarily unique as they are based on various sources online.
    This is mainly to provide a source of reference to myself and my associates but if it can be of use to someone else, that is good.
    Note that information is provided here as is. Use at your own risk. There is no guarantee that it is accurate. We will update the information as time and resources permit.

    Powered by Create your own unique website with customizable templates.