Ad

Our DNA is written in Swift
Jump

Radar: ABUnknownPersionViewController

Apple is introducing a new contacts framework in iOS 9. The do so very aggressively to even replace view controllers from AddressBookUI.framework with their new implementations. Unfortunately not without problems.

Normally I am prefer to keep quiet about bugs in iOS beta versions, but this one affects apps public on the app store which are using this view controller and therefore I felt it necessary to warn my iOS developer colleagues about it. This is the crash I was alluding to on iOS Today.

rdar://21357089 – ABUnknownPersionViewController_modern overreleases CNContactViewController
rdar://21438771 – ABUnknownPersionViewController Regression

ABUnknownPersionViewController_modern overreleases CNContactViewController

Summary

ABUnknownPersionViewController “modern” implementation tries to release an already-released ABUnknownPersionViewController CNContactViewController, the second time it is popped off a navigation controller.

Steps to Reproduce

  1. Present an ABUnknownPersionViewController on a navigation controller
  2. Go back
  3. Present it again
  4. Go back

Expected Results

  • No crash

Actual Results

  • Crash

Enabling Zombies, you get -[CNContactViewController release]: message sent to deallocated instance 0x161aae650 from ABUnknownPersionViewController_modern’s -dealloc.

Crash Stack


ABUnknownPersionViewController Regression

Summary

When presenting an ABUnknownPersionViewController on a UINavigationController there are two visual glitches. This is a regression. Running on iOS 8 or built with the iOS 8 SDK these glitches don’t occur.

Steps to Reproduce

  1. Run the provided sample app on iOS 9 simulator.
  2. Click on the center button

Expected Results

  • the presented view controller should appear, correctly laid out
  • just like in iOS 8

Actual Results

  • before any content of the presented view controller appears, there is a black background visible
  • after a short pause the content appears
  • but it goes behind the navigation bar because it does not obey the topLayoutGuide

Notes

Apparently you changed the internal implementation of ABUnknownPersionViewController to use a controller from the new Contacts framework. Your implementation seems to not take the use case into account which is shown by the sample app.

iOS 8 vs iOS 9

ABUnknownPersionViewController iOS 8 vs iOS 9

The mentioned app for both is the ABUnknownPersionViewControllerBug project on my Radar Samples GitHub repo.


Categories: Bug Reports

Leave a Comment