➞ Catching Leaky View Controllers Without Instruments

Arek Holko:

Now, all we need to do is call dch_checkDeallocation() from viewDidDisappear(_:) in all view controllers (except for those that we keep alive after they’re removed from their parents or dismissed) […] If there’s a leak, we’ll see an assertion failure (only in -Onone builds)

That’s a really clever way to ensure your view controllers are all deallocated.

Introducing MonthlySales

Last Sunday I was checking out my monthly app sales. I use AppFigures for that, but before going to AppFigures I had to check out the Apple Fiscal Calendar. Apple, like most corporations, uses a calendar that slightly differs from the “normal” calendar–it’s off by a few days most of the time. After determining the start and end date of the month, I went to AppFigures, adjusted the sales data for the time period I had just determined and finally could look at my sales numbers.

I do that dance every week, but in this particular week, I just had the urge to do something about it. So I sat down and did what developers do, and wrote an app.

The result is “MonthlySales”, a very simple but efficient app designed to give you an overview over your Apple App Store revenue numbers, adjusted based on the Apple Fiscal Calendar. It’s not on the App Store, but it’s an Open Source app you can find on GitHub. Enjoy!

App Store scam made easy

Johnny Lin:

I scrolled down the list in the Productivity category and saw apps from well-known companies like Dropbox, Evernote, and Microsoft. That was to be expected. But what’s this? The #10 Top Grossing Productivity app (as of June 7th, 2017) was an app called “Mobile protection :Clean & Security VPN”. Given the terrible title of this app (inconsistent capitalization, misplaced colon, and grammatically nonsensical “Clean & Security VPN?”), I was sure this was a bug in the rankings algorithm. So I check Sensor Tower for an estimate of the app’s revenue, which showed… $80,000 per month?? That couldn’t possibly be right. Now I was really curious. I tap into the app details to see that the developer is “Ngan Vo Thi Thuy”. Wait so, this is a VPN service offered by an independent developer who didn’t even bother to incorporate a company? That’s a huge red flag.

Spoilers: it’s a scammy app asking people for a weekly subscription at $99.99, with a one-week “free trial”. Inexperienced users who don’t known how to cancel subscriptions (or just those who forget about them after the free 7 days) will fall for it. And if just a tiny percentage of the users fall for it, it’s a huge win for the scammers. Read the rest of the article, it’s worth it.

I checked to see if this app is also found on the German App Store, and it’s not. It’s not on the US App Store either, so Apple apparently has already taken it down. However there’s an app called “Mobile Protection – Total Clean & Security VPN” by a company called Ancor Software, LLC. Looks like the scammer was piggy-backing on this (legitimate) app. However from experience I can say that app like these don’t seem to show up in the top grossing charts in Germany.

Turns out, scammers are abusing Apple’s relatively new and immature App Store Search Ads product. They’re taking advantage of the fact that there’s no filtering or approval process for ads, and that ads look almost indistinguishable from real results, and some ads take up the entire search result’s first page.

This is likely the reason why this doesn’t seem to happen on the German App Store, at least not at the same scale. There are no search ads here yet, so the 200 Top Grossing apps consist almost completely out of pay-to-win games, dating apps and a few outliers (Things 3, for example, some fitness apps, some navigation apps). The same goes for the Paid and Free Top Charts–no obviously scammy apps, if you don’t include pay-to-win games.

In cases like this, you can help by reporting the scam app. If you have an iTunes Connect account, go to the Contact us form, select “Feedback and Concerns” and “Report a Fraud Concern”.

WWDC 2017 Predictions Revisited

On Friday, I posted my “WWDC predictions” for this year. Let’s see if I was right.

  • iOS 11 and macOS 10.13.
  • Xcode 9 with Swift 4 support.

Duh. These were no-brainers. Passed.

  • Extended SiriKit APIs.

SiriKit has been extended substantially, adding support for Lists and Notes, among several other intents. Passed.

  • A system wide “dark mode” in iOS.

Doesn’t look like it. Now, it may be possible that it actually does include a “dark mode”, and that it’s just hidden until the new iPhones come out in September/October, which supposedly have OLED displays. But for now: Failed.

  • A UI refreshment in iOS, hopefully restoring Buttons to look like Buttons.

The visual style has changed a lot. From what I can tell from the screenshots, it now uses a lot more of these “sheet” kind of layers, TabBar and ToolBar images are a little “fatter” and less “skinny” and there’s the new “big font” NavigationBar-replacement hanging around. Also buttons look a lot more like buttons. Passed.

  • New MacBooks and a shiny new Magic Keyboard.

Nope. A price drop are not new MacBooks. Also no new Magic Keyboard, even though the dark iMac Pro keyboard looks badass (want!). And there’s a new extended (wireless) Magic Keyboard. Still: Failed.

  • Machine learning APIs, like the ones used in the photo apps.

Core ML is exactly this, a machine learning API complete with Deep Learning, Natural Language Processing and all that other stuff. Also “Machine Learning” is the most overused buzzword that I heard in the Keynote (over and over and over again). Passed.

  • Better iPad support in iOS.

It was a long time coming, but they finally delivered. iOS 11 contains better support for the iPad, with better multitasking, a new dock, Drag & Drop, a new “floating window” mode and the new “Files” app. Passed.

  • Changing default apps (web browser, Email client etc) to arbitrary third-party apps in iOS.
  • New Mac Pro. I doubt there will even be an announcement. It’s coming…in 2019.
  • iMessage for Android (el-oh-el).

These three were in the “Unlikely” category, so I won’t grade them. None of them came true, although there was a sneak peek at the iMac Pro. Not the Pro I was thinking of, obviously.

  • A Siri Speaker (Amazon Echo / Google Home competitor).

So it’s out there. It’s called HomePod, it looks great, it seems to work great (hard to judge from a Keynote), it’s Apple-esk expensive, it will be available in December and in English speaking countries only at first. Screw that. I guess I need to keep talking to Alexa.

Five passes, two failed. Not bad. But that really doesn’t matter, because what about my wish?

  • Better tools.

Xcode 9 finally (and I say that in the sincerest way possible) supports refactoring Swift code. And not just renaming, but also things like automatically implement missing protocol requirements, overrides for abstract methods and the ability to extract variables and functions, and much more. That’s a huge win. Supposedly it’s also faster, but that remains to be seen. Also we can finally wirelessly debug apps in the network, without the requirement to connect it to a Mac via cable.

Now where are those download links…?

WWDC 2017 Predictions

Here’s my list of “predictions” for WWDC 2017. I’ve ordered them into very likely, likely, possibly and unlikely. This year is a little harder than usual, because there have been very few leaks and there is little low hanging fruit.

Very likely:

  • iOS 11 and macOS 10.13.
  • Xcode 9 with Swift 4 support.

Likely:

  • Extended SiriKit APIs.
  • A system wide “dark mode” in iOS.
  • A UI refreshment in iOS, hopefully restoring Buttons to look like Buttons.

Possibly:

  • New MacBooks and a shiny new Magic Keyboard.
  • Machine learning APIs, like the ones used in the photo apps. I guess these will be limited at first, but who knows what they’ll come up with.
  • Better iPad support in iOS. Sounds like an odd thing to say, but the iPad has been Apple’s neglected second child in iOS for a while now, and better iPad support was rumoured for last year’s WWDC.

Unlikely:

  • Changing default apps (web browser, Email client etc) to arbitrary third-party apps in iOS.
  • New Mac Pro. I doubt there will even be an announcement. It’s coming…in 2019.
  • iMessage for Android (el-oh-el).

Hard to predict:

  • A Siri Speaker (Amazon Echo / Google Home competitor). There have been rumors, but there are so many engineering problems surrounding this that I can’t say for sure that the thing is real.
  • UIKit for the Mac. This has been rumoured for years, and given the current state of AppKit it’s overdue. Basically Apple could make a UIKit-ish refresh of AppKit, or add a new framework altogether. Obviously both UIKit and AppKit still need a different treatment, because they have very different underlying input paradigms.

Now, what do I wish for WWDC? Regardless whether or not it’s likely:

  • Better tools.
  • Better tools.
  • Did I mention better tools?

Swift is a great language, but the tools are just holding us all back. Compared to other IDEs, Xcode is a mess. The compile times are ridiculous and much functionality is failing at times (syntax highlighting stops to work more often than it should). Also Xcode still lacks even basic refactoring tools for Swift, something that should be a given for any IDE that came out in the last ten years. I realise that Swift is not a high priority for Apple internally, because they are not using it for the important stuff (yet). So there is little inside pressure to make it better. But if they want Swift to get the developer support it deserves, they need to double down on their tools.

➞ Bad Guesses for the Next macOS Name

I think “macOS Yolo County” would be quite funny though.

SKStoreReviewController–it works

In iOS 10.3, Apple introduced new functionality related to App Store reviews. One part of it is the SKStoreReviewController, which displays a popup asking the user to rate your app. These popups have been quite popular for a very long time, but they always had the caveat of redirecting the user to the App Store, leaving your app and disrupting the user’s workflow. With SKStoreViewController, the user picks their rating directly in the app, never leaving it. It’s up to the developer to decide at what point it makes the most sense to show the popup.

A little history. Last year, I’ve released a new version of ID-Photo, an app of mine that I originally developed in 2011. It grew organically over the years, but finally reached a point where further development required a rewrite. So after some back and forth, I rewrote it in Swift from July on, and released it in September. Over the course of about seven months, I released four versions, and had about 32.000 updates and new downloads combined. Here are the worldwide reviews for these four versions (3.1.1 was skipped and never released):

Not a lot, isn’t it? ID-Photo was constantly in the German and US Top 100 Photo & Video apps, so it wasn’t really about exposure. People just didn’t care to review the app, which is fine, I suppose. There’s little incentive to review if everything is OK, but if you encounter a problem, writing a “bad” review is a nice way to blow off some steam. This leads to reviews being skewed towards negative ratings, even though most users are perfectly happy.

In April of this year, I’ve published a new version of ID-Photo, containing a couple of bug fixes and the new SKStoreReviewController. It was an experiment, I didn’t know what to expect. I figured in the worst case I will remove it again, because many people online were already threatening to give 1 star to any app asking for a review. Spoiler: it turned out much better than expected.

In just a little over one month, I’ve collected 52 reviews, most of which were positive. In the German app store, the rating is even better:

None of these reviews have any text associated with them, which means they were very likely obtained via the review controller. Of course there are still some 1 star reviews, but it’s impossible to know if these users where genuinely disappointed with my app, or if they just hated the prompt to review. Given how little there are, I don’t think it’s important for me to find out.

Theoretically, the whole thing would have only taken me three lines of code (four if you count the import of StoreKit):

if #available(iOS 10.3, *) {
  SKStoreReviewController.requestReview()
}

Obviously it’s not that easy. I only show the request after the user used the basic core functionality of the app, namely picking or taking a photo and then creating a passport print. When the user switches back to the main menu, the request is fired. This makes sure that a new user is not immediately “greeted” with a review prompt after opening the app for the first time, and that the user had the opportunity to realise they got their money’s worth. And apparently it’s working. The reviews now paint a much better picture of what the app actually is like and checking out new reviews is a much happier experience for me.

➞ UIDebuggingInformationOverlay

Ryan Peterson:

UIDebuggingInformationOverlay is a private UIWindow subclass created by Apple, presumably to help developers and designers debug Apple’s own iOS apps.

This looks extremely useful.

A new beginning

This is the first post of my new blog. Enjoy!

Impressum | Datenschutz