Code Monkey home page Code Monkey logo

Comments (8)

fheswara avatar fheswara commented on July 21, 2024

I'm having same situation also, Is there a way to include Restkit to my framework if using cocoapods?

from ios-framework.

paulyoung avatar paulyoung commented on July 21, 2024

I got this working. In the Build Phases section of the "Framework" aggregate target, change the xcodebuld command to build the workspace created by CocoaPods instead of your old project file.

# Build the other platform.
xcodebuild ONLY_ACTIVE_ARCH=NO -workspace "${PROJECT_DIR}/${PROJECT_NAME}.xcworkspace" -scheme "${TARGET_NAME}" -configuration "${CONFIGURATION}" -sdk ${SF_OTHER_PLATFORM}${SF_SDK_VERSION} BUILD_DIR="${BUILD_DIR}" OBJROOT="${OBJROOT}" BUILD_ROOT="${BUILD_ROOT}" SYMROOT="${SYMROOT}" $ACTION

This only worked for me by adding ONLY_ACTIVE_ARCH=NO. The only other changes are to pass -workspace and -scheme instead of -project and -target.

from ios-framework.

quangpc-zz avatar quangpc-zz commented on July 21, 2024

i got another problem
when i build framework, i use AFNetworking. If I simple drag to other project, and that project already include AFNetworking is not problem. But when I use CocoaPods to build framework, when i include this to an other project with CocoaPods, I have errors when build. Is there a way to build framework with CocoaPods and then integrate to an other project already used CocoaPods?

from ios-framework.

paulyoung avatar paulyoung commented on July 21, 2024

I think you're talking about a duplicate symbol issue. This has been discussed here. CocoaPods/CocoaPods/issues/1072

Our open source Cocoa projects no longer build dependencies in directly. All of them must now be built and linked at the app level.

-- @jspahrsummers

Sounds like your framework provider also needs to take this approach.

from ios-framework.

jverkoey avatar jverkoey commented on July 21, 2024

Closing this barring any further updates. Please reopen if this issue is still active.

from ios-framework.

wilmarvh avatar wilmarvh commented on July 21, 2024

Thanks @paulyoung for the tip. When using Cocoapods with your framework this is a valuable thing to note in the build script. Should be made a pull request to be part of the instructions.

from ios-framework.

juanjo-ramos avatar juanjo-ramos commented on July 21, 2024

@paulyoung @Aranir let me guys make sure I'm under the same circumstances.

  1. You created a static framework following the steps depicted here: https://github.com/jverkoey/iOS-Framework/#developing-the-framework-as-a-dependent-project

  2. The framework that you developed to be used in other apps, contains third-party dependencies that you were managing (in the framework) using Cocoapods.

  3. You wanted the sources of those pods to be included in the .framework you produced

I followed the steps depicted here https://github.com/jverkoey/iOS-Framework/#developing-the-framework-as-a-dependent-project including the update of @paulyoung but when my framework built does not contain the sources of the different pods I have in the workspace.

Am I missing something here in order to get the sources of the pods I'm using included in the framework?

from ios-framework.

paulyoung avatar paulyoung commented on July 21, 2024

@jjramos-developer I haven't used CocoaPods since Swift was released but I believe it's currently possible to have CocoaPods pull in your framework's dependencies when consumers use it, at least for dynamic frameworks.

This is based on a discussion I had recently about Argo: thoughtbot/Argo#109 (comment)

As to how exactly I'm not sure, but I imagine it's down to putting spec.dependency entries in your .podspec like Argo does: https://github.com/thoughtbot/Argo/blob/9d55345286f44c88a887083e18cef65627934fd6/Argo.podspec#L19-L20

from ios-framework.

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.