- September 12, 2015 at 12:34 am #50211
PowerVR SDK 3.5 using XCode 7, targeting iOS 6.1 (and others).
The sample(s) build, but on execution the following happens:
2015-09-11 18:59:27.340 OGLES2Water[1863:58149] *** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3505.16/UIApplication.m:3294
2015-09-11 18:59:27.351 OGLES2Water[1863:58149] *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Application windows are expected to have a root view controller at the end of application launch’
That explains it well enough, the code in AppController.mm has:
Other threads on this related error state that a call to setRootViewController is required, but I’m not sure what complies. _glView doesn’t appear to be acceptable (doesn’t compile if I change the line to
The compiler says EAGLView can’t be the lvalue,
It SEEMS this just requires a simple adjustment – thought someone here might know what qualifies as the UIViewController object in the typical examples provided in PowerVR SDK 3.5 (like Water)September 12, 2015 at 5:07 pm #50218
Update, of a kind:
It seems this may be an iOS 9 issue, not an Xcode 7 issue. Similar inquiry, but at least if we target and build for an iOS 8.x device, the software works. An iOS 9 simulator will crash, even if the build targets older (say, 6.1) versions.September 13, 2015 at 4:53 am #50219
At the risk of talking to myself ( 😉 ) I found AN answer, not sure if it’s really the RIGHT answer, but here’s what worked:
In AppController.h of the sample, the following objective-C interface is declared
@interface AppController : NSObject <UIAccelerometerDelegate>
So, I changed that to:
@interface AppController : UIViewController<UIAccelerometerDelegate>
Then, in AppController.mm, at comment “Create a full-screen window”, where it allocates the _window member, I added:
_window.rootViewController = self;
Now, it launches without complaint or incident.
The reason I think it’s not the RIGHT answer is that it is incomplete. Now, when rotating a device, the display orients in inappropriate ways, probably because it’s not controlled so as to ignore the orientation.
At least it’s a good start.September 14, 2015 at 4:35 pm #50242
Thanks for reporting the issue. I’ll discuss it with the SDK team