Software Archive
Read-only legacy content
17061 Discussions

Problem while building application with dummy plugin to impact Android - iOS Manifest

Javad_Ahmadzadeh
Beginner
660 Views

Hi there ,

I'm trying to add Ubertesters library to my project , they had built up an SDK for cordova which is accessible in http://ubertesters.com/sdk-cordova/ , in one its steps I've to add the token string into my Android Manifest and iOS plist file which is impossible because they will build in cloud. I made a ticket in their portal and finally they returned me the https://software.intel.com/en-us/xdk/faqs/general#android-manifest , regarding to that guide I've made a plugin (which is attached to the topic) and added that to my project with no problem BUT at the time of build it return some fuzzy error (which is attached as Screenshot)

What shall I do to make it possible in both iOS and Android format !?

Thanks
Javad

0 Kudos
1 Solution
Swati_S_Intel1
Employee
660 Views

Hello Javad, the plugin issue on iOS has been fixed in the build system. Please try your build again, it should work now, I've verified the build with your plugin.

View solution in original post

0 Kudos
13 Replies
PaulF_IntelCorp
Employee
660 Views

@Javad -- your plugin looks to me like it should work, the "parent" attribute could be an issue (I'm not sure). I find it confusing that the other two plugins, which are standard plugins needed for a Crosswalk build under CLI 5.1.1, also failed...

Are you able to successfully build with this plugin if you do a standard Android build, rather than a Crosswalk build?

BTW, you can add the Android permissions to your build using the "Add Permissions" input field at the bottom of the Build Settings on the Projects tab.

It seems to me that ubertesters could be using the "Variables" feature of the plugin.xml file to deal with the last bit, where you need to add your ubertesters key. Tell them to look at this: http://docs.phonegap.com/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_variables

0 Kudos
Javad_Ahmadzadeh
Beginner
660 Views

Dear Paul ,

Thanks for your reply , here is my last test result with Pure Android Build (I mean without Crosswalk) which contains Error too !

My problem is not about adding permissions into configs , its all about impacting final config files such as Android Manifest and iOS plist files , I've asked about this issue from Ubertesters Support Team and its their final answer ...

The technical team analyzed the configuration file - there is no evidence that the plugin is failed to be created due to adding Ubertesters data. We recommend you to check Intel XDK forums or contact their support to find out the exact reason why the plugin is failed to be created and check the other ways to modify the configuration files in order to add the token.

...

At the moment there is no way to add the organisation token in another way than mentioned in the SDK guides.

Now what shall I do !?

0 Kudos
PaulF_IntelCorp
Employee
660 Views

The thing that is confusing about your image is that the error is with two OTHER plugins. As the ubertesters note, their plugin worked (it was installed, according to the build summary). If you remove their plugin, do you still get this error? If so, there's something about their plugin that is causing a conflict with those other two plugins, or it could be that adding that ubertesters plugin is causing a failure to add any additional plugins...

0 Kudos
Javad_Ahmadzadeh
Beginner
660 Views

There is no problem with Ubertesters SDK because its tested on other platforms such as PhoneGap , even when it is added to project it does not fire up any problem BUT when I import my custom plugin (which is attached to my first post) it make errors. In the other hand there is no way give the plugin its information by "Variables" feature as they say ...

It is impossible to use the API key method due to system particularities. The organization token should be written in the manifest file so the system can detect which organization the build belongs to. 
Please make sure you've followed  all the Intel XDK instructions when compiling the build.
Really how can I Impact Android Manifest and iOS plist file ??
0 Kudos
PaulF_IntelCorp
Employee
660 Views

Javad -- I would clone their plugin and then make the changes you have outlined in your custom plugin directly in their plugin.xml file. Then add that modified plugin as a "local" plugin using the Intel XDK plugin manager. Let me know how that goes.

0 Kudos
Javad_Ahmadzadeh
Beginner
660 Views

Dear Paul , Its impossible to clone the plugin.xml files ! The desired configs MUST be in Android Manifest and iOS plist files not other files. Really is not there any way to impact Android Manifest and iOS plist files ?? I'm sure its a huge problem in Intel XDK which is not exists in other platforms such as PhoneGap , How can we report such problems !? I had a discussion with "kathy.a.farrel [AT] intel" but after reporting the problem she got disappeared !!

0 Kudos
PaulF_IntelCorp
Employee
660 Views

Javad -- it is true that you do not have direct access to the Android manifest and iOS plist files, due to the fact that the build system is cloud-based. If they have a version of this plugin that works with PhoneGap Build I'd like to see it, because PhoneGap Build has exactly the same issue.

When I looked, last, it appeared to me that the changes they need to make to the manifest and plist can be accomplished using the standard plugin.xml directives. So my advice was that you clone their plugin into a directory on your system. Then make your plugin.xml changes in the plugin.xml file inside that cloned plugin. Then include that "local" plugin in your project using the plugin manager "add a third-party" plugin feature (select "local" when you do that). This will allow you to include a modified version of their plugin. My reason for doing it this way was to eliminate whatever conflict was appearing.

I hope this clarifies what I am recommending. I believe that what you did in your custom plugin should resolve the issue, but there may be some conflicts with other plugins, thus the suggestion that you customize their plugin with your changes and try doing it that way.

I'm very sorry that you do not have direct access to the mainifest and plist files, this is a consequence of moving the build system to the cloud. If it turns out that my recommendation does not work, it may be that you can only use a local CLI to build your app using this particular plugin. Unfortunately, there are a few plugins that are simply not compatible with a cloud-based build system, and this may be one of them, but I believe it can be resolved based on my original recommendations.

0 Kudos
Javad_Ahmadzadeh
Beginner
660 Views

Dear Paul , HERE you may find out about the Ubertesters official plugin for Cordova/PhoneGap . If I want to do so in Intel XDK platform , What should I do !?

0 Kudos
PaulF_IntelCorp
Employee
660 Views

Javad -- I'll take a closer look when I return from vacation in January.

0 Kudos
Javad_Ahmadzadeh
Beginner
660 Views

Dear Paul , I'm still looking for an answer. It's amazing and a bit shameful that there no support team within Intel XDK team to fix these kind of strange problems. It's almost couple of months that I've reported this funny problem BUT nothing happened. In such case I LOVE Apple support team with their amazing XCode.

0 Kudos
Swati_S_Intel1
Employee
660 Views

Hi Javad, I was able to build an app using your plugin, I've sent you a detailed email. 

0 Kudos
Swati_S_Intel1
Employee
660 Views

Hello Javad,

I'm not sure if you saw the solution in the email. I'm posting here for benefit of others who might face this issue.

1) To make an entry into manifest.xml and info.plist file, create a dummy plugin.xml with the following code. Wrap this plugin.xml file in a folder and add this dummy plugin through "local plugin" in the plugin manager.

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
-->

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
    xmlns:rim="http://www.blackberry.com/ns/widgets"
    xmlns:android="http://schemas.android.com/apk/res/android"
    id="dummy-plugin"
    version="1.0.0">
    <name>dummy</name>
    <description>Cordova dummy Plugin</description>
    <license>Apache 2.0</license>
    <keywords>cordova,dummy</keywords>

    <engines>
            <engine name="cordova" version=">=3.0.0" />
    </engines>


    <platform name="android">
        
        <config-file target="AndroidManifest.xml" parent="/*">
            <meta-data android:name="ubertesters_organization_token" android:value="19529c9c-6c30-11e5-8416-22000a9127ac" />
        </config-file>

    </platform>


	<platform name="ios">

		<config-file target="*-Info.plist" parent="/*">
		    <array>
		        <dict>
		            <key>ubertesters_organization_token</key>
		            <string>19529c9c-6c30-11e5-8416-22000a9127ac</string>
		        </dict>
		    </array>
		</config-file>
	
    </platform>

</plugin>

When you build your app, this will make appropriate entry in the manifest.xml (Android) and info.plist (iOS).

2) The plugin https://github.com/Ubertesters/cordova-ubertesters.git fails to install for iOS since the plugin developer has not included armv7s slice in the static library. Our current iOS build system uses cordova-ios 3.8.0 and it requires armv7s, with cordova-iOS 4.0 this problem will not happen which is sketched out for future releases. For now, we are looking into providing  a workaround for this issue but, it would be best for the plugin developer to add the arm7s architecture in the plugin.

0 Kudos
Swati_S_Intel1
Employee
661 Views

Hello Javad, the plugin issue on iOS has been fixed in the build system. Please try your build again, it should work now, I've verified the build with your plugin.

0 Kudos
Reply