Hola, Apple

1

Hablemos de iOS

2

Conozcamos XCode

3

¿Necesito un iPhone para ser iOS Developer?

Tu primera app en iOS

4

¡Hola, Mundo Apple!

5

Navegación con UINavigationController

6

Modales en la navegación

7

Utilizando controles en código

8

Autolayout vs SwiftUI

9

Autolayout

10

Listas con UITableView

11

Celdas personalizadas para nuestras listas.

12

Persistencia: UserDefaults

Manejo de dependencias

13

CocoaPods

14

Carthage

Servicios Web

15

Primeros pasos para consumir servicios

16

Afinando detalles para consumir servicios

17

Convirtiendo los JSON a modelos

18

Alamofire

Proyecto: PlatziTweets

19

Bienvenido a PlatziTweets

20

Configurando Proyecto

21

Diseñando vistas iniciales

22

Configuración de vistas iniciales

23

Configuración de registro

24

Descripción de la API de PlatziTweets

25

Conexión de la API y Autenticación

26

Registro de usuarios

27

Diseño del Tweet

28

Obteniendo Tweets

29

Creación de vista para publicar Tweets

30

Publicando Tweets

31

Borrando Tweets

32

Integración de la cámara

33

Conexión con Firebase

34

Configuración de XCode para correr app

35

Subir imagen a Firebase

36

Publicar Tweet con imagen

37

Tomando Videos para el Tweet

38

Publicar Tweet con video

39

Detalles del video

40

Accediendo al GPS

41

Implementando mapas con MapsKit

42

Mostrando todos los estudiantes en el mapa

43

Retos del proyecto

En producción

44

Enviar a pruebas con Firebase Distribution

45

Enviar tu aplicación a APP Store Connect

46

Distribución de tu app con TestFlight

iOS Avanzado

47

Dark Mode

48

SwiftUI

49

Terminando detalles de una vista con SwiftUI

50

Objective-C

Hola, iOS Developer

51

Felicidades

52

Expert Session: ¡nuevo espacio para resolver tus dudas sobre el desarrollo de Apps para iOS!

Aún no tienes acceso a esta clase

Crea una cuenta y continúa viendo este curso

Alamofire

18/52
Recursos

Aportes 8

Preguntas 5

Ordenar por:

¿Quieres ver más aportes, preguntas y respuestas de la comunidad? Crea una cuenta o inicia sesión.

Implementado con Carthage! Cocoa pods se siente como ensuciar tu proyecto XD.

Me salio este error, se arreglo haciendo un => pod update

Alamofire es una biblioteca especifica para Swift, que nos permite realizar peticiones a un servidor web cumpliendo y explotando todas las capacidades de HTTP

lo implemente con Carthage y fue de maravilla 🤟🏽

Alamofire 😃

Hice el mismo ejemplo anterior que mencione en la clase pasada pero usando ahora Alamofire

import UIKit
import Alamofire

struct JSONExample : Codable
{
    let userId : Int
    let id : Int
    let title : String
    let completed : Bool
}

class ViewController: UIViewController
{
    @IBOutlet weak var userIDLabel : UILabel!
    @IBOutlet weak var idLabel : UILabel!
    @IBOutlet weak var titleLabel : UILabel!
    @IBOutlet weak var completedLabel : UILabel!
    @IBOutlet weak var activityIndicator: UIActivityIndicatorView!
    
    
    
    override func viewDidLoad()
    {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        
        fetchServices()
    }

    private func fetchServices()
    {
        let URLServer = "https://jsonplaceholder.typicode.com/todos/1"
        
        guard let endpoint = URL(string: URLServer) else
        {
            return
        }
        
        //Inicializacion del Loader
        activityIndicator.startAnimating()
        
        AF.request(endpoint, method: .get, parameters: nil).responseData
        {
            (response: AFDataResponse<Data>) in
            
            //Detencion del Loader
            DispatchQueue.main.async
            {
                self.activityIndicator.stopAnimating()
            }
            
            if response.error != nil
            {
                print("Error. Linea hecha por mi.")
                return
            }
            
            guard let dataFromService = response.data,
                  let model : JSONExample = try? JSONDecoder().decode(JSONExample.self, from: dataFromService) else
            {
                return
            }
            
            //Importante: Todos los llamados a la UI; se hacen en el main thread
            DispatchQueue.main.async
            {
                //self.userIDLabel.text = dictionary["userId"] as? String
                
                self.userIDLabel.text = (model.userId != 0) ? "Contiene algun valor" : "Pues no..."
                
                
                self.idLabel.text = (model.id != 0) ? "Contiene algun valor" : "Al parecer no contiene un valor"
                
                self.titleLabel.text = model.title
                
                
                self.completedLabel.text = model.completed ? "completado" : "no completado"
            
            }
                
        }
    }

}

Excelente clase…

utilizando PopoaCods me sale el siguiente error:

[email protected] Aprendiendo-Servicios % pod install --repo-update
[in /Users/rtidev/OneDrive/Documentos/Rti/FabricaSw/Ios/Aprendiendo-Servicios]
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

[!] Automatically assigning platform iOS with version 14.0 on target Aprendiendo-Servicios because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.

[!] The Aprendiendo-ServiciosUITests [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-Aprendiendo-Servicios-Aprendiendo-ServiciosUITests/Pods-Aprendiendo-Servicios-Aprendiendo-ServiciosUITests.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the$(inherited)` flag, or
- Remove the build settings from the target.

[!] The Aprendiendo-ServiciosUITests [Release] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-Aprendiendo-Servicios-Aprendiendo-ServiciosUITests/Pods-Aprendiendo-Servicios-Aprendiendo-ServiciosUITests.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the$(inherited)` flag, or
- Remove the build settings from the target.

utilizando Carthage me sale el siguiente error:

[email protected] Aprendiendo-Servicios % more Cartfile
github “Alamofire/Alamofire” ~> 5.2
[email protected] Aprendiendo-Servicios % carthage update --platform ios
*** Cloning Alamofire
*** Checking out Alamofire at “5.2.2”
*** xcodebuild output can be found in /var/folders/50/8hydzxfj20x68jsdp8p76nc40000gn/T/carthage-xcodebuild.nIlCqq.log
*** Building scheme “Alamofire iOS” in Alamofire.xcworkspace
Build Failed
Task failed with exit code 1:
/usr/bin/xcrun lipo -create /Users/rtidev/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0.1_12A7300/Alamofire/5.2.2/Build/Intermediates.noindex/ArchiveIntermediates/Alamofire\ iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework/Alamofire /Users/rtidev/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0.1_12A7300/Alamofire/5.2.2/Build/Products/Release-iphonesimulator/Alamofire.framework/Alamofire -output /Users/rtidev/OneDrive/Documentos/Rti/FabricaSw/Ios/Aprendiendo-Servicios/Aprendiendo-Servicios/Carthage/Build/iOS/Alamofire.framework/Alamofire

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/50/8hydzxfj20x68jsdp8p76nc40000gn/T/carthage-xcodebuild.nIlCqq.log