Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4297E9810 for ; Tue, 7 Feb 2012 00:48:54 +0000 (UTC) Received: (qmail 82801 invoked by uid 500); 7 Feb 2012 00:48:54 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 82774 invoked by uid 500); 7 Feb 2012 00:48:53 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 82766 invoked by uid 99); 7 Feb 2012 00:48:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 00:48:53 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FRT_ADOBE2,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alunny@gmail.com designates 74.125.82.43 as permitted sender) Received: from [74.125.82.43] (HELO mail-ww0-f43.google.com) (74.125.82.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 00:48:46 +0000 Received: by wgbdr13 with SMTP id dr13so15559775wgb.0 for ; Mon, 06 Feb 2012 16:48:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=TtUIRN6jbCcLyhrob8Rpvj1LOfzRRp0bqKjC+E+rROk=; b=OvyK/BL85cUO0q3RccBTW4/Anhmi0yWHI7MCmq4KXhB8iTpXwtTwGCFwMfMRcRk+Fp 1BDWlyO8bIj4nvr6g1dBJlIBqvA/IUzhTOZiNAGcauEcTZ3DnlAjCWuuBzBftx849Meq sIVTeV/4vlJnr7JJibT6fK8y9/Q75DgkgssVc= MIME-Version: 1.0 Received: by 10.180.92.73 with SMTP id ck9mr30918918wib.2.1328575706681; Mon, 06 Feb 2012 16:48:26 -0800 (PST) Received: by 10.216.168.12 with HTTP; Mon, 6 Feb 2012 16:48:26 -0800 (PST) Reply-To: alunny@gmail.com In-Reply-To: References: Date: Mon, 6 Feb 2012 16:48:26 -0800 Message-ID: Subject: Re: Plugins: Packaging/Installation/Manifests and whatnot From: Andrew Lunny To: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=f46d043892c50dd30c04b85523e9 X-Virus-Checked: Checked by ClamAV on apache.org --f46d043892c50dd30c04b85523e9 Content-Type: text/plain; charset=ISO-8859-1 Update: The pluginstall script - https://github.com/alunny/pluginstall - now installs (simple) iOS plugins as well as Android. There are three steps to installing an iOS plugin: 1. move some files around 2. modify the PhoneGap.plist file 3. modify the XCode project file (App.xcodeproj/project.pbxproj) 1 and 2 are trivial (although the Node library for manipulating plist files does need some love). 3 right now depends on a separate library I've developed - https://github.com/alunny/node-xcode - that parses an XCode project file into a JavaScript object. This object can then be easily modified, and written back out. The node-xcode project is not very mature, and will need enhancements to deal with the full range of PhoneGap plugins. My next step is to modify a fork of the ChildBrowser plugin, to allow for cross-platform deployment of the same JavaScript file (there are some fiddly inconsistencies between Android and iOS there). I'll then have a screencast/demo available of how the whole process works. On 24 January 2012 13:19, Filip Maj wrote: > > On 24 January 2012 09:55, Filip Maj > > wrote: > > Can you explain the two nodes in your example plugins.xml ? What > is the difference between the two elements? Lines 8-9. > > "The first tag is pointing to the js file, the second to a directory also > called "childbrowser" that needs to be moved into the project's www > directory." > > Gotcha! > > > >... > >A couple of open issues: > >* the current format doesn't have a mechanism for specifying that one > >plugin depends on another, which will be necessary > >* there's no way to specify a dependency on an external library - for > >example, a separate framework on iOS. I will investigate options as I > >begin > >work on the iOS side of the code. > > Could we use what mechanisms already exist in package.json to figure this > out? Maybe add an extension to this? It'd be nice to be able to feature > phonegap plugins and other tools in NPM, and it seems we're going the > route of node anyways for our CLI stuff. > > > It's definitely something we should feel out as phonegap-js and the plugin > tooling progress, particularly for plugin distribution. I think having this > kind of manifest file and a package.json is not out of the question, if > they're doing two very different things. > > At this stage, I'm focused on the plugin installation - with the > assumption that all the code is available locally. If you assume all the > code is there on the filesystem, package.json and the npm infrastructure > don't really benefit us. The goal right now is to encode all this > information: > > > https://github.com/phonegap/phonegap-plugins/blob/master/Android/ChildBrowser/README.md > > in a format that can easily be manipulated by software and humans. > > ^^ This is key. I'm thinking some extensions to either xml/json format we > end up on over what's already "in place" (a la NPM or even a similar sort > of extensions employed by Nodejitsu). > > It'd be a little ugly to have two config files in the root of the plugin, > but it keeps things simple (non-intertwined), especially while we're > prototyping this stuff. > > That's my concern, is that if we go down the rabbit hole without thinking > about all the aspects of the cordova project this affects we could end up > with a sub-par solution. > > ;/ > --f46d043892c50dd30c04b85523e9--