- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I wanted to clarify the restriction the XDK enforces on the location of custom (local) plugins. When I try to import a local plugin outside of the www folder, I get the error: "Please choose a path within the project directory." This is okay other than the fact that when the app is built, the source code is included in plain text of the build which gets distributed (in the www dir). Other imported plugins get put into the /App/plugins directory (which makes sense) but it seems the XDK is enforcing local plugins to be inside the "source" /App/www directory instead of just the project "/App" or "/App/plugins" directories.
The directory structure of the application is:
>App
>plugins
>com.apache.cordova.plugins
>www
>index.html
I would love to hear the reason behind this or if it is simply a bug. If it is an error, it would be great to see it fixed whenever there is a new release (jut wanted to bring your attention to it).
Thanks so much,
David
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's not a bug.
The fact that you see that plugins directory alongside (not inside) the www directory is the bug (its use is actually slated for a future version, at the moment it is only being used by the Emulate tab). In a future version all of your plugins will end up in that project-dir/plugins directory and you won't have to store local plugins inside your www directory. When that future version becomes available, the plugins your app uses will be gathered from that project-dir/plugins directory and shipped to the build system, along with the source to your app that is stored in the www directory.
The current system, which requires that your local plugins be located inside the www directory, is not a good long term solution and we understand that this is not optimal. Moving to the new model requires some changes to the build system and how the XDK and the build system interact. When all that work is done you'll see a much cleaner system for handling local plugins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks as always for your helpful answer, Paul.
I totally understand that any change to this will require some tinkering with how the XDK and build system interact and which files are zipped and sent over for building. I suppose with this change, there will also be the opportunity to make sure the the .mobileprovision files needed for iOS are also not required to be in the www/ directory that ends up in the app. The plugin source code and mobile provision files certainly shouldn't be sent along to the end users in the final build.
I have no immediate concern with this but I am happy its on your radar.
Thanks!
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regarding the provisioning files, we also have some work in progress that will change the way certificates are handled by the build system that should alleviate that problem and make it easier for developers to modify, update and control the certificate files that get used as part of the build. Unfortunately, I am not able to tell you when these features will be available. :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Understood. Both of these were just something unusual that i wanted to point out. Glad it is being looked at - i totally understand that this isn't a top priority so no ETA needed :)
Out of curiosity (but not wanting to step on anyone's toes), is there a reason this fix is not as simple as zipping the application root directory and using all the paths specified for plugins, provisioning profiles, icons, etc. as being relative to the root project directory and all JS/HTML files as relative to the (also specified) www/ directory?
All the best,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There can be lots of temp files and other non-essential (but large) files in the project directory that end up creating a very large bundle to send to the build system. The build system can handle large files, but we have lots of developers with slow network connections, so keeping the size of the bundle that is shipped to the build system smaller is better, it avoids long delays in the overall build process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Understood. My assumption was that the root of the project directory gets included anyway since that's where the intelxdk.config.platform.xml files live. I guess only the relevant config file gets sent along instead of the whole set. That makes sense. Seems like that config will have to be processed client side to dynamially select and include just the relevant plugin folders and profiles before each build so as to not include any of those other temp files from the project root (though I don't see any temp files in my projects). Thank you for clarifying and satisfying my curiosity on this :) I hope this does eventually get cleaned up and I appreite the explanation, expertise, and hard work that goes into the XDK.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page