Comments (17)
Your code seems ok. Have you tried running the test cases? They extract a sample project to /tmp and edit that.
from xcodeeditor.
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.
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.
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;
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;
Thanks for your help!
from xcodeeditor.
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.
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.
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.
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.
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.
Oops. wrong button.
from xcodeeditor.
If it won't take long I would greatly appreciate if you could do it since you know your code much better...
from xcodeeditor.
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.
@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.
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.
Holle jasperblues, i find platform is "platform :osx, '10.6'"
from xcodeeditor.
i follow the cocospod and finish use XcodeEditor.Thx!
from xcodeeditor.
@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)
- addframework failed in xcode7 HOT 11
- ESA.Sales.Foobar.xib: iOS xibs do not support target device type "mac" HOT 1
- Linker Error because of duplicate symbols HOT 3
- Update Compile Sources HOT 4
- Embed framework HOT 9
- xcconfig not work in project and target base configuration!
- how can i remove an existing xxx.framework(not imported from apple's libraries) from my project HOT 4
- Carthage: Dependency "XcodeEditor" has no shared framework schemes
- Add file to dynamic framework target Public/Private/Project Build Phases > Headers?
- Make scheme shared
- removeResourceWithKey and removeMemberWithKey need documentation
- XcodeEditor does not handle Emoji in build phase names well HOT 14
- [Question] Does XCodeEditor support sorting targets in alphabetical order?
- feature - determine project / name directory path / project file from key window HOT 4
- Doesn't get all the XCBuildConfiguration's in the file HOT 2
- "Project file of type file.storyboard can't become a build file." HOT 1
- Support for Copy Bundle Phases HOT 6
- Create new Target & Scheme HOT 1
- EXC_BAD_ACCESS from xce_stringFromMemberType HOT 1
- how to add some .strings files to project? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcodeeditor.