IBM Worklight 6.0 - App Center on iOS7 fails to open

南笙酒味 提交于 2019-12-11 08:01:01

问题


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:


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];
    }
    


来源:https://stackoverflow.com/questions/20427310/ibm-worklight-6-0-app-center-on-ios7-fails-to-open

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!