Comments (6)
Interesting tips! Would you like to write up a quick walkthrough on how to do this for Nimbus?
On a separate, but related note: I personally find it incredibly easy to just drop the Nimbus source into my various projects and not worry about configuring any dependencies or linker flags. I want to avoid walking Nimbus down Three20's path of multiple separate projects. This is because, while in theory it made sense to share static libs of Three20 between projects, in practice this results in a net negative due to the hassle of configuring projects and debugging external Xcode projects.
from nimbus.
Sometimes I have to hide my sources from the customers ;) It's about my intellectual property protection. So, I realized that it is a bad idea to include all sources to the project (very often customers asks for the project sources).
So, I found that the static framework is a pretty good solution for me.
Nimbus is open-source project. So hiding the sources isn't argument here =)
But, protecting the sources isn't the only thing that static frameworks can offer.
Adding the framework to the project is much easier, than adding a bunch of files from specific folder. When we're using the framework - all we need is to add the framework to the project and import the header. Moreover, static frameworks are visible for xcode, because they are real frameworks. Just like UIKit and Foundation frameworks )
Also, sometimes I don't want to have sources of the third-party lib or framework. I don't want to have a deal with warnings, related to it. And the static library isn't solution for me due to the painful integration.
Btw, XCode 4 works just perfect with this frameworks. Just read the readme here: https://github.com/kstenerud/iOS-Universal-Framework, add projects templates to the xcode and try! It is easy.
So, the quick walkthrough:
- Add frameworks template projects to the xcode. There are two ways: use fake or/and real framework. Both of them has their pros and cons. I prefer real framework.
- Create empty framework, for example, NimbusCore, and add the sources to it. Then make needed headers public and compile ;)
- If framework projects lies in the same workspace with another projects - this framework will be visible in the list of frameworks in "Workspace" section.
I hope (while I've typed this reply) you've already tested this solution ;)
It is late night in Kiev, so, good night!
from nimbus.
I've created scripts to build static frameworks for an internal iOS library and they do make it easy to add to your project, just like adding UIKit, StoreKit or any other iOS framework.
It also solves the ARC/non-ARC project issue. (Although I still prefer Nimbus to be ARC enabled).
I had issues loading Categories using a static framework, even with the Category Macro fix, but will try again.
If we provided the scripts to generate the framework folders then it should be easy for people to chose which method suits them and we don't need to dictate how to use the library.
from nimbus.
@rogchap Agreed; that sounds like the safest solution here. How easy are the scripts to use?
from nimbus.
Easy enough to run and output all the nimbus modules and should be straight forward to add new modules to the script. I'll put together a working prototype for you to look at.
from nimbus.
I branched "frameworks" and started to create targets that are "Real Static Frameworks"
from ( https://github.com/kstenerud/iOS-Universal-Framework )
Packages compile as any target you would build, but create the framework files and then copy them to the
./frameworks directory of the git repository.
And by associating them to the scheme, adding a "rm" of old frameworks files before compilation keeps everything up to date.
Tell me if you're interested : you can see that starting work there : https://github.com/Vaseltior/nimbus
from nimbus.
Related Issues (20)
- Three20 Migration guide link broken HOT 5
- NIQueryDictionaryFromStringUsingEncoding uses iOS 9 deprecated API HOT 2
- generate_namespace_generator filtering necessary symbols
- Migration to Swift 3
- It seems some api not fit the Swift 3...
- Use accessibilityLabel when available in NIAttributedLabel
- when can support AFNetworking3.0 HOT 1
- when can support AFNetworking3.0?
- NISwitchFormElement property attribute
- Add to Project Page is Down
- afn 3.0
- NIRuntimeClassModifications.m class utilizing method_exchangeImplementations() instead of method_setImplementation() for swizzling!
- NIAttributedLabel has more text truncation than needed after resizing.
- Test issue, please ignore
- Make Nimbus build successfully with -Wvla HOT 1
- 无法正常编译 HOT 3
- Add nullability annotations to NICollectionViewModel
- Apple generates warnings for submissions of apps that use UIWebView APIs HOT 7
- [[UIApplication sharedApplication] openURL:] causing crashes with Xcode 11 iOS 13 update
- latest tag
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 nimbus.