You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by sgrebnov <gi...@git.apache.org> on 2014/07/10 21:01:58 UTC

[GitHub] cordova-lib pull request: CB-7118 iOS: add target-device and Minim...

GitHub user sgrebnov opened a pull request:

    https://github.com/apache/cordova-lib/pull/57

    CB-7118 iOS: add target-device and MinimumOSVersion support to config.xml

    https://issues.apache.org/jira/browse/CB-7118

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-lib CB-7118

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-lib/pull/57.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #57
    
----
commit ad492e086067a16bd2bdac0774fd5f78e64603b5
Author: sgrebnov <v-...@microsoft.com>
Date:   2014-07-10T19:00:20Z

    CB-7118 iOS: add target-device and MinimumOSVersion support to config.xml

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-lib pull request: CB-7118 iOS: add target-device and Minim...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-lib/pull/57


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-lib pull request: CB-7118 iOS: add target-device and Minim...

Posted by sgrebnov <gi...@git.apache.org>.
Github user sgrebnov commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/57#discussion_r14868912
  
    --- Diff: cordova-lib/src/cordova/metadata/ios_parser.js ---
    @@ -217,6 +220,38 @@ module.exports.prototype = {
                 self.update_overrides();
                 util.deleteSvnFolders(self.www_dir());
             });
    +    },
    +
    +    update_build_settings:function(config) {
    +        var targetDevice = parseTargetDevicePreference(config.getPreference('target-device', 'ios'));
    +        var deploymentTarget = config.getPreference('deployment-target', 'ios');
    +
    +        // no build settings provided, we don't need to parse and update .pbxproj file
    +        if (!targetDevice && !deploymentTarget) {
    +            return Q();
    +        }
    +
    +        var me = this;
    +        var d = Q.defer();
    +        var proj = new xcode.project(this.pbxproj);
    +        proj.parse(function(err,hash) {
    +            if (err) {
    +                d.reject(new Error('An error occured during parsing of project.pbxproj. Start weeping. Output: ' + err));
    +                return;
    +            }
    +            var buildConfiguration = proj.pbxXCBuildConfigurationSection();
    +            if (targetDevice) {
    +                // TODO: replace propReplace with proj.updateBuildProperty after below is release
    +                // https://github.com/alunny/node-xcode/pull/33
    --- End diff --
    
    Updated, thx @sriranggd 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] cordova-lib pull request: CB-7118 iOS: add target-device and Minim...

Posted by Axel Nennker <ig...@gmail.com>.
s/ettigns/ettings/g
Am 10.07.2014 21:02 schrieb "sgrebnov" <gi...@git.apache.org>:

> GitHub user sgrebnov opened a pull request:
>
>     https://github.com/apache/cordova-lib/pull/57
>
>     CB-7118 iOS: add target-device and MinimumOSVersion support to
> config.xml
>
>     https://issues.apache.org/jira/browse/CB-7118
>
> You can merge this pull request into a Git repository by running:
>
>     $ git pull https://github.com/MSOpenTech/cordova-lib CB-7118
>
> Alternatively you can review and apply these changes as the patch at:
>
>     https://github.com/apache/cordova-lib/pull/57.patch
>
> To close this pull request, make a commit to your master/trunk branch
> with (at least) the following in the commit message:
>
>     This closes #57
>
> ----
> commit ad492e086067a16bd2bdac0774fd5f78e64603b5
> Author: sgrebnov <v-...@microsoft.com>
> Date:   2014-07-10T19:00:20Z
>
>     CB-7118 iOS: add target-device and MinimumOSVersion support to
> config.xml
>
> ----
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastructure@apache.org or file a JIRA ticket
> with INFRA.
> ---
>

[GitHub] cordova-lib pull request: CB-7118 iOS: add target-device and Minim...

Posted by sriranggd <gi...@git.apache.org>.
Github user sriranggd commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/57#discussion_r14855708
  
    --- Diff: cordova-lib/src/cordova/metadata/ios_parser.js ---
    @@ -217,6 +220,38 @@ module.exports.prototype = {
                 self.update_overrides();
                 util.deleteSvnFolders(self.www_dir());
             });
    +    },
    +
    +    update_build_settings:function(config) {
    +        var targetDevice = parseTargetDevicePreference(config.getPreference('target-device', 'ios'));
    +        var deploymentTarget = config.getPreference('deployment-target', 'ios');
    +
    +        // no build settings provided, we don't need to parse and update .pbxproj file
    +        if (!targetDevice && !deploymentTarget) {
    +            return Q();
    +        }
    +
    +        var me = this;
    +        var d = Q.defer();
    +        var proj = new xcode.project(this.pbxproj);
    +        proj.parse(function(err,hash) {
    +            if (err) {
    +                d.reject(new Error('An error occured during parsing of project.pbxproj. Start weeping. Output: ' + err));
    +                return;
    +            }
    +            var buildConfiguration = proj.pbxXCBuildConfigurationSection();
    +            if (targetDevice) {
    +                // TODO: replace propReplace with proj.updateBuildProperty after below is release
    +                // https://github.com/alunny/node-xcode/pull/33
    --- End diff --
    
    Looks like your changes to xcode module were accepted and also released as version `0.6.7`. I think it would be best to put in the new `updateBuildProperty` and get this merged, along with an update to the `xcode` version in the dependency list.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-lib pull request: CB-7118 iOS: add target-device and Minim...

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-lib/pull/57#issuecomment-48666625
  
    update_build_settigns should be update_build_settings


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-lib pull request: CB-7118 iOS: add target-device and Minim...

Posted by sgrebnov <gi...@git.apache.org>.
Github user sgrebnov commented on the pull request:

    https://github.com/apache/cordova-lib/pull/57#issuecomment-48696309
  
    Fixed  'update_build_settings' issue and force pushed, thank you Jesse @purplecabbage 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---