Latest 0.2.0
License MIT
Platforms ios 10.0

youbike for iOS project

You can now get the youbike realtime info in a very easy way.
According to available open data from TW Gov, for now, support cities are: Taipei, New Taipei, Taoyuan, Taichung.



pod 'youbike'

At xcode project

import youbike

At Info.plist, add these urls to ‘Exception Domains’ at ‘App Transport Security Settings’


Get all station

youbike.station.all { (stations) in
    // all stations array

Specific city

youbike.station.taoyuan { (stations) in
    // taoyuan stations array

Specific cities

youbike.station.with(locations: [.Taipei, .Taoyuan]) { (stations) in
    // taipei and taoyuan stations array    

Search nearest / result limit

let taoyuanArena = CLLocationCoordinate2D(latitude: 24.9950114,longitude: 121.3229133)
youbike.station.all(withCount: 5, nearest: taoyuanArena) { (stations) in
    // 5 result that near taoyuan arena
youbike.station.taoyuan(withCount: 5, nearest: taoyuanArena) { (stations) in
    // as same as previous one ideally...:p
youbike.station.taoyuan(nearest: taoyuanArena) { (stations) in
    // all taoyuan stations sorted with taoyuan arena
youbike.station.taoyuan(nearest: taoyuanArena) { (stations) in
    // all stations sorted with taoyuan arena

Station update

youbike.station.update(fromStation: <#station#>) { (station) in
    // update for station

Auto Update

Start fetch


Updated result (default: per minute, all stations)


Stop fetch


Auto Update Settings

Location based limit result

youbike.autoUpdate.startUpdating(location: [.Taoyuan], withCount: 3, nearest: taoyuanArena, interval: 2) //3 result near taoyuan arena at taoyuan, update every 2 mins

Change settings while updating

youbike.autoUpdate.count(5) // set result limit to 5
youbike.autoUpdate.interval(minute: 5) // set update interval to 5 mins
youbike.autoUpdate.nearest(CLLocationCoordinate2D) // set nearest location
youbike.autoUpdate.with(location: [location]) // set cities

Latest podspec

    "name": "youbike",
    "version": "0.2.0",
    "summary": "Get Taiwan's youbike realtime information with no pain!",
    "description": "For API documentations, please refer to github project page readme.",
    "homepage": "",
    "license": {
        "type": "MIT"
    "authors": {
        "kahopoon": "[email protected]"
    "platforms": {
        "ios": "10.0"
    "source": {
        "git": "",
        "tag": "0.2.0"
    "source_files": "youbike/*.{swift,plist,h}",
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This