Implementado con Carthage! Cocoa pods se siente como ensuciar tu proyecto XD.
Hola, Apple
Hablemos de iOS
Conozcamos XCode
¿Necesito un iPhone para ser iOS Developer?
Tu primera app en iOS
¡Hola, Mundo Apple!
Navegación con UINavigationController
Modales en la navegación
Utilizando controles en código
Autolayout vs SwiftUI
Autolayout
Listas con UITableView
Celdas personalizadas para nuestras listas.
Persistencia: UserDefaults
Manejo de dependencias
CocoaPods
Carthage
Servicios Web
Primeros pasos para consumir servicios
Afinando detalles para consumir servicios
Convirtiendo los JSON a modelos
Alamofire
Proyecto: PlatziTweets
Bienvenido a PlatziTweets
Configurando Proyecto
Diseñando vistas iniciales
Configuración de vistas iniciales
Configuración de registro
Descripción de la API de PlatziTweets
Conexión de la API y Autenticación
Registro de usuarios
Diseño del Tweet
Obteniendo Tweets
Creación de vista para publicar Tweets
Publicando Tweets
Borrando Tweets
Integración de la cámara
Conexión con Firebase
Configuración de XCode para correr app
Subir imagen a Firebase
Publicar Tweet con imagen
Tomando Videos para el Tweet
Publicar Tweet con video
Detalles del video
Accediendo al GPS
Implementando mapas con MapsKit
Mostrando todos los estudiantes en el mapa
Retos del proyecto
En producción
Enviar a pruebas con Firebase Distribution
Enviar tu aplicación a APP Store Connect
Distribución de tu app con TestFlight
iOS Avanzado
Dark Mode
SwiftUI
Terminando detalles de una vista con SwiftUI
Objective-C
Hola, iOS Developer
Felicidades
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
Aportes 8
Preguntas 5
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
¿Quieres ver más aportes, preguntas y respuestas de la comunidad? Crea una cuenta o inicia sesión.