$30 off During Our Annual Pro Sale. View Details »

Swift for lazy iOS Developers

Swift for lazy iOS Developers

The presentation talks about usage of Cocoapods, swift package manager, carthage and about open-source contribution.

By Ashish Kapoor
Swift Delhi Community Manager

Avatar for Ashish Kapoor

Ashish Kapoor

January 21, 2017
Tweet

Other Decks in Programming

Transcript

  1. You have 20 days and been assigned a small project/app

    to submit a good enough PoC or the whole application itself. What are you going to do?
  2. “Beginners?” look up for this term called: A curated list

    of awesome iOS ecosystem, including Objective-C and Swift Projects Getting Started Libraries And Frameworks Animation Charts
  3. How to include the frameworks or libraries in your project?

    There are two ways you can: 1. CocoaPods 2. Carthage
  4. Steps to setup cocoapods on your mac Step 1: open

    a command line in the project directory and use gem install cocoapods to install cocoapods Step 2: So go back into the project directory and do a gem install cocoapods. Step 3: Now type pod install to get the pods project fully created. It will take some time initially because CocoaPods uses a single central git repo of all the available dependencies and it has to download that first.
  5. Simple Steps: # Installation $ pod install # Updation $

    pod update # Implementation $ pod init XCODEPROJ Template of a Podfile: # Define a global platform for your project # platform :ios, '10.0' target 'XCODEPROJ' do # If using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for XCODEPROJ pod 'Alamofire', '~> 4.0' end
  6. - A simple, decentralized dependency manager for Cocoa And there

    comes another approach altogether… Carthage
  7. Step 1: Install Carthage. You can download a DMG installer

    from the Carthage GitHub page. Step 2: Good, open a command line in the project directory and use carthage bootstrap to download and build the dependencies or type $ brew install carthage Step 3: That’s it. Step 4: The only time you have to worry about it again is if you want to update the dependencies. Then you just update the Cartfile with the new dependency or version and run carthage update. The format is just a simple list of dependencies so it's easy to do. Steps to get success with carthage:
  8. 1. Alamofire - URLSession handling 2. Kingfisher - Images handling

    3. Spring - Easy animations 4. Realm - The alternative to CoreData and SQLite 5. SwiftyJSON - Json parsing is neat and type safe … References: “github.com/trending/swift” Top 5 Open Source projects for iOS:
  9. Good practises of using Open Source Libraries Licenses & Standards

    The following OSI-approved licenses are popular, widely used, or have strong communities: § Apache License 2.0 § BSD 3-Clause "New" or "Revised" license § BSD 2-Clause "Simplified" or "FreeBSD" license § GNU General Public License (GPL) § GNU Library or "Lesser" General Public License (LGPL) § MIT license § Common Development and Distribution License Source: https://opensource.org/licenses