Skip to content

addframework failed in xcode7  #56

Description

@wlevene

I updated xcode to xcode7, happened this

static const NSString* SDK_PATH = @"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk";

  • (NSString*)libzDylibPath
    {
    return [SDK_PATH stringByAppendingPathComponent:@"/usr/lib/libz.tbd"];
    }

XCFrameworkDefinition* frameworkDefinition = [[XCFrameworkDefinition alloc] initWithFilePath:[XCFrameworkPath libzDylibPath] copyToDestination:NO];

[frameworksGroup addFramework:frameworkDefinition toTargets:[project targets]];

b33cc970-f502-4c8b-b1bb-b0c65d3d465a

here is ok~ but when i build the project, failed for this

fffc1340-e6e8-4e00-89a1-fdc3995c95b2

Activity

  1. cezheng commented on Sep 24, 2015

    @cezheng
    Contributor

    linking against *.tbd libraries seems to be an unfinished feature in xcode 7, try adding -lz in the OTHER_LD_FLAGS which will do what you want

  2. wlevene commented on Sep 24, 2015

    @wlevene
    Author

    i wish the author will finish link *.tbd libraries feature in xcode 7 soon, ;)

  3. cezheng commented on Sep 24, 2015

    @cezheng
    Contributor

    I guess the tbd issue is not XcodeEditor's problem but a problem of Xcode itself, so I guess this issue should be closed

  4. wlevene commented on Sep 24, 2015

    @wlevene
    Author

    the reason is the pbxproj file format is changed, may be need to support it in XcodeEditor

  5. cezheng commented on Sep 24, 2015

    @cezheng
    Contributor

    I don't think so. Even if you manually add the libz.tbd to your project in Xcode, it fails

  6. wlevene commented on Sep 24, 2015

    @wlevene
    Author

    i manually add the libz.tbd to my project in Xcode, it is ok
    195d1538-56f5-4ff5-8148-de7813b7cbf9

  7. cezheng commented on Sep 24, 2015

    @cezheng
    Contributor

    Oh, maybe *.tbd cannot be used in a static library project. I have a static library project and if I add a tbd file the build just fails

  8. jasperblues commented on Nov 21, 2015

    @jasperblues
    Member

    @cezheng @gangwang Agree we can close this?

  9. akame commented on Dec 24, 2015

    @akame

    I think this problem because XcodeEditor doesn't support .tbd file,
    I add Dylib = 24 in XcodeSourceFileType.h
    and @"sourcecode.text-based-dylib-definition" : @(Dylib) in XcodeSourceFileType.m(NSDictionaryWithXCFileReferenceTypes).

    At last, I copy a new function from function :- (void)addFramework:(XCFrameworkDefinition *)frameworkDefinition; in XCGourp.m .
    I change:
    fileReference = [self makeFileReferenceWithPath:path name:name type:Framework]
    to
    fileReference = [self makeFileReferenceWithPath:path name:name type:Dylib]

    I'm a new programmer ,and if I was wrong, forgive me .

  10. wlevene commented on Apr 6, 2016

    @wlevene
    Author

    @akame hahaha~~~~~ thank you! you are right, i follow u step, it works! @jasperblues

  11. forwardto9 commented on Nov 17, 2016

    @forwardto9

    @akame nice! but you also add buidPharse item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions