0

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?

Bocaxica
  • 3,911
  • 3
  • 37
  • 54
  • It appeared to be a problem with a CocoaPod from the company I work for. So the problem was not with the Pixate engine, it was with an internal CocoaPod. This CocoaPod is very specific to the company I work for, and nobody else will use it except our company. The Pixate Engine works fine.. – Bocaxica Feb 14 '14 at 11:03

2 Answers2

0

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

pixatepaul
  • 251
  • 2
  • 5
  • Hi, I can also see the problem in Simulator it doesn't seem to be TestFlight related. I will update the issue above. – Bocaxica Feb 12 '14 at 14:56
  • Hi Paul, it was a problem in an internal CocoaPod that is used in our company. No problem with Pixate. I have voted to close this question. – Bocaxica Feb 14 '14 at 10:54
  • I have the same issue - what CocoaPod was causing the problem for you? – Eric Risler May 09 '14 at 17:50
0

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.

Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
  • Hi, the stylemode doesn't make a difference. I can now also see it in simulator, I realized that when I uninstall the app and then launch it from xcode it will show me the problem in simulator as well. – Bocaxica Feb 12 '14 at 14:54