【发布时间】:2015-09-24 21:55:14
【问题描述】:
我正在使用 Cordova 平台来创建 iO、Android 和 Windows 应用程序。我尝试了解有关 Cordova 的所有信息,并且我认为自己非常擅长使用该工具。
在我将 xCode 6.4 升级到 7 后,我遇到了一个问题。当我尝试在终端中构建我的 iOs 应用程序时,就会出现问题。我在这个错误中遇到了一个错误,创建了一些额外的冲突,再次查看构建:
// 错误 AppDelegate.m:138:1:警告:实现中的返回类型冲突 'application:supportedInterfaceOrientationsForWindow:': 'UIInterfaceOrientationMask'(又名'enum UIInterfaceOrientationMask')与'NSUInteger'(又名'unsigned int') [-Wmismatched-return-types] // 错误
我看了很多论坛还是找不到解决办法。 有人可以帮我解决这个问题吗?
【问题讨论】:
-
这只是一个警告,不应该破坏任何东西。它已被修复并将包含在下一个 cordova 版本中,但您可以编辑 AppDelegate 第 138 行并使其返回 UIInterfaceOrientationMask 而不是 NSUInteger
-
我不会写 Objetive-C。你能帮我打补丁吗?
-
只需转到第 138 行并将 NSUInteger 切换到 UIInterfaceOrientationMask
-
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(nullable UIWindow *)window NS_AVAILABLE_IOS(6_0);我做了,但错误仍然存在!
-
谢谢jcesarmobile,我找到了我一一尝试的所有NSUInteger,并修复了错误。我觉得一切都很好。
标签: ios cordova cordova-ios