在使用 Xcode 5.0.2 构建 IBMAppCenter 应用程序后,
不幸的是,在 iPhone 上运行 .ipa 时它不起作用。
单击打开的应用程序时,会显示启动图像几秒钟,然后关闭而不会引发错误。
这是一个已知错误吗?
在使用 Xcode 5.0.2 构建 IBMAppCenter 应用程序后,
不幸的是,在 iPhone 上运行 .ipa 时它不起作用。
单击打开的应用程序时,会显示启动图像几秒钟,然后关闭而不会引发错误。
这是一个已知错误吗?
确保您已遵循有关如何为 iOS 7 启用 AppCenter 应用程序的说明,详见以下 IBM 技术说明:http ://www-01.ibm.com/support/docview.wss?uid=swg27039574
我什至会说要确保您运行的是正确版本的 Worklight。
请仔细阅读技术说明。
复制粘贴:
启用 Application Center 客户端
完成以下步骤以使您的 Application Center 客户端能够在 iOS 7 上运行:
如文档所述,将 App Center 项目导入 Eclipse。
使用 Worklight Studio 向导创建另一个 Worklight 项目并添加一个 iPhone 环境。
将apps/appName/iphone/native/WorklightSDK/libWorklightStaticLibProject.a
文件复制到 App Center 项目。使用相同的名称覆盖现有文件。
CDVMainViewController
在Worklight 生成的类 ( CDVMainViewController.m
)中添加以下代码。此代码处理 iOS 7 状态栏设计更改。
- (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]; }