Hi there! I just wanted to document changes I had to make to my app to make it compatible with iOS7.
opengl issue:
I received the "There was an opengl error: 0x502" message when running the app, built as an iOS6 app, on iOS7. It gave me the same error even _after_ compiling w/ Xcode5. That issue was fixed after downloading the latest changes from the master branch.
PNG issue:
Also, I can verify that the code below, when applied to Classes/Textures/SPTexture.m at around line 272, fixes the issue where my alpha PNGs (which are part of my game's main texture atlas) were displaying as pixelated opaque images. Great Work!
+ (NSDictionary *)optionsForPath:(NSString *)path mipmaps:(BOOL)mipmaps pma:(BOOL)pma
{
// ... code above
#if TARGET_IPHONE_SIMULATOR
// ... don't change
#else
NSString *osVersion = [[UIDevice currentDevice] systemVersion];
if ([osVersion isEqualToString:@"7.0"])
{
BOOL usePma = pma && [self expectedPmaValueForFile:path];
[options setValue:@(usePma) forKey:GLKTextureLoaderApplyPremultiplication];
}
#endif
FYI, it wasn't immediately obvious to me where to put the status bar hack. I ended up putting the code:
- (BOOL)prefersStatusBarHidden
{
return YES;
}
in the SPViewController.m file.
It would be great if you added an option to "Review" a post before posting it! I've had to edit this post a few times because my grammar sucks 🙂