Journey to App Store

Take PERFECT screenshots before submit your App to the App Store

Before you release you app to the world, you would definitely want to show the fancy of your app by screenshots. Although you can easily make screenshots in the simulator or on your phone, the status bar has always been a pain:

  • Time, time, time
  • I don’t want to show the poor signal of my “T-Maybe”
  • Wait my battery is gonna run off?

In this blog, I will take about how to make a perfect screenshot just like Apple.

1. Smart use of Quicktime

In iOS8, thanks to Apple, it is relatively easy to do a live demo on the phone with the cool feature from quicktime. However, as you may never noticed, when you connect your phone to your laptop and open the quick time for the demo, your status bar would automatically switched to the present mode! Will full signal, no carrier name and full battery! And of course, it would display the Apple’s standard demo time: 9:41AM!Untitled-1
Now grab your phone and take a screenshot!

2. Take screenshot on the simulator

If you prefer to do the screenshot on the simulator and do not want the ugly “Carrier” or the real time, we have another option

SimulatorStatusMagic( provide you a very simple way to do that. Just go ahead and clone that repo, build that on the simulator you want(iPhone 6, iPhone 5s etc), and hit the only button!iOS Simulator Screen Shot Jul 20, 2015, 2.55.46 PMiOS Simulator Screen Shot Jul 20, 2015, 2.56.33 PM

The simulator retain this status bar and now you could go into your app and user Command+S to make screen shots!

What is next…

After get your perfect screenshot, try the Screenshot Builder on LaunchKit and happy App Store 😀

Objective C study note

Apply CSS into your UIWebVIew

First, you need to drag your .css file into your Xcode workspace, I dragged it into the “Supporting Files/”

Then, all you need is these three lines:

NSString *path = [[NSBundle mainBundle] resourcePath];
NSURL *baseURL = [NSURL fileURLWithPath:path];
[webView loadHTMLString:htmlString baseURL:baseURL];

If you’re curious, you can actually log out everything you have in the resourcePath of your App.

    NSFileManager *fileManager = [NSFileManager defaultManager];
    NSArray *dirContents = [fileManager contentsOfDirectoryAtPath:path error:nil];
    NSLog(@"Contents = %@",dirContents);

If you can see your *.css file, you are good to go!

Of course, you would need to add a line of CSS code into the header of your html string to make it aware of that CSS file.

NSMutableString *finalHtmlString = [[NSMutableString alloc]initWithString:@"<link href=\"mobile.css\" rel=\"stylesheet\" type=\"text/css\">"];
[finalHtmlString appendString:htmlString];

Before                                                                 After