14 March 2015

tech

  1. networking - Alamofire
  2. database - Realm
  3. html parse - HTMLDocument

tech 1 setup alamofire

embedded framework

  1. add alamofire as a submodule
    • open terminal
    • cd to top-level project dir
    • git submodule add https://github.com/Alamofire/Alamofire.git
  2. open Alamofire folder drag Alamofire.xcodeproj into file navigator
  3. ensure Deployment Target of Alamofire.framework matches application target
  4. open Build phases
    • select Target Dependencies group
    • add Alamofire.framework
  5. click +
    • select New Copy File Phases
    • rename this new phases to Copy Frameworks
    • set the Destination to Frameworks
    • add Alamofire.framework

tech 2 setup Realm

  1. download the latest release
  2. drag ios/Realm.framework
    • into file navigator
    • checking Copy items if needs
  3. in Build Phased tab under Link Binary with Libraries
    • add libc++.dylib
  4. drag Swift/RLMSupport.swift
    • into file navigator
    • checking Copy items if needs

tech 3 setup HTMLDocument

  1. add class files and the (option) category/extension to your project
  2. in Build Phased tab under Link Binary with Libraries
    • add libxml2.dylib
  3. in Build Settings under Header Search Pathes
    • add $SDKROOT/usr/include/libxml2
  4. in Build Settings under other linker flags
    • add -lxml2
  5. add Bridging-Header.h
  6. in Build Settings under Objective-C Bridging Header
    • enter Bridging-Header.h

ui

  1. drawer - create-slide-out-navigation-panel-swift


blog comments powered by Disqus