SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
ABANDONNER ALAMOFIRE
(OU COMMENT ALAMOFIRE NOUS A LAISSÉ TOMBER)
def shared_pods
pod 'Alamofire', '~> 3.3.0'
pod 'Appboy-iOS-SDK', '2.21.0'
pod 'Branch', '0.11.16'
pod 'CLImageEditor', '0.1.4'
pod 'CMPopTipView', '2.2.0'
pod 'Crashlytics', '~> 3.8.2'
pod 'CRToast', '0.0.9'
pod 'DraggableCollectionView', '0.1'
pod 'DZNEmptyDataSet', '1.7.3'
pod 'DZNSegmentedControl', '1.3.2'
pod 'Fabric', '~> 1.6.9'
pod 'FBSDKCoreKit', '4.15.1'
pod 'FBSDKLoginKit', '4.15.1'
pod 'FBSDKShareKit', '4.15.1'
pod 'InstagramKit', '3.7'
pod ‘StreemMapper'
pod 'RealmSwift', ' ~> 2.0.0'
pod 'SDWebImage/WebP', '3.8.1'
pod 'SimpleAuth/Meetup', '0.3.2'
pod 'SnapKit', '~> 0.22.0'
pod 'Starscream', '1.1.3'
pod 'SVProgressHUD', '1.1.3'
pod 'SVWebViewController', :git => 'https://github.com/TransitApp/SVW
end
DÉPENDENCES COCOAPODS
PROBLÈMES DES LIBRAIRIES EXTERNES
▸ Code non maitrisé
▸ Bugs potentiels à chaque mise à jour
▸ Potentiel abandon
PROBLÈMES AVEC ALAMOFIRE
▸ Complexe à appréhender
▸ Difficile à forker
▸ Ne fournit pas d’architecture
▸ Besoin d’autres librairies (JSON, Rx,…)
REQUETE HTTP ALAMOFIRE
Alamofire.request("https://api.deezer.com/track/123")
.responseJSON { (response:DataResponse<Any>) in
//Manage JSON response
}
PROBLÈMES AVEC ALAMOFIRE
APP
NETWORK LAYER
ALAMOFIRE
INTERNET
Adapted from Moya
PROBLÈMES RENCONTRÉS CHEZ HER
▸ Changement du header User-Agent
▸ Abandon d’iOS8
3h de perdues
?
PLUSIEURS SOLUTIONS
▸ Abandonner iOS8
▸ Forker Alamofire
▸ Rester sur Swift 2 et Xcode 7
▸ Utiliser une autre librairie
▸ Réécrire un nouveau module
NIKKA - IDÉES
▸ Répondre à 90% des besoins utilisateurs
▸ Pouvoir adapter le noyaux à ses besoins
▸ Pouvoir gérer différentes APIs
▸ Fournir une structure de base
▸ Pouvoir ajouter des extensions
NIKKA - IMPLÉMENTATION
class DeezerProvider:HTTPProvider {
let baseURL = URL(string:"https://api.deezer.com")!
let additionalHeaders = ["access_token":"eyJh..."]
}
Provider
class DeezerProvider:HTTPProvider {
let baseURL = URL(string:"https://api.deezer.com")!
}
class DeezerProvider:HTTPProvider {
let baseURL = URL(string:"https://api.deezer.com")!
let additionalHeaders = ["access_token":"eyJh..."]
func validate(response: HTTPURLResponse, data: Data,
error: Error?) -> NikkaError? {
}
}
NIKKA - IMPLÉMENTATION
extension Route{
static let me = Route(path:"/me")
static let infos = Route(path:"/infos")
static let track = {(id:Int64) in Route(path:"/track/(id)")}
static let ratePlaylist = {(id:Int,rating:Int) in
Route(path:"/playlist/(id)",
method:.post,
params:["note":rating])
}
}
Route
NIKKA - IMPLÉMENTATION
DeezerProvider().request(.track(12345678)).response{
(response:Response<Any>?) in
}
Making a request
NIKKA - EXTENSIONS
JSON
DeezerProvider().request(.track(12345678)).responseObject{
(Response<Track>) in
}
Librairies supportées :
• Gloss
• ModelMapper
• ObjectMapper
• StreemMapper
• Unbox
NIKKA - EXTENSIONS
Futures
Rx
let track:Future<Track> =
DeezerProvider().request(.track(12345678)).responseObject()
let track:Observable<Track> =
DeezerProvider().request(.track(12345678)).responseObject()
SOURCES
Feel free to reach out at
emilien@weareher.com
github.com/JustaLab/Nikka
medium.com/@streem

Contenu connexe

Tendances

Tendances (20)

It Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software DevelopmentIt Works On My Machine: Vagrant for Software Development
It Works On My Machine: Vagrant for Software Development
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 
CloudKit as a backend
CloudKit as a backendCloudKit as a backend
CloudKit as a backend
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
Dockerize node.js application
Dockerize node.js applicationDockerize node.js application
Dockerize node.js application
 
Scale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic BeanstalkScale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic Beanstalk
 
Cocoa pods
Cocoa podsCocoa pods
Cocoa pods
 
IaC and Immutable Infrastructure with Terraform, Сергей Марченко
IaC and Immutable Infrastructure with Terraform, Сергей МарченкоIaC and Immutable Infrastructure with Terraform, Сергей Марченко
IaC and Immutable Infrastructure with Terraform, Сергей Марченко
 
Pluralsight Webinar: Simplify Your Project Builds with Docker
Pluralsight Webinar: Simplify Your Project Builds with DockerPluralsight Webinar: Simplify Your Project Builds with Docker
Pluralsight Webinar: Simplify Your Project Builds with Docker
 
TechUG - Kubernetes 101 - May 2020
TechUG - Kubernetes 101 - May 2020TechUG - Kubernetes 101 - May 2020
TechUG - Kubernetes 101 - May 2020
 
Introduction to Vagrant
Introduction to VagrantIntroduction to Vagrant
Introduction to Vagrant
 
Docker deploy
Docker deployDocker deploy
Docker deploy
 
PuppetConf 2016: Building Nano Server Images with Puppet and DSC – Michael Sm...
PuppetConf 2016: Building Nano Server Images with Puppet and DSC – Michael Sm...PuppetConf 2016: Building Nano Server Images with Puppet and DSC – Michael Sm...
PuppetConf 2016: Building Nano Server Images with Puppet and DSC – Michael Sm...
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
МИХАЙЛО ЗЕНІН «Dockerizing environment for mobile test automation. Scaling fr...
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de Vagrant
 
App development with quasar (pdf)
App development with quasar (pdf)App development with quasar (pdf)
App development with quasar (pdf)
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with Docker
 
Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]Vagrant + Docker provider [+Puppet]
Vagrant + Docker provider [+Puppet]
 
Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-Overview
 

En vedette

En vedette (20)

Handle the error
Handle the errorHandle the error
Handle the error
 
Make Acccessibility Great Again
Make Acccessibility Great AgainMake Acccessibility Great Again
Make Acccessibility Great Again
 
Project Entourage
Project EntourageProject Entourage
Project Entourage
 
Comment faire de HLS votre solution vidéo préférée ?
Comment faire de HLS votre solution vidéo préférée ?Comment faire de HLS votre solution vidéo préférée ?
Comment faire de HLS votre solution vidéo préférée ?
 
Advanced functional programing in Swift
Advanced functional programing in SwiftAdvanced functional programing in Swift
Advanced functional programing in Swift
 
Quoi de neuf dans iOS 10.3
Quoi de neuf dans iOS 10.3Quoi de neuf dans iOS 10.3
Quoi de neuf dans iOS 10.3
 
Présentation de HomeKit
Présentation de HomeKitPrésentation de HomeKit
Présentation de HomeKit
 
La sécurité sur iOS par Arnaud de Bock
La sécurité sur iOS par Arnaud de BockLa sécurité sur iOS par Arnaud de Bock
La sécurité sur iOS par Arnaud de Bock
 
L'intégration continue avec Bitrise
L'intégration continue avec BitriseL'intégration continue avec Bitrise
L'intégration continue avec Bitrise
 
IoT Best practices
 IoT Best practices IoT Best practices
IoT Best practices
 
How to communicate with Smart things?
How to communicate with Smart things?How to communicate with Smart things?
How to communicate with Smart things?
 
Programme MFI retour d'expérience
Programme MFI retour d'expérienceProgramme MFI retour d'expérience
Programme MFI retour d'expérience
 
CONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANECONTINUOUS DELIVERY WITH FASTLANE
CONTINUOUS DELIVERY WITH FASTLANE
 
What's new in iOS9
What's new in iOS9What's new in iOS9
What's new in iOS9
 
SwiftyGPIO
SwiftyGPIOSwiftyGPIO
SwiftyGPIO
 
Monads in Swift
Monads in SwiftMonads in Swift
Monads in Swift
 
Tout savoir pour devenir Freelance
Tout savoir pour devenir FreelanceTout savoir pour devenir Freelance
Tout savoir pour devenir Freelance
 
Super combinators
Super combinatorsSuper combinators
Super combinators
 
Safari app extensions cleared up by Sanaa Squalli
Safari app extensions cleared up by Sanaa SqualliSafari app extensions cleared up by Sanaa Squalli
Safari app extensions cleared up by Sanaa Squalli
 
Introduction to WebRTC on iOS
Introduction to WebRTC on iOSIntroduction to WebRTC on iOS
Introduction to WebRTC on iOS
 

Similaire à Alamofire

Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development
Phuoc Nguyen
 
Wtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_publicWtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_public
Jaime Blasco
 
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
RootedCON
 
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post ExploitPenetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
JongWon Kim
 

Similaire à Alamofire (20)

Gatekeeper Exposed
Gatekeeper ExposedGatekeeper Exposed
Gatekeeper Exposed
 
Virus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing GatekeeperVirus Bulletin 2015: Exposing Gatekeeper
Virus Bulletin 2015: Exposing Gatekeeper
 
Metasploit seminar
Metasploit seminarMetasploit seminar
Metasploit seminar
 
ADVANCED MALWARE THREATS -- NO HAT 2019 (BERGAMO / ITALY)
ADVANCED MALWARE THREATS --  NO HAT 2019 (BERGAMO / ITALY)ADVANCED MALWARE THREATS --  NO HAT 2019 (BERGAMO / ITALY)
ADVANCED MALWARE THREATS -- NO HAT 2019 (BERGAMO / ITALY)
 
What the Struts?
What the Struts?What the Struts?
What the Struts?
 
Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development
 
FRIDA 101 Android
FRIDA 101 AndroidFRIDA 101 Android
FRIDA 101 Android
 
Black Hat '15: Writing Bad @$$ Malware for OS X
Black Hat '15: Writing Bad @$$ Malware for OS XBlack Hat '15: Writing Bad @$$ Malware for OS X
Black Hat '15: Writing Bad @$$ Malware for OS X
 
Wtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_publicWtf is happening_inside_my_android_phone_public
Wtf is happening_inside_my_android_phone_public
 
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...Jaime Blasco & Pablo Rincón -  Lost in translation: WTF is happening inside m...
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
 
Parrot Drones Hijacking
Parrot Drones HijackingParrot Drones Hijacking
Parrot Drones Hijacking
 
Debugging: Or How I Learned To Stop Worrying and Love EXC_BAD_ACCESS
Debugging: Or How I Learned To Stop Worrying and Love EXC_BAD_ACCESSDebugging: Or How I Learned To Stop Worrying and Love EXC_BAD_ACCESS
Debugging: Or How I Learned To Stop Worrying and Love EXC_BAD_ACCESS
 
Putting Rugged Into your DevOps Toolchain
Putting Rugged Into your DevOps ToolchainPutting Rugged Into your DevOps Toolchain
Putting Rugged Into your DevOps Toolchain
 
My name is Trinidad
My name is TrinidadMy name is Trinidad
My name is Trinidad
 
DrupalCamp London 2017 - Web site insecurity
DrupalCamp London 2017 - Web site insecurity DrupalCamp London 2017 - Web site insecurity
DrupalCamp London 2017 - Web site insecurity
 
OS X Malware: Let's Play Doctor
OS X Malware: Let's Play DoctorOS X Malware: Let's Play Doctor
OS X Malware: Let's Play Doctor
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)
 
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post ExploitPenetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
 
A Developer’s Guide to Kubernetes Security
A Developer’s Guide to Kubernetes SecurityA Developer’s Guide to Kubernetes Security
A Developer’s Guide to Kubernetes Security
 
Ilomo Clampi Botnet Aug2009
Ilomo Clampi Botnet Aug2009Ilomo Clampi Botnet Aug2009
Ilomo Clampi Botnet Aug2009
 

Plus de CocoaHeads France

Plus de CocoaHeads France (14)

Mutation testing for a safer Future
Mutation testing for a safer FutureMutation testing for a safer Future
Mutation testing for a safer Future
 
iOS App Group for Debugging
iOS App Group for DebuggingiOS App Group for Debugging
iOS App Group for Debugging
 
Asynchronous swift
Asynchronous swiftAsynchronous swift
Asynchronous swift
 
Visual accessibility in iOS11
Visual accessibility in iOS11Visual accessibility in iOS11
Visual accessibility in iOS11
 
My script - One year of CocoaHeads
My script - One year of CocoaHeadsMy script - One year of CocoaHeads
My script - One year of CocoaHeads
 
Ui testing dealing with push notifications
Ui testing dealing with push notificationsUi testing dealing with push notifications
Ui testing dealing with push notifications
 
Design like a developer
Design like a developerDesign like a developer
Design like a developer
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPods
 
Let's migrate to Swift 3.0
Let's migrate to Swift 3.0Let's migrate to Swift 3.0
Let's migrate to Swift 3.0
 
Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.
 
Un retour d'expérience sur Apple Pay
Un retour d'expérience sur Apple PayUn retour d'expérience sur Apple Pay
Un retour d'expérience sur Apple Pay
 
MVC-RS par Grégoire Lhotelier
MVC-RS par Grégoire LhotelierMVC-RS par Grégoire Lhotelier
MVC-RS par Grégoire Lhotelier
 
Firebase par nicolas lehovetzki
Firebase par nicolas lehovetzkiFirebase par nicolas lehovetzki
Firebase par nicolas lehovetzki
 
J'ai fait une app native en React Native
J'ai fait une app native en React NativeJ'ai fait une app native en React Native
J'ai fait une app native en React Native
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Dernier (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

Alamofire

  • 1. ABANDONNER ALAMOFIRE (OU COMMENT ALAMOFIRE NOUS A LAISSÉ TOMBER)
  • 2. def shared_pods pod 'Alamofire', '~> 3.3.0' pod 'Appboy-iOS-SDK', '2.21.0' pod 'Branch', '0.11.16' pod 'CLImageEditor', '0.1.4' pod 'CMPopTipView', '2.2.0' pod 'Crashlytics', '~> 3.8.2' pod 'CRToast', '0.0.9' pod 'DraggableCollectionView', '0.1' pod 'DZNEmptyDataSet', '1.7.3' pod 'DZNSegmentedControl', '1.3.2' pod 'Fabric', '~> 1.6.9' pod 'FBSDKCoreKit', '4.15.1' pod 'FBSDKLoginKit', '4.15.1' pod 'FBSDKShareKit', '4.15.1' pod 'InstagramKit', '3.7' pod ‘StreemMapper' pod 'RealmSwift', ' ~> 2.0.0' pod 'SDWebImage/WebP', '3.8.1' pod 'SimpleAuth/Meetup', '0.3.2' pod 'SnapKit', '~> 0.22.0' pod 'Starscream', '1.1.3' pod 'SVProgressHUD', '1.1.3' pod 'SVWebViewController', :git => 'https://github.com/TransitApp/SVW end DÉPENDENCES COCOAPODS
  • 3. PROBLÈMES DES LIBRAIRIES EXTERNES ▸ Code non maitrisé ▸ Bugs potentiels à chaque mise à jour ▸ Potentiel abandon
  • 4. PROBLÈMES AVEC ALAMOFIRE ▸ Complexe à appréhender ▸ Difficile à forker ▸ Ne fournit pas d’architecture ▸ Besoin d’autres librairies (JSON, Rx,…)
  • 5. REQUETE HTTP ALAMOFIRE Alamofire.request("https://api.deezer.com/track/123") .responseJSON { (response:DataResponse<Any>) in //Manage JSON response }
  • 6. PROBLÈMES AVEC ALAMOFIRE APP NETWORK LAYER ALAMOFIRE INTERNET Adapted from Moya
  • 7. PROBLÈMES RENCONTRÉS CHEZ HER ▸ Changement du header User-Agent ▸ Abandon d’iOS8 3h de perdues ?
  • 8. PLUSIEURS SOLUTIONS ▸ Abandonner iOS8 ▸ Forker Alamofire ▸ Rester sur Swift 2 et Xcode 7 ▸ Utiliser une autre librairie ▸ Réécrire un nouveau module
  • 9. NIKKA - IDÉES ▸ Répondre à 90% des besoins utilisateurs ▸ Pouvoir adapter le noyaux à ses besoins ▸ Pouvoir gérer différentes APIs ▸ Fournir une structure de base ▸ Pouvoir ajouter des extensions
  • 10. NIKKA - IMPLÉMENTATION class DeezerProvider:HTTPProvider { let baseURL = URL(string:"https://api.deezer.com")! let additionalHeaders = ["access_token":"eyJh..."] } Provider class DeezerProvider:HTTPProvider { let baseURL = URL(string:"https://api.deezer.com")! } class DeezerProvider:HTTPProvider { let baseURL = URL(string:"https://api.deezer.com")! let additionalHeaders = ["access_token":"eyJh..."] func validate(response: HTTPURLResponse, data: Data, error: Error?) -> NikkaError? { } }
  • 11. NIKKA - IMPLÉMENTATION extension Route{ static let me = Route(path:"/me") static let infos = Route(path:"/infos") static let track = {(id:Int64) in Route(path:"/track/(id)")} static let ratePlaylist = {(id:Int,rating:Int) in Route(path:"/playlist/(id)", method:.post, params:["note":rating]) } } Route
  • 13. NIKKA - EXTENSIONS JSON DeezerProvider().request(.track(12345678)).responseObject{ (Response<Track>) in } Librairies supportées : • Gloss • ModelMapper • ObjectMapper • StreemMapper • Unbox
  • 14. NIKKA - EXTENSIONS Futures Rx let track:Future<Track> = DeezerProvider().request(.track(12345678)).responseObject() let track:Observable<Track> = DeezerProvider().request(.track(12345678)).responseObject()
  • 15. SOURCES Feel free to reach out at emilien@weareher.com github.com/JustaLab/Nikka medium.com/@streem