This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colocamos una descripción para nuestro lane | |
desc "Generando Certificados para Weriklandia" | |
# iniciamos nuestro lane con el nombre certificate | |
lane :certificate do | |
# instalamos provising profile de desarrollo | |
match( | |
type: "development" | |
) | |
# instalamos provising profile para ad-hoc | |
match( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aqui declaramos la url del repositorio donde estarán guardados los certificates y provisioning profile | |
git_url "[email protected]:usuario/ios.certificates.git" | |
# Se define el tipo de certificate y provisining profile que se crearar por default | |
# Es decir, cuando escribes solo match en el terminal genera el tipo de certificado que pusiste aqui pueden ser development, ad-hoc, app-store y enterprise. | |
type "development" | |
# Aqui defines los bundle indetifier de las aplicaciones a las cuales les crearemos los provisioning profile | |
app_identifier ["pe.com.orbis.*","pe.com.orbis.OrbisMobile"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Definimos que version minima de Fastlane necesitamos para hacer nuestras tareas | |
# En el momento que estoy escribiendo el post la ultima version es la 2.28.2 | |
fastlane_version "2.28.2" | |
# En plataformas vamos a trabajar | |
default_platform :ios | |
# lane es como una tarea que asu ves tiene un conjunto de acciones las cuales defines segun lo que gustes | |
# Es el nombre de este lane es "beta" | |
lane :beta do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let appID = "(Your App ID on App Store)" | |
let urlStr = "itms-apps://itunes.apple.com/app/id\(appID)" // (Option 1) Open App Page | |
let urlStr = "itms-apps://itunes.apple.com/app/viewContentsUserReviews?id=\(appID)" // (Option 2) Open App Review Tab | |
UIApplication.sharedApplication().openURL(NSURL(string: urlStr)!) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create key default | |
$ ssh-keygen | |
2. Create other key | |
$ ssh-keygen -f ~/.ssh/github_key -C "github_key" | |
3. Create 'config' file | |
$ touch config && nano config | |
4. Add Configuration in config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
struct K { | |
struct URL { | |
static let RecoverPassword = "https://url/recuperar-clave" | |
static let HaveNotUser = "https://url/afiliacion/paso1" | |
static let PagoEfectivoOverview = "url/pe/tarjeta-visa" | |
static let HelpCenter = "http://url/home" | |
static let serviceURL = "https://url/" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// make a request | |
func getListData(parameters : [String:AnyObject], callback: ([NSObject:AnyObject], String?) -> Void) { | |
var urlService : String! | |
var parametersInfo : String! | |
urlService = "\(urlMain)" | |
parametersInfo = setFormDataFromDictionary(parameters) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
func isEmail() -> Bool { | |
let regex = try! NSRegularExpression(pattern: "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$", options: [.CaseInsensitive]) | |
return regex.firstMatchInString(self, options:[], range: NSMakeRange(0, utf16.count)) != nil | |
} | |
func isDni() -> Bool { | |
let regex = try! NSRegularExpression(pattern: "^[0-9]{8}$", options: [.CaseInsensitive]) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class func shakeThis(element:UIView) { | |
element.transform = CGAffineTransformMakeTranslation(-20, 0) | |
UIView.animateWithDuration(0.8, delay: 0.0, usingSpringWithDamping: 0.3, initialSpringVelocity: 0.5, options: UIViewAnimationOptions.CurveEaseInOut, animations: { () -> Void in | |
element.transform = CGAffineTransformIdentity | |
}, completion: nil) | |
// iphoneVibrate |