Giter VIP home page Giter VIP logo

Comments (17)

jasperblues avatar jasperblues commented on July 21, 2024

Your code seems ok. Have you tried running the test cases? They extract a sample project to /tmp and edit that.

from xcodeeditor.

kevray avatar kevray commented on July 21, 2024

All the test cases run fine...XCBuildConfiguration has a dictionary called _buildSettings that adds the new parameters to it but I don't see where that dictionary is actually saved back to the project? Can you tell me where that happens?

from xcodeeditor.

jasperblues avatar jasperblues commented on July 21, 2024

There are separate config dictionaries which are related back to the target. I used this feature on a project about 3 months ago and it seemed to be working fine.

Is this test in XCTargetTests working correctly: - (void)test_allows_setting_build_configurations ?

from xcodeeditor.

kevray avatar kevray commented on July 21, 2024

Okay, sorry, it looks like cocoa pods might not have the latest code? I removed it from my cocoa pods and just put the API in directly and it is now saving my changes!

But now I noticed something else. Instead of adding to the HEADER_SEARCH_PATHS it is replacing it entirely. It appears not to pull in the HEADER_SEARCH_PATHS when the project gets loaded in (Debug Log then screenshot of project settings):

before: {
buildSettings =     {
    "ALWAYS_SEARCH_USER_PATHS" = NO;
    "COPY_PHASE_STRIP" = NO;
    "GCC_DYNAMIC_NO_PIC" = NO;
    "GCC_OPTIMIZATION_LEVEL" = 0;
    "GCC_PRECOMPILE_PREFIX_HEADER" = YES;
    "GCC_PREFIX_HEADER" = "prefixTouch.pch";
    "INFOPLIST_FILE" = "Info.plist";
    "IPHONEOS_DEPLOYMENT_TARGET" = "4.0";
    "PRODUCT_NAME" = OAuthSampleTouch;
    "TARGETED_DEVICE_FAMILY" = "1,2";
};
isa = XCBuildConfiguration;
name = Debug;

screen shot 2014-06-23 at 9 53 18 am

And then after I add the new parameters:

The settings: {
buildSettings =     {
    "ALWAYS_SEARCH_USER_PATHS" = NO;
    "COPY_PHASE_STRIP" = NO;
    "GCC_DYNAMIC_NO_PIC" = NO;
    "GCC_OPTIMIZATION_LEVEL" = 0;
    "GCC_PRECOMPILE_PREFIX_HEADER" = YES;
    "GCC_PREFIX_HEADER" = "prefixTouch.pch";
    "HEADER_SEARCH_PATHS" =         (
        "$(SRCROOT)/**"
    );
    "INFOPLIST_FILE" = "Info.plist";
    "IPHONEOS_DEPLOYMENT_TARGET" = "4.0";
    "PRODUCT_NAME" = OAuthSampleTouch;
    "TARGETED_DEVICE_FAMILY" = "1,2";
};
isa = XCBuildConfiguration;
name = Debug;

screen shot 2014-06-23 at 9 56 46 am

Thanks for your help!

from xcodeeditor.

jasperblues avatar jasperblues commented on July 21, 2024

Apologies! I'll push another CocoaPods version.

Regarding merging in vs overwriting: yes the method name implies it will merge doesn't it?

I'm sorry you've had a hard slog to get there. I wish I had a couple of weeks to give this library some more attention. . Glad it was at least mostly helpful.

from xcodeeditor.

kevray avatar kevray commented on July 21, 2024

No worries, its a great API that has been really useful and saved me a ton of time!

Is the merging something that is an easy fix and something you will be updating soon? Or will I need to find a work around?

from xcodeeditor.

jasperblues avatar jasperblues commented on July 21, 2024

Merging? You mean update CocoaPods. I'll do that right away. (I thought I had).

Meantime, there is a workaround of sorts. You can fetch the latest version with:

pod 'XcodeEditor', :head

from xcodeeditor.

kevray avatar kevray commented on July 21, 2024

Sorry, what I meant was is there a way to add to the existing HEADER_SEARCH_PATHS and OTHER_LDFLAGS instead of always overwriting them?

from xcodeeditor.

jasperblues avatar jasperblues commented on July 21, 2024

That should be done as:

  • String split the existing entries into an array.
  • Append the new entries onto the array.
  • Call existing method.

I agree that code should be in the library itself. Would you like to add it? Otherwise I should have some time later tonight (currently 9.15am here) to add it for you.

from xcodeeditor.

jasperblues avatar jasperblues commented on July 21, 2024

Oops. wrong button.

from xcodeeditor.

kevray avatar kevray commented on July 21, 2024

If it won't take long I would greatly appreciate if you could do it since you know your code much better...

from xcodeeditor.

mzworks avatar mzworks commented on July 21, 2024

holle, when i user the XcodeEditor.framework,I find a problem.

dyld: Library not loaded: @executable_path/../Frameworks/XcodeEditor.framework/Versions/A/XcodeEditor
Referenced from: /Users/Paul/Library/Developer/Xcode/DerivedData/XCodeBuild_ShellPush-bcpwpcmpzitnmzdnagxqfcrtzbmr/Build/Products/Debug/XCodeBuild_ShellPush.app/Contents/MacOS/XCodeBuild_ShellPush
Reason: image not found

I don't know how to fixed it.
Please help me, thx

from xcodeeditor.

jasperblues avatar jasperblues commented on July 21, 2024

@mzworks Is it possible that you can use CocoaPods or add the source to your project. Both of these options will work fine, however, I haven't tried the framework target for a long time.

from xcodeeditor.

mzworks avatar mzworks commented on July 21, 2024

Holle jasperblues, i use CocoaPods, but it say

[!] The platform of the target Pods (iOS 7.0) is not compatible with XcodeEditor (1.6) which has a minimum requirement of OS X.

my profile is
platform :ios, '7.0'
pod 'XcodeEditor', '~> 1.6'

from xcodeeditor.

mzworks avatar mzworks commented on July 21, 2024

Holle jasperblues, i find platform is "platform :osx, '10.6'"

from xcodeeditor.

mzworks avatar mzworks commented on July 21, 2024

i follow the cocospod and finish use XcodeEditor.Thx!

from xcodeeditor.

jasperblues avatar jasperblues commented on July 21, 2024

@mzworks I'm happy it's working for you. (NB: This ticket was actually about adding linking flags to a project, not linking this project itself, but no problem).

from xcodeeditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.