Comments (15)
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.
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.
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.
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.
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: . Images are missing, but I'm sure I can work that one out.
Cheers,
James
from lnpopupcontroller.
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.
Fair point 😝, it was educational for me anyway.
from lnpopupcontroller.
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.
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.
Great! 👍
from lnpopupcontroller.
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.
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.
@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.
Added Carthage support. Will not support CocoaPods.
from lnpopupcontroller.
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.
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)
- SwiftUI preview does not compile with missing required module 'LNPopupController_ObjC HOT 13
- Floating background color HOT 7
- Larger text sizes / content categories look bad HOT 32
- Bat layout is broken under certain extreme situations HOT 1
- RTL layout issues HOT 3
- 2.16.* subtitleTextAttributes how to set before ios 15?
- ContentView left inset of -8 HOT 8
- xcode manual build error HOT 3
- Popup Bar title and subtitle layout/visibility with MarqueeLabel enabled. HOT 2
- Swiping down on a .popupInteractionStyle(.drag) popup causes both the popup and the tabBar to hide HOT 3
- Swipe down HOT 10
- Miniplayer disappears sometimes and popup is not opened. HOT 4
- Using SettingKeys HOT 3
- Presenting view controller from detached view controller is not supported, and may result in incorrect safe area insets and a corrupt root presentation. HOT 6
- Wrong subtitle label layout on RLT HOT 3
- Hiding popup var always animates. HOT 2
- Unsafe build flags HOT 3
- Emptiness
- prefersHomeIndicatorAutoHidden not called HOT 2
- No type or protocol named 'UIObjectTraitDefinition' error when trying to build xcode HOT 2
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 lnpopupcontroller.