I'm building our BB10 environment in Worklight using two different ways.
我正在使用两种不同的方式在Worklight中构建我们的BB10环境。
1- Through Eclipse IDE:
1-通过Eclipse IDE:
The config.xml in the native folder which has been generated after building the environment contains all the feature that we need in our project.
构建环境后生成的本机文件夹中的config.xml包含我们项目中需要的所有功能。
<?xml version='1.0' encoding='utf-8'?>
<widget id="MobileBanking" version="1.0.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" rim:backButton="exit">
<name>Mobile Bank</name>
<author email="support@company.com">company</author>
<description>
Mobile Bank
</description>
<license href="http://opensource.org/licenses/alphabetical">
</license>
<access subdomains="true" uri="file:///store/home" />
<access subdomains="true" uri="file:///SDCard" />
<!-- start_worklight_host_server do not change this line-->
<access subdomains="true" uri="https://mobile-qa.company.ca" />
<!-- end_worklight_host_server do not change this line-->
<access subdomains="true" uri="tel://*"/>
<access subdomains="true" uri="http://google.com"/>
<access subdomains="true" uri="http://maps.googleapis.com"/>
<access subdomains="true" uri="http://googleapis.com"/>
<access subdomains="true" uri="http://maps.gstatic.com"/>
<access subdomains="true" uri="http://fonts.gstatic.com"/>
<access subdomains="true" uri="http://csi.gstatic.com"/>
<access subdomains="true" uri="https://www.company.com/*" />
<!-- <access subdomains="true" uri="*" /> -->
<icon src="icon.png" />
<rim:splash src="splash-1024x600.png" />
<rim:splash src="splash-600x1024.png" />
<rim:splash src="splash-1280x768.png" />
<rim:splash src="splash-768x1280.png" />
<content src="webresources/skinLoader.html" />
<rim:permissions>
<rim:permit>read_device_identifying_information</rim:permit>
<rim:permit>access_shared</rim:permit>
<rim:permit>read_geolocation</rim:permit>
<rim:permit>access_pimdomain_contacts</rim:permit>
<rim:permit>access_pimdomain_messages</rim:permit>
<rim:permit>access_location_services</rim:permit>
</rim:permissions>
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
<preference name="Orientation" value="portrait"/>
<preference name="ChildBrowser" value="disable"/>
<preference name="AutoHideSplashScreen" value="false"/>
<preference name="WebSecurity" value="enabled" />
<feature id="blackberry.invoke" name="blackberry.invoke" value="blackberry.invoke" />
<feature id="blackberry.app" name="blackberry.app" value="blackberry.app" />
<feature id="com.blackberry.utils" name="com.blackberry.utils" />
<feature id="com.blackberry.pim.lib" name="com.blackberry.pim.lib" />
<feature id="Battery" name="Battery" value="Battery" />
<feature id="Camera" name="Camera" value="Camera" />
<feature id="Contacts" name="Contacts" value="Contacts" />
<feature id="Device" name="Device" value="Device" />
<feature id="Accelerometer" name="Accelerometer" value="Accelerometer" />
<feature id="Compass" name="Compass" value="Compass" />
<feature id="Notification" name="Notification" value="Notification" />
<feature id="org.apache.cordova.file" name="File" value="File" />
<feature id="FileTransfer" name="FileTransfer" value="FileTransfer" />
<feature id="Geolocation" name="Geolocation" value="Geolocation" />
<feature id="Media" name="Media" value="Media" />
<feature id="Capture" name="media-capture" value="Capture" />
<feature id="NetworkStatus" name="NetworkStatus" value="NetworkStatus" />
<feature id="SplashScreen" name="SplashScreen" value="SplashScreen" />
<feature id="Vibration" name="Vibration" value="Vibration" />
</widget>
2- When I use Ant Worklight Builder, the generated native folder for BB10 contains the following config.xml:
2-当我使用Ant Worklight Builder时,为BB10生成的本机文件夹包含以下config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="MobileBank" version="1.0.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" rim:backButton="exit">
<name>MobileBank</name>
<author email="support@company.com">company</author>
<description>
MobileBanking
</description>
<license href="http://opensource.org/licenses/alphabetical">
</license>
<access subdomains="true" origin="file:///store/home" />
<access subdomains="true" origin="file:///SDCard" />
<!-- start_worklight_host_server do not change this line-->
<access subdomains="true" origin="https://mobile-qa.company.ca" />
<!-- end_worklight_host_server do not change this line-->
<access subdomains="true" origin="*" />
<icon src="icon.png" />
<rim:splash src="splash-1024x600.png" />
<rim:splash src="splash-600x1024.png" />
<rim:splash src="splash-1280x768.png" />
<rim:splash src="splash-768x1280.png" />
<content src="webresources/skinLoader.html" />
<rim:permissions>
<rim:permit>read_device_identifying_information</rim:permit>
<rim:permit>access_shared</rim:permit>
<rim:permit>read_geolocation</rim:permit>
<rim:permit>access_pimdomain_contacts</rim:permit>
</rim:permissions>
</widget>
All the feature tags disappear using Ant builder.
所有功能标签都使用Ant构建器消失。
Worklight Ant task version 6.2.0.01.20150329-1923
Worklight Ant任务版本6.2.0.01.20150329-1923
WebWorks SDK version 2.2.0.15.
WebWorks SDK版本2.2.0.15。
I tried Windows and Mac. got same result. Thank you.
我试过Windows和Mac。结果相同。谢谢。
1 个解决方案
#1
See this blog post: https://developer.ibm.com/mobilefirstplatform/2015/03/05/ootb-support-blackberry-webworks-2-2/
请参阅此博客文章:https://developer.ibm.com/mobilefirstplatform/2015/03/05/ootb-support-blackberry-webworks-2-2/
I've created an application with the BlackBerry 10 environment two times: using The WebWorks 1.0 SDK and the WebWorks 2.2 SDK. The difference in config.xml is due to the SDK used.
我已经两次使用BlackBerry 10环境创建了一个应用程序:使用WebWorks 1.0 SDK和WebWorks 2.2 SDK。 config.xml的不同之处在于使用了SDK。
- The Worklight builder will create the first config.xml if your environment variable for WEBWORKS_HOME is pointing to WebWorks 1.0.
- The Worklight builder will create the second config.xml if your environment variable for WEBWORKS_HOME is pointing to WebWorks 2.2.
如果WEBWORKS_HOME的环境变量指向WebWorks 1.0,Worklight构建器将创建第一个config.xml。
如果WEBWORKS_HOME的环境变量指向WebWorks 2.2,Worklight构建器将创建第二个config.xml。
This means that your Studio and Ant .jar file are not of the same version Worklight.
Get the latest iFix from IBM Fix Central; to get the Ant .jar I believe that you will need to extract the Server installation to get it.
这意味着您的Studio和Ant .jar文件与Worklight的版本不同。从IBM Fix Central获取最新的iFix;获取Ant .jar我相信您需要提取服务器安装才能获得它。
#1
See this blog post: https://developer.ibm.com/mobilefirstplatform/2015/03/05/ootb-support-blackberry-webworks-2-2/
请参阅此博客文章:https://developer.ibm.com/mobilefirstplatform/2015/03/05/ootb-support-blackberry-webworks-2-2/
I've created an application with the BlackBerry 10 environment two times: using The WebWorks 1.0 SDK and the WebWorks 2.2 SDK. The difference in config.xml is due to the SDK used.
我已经两次使用BlackBerry 10环境创建了一个应用程序:使用WebWorks 1.0 SDK和WebWorks 2.2 SDK。 config.xml的不同之处在于使用了SDK。
- The Worklight builder will create the first config.xml if your environment variable for WEBWORKS_HOME is pointing to WebWorks 1.0.
- The Worklight builder will create the second config.xml if your environment variable for WEBWORKS_HOME is pointing to WebWorks 2.2.
如果WEBWORKS_HOME的环境变量指向WebWorks 1.0,Worklight构建器将创建第一个config.xml。
如果WEBWORKS_HOME的环境变量指向WebWorks 2.2,Worklight构建器将创建第二个config.xml。
This means that your Studio and Ant .jar file are not of the same version Worklight.
Get the latest iFix from IBM Fix Central; to get the Ant .jar I believe that you will need to extract the Server installation to get it.
这意味着您的Studio和Ant .jar文件与Worklight的版本不同。从IBM Fix Central获取最新的iFix;获取Ant .jar我相信您需要提取服务器安装才能获得它。