All Projects → devxoul → Cocoaseeds

devxoul / Cocoaseeds

Licence: mit
Git Submodule Alternative for Cocoa.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Cocoaseeds

assetter
Assets manager for PHP. Allow manage CSS and JS files in website and its dependencies. Also allows refresh cache in browsers by adding revisions of loaded files. Builtin plugins to compile SASS and/or LESS styles to CSS just-in-time.
Stars: ✭ 14 (-95.88%)
Mutual labels:  dependency-manager
spatterlight
Updated fork of Spatterlight
Stars: ✭ 60 (-82.35%)
Mutual labels:  cocoa
Radialmenu
RadialMenu is a custom control for providing a touch context menu (like iMessage recording in iOS 8) built with Swift & POP
Stars: ✭ 292 (-14.12%)
Mutual labels:  cocoa
WebPKit
A framework that extends a variety of Cocoa APIs with capabilities for encoding and decoding WebP files for all of Apple's platforms.
Stars: ✭ 29 (-91.47%)
Mutual labels:  cocoa
Eloquent
Eloquent is a bible study tool for macOS
Stars: ✭ 88 (-74.12%)
Mutual labels:  cocoa
Nshipster.com
A journal of the overlooked bits in Objective-C, Swift, and Cocoa. Updated weekly.
Stars: ✭ 280 (-17.65%)
Mutual labels:  cocoa
ruby-china-reader
Simple Mac Reader for Ruby China
Stars: ✭ 48 (-85.88%)
Mutual labels:  cocoa
Poet
Poet helps you declare, manage and install dependencies of Python projects, ensuring you have the right stack everywhere.
Stars: ✭ 312 (-8.24%)
Mutual labels:  dependency-manager
xcode-config
My Xcode config - Alfred Workflow, File templates, Xcode code snippets, themes, IDETextKeyBindingSet
Stars: ✭ 16 (-95.29%)
Mutual labels:  cocoa
Macdriver
Native Mac APIs for Go
Stars: ✭ 3,582 (+953.53%)
Mutual labels:  cocoa
Rearrange
Collection of utilities for interacting with NSRange and NSTextRange
Stars: ✭ 28 (-91.76%)
Mutual labels:  cocoa
XcoatOfPaint
Replace your Xcode icon with colorful variants
Stars: ✭ 131 (-61.47%)
Mutual labels:  cocoa
Runtimesummary
一个集合了常用 Objective-C Runtime 使用方法的 Playground。
Stars: ✭ 281 (-17.35%)
Mutual labels:  cocoa
git-explode
Explode linear sequence of git commits into topic branches
Stars: ✭ 43 (-87.35%)
Mutual labels:  dependency-manager
Drawkit
Vector and illustration framework for macOS
Stars: ✭ 299 (-12.06%)
Mutual labels:  cocoa
Kit
A collection of Obj-C classes and categories for macOS.
Stars: ✭ 19 (-94.41%)
Mutual labels:  cocoa
Xcode One Dark
Atom One Dark theme for Xcode
Stars: ✭ 273 (-19.71%)
Mutual labels:  cocoa
Stprivilegedtask
An NSTask-like wrapper around the macOS Security Framework's AEWP function to run shell commands with root privileges in Objective-C / Cocoa.
Stars: ✭ 335 (-1.47%)
Mutual labels:  cocoa
G
Simple go version manager, gluten-free
Stars: ✭ 307 (-9.71%)
Mutual labels:  dependency-manager
Linkedideas
A macOS/iOS apps to treat ideas as links of concepts.
Stars: ✭ 286 (-15.88%)
Mutual labels:  cocoa

CocoaSeeds

Gem Build Status

Git Submodule Alternative for Cocoa. Inspired by CocoaPods.

Why?

  • iOS 7 projects do not support the use of Swift libraries from CocoaPods or Carthage.

    ld: warning: embedded dylibs/frameworks only run on iOS 8 or later

  • CocoaSeeds just downloads the source code and add it to your Xcode project. No static libraries, no dynamic frameworks.

  • Git Submodule sucks.

  • It can be used with CocoaPods and Carthage.

Installation

You can get CocoaSeeds from RubyGems.

$ [sudo] gem install cocoaseeds

How to Use CocoaSeeds

1. Write a Seedfile

A Seedfile is a ruby script that manifests the dependencies of your project. You can manage third party libraries by simply specifying them in the Seedfile. Currently, CocoaSeeds supports only GitHub and BitBucket repositories. However, we are planning to support other version control systems.

Let's make an empty file named Seedfile in the directory where your Xcode project file is located. Here is a sample Seedfile:

Seedfile

github "Alamofire/Alamofire", "1.2.1", :files => "Source/*.{swift,h}"
github "devxoul/JLToast", "1.2.5", :files => "JLToast/*.{swift,h}"
github "devxoul/SwipeBack", "1.0.4"
github "SnapKit/SnapKit", :commit => "62e7645", :files => "Source/*.{swift,h}"

git "https://gitlab.com/MyCompany/CompanyLibrary.git", "1.1.0"
local "PrivateLibrary", "../libs/PrivateLibrary", :files => "Source/*.{swift,h}"

target :MyAppTest do
  github "Quick/Quick", "v0.3.1", :files => "Quick/**.{swift,h}"
  github "Quick/Nimble", "v0.4.2", :files => "Nimble/**.{swift,h}"
end

Can you guess what each line does? It has basic information about the third party libraries.

Each line in a Seedfile consists of three parts: source, tag, and files. Let's look at the second line of the previous sample.

github "devxoul/JLToast", "1.2.5", :files => "JLToast/*.{swift,h}"
~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       (Source)          (Version)             (Files)
Parts Example Required Default
Source github "devxoul/SwipeBack" Required -
Version Tag: "1.0.4"
Branch: "swift-2.0"
Commit: :commit => "SHA1"
Required -
Files :files => "JLToast/*.{swift,h}" Optional */**.{h,m,mm,swift}

Tip: You can pass an array to :files for multiple file patterns:

:files => ["/path1/*.swift", "/path2/*.swift"]

Want to use branch names instead of tags? See the Branch support section.

Specifying targets

Third party libraries can be included as a specific target by creating a target block. For example, if you want to add some testing libraries such as Quick and Nimble into test target, you can specify them like this:

target :MyAppTest do
  github "Quick/Quick", "v0.3.1", :files => "Quick/**.{swift,h}"
  github "Quick/Nimble", "v0.4.2", :files => "Nimble/**.{swift,h}"
end

Specifying Xcode project file path

If the .xcodeproj file is located in other location, you can specify the path in Seedfile.

xcodeproj "path/to/Project.xcodeproj"

target :MyApp do
    github "devxoul/JLToast", "1.2.5", :files => "JLToast/*.{swift,h}"
end

2. Install dependencies

After you are done with your Seedfile, it's time to load those libraries into your project. This is pretty simple. Just open the terminal, cd to your project directory and execute seed install command.

$ seed install

Then, all the source files will be automatically downloaded and added to a group named 'Seeds'.

Seeds-in-Xcode

3. Enjoy

Build your project and enjoy coding!

Tips and Tricks

Using branches

You can specify a branch name instead of the tag. What you need to do is just replacing the tag with the branch name.

github 'devxoul/SwiftyImage', 'swift-2.0', :files => 'SwiftyImage/SwiftyImage.swift'

Excluding files

Use exclude_files to exclude files from files pattern.

github 'devxoul/Carte', '0.2.2', :files => 'Carte/*', :exclude_files => "Carte/Carte.h"

Using resources

If the resource files are sprecified in files, they will be added to Copy Bundle Resource build phase instead of Compile Source build phase.

github 'author/Repository', 'x.y.z', :files => ['Source/*', 'Images/*']

Resolving filename conflicts

Since CocoaSeeds tries to include source files directly rather than linking dynamic frameworks, it is important to make sure that all sources have different names. CocoaSeeds provides a way to do this:

Seedfile

swift_seedname_prefix!  # add this line

github "thoughtbot/Argo", "v1.0.3", :files => "Argo/*/*.swift"
github "thoughtbot/Runes", "v2.0.0", :files => "Source/*.swift"

Then all of source files installed via CocoasSeeds will have names with the seed names as prefix.

Before (filename) After (seedname_filename)
Seeds/Alamofire/Alamofire.swift Seeds/Alamofire/Alamofire_Alamofire.swift
Seeds/Argo/Operators/Operators.swift Seeds/Argo/Operators/Argo_Operators.swift
Seeds/Runes/Operators.swift Seeds/Runes/Runes_Operators.swift

FAQ

  • Are you using this in real-world projects? (Does Apple allow apps to use CocoaSeeds?)

    • Of course I am. I'm developing a social media service that has about 2 million users. The app is on AppStore without any complaints from Apple.
  • Can I ignore Seeds folder in VCS (version control system)?

    • Yes, you can ignore the Seeds folder (by adding it to .gitignore if you use Git).

License

CocoaSeeds is under MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].