Alamofire multiuser loading error in Swift

When I tried to upload an image using Alamofire, I get an error in .POST

Im attaching an image along with this to show an error

( http://www.awesomescreenshot.com/image/422237/0d5fe4a4b486b14fdf52f8ca26d22bea )

0
source share
2 answers

I had the same problem as Michal said that the installation problem, if you use cocoapods , go to your files/pods/Alamofires/Source project and make sure that you have 9 files exactly like this image, and make sure that the MultipartFormData.swift file is

if you are not using cocoapods , just open the Alamofire folder and go to the source folder and make sure you have the same files.

if you did not find MultipartFormData.swift , it means that your version of Alamofire does not support MultipartFormData, then you will need to get the latest version here of Alamofire , or if you use cocoapods , you need to update the Alamofire pod line on the podfile to look like

 platform :ios, '8.0' use_frameworks! target 'ProjectName' do pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'master' end target 'ProjectNameTests' do end 

after updating your pod file you need to run this command to update the cocoapods project

 pod install --verbose 
+4
source

Alamofire may have a problem installing. Make sure you import it correctly.

Changing .POST for Alamofire.Method.POST or Method.POST (if you also configured iOS 7 and you did not import Alamofire as a dynamic structure) will show the real problem or fix your problem.

Check this thread . Also, remember that with iOS 7 support, you do not call Alamofire methods with the Alamofire keyword Alamofire. .

0
source

All Articles