IBM Worklight 6.0 - App Center on iOS7 fails to open

329 views Asked by At

After building the IBMAppCenter application with Xcode 5.0.2,
When running the .ipa on an iPhone it unfortunately doesn't work.

When clicking the app it opens up, shows the splash image for a few seconds, but then closes without throwing an error.

Is this a known error?

1

There are 1 answers

0
Idan Adar On BEST ANSWER

Make sure that you have followed the instructions on how to enable the AppCenter application for iOS 7, as detailed in the following IBM technote: http://www-01.ibm.com/support/docview.wss?uid=swg27039574

I'd even say to make sure you are running the correct version of Worklight.
Please carefully read the technote.

Copy/paste:

Enable the Application Center Client

Complete the following steps to enable your Application Center Client to run on iOS 7:

  1. Import the App Center project into Eclipse as the documentation states.

  2. Use the Worklight Studio wizard to create another Worklight project and add an iPhone environment.

  3. Copy the apps/appName/iphone/native/WorklightSDK/libWorklightStaticLibProject.a file to the App Center project. Overlay the existing file by using the same name.

  4. Add the following code in the CDVMainViewController Worklight generated class (CDVMainViewController.m). This code handles the iOS 7 status bar design change.

    - (UIStatusBarStyle)preferredStatusBarStyle
    {
      return UIStatusBarStyleLightContent;
    }
    
    - (void)viewWillAppear:(BOOL)animated
    {
    CGFloat version = [[UIDevice currentDevice].systemVersion floatValue];
      if (version >= 7) {
         // iOS 7 or above
         CGRect oldBounds = [self.view bounds];
         CGRect newViewBounds = CGRectMake( 0, -10, oldBounds.size.width,
            oldBounds.size.height-20 );
         CGRect newWebViewBounds = CGRectMake( 0, -20, oldBounds.size.width,
            oldBounds.size.height-40 );
         UIColor *headerColor = 
            [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:1.0f];
         [self.view setBackgroundColor:headerColor];
         [self.view setBounds:newViewBounds];
         [self.webView setBounds:newWebViewBounds];
      } 
      [super viewWillAppear:animated];
    }