Blog posts

Push / Pop modal SFSafariViewController (Hacking swipe from edge gesture)

October 11, 2015
In iOS 9 Apple introduced SFSafariViewController. In a nutshell it pretty much runs full Safari in your app. This is great as user gets all Keychain passwords, Safari extensions access, cookies, session data, etc. All of that done securely as the SFSafariViewController spins up a separate process, so that the app does not have access to SFSafariViewController’s content (More info here). That’s all great, however there is problem. Result of pushing SFSafariViewController in UINavigationsController is loss of default bar behaviour, which looks pretty bad. So really, only option is to present it modally. This has is own drawbacks. Apple has made unfortunate choice of placing the done button to top right corner. This makes it very difficult to dismiss when using the phone one handed. Although, I don’t really think positioning it anywhere else would solve the problem. Now standard swipe from the edge of the screen gesture really is the (more…)
#Blog posts, #Coding, #iOS Development, #Swift

Add iOS 9’s Quick Actions shortcut support in 15 minutes right now !

September 14, 2015
Apple introduced 3D touch (/force touch for iOS) functionality in iOS 9. API is divided into 3 parts. Quick actions, Peek and Pop, Pressure Sensitivity. This functionality will be available in iOS 9 at launch. Meaning you can already submit apps with support for it right now. I will only delve into Quick Action support which is most straight forward and no brainer. With a bit of luck it can all be done in 15 min. Let me however start by disclaimer, that at the time of writing of this article I have no way of testing any sample code as neither simulator in Xcode 7 nor 7.1 beta support 3D touch simulation and iPhone 6s is still over a week away. I will update this post as soon as I’m able to actually test it. If you’d like to hear about update, you can follow me here @stringCode. Without further (more…)
#Blog posts, #Coding, #iOS Development, #Swift

Adding your blog to iOS9 News.App

September 4, 2015
Apple will introduce new News.App in upcoming iOS9 release. News app is basically locked down, cleaned up RSS reader. It is to be sort of replacement for deprecated News Stand app. Some say it is response to Facebook’s native news articles. Is News.App going gain more traction then News Stand did ? Is it horrible for open web and publishers ? I don’t know, but I think it would be cool to get my little blog on it. It turns out to be surprisingly easy. Simply login to icloud.com/#newspublisher. Provide some simple info and logo image. Logo has to have height of 256 px and width up to recommend 2048 px or maximum 2560 px (hmm, wonder what would be the resolution of theoretical bigger iPad). Then wait for approval process. In my case it was about 2 weeks. If my very modest blog can make it on there, then any blog (more…)
#Blog posts, #Reviews, #Technology

Rendering version number into beta app icon using swift script

August 28, 2015
It’s quite handy to have multiple builds of same app on one device for developing purposes. I usually setup three different builds. I like to have AppStore version alongside βeta version that is distributed to testers, as well as having separate debug builds. Last is only used when I directly build and run from Xcode. I described my setup in blog post here. That blog post it’s a prerequisite for following technique of rendering app version and build number onto icon described below. All of the code is written in Swift 2.0 and sample project is Xcode 7.0 beta 6 project. Start by downloading icon_processor.swift. You may want to download whole sample project (make sure you are viewing icon_version_rendering branch). It will make following along easier. Copy icon_processor.swift to your project folder. Add new Run script build phase in iOS target just under target dependencies in Build Phases tab. Define a path to (more…)
#Blog posts, #Coding, #iOS Development, #Swift

Adding Weibo sharing option to your app (How and Why to China)

August 16, 2015
According to TechCrunch article Apple’s App Store saw $1.7B in billings transaction in July 2015 alone. To date, the company has paid out $33 billion to App Store developers, it said – $8 billion of which was in 2015 alone. Large chunk of growth has come from China. In fact China has overtaken U.S as number one source of downloads. And its now number three country by revenue.
This explained my continuos puzzlement by downloads stats for Memory Game. I though it was some sort of outlier, or possibly due to the popularity of Apple Watch in China. Not so. China truly is market not to be ignored. Business model for this particular game is first two levels are for free, then £0.79 (tier 1) to unlock all levels. Alternatively you can share on social media to unlock level three for free. My (more…)
#Blog posts, #Coding, #iOS Development, #Technology, #Uncategorized

AppStore app version along side beta, debug build on Apple Watch & iPhone

August 9, 2015
It’s quite handy to have multiple builds of same app on one device for developing purposes. I usually setup three different builds. I like to have AppStore version alongside βeta version that is distributed to testers, as well as having separate debug builds. Last is only used when I directly build and run from Xcode. This involves having different bundle ids. Therefore there will be multiple app ids and provisioning profiles that will need to be created. It’s a drawback, but one well worth the costs. I hate when I want to show off the app to someone but build I have on the device is buggy development version. Or when tester is trying to show me bug he/she found, but I haven’t got the same build as he/she does, on my device. All that is gone with multiple bundle ids setup. I also like to render version and build numbers (more…)
#Blog posts, #Coding, #iOS Development

Pluto + Charon wallpaper setup

July 15, 2015
I am super exited about New horizons mission, what it represents and what it stands for. I can’t wait for proper hight resolution images. As of now, the best what we have is 1024 x 1024 pixels image of Pluto and 1050 × 794 image of Charon. Pluto it is for my 4K screen and Charon for retina macbook pro ! (more…)
#Blog posts, #Science