Skip to content

Instantly share code, notes, and snippets.

View camyoh's full-sized avatar

Andrés Mendieta camyoh

  • Bogotá, Colombia
View GitHub Profile
@camyoh
camyoh / getIP.swift
Last active April 10, 2024 02:28
Get the IP on iphone, swift 5
let ipName = getIpAddress() ?? ""
func getIpAddress() -> String? {
var address : String?
// Get list of all interfaces on the local machine:
var ifaddr : UnsafeMutablePointer<ifaddrs>?
guard getifaddrs(&ifaddr) == 0 else { return nil }
guard let firstAddr = ifaddr else { return nil }
@camyoh
camyoh / ViewController.swift
Created March 26, 2022 12:12
Simple Table View with data
//
// ViewController.swift
// prefetching
//
// Created by Andres Mendieta on 3/26/22.
//
import UIKit
/// Primary app view controller