kyleroche/Professional_iOS_AugmentedReality — Issue #4: Chapter 11 Issue
Author: mfanto
Created: 2012-02-06 22:30:10+00:00
State: open

I've been working through your book, it's tremendous by the way, but I'm having some difficulties with Chapter 11. I've successfully built the application while following along. I've also grabbed the source from here. When I run the application while connected to XCode, it works fine for a bit. After a minute of using it, the app will stop displaying the label. (This is before the social integration). I am testing with an iPhone 4G, running iOS 4.3.3. Perhaps it's an iOS issue?

I've added debug statements in various spots of the code. I see that the point is still in the viewport
(if ([self viewportContainsCoordinate:item]) is true, and it's reaching the line to add the annotation: [rootViewController.view addSubview:viewToDraw], both in ARController.m. But it just eventually stops displaying the annotation.

There's no exceptions being thrown, the heading and location continues to update, everything seems fine except the labels just disappear. It also happens quite a bit more frequently if not connected to XCode. Closing/opening the app does not seem to make a difference. I just tried one final time, disconnected from XCode. The label showed properly for about 10 seconds. I rotated the device from portrait to landscape, and back again. The label no longer shows. I fully closed the app, re-opened, and it's still not displaying the label.

My first guess is I'm leaking memory somewhere. But after running the app for an extended period of time while debugging, I see no memory warnings or anything.

I apologize if this isn't the best place for issues. If I should post elsewhere, please let me know. Thanks again.