Question

I am using Pixate to style my views. My whole application works with storyboards. My App is an iPad only app.

I have a valid Pixate licenseKey and I am setting this up in the main:

int main(int argc, char * argv[])
{
    @autoreleasepool {
        [Pixate licenseKey:@"<my pixate license key>" forUser:@"<my email address>"];
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([WHVVAppDelegate class]));
    }
}

When I launch the app for the very first time on a device, the views have no styling from Pixate. When I then kill the app, and then I launch it again Pixate will start working.

When I saw this happening, I tried to call [Pixate updateStylesForAllViews]; in the [viewDidAppear:] method of my very first view of my app. But the results remain the same.

Anyone familiar with this problem? How could I troubleshoot further from here?

No correct solution

OTHER TIPS

Have you tried running on device but without Testflight, just to rule that out?

Make sure you have this somewhere in your app delegate's didFinishLaunchingWithOptions

self.window.styleMode = PXStylingNormal;

Another thing to check is if you are using live CSS editing. If so, make sure you wrap that code with a condition that makes it only run in the Simulator. Otherwise, your on-device build will try to find your CSS file using your Mac's file path (which it won't find).

#if TARGET_IPHONE_SIMULATOR || TARGET_IPAD_SIMULATOR
  [Pixate styleSheetFromFilePath:@"../../default.css" withOrigin:PXStylesheetOriginApplication];
  Pixate.currentApplicationStylesheet.monitorChanges = YES;
#endif

I hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top