Git Product home page Git Product logo

Comments (10)

alloy avatar alloy commented on May 22, 2024

In order to make the app link the right libraries in the simplest way seems to be to generate an xcconfig file that the user's target configurations need to be based on. This also fixes the other extra settings needed in the user's app. I’ve added some code that generates xcconfig files like:

USER_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)
ALWAYS_SEARCH_USER_PATHS = YES
OTHER_LDFLAGS = -framework SystemConfiguration -framework CFNetwork -framework MobileCoreServices -l z.1.2.3 -l xml2.2.7.3
HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2"

from cocoapods.

alloy avatar alloy commented on May 22, 2024

Still need to write-up how the user should setup her project to use cocoa-pods.

from cocoapods.

fabiopelosin avatar fabiopelosin commented on May 22, 2024

Can this issue be closed?

from cocoapods.

alloy avatar alloy commented on May 22, 2024

@irrationalfab Yeah definitely. I think it’s best if you just close tickets when you think that’s the correct course and optionally say ‘re-open if still applicable’ :)

from cocoapods.

JanC avatar JanC commented on May 22, 2024

Hi,
could you write a how to in the docs about how we are supposed to user CocoaPods in a Workspace that has both an "App" project and a static library project. I have troubles setting up such a environment. See this

https://groups.google.com/forum/?fromgroups=#!topic/cocoapods/DOVaKHXzfnI

cheers,
Jan

from cocoapods.

fabiopelosin avatar fabiopelosin commented on May 22, 2024

Regarding the thread on the mailing list

platform :ios, '6.0'
# Pods used by the main App project
pod 'MACachedImageView', '~> 1.0.0'
pod 'RegexKitLite', '~> 4.0'
pod 'CocoaLumberjack', '~> 1.6'
# Pods used by the library project
xcodeproj 'PStatsKit/PStatsKit/PStatsKit'
target :PStatsKit do
    pod 'RegexKitLite', '~> 4.0'
end

The xcodeproj directive refers to the current target so a correct setup would have been:

target :PStatsKit do
  xcodeproj 'PStatsKit/PStatsKit/PStatsKit'
  pod 'RegexKitLite', '~> 4.0'
end

from cocoapods.

JanC avatar JanC commented on May 22, 2024

Hi,
I tried doing as you wrote in this project

https://www.dropbox.com/s/7blzr46ckgi8wua/MyApp2.zip

but I'm getting the error

could not automatically select an Xcode workspace. Specify one in your Podfile.

The Podfile included in the zip is:

platform :ios, '6.0'


target :MyApp do
    pod 'MBProgressHUD', '~> 0.5'
    pod 'SEHumanizedTimeDiff', '~> 0.0.1'
end


target :MyLibrary do
    xcodeproj 'MyLibrary'
    pod 'SEHumanizedTimeDiff', '~> 0.0.1'
end

from cocoapods.

fabiopelosin avatar fabiopelosin commented on May 22, 2024

When there is one than more project you need to specify the name of the workspace manually:

workspace 'MyApp'
platform :ios, '6.0'

target :MyApp do
    pod 'MBProgressHUD', '~> 0.5'
    pod 'SEHumanizedTimeDiff', '~> 0.0.1'
end


target :MyLibrary do
    xcodeproj 'MyLibrary'
    pod 'SEHumanizedTimeDiff', '~> 0.0.1'
end

from cocoapods.

JanC avatar JanC commented on May 22, 2024

thanks @irrationalfab, that worked ;)

from cocoapods.

JanC avatar JanC commented on May 22, 2024

Hi,
yet another problem :( If MyLibrary uses pod 'ASIHTTPRequest', '~> 1.8.1', I get a linker error:

can't locate file for: -lxml2.2
file: -lxml2.2 is not an object file (not allowed in a library)
can't locate file for: -lz.1
file: -lz.1 is not an object file (not allowed in a library)

This is the same problem as in #830 ... but shouldn't CocoaPods handle this ?

from cocoapods.

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.