Coder Social home page Coder Social logo

Comments (15)

LeoNatan avatar LeoNatan commented on May 24, 2024

Right, the issue here is that this is a dynamic framework, and I have zero experience with CocoaPods with dynamic libraries. It used to be a big mess. If anything, I am more interested in Carthage support, as it is a much leaner solution.

from lnpopupcontroller.

jameseunson avatar jameseunson commented on May 24, 2024

Ah interesting, didn't realise. I respect your choice of Carthage. I'm still curious to see if it can be done, so I might do some research. Thanks for your fast response

from lnpopupcontroller.

LeoNatan avatar LeoNatan commented on May 24, 2024

I am keeping this issue open for now. If you want to help me out, would like that. You can submit PR and I will merge.

from lnpopupcontroller.

jameseunson avatar jameseunson commented on May 24, 2024

Hey, managed to compile the .framework into a .a static library, which makes it easy to turn into a Cocoapod. The method of doing this involved adding a static library target to the LNPopupController project, and adding headers and sources in the correct parts of the build phases section.
screen shot 2015-09-25 at 9 09 32 pm

I then used these commands to generate a static library:

xcodebuild -target LNPopupController-staticlib -configuration Release -sdk iphonesimulator9.0
xcodebuild -target LNPopupController-staticlib -configuration Release -sdk iphoneos9.0

lipo build/Release-iphonesimulator/libLNPopupController-staticlib.a Build/Release-iphoneos/libLNPopupController-staticlib.a -create -output build/libLNPopupController.a

I catted all your public header files into one file, which again makes it easier to create a Podfile. I'm also not familiar with the process of creating a cocoapod, but the Flurry pod seems like a good basis as it is distributed as a static library and accompanying header file. The spec for Flurry for iOS is here: https://github.com/flurry/Flurry-iOS-SDK/blob/master/Flurry-iOS-SDK.podspec If you like I can write a spec based on this next week. The specific flag Flurry uses to bundle the static library is detailed here: https://guides.cocoapods.org/syntax/podspec.html#vendored_libraries

And finally a screenshot of the library functioning in one of my apps, running from the compiled static library and header file: simulator screen shot 25 sep 2015 9 13 27 pm. Images are missing, but I'm sure I can work that one out.

Cheers,
James

from lnpopupcontroller.

LeoNatan avatar LeoNatan commented on May 24, 2024

This is the one solution I do not want to support. 😄 Feel free to use it, of course, but going forward, a dynamic framework is the obvious way to go. One advantage is, as you said, images. Because dynamic frameworks are bundles of their own, they can have their own assets that are not merged into the main bundle. This is why I prefer Carthage in this regard.

from lnpopupcontroller.

jameseunson avatar jameseunson commented on May 24, 2024

Fair point 😝, it was educational for me anyway.

from lnpopupcontroller.

LeoNatan avatar LeoNatan commented on May 24, 2024

Sure, that's quite the detective work, and thanks for it!

If I was to look into Carthage integration, would you be interested?

from lnpopupcontroller.

jameseunson avatar jameseunson commented on May 24, 2024

Sure thing, I've never used it before, but it's authored by Github so I'm sure it's good. If you add it, I'll definitely use it.

from lnpopupcontroller.

LeoNatan avatar LeoNatan commented on May 24, 2024

Great! 👍

from lnpopupcontroller.

jameseunson avatar jameseunson commented on May 24, 2024

Hey,

Sorry to go on about this but I found something that is pretty relevant to your project, relating to CocoaPods and distributing a Framework. I was experimenting with a Firebase (https://www.firebase.com/) API over the weekend and integrated their client library as a CocoaPod into my test project.

I couldn't help but notice their CocoaPod Podspec is literally just a reference to their .framework file, bundled into a zip and placed on a CDN.

Their podspec is here: https://github.com/CocoaPods/Specs/blob/master/Specs/Firebase/2.4.0/Firebase.podspec.json

The "vendored_frameworks" entry points to the name of their framework, and the framework location is specified using the "source" entry and points to their CDN: https://cdn.firebase.com/ObjC/Firebase.framework-2.4.0.zip

Theoretically you could use their podspec as a template for your own?

This is the last I'll mention of this, I promise 😂

from lnpopupcontroller.

funkenstrahlen avatar funkenstrahlen commented on May 24, 2024

To be honest: I do not know enough about Pods and dynamic frameworks to judge if a Pod of this framework makes sense or not. I respect your decision not to create a Pod.

However I would appreciate if you could improve the readme part about integrating this framework into an existing project. I struggle a lot trying to do that.

from lnpopupcontroller.

LeoNatan avatar LeoNatan commented on May 24, 2024

@funkenstrahlen The included explanation is really all you need to do. Drag the project to your project, add it to Embedded Binaries in your target, and that should be it.

from lnpopupcontroller.

LeoNatan avatar LeoNatan commented on May 24, 2024

Added Carthage support. Will not support CocoaPods.

from lnpopupcontroller.

Urkman avatar Urkman commented on May 24, 2024

If you are interested to support Cocopods...
Just add a file with this name:
LNPopupController.podspec

And add this to the file:
Pod::Spec.new do |s|
s.name = 'LNPopupController'
s.version = '1.4.5'
s.license = 'MIT'
s.summary = 'A framework for presenting view controllers as popups of other view controllers.'
s.description = 'LNPopupController is a framework for presenting view controllers as popups of other view controllers, much like the Apple Music and Podcasts apps.'
s.homepage = 'https://github.com/LeoNatan/LNPopupController'
s.authors = 'Leo Natan'
s.source = { :git => 'https://github.com/LeoNatan/LNPopupController.git', :tag => 'v' << s.version.to_s }
s.source_files = 'LNPopupController//*.{h,m}', 'LNPopupController///*.{h,m}'
s.public_header_files = 'LNPopupController/
/.h'
s.private_header_files = 'LNPopupController/__/Private/
.h'
s.resources = 'LNPopupController/*.xcassets'
s.requires_arc = true
s.ios.deployment_target = '8.0'
end

And you are all set...

If you somebody uses Swift:
Just add "@import LNPopupController;" to the Bridging header...

from lnpopupcontroller.

iDevelopper avatar iDevelopper commented on May 24, 2024

Don't understand why this framework do not have Cocoapods support? I have read that is because of dynamic library, however Cocoapods support this, no?

from lnpopupcontroller.

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.