Worklight 6.1 swift 1.2支持

时间:2015-07-14 14:42:23

标签: ios swift ibm-mobilefirst

我正在开发一个已经在worklight 6.1服务器上构建和部署适配器的项目,我必须使用最新版本的Swift开发一个应用程序来使用这些适配器。

我正在尝试将原生API添加到项目中,然后从本机应用程序连接到服务器但是当我调用WLCliend.WLConnectWithDelegate(self)时我得到了这个错误:

> 2015-07-14 17:35:58.782 iOSNativeAPI[46479:353823] [ERROR]
> [WORKLIGHT]: Cannot find Cookies.mom file 2015-07-14 17:35:58.789
> iOSNativeAPI[46479:353823] *** Terminating app due to uncaught
> exception 'NSInvalidArgumentException', reason: 'Cannot create an
> NSPersistentStoreCoordinator with a nil model'
> *** First throw call stack:

我的问题是,这有什么与项目在swift和6.1中的服务器有关吗?因为6.1服务器没有生成桥接头文件,所以我必须自己创建它。

worklight服务器6.1也适用于swift 1.2吗? 如果是的话可能导致这个错误?

修改

这里是桥接头文件:(我从使用7.0版本生成的文件中提取它并提示未找到的文件)

/*
* Licensed Materials - Property of IBM
* 5725-I43 (C) Copyright IBM Corp. 2006, 2014. All Rights Reserved.
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
#import "AbstractAcquisitionError.h"
#import "AbstractGeoAreaTrigger.h"
#import "AbstractGeoDwellTrigger.h"
#import "AbstractPosition.h"
#import "AbstractTrigger.h"
#import "AbstractWifiAreaTrigger.h"
#import "AbstractWifiDwellTrigger.h"
#import "AbstractWifiFilterTrigger.h"
#import "AcquisitionCallback.h"
#import "AcquisitionFailureCallback.h"
#import "BaseChallengeHandler.h"
#import "BaseDeviceAuthChallengeHandler.h"
//#import "BaseProvisioningChallengeHandler.h"
#import "ChallengeHandler.h"
//#import "JSONStore.h"
//#import "JSONStoreAddOptions.h"
//#import "JSONStoreCollection.h"
//#import "JSONStoreOpenOptions.h"
//#import "JSONStoreQueryOptions.h"
//#import "JSONStoreQueryPart.h"
#import "OCLogger.h"
#import "WLAcquisitionFailureCallbacksConfiguration.h"
#import "WLAcquisitionPolicy.h"
//#import "WLAnalytics.h"
#import "WLArea.h"
//#import "WLAuthorizationManager.h"
#import "WLCallbackFactory.h"
#import "WLChallengeHandler.h"
#import "WLCircle.h"
#import "WLClient.h"
#import "WLConfidenceLevel.h"
#import "WLCookieExtractor.h"
#import "WLCoordinate.h"
#import "WLDelegate.h"
#import "WLDevice.h"
#import "WLDeviceAuthManager.h"
#import "WLDeviceContext.h"
#import "WLEventSourceListener.h"
#import "WLEventTransmissionPolicy.h"
#import "WLFailResponse.h"
#import "WLGeoAcquisitionPolicy.h"
#import "WLGeoCallback.h"
#import "WLGeoDwellInsideTrigger.h"
#import "WLGeoDwellOutsideTrigger.h"
#import "WLGeoEnterTrigger.h"
#import "WLGeoError.h"
#import "WLGeoExitTrigger.h"
#import "WLGeoFailureCallback.h"
#import "WLGeoPosition.h"
#import "WLGeoPositionChangeTrigger.h"
#import "WLGeoTrigger.h"
#import "WLGeoUtils.h"
#import "WLLocationServicesConfiguration.h"
#import "WLOnReadyToSubscribeListener.h"
#import "WLPolygon.h"
#import "WLProcedureInvocationData.h"
#import "WLProcedureInvocationResult.h"
#import "WLPush.h"
#import "WLPushOptions.h"
//#import "WLResourceRequest.h"
#import "WLResponse.h"
#import "WLResponseListener.h"
//#import "WLSecurityUtils.h"
//#import "WLSimpleDataSharing.h"
#import "WLTriggerCallback.h"
#import "WLTriggersConfiguration.h"
//#import "WLTrusteer.h"
//#import "WLUserCertAuth.h"
#import "WLWifiAccessPoint.h"
#import "WLWifiAccessPointFilter.h"
#import "WLWifiAcquisitionCallback.h"
#import "WLWifiAcquisitionPolicy.h"
#import "WLWifiConnectTrigger.h"
#import "WLWifiConnectedCallback.h"
#import "WLWifiDisconnectTrigger.h"
#import "WLWifiDwellInsideTrigger.h"
#import "WLWifiDwellOutsideTrigger.h"
#import "WLWifiEnterTrigger.h"
#import "WLWifiError.h"
#import "WLWifiExitTrigger.h"
#import "WLWifiFailureCallback.h"
#import "WLWifiLocation.h"
#import "WLWifiTrigger.h"
#import "WLWifiVisibleAccessPointsChangeTrigger.h"

1 个答案:

答案 0 :(得分:2)

在Swift 1.2中实现您的应用程序(这对您来说很棒!)和您的服务器之间没有任何联系。服务器并不关心编写应用程序的编程语言。

是的,您确实应该在Worklight 6.1中实现自己的桥接头文件。在以后的版本中,将为您提供此桥接文件。后来的版本= MobileFirst Platform 7.0。

我们鼓励您从Worklight 6.1升级到MobileFirst 7.0。

另请注意,cookies.mom已被弃用且已不再使用,但我相信在6.1中它仍然在使用中,所以现在我的猜测是它可能是您的桥接标题可能有问题或者您的实现。你能提供这些吗?