Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A15EC17EB5 for ; Wed, 1 Apr 2015 01:53:22 +0000 (UTC) Received: (qmail 17467 invoked by uid 500); 1 Apr 2015 01:53:16 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 17426 invoked by uid 500); 1 Apr 2015 01:53:16 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 17413 invoked by uid 99); 1 Apr 2015 01:53:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2015 01:53:15 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of csantana23@gmail.com designates 209.85.214.181 as permitted sender) Received: from [209.85.214.181] (HELO mail-ob0-f181.google.com) (209.85.214.181) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2015 01:52:50 +0000 Received: by obvd1 with SMTP id d1so56967291obv.0 for ; Tue, 31 Mar 2015 18:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=q9rHBAm3NPn/6HA/vc97ikzOJytDKbT+52JRt9pXfjA=; b=Zq2G5cj4+1PmMTxTs0r43t8dEmJAs7rpi1YbLNcv48j4W4opOjFCuWbwDygGQCfEh2 ri6Wk1IELR8bmiRodRnbr7Tt0pcO02RMZRj259rRV6YNfGOMc7Z/byvXBo6sCi8pHVZD wKbG4GCqPg+19C8T0or2DwYSyWkgoXU1AX1odN79qJEsakyCA0aizdMpkTSMxshgZZNL r+gSVqIhhiizDuQ2UxlDTFzSevYU/SHszSpLoECpIjr0vMDhDwSbQLpC9uxUvlTF2D3I m5d7TN1KZwEb46ulFzrYNkUf/c8CTlCHyGinoEJRSfbNQvyJ/WIm9PA0SQYHDojA5mUv HQYg== MIME-Version: 1.0 X-Received: by 10.182.166.71 with SMTP id ze7mr35407822obb.73.1427853124027; Tue, 31 Mar 2015 18:52:04 -0700 (PDT) Received: by 10.60.103.177 with HTTP; Tue, 31 Mar 2015 18:52:03 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 Mar 2015 21:52:03 -0400 Message-ID: Subject: Re: [iOS] Converting to use Xcode Workspaces (in cordova-ios 4.x) From: Carlos Santana To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=e89a8ff1cf463fcd0305129ff66c X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff1cf463fcd0305129ff66c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable This is great shaz, I will take a look. This is something that have come up internally here in IBM from different groups building native libraries/sdk for mobile services. And for MobileFirst as we find out that there are developers that start native only, and then they want to add a cordova web view (inlcuding plugins) for one of their screens to start adding more web dev into their complex native mobile apps. I will check your branch out and make comments in gihub, I'm curios to see how you are packaging the web parts of the plugin as resources bundle, and then make it available to the web view, it was the only part I didn't have a clear picture how to solved. On Tue, Mar 31, 2015 at 9:28 PM, Sidney Bofah wrote: > Hi Shaz, > > i take my hat off your efforts and initial analysis - after initial =E2= =80=9Cif it > isn=E2=80=99t broken=E2=80=A6=E2=80=9D-based doubts, i now also think mig= rating > the iOS Cordova template structure to XCode workspaces is the best > longterm approach. > > Addendum to your analysis: > iOS =E2=80=9C.frameworks" are not restricted to iOS 8+ per se, only _dyna= mic_ > frameworks (dylibs) are. That is, _static_ frameworks can > be bundled since i-don=E2=80=99t-know-when. From a workflow perspective i= t used to > be tedious though, as one needs to build for ARM > and simulator, then merge the resulting Mach-O executables via the lipo > CLI, etc. - but in XCode 6, Apple made this easier by > providing a template for this (and there were third party framework > templates as well). > > Based on these experiences, I created a workflow for myself to get from a > popular iOS cocoa control to a Cordova plugin in less > than a day (for a simple framework with a few methods to expose via > CDVPlugin). As we all know, Plugman has been supporting > custom frameworks for a while, and can then copy to the platform folders > and reference those files, which works flawlessly. > Attached my repo links [1], i=E2=80=99d be glad to assist with any questi= ons if > that=E2=80=99s useful for the .xcworkspace migration process. > > Best regards, > Sidney > > [1] > https://github.com/SidneyS/GCDWebServer-static-framework > https://github.com/SidneyS/MRProgress-static-framework > > > > On 01 Apr 2015, at 02:41, Shazron wrote: > > > > ISSUE: > > https://issues.apache.org/jira/browse/CB-5921 > > > > PROOF OF CONCEPT: > > https://github.com/shazron/CB-5921 > > > > I took it onto myself to create a proof of concept on how this could > > work. Check out the README for the conversion details: > > https://github.com/shazron/CB-5921/blob/master/README.md > > > > TLDR; The essence of it is: > > > > 1. There is a workspace that contains: CordovaLib, the user's project, > > and N plugin framework projects > > 2. CordovaLib is no longer a subproject of the user's project > > 3. CordovaLib contains a target that will create a Cordova.framework > > 4. Plugins are iOS Framework projects (adding a plugin requires adding > > an xml line in xcworkspace, and framework refs in the user's project ) > > 5. Plugin JS is still installed by the CLI unless we find an alternativ= e > method > > 6. The CLI needs to be changed to do (4) > > > > Implementation details are in the README referenced above. > > > > BENEFITS > > > > This makes it all modular especially the plugins. Plugins are > > frameworks instead of static libraries because some plugins contain > > resource bundles that need to be included, and frameworks provide this > > functionality. Workspaces have been there since Xcode 4, and are used > > by a bunch of other package managers (Cococapods), it will be good to > > work well with other packaging systems if we can. Also, plugin > > installation is simplified. > > > > Cordova is a framework so there will be no duplicate symbol problem > > when linking a plugin into the user's project. > > > > POTENTIAL PROBLEMS: > > > > 1. I haven't tested this on iOS 7 devices yet though (since iOS > > frameworks are iOS 8 only -- but they should still work if weak > > linked), I'll have to find a device and report back. > > 2. cordova-cli platform version issues: if cordova-ios 4.x supports > > workspaces, and you are on a cordova-cli that doesn't know about the > > new template format (but you installed the new platform anyway), it > > won't work > > > > Send me your comments, ideas, etc... > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > > For additional commands, e-mail: dev-help@cordova.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > For additional commands, e-mail: dev-help@cordova.apache.org > > --=20 Carlos Santana --e89a8ff1cf463fcd0305129ff66c--