Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jon Shier
    @jshier
    @jesmg Are you sure the cross signing is correct? Alamofire support cross signing, as that’s what Lets Encrypt uses for its certs, which are used by many clients.
    donners
    @donnersyt
    Hi, I was wondering if it is possible to use HTTP and HTTPS proxies for requests sent through Alamofire on iOS 11 as this demo code does not appear to work for me! https://stackoverflow.com/questions/42616908/how-to-use-a-proxy-server-with-alamofire-4-and-swift-3
    Jon Shier
    @jshier
    It should work, as Alamofire just uses the underlying URLSession functionality. If it’s not working for you, I’d suggest checking your proxy setup and investigating any errors you’re getting from the connection.
    donners
    @donnersyt
    @jshier HTTP requests work ok, but anything over HTTPS returns Error: Optional(Error Domain=kCFErrorDomainCFNetwork Code=310 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2096, _kCFStreamErrorDomainKey=4})
    HTTPS requests work fine when I use the same proxy through my System Settings on my Mac. Do you think I need to change my Info.plist file, as I had to do so in order to be able to send HTTP requests
    Jon Shier
    @jshier
    As long as your HTTPS proxy uses HTTPS for your connection to it, you shouldn’t need to change anything for ATS. Well, unless your proxy connection doesn’t support the encryptions or TLS versions required. Does it?
    Does the error you get have a description or localizedDescription?
    From quick Google it seems likely that error is due to a cert issue when using the proxy. Is it something you can control or fix? Otherwise you might need an ATS exception in your Info.plist.
    Jon Shier
    @jshier
    Also, if you’re manually setting any proxy headers (Proxy-Authenticate or Proxy-Authorization) on a per-URLRequest level, you may want to try moving those headers to the URLSessionConfiguration’s additionalHTTPHeaders property.
    Rick Consuelo Sanchez
    @ricksanchezisagoodman
    hey all! is this the place to ask questions how to use alamofire?
    Jon Shier
    @jshier
    @ricksanchezisagoodman Sure, though we aren’t around much, so Stack Overflow is another option.
    Vikas Singh
    @VikasSingh-NITB
    Hi All....I have applied swizzling on dataTask method from URLSession and its working properly...but its not working for Alamofire request method...any idea...??
    Vikas Singh
    @VikasSingh-NITB
    Anybody help me...??
    Alexis A. Banaag Jr.
    @aabanaag
    Hi, I'm doing a photo upload to our Google Cloud storage but when I try to do multipart upload it fails and returns an error . It shows an error that the bytes are in mismatch. that it expect XXX more than the one it contains. The problem is the size and the image have no changes before the call is being processed. But when I did Alamofire.upload(data, to: URL) it works instantly. Any insights onto why?
    Alexis A. Banaag Jr.
    @aabanaag
    Optional("Invalid request. There were 5583 byte(s) (or more) in the request body. There should have been 5404 byte(s) according to the Content-Range header.") this is the sample error I get when I try to implement a multipartForm upload.
    Jon Shier
    @jshier
    @VikasSingh-NITB Without knowing more about what you’re swizzling, why, and what’s not working, there’s not much we can help you with here. Alamofire doesn’t test any compatibility with swizzling URLSession internals.
    Jon Shier
    @jshier
    @aabanaag Looks like you’re trying to support Drive’s resumable uploads. Those don’t seem to be the same as their multipart uploads, so it doesn’t seem like you can or should combine the two. So you’ll probably need to choose one method and use that, or perhaps use their SDK.
    Vikas Singh
    @VikasSingh-NITB
    Screen Shot 2018-07-16 at 7.02.40 PM.png
    @jshier in above image...App is crashing on completionHandler.....
    And I am calling method from target app viewController like this:
    let urlString = "https://reqres.in/api/register" Alamofire.request(urlString).response { response in // method defaults to.getdebugPrint(response) }
    Vikas Singh
    @VikasSingh-NITB
    Plz help....
    Jon Shier
    @jshier
    @VikasSingh-NITB Alamofire doesn’t use the dataTask(with:completionHandler:) method, so this doesn’t seem to have anything to do with it. I don’t recommend swizzling like that in general, but there’s nothing for Alamofire to do here.
    Vikas Singh
    @VikasSingh-NITB
    Thanks @jshier
    Kashif Jilani
    @kashiftriffort
    I need to do method swizzling using Alamofire
    I have achieve that using using urlsession and it worked, how will swizzling work with Alamorefire
    Vikas Singh
    @VikasSingh-NITB
    @jshier My requirement is automatically instrument all network requests, done by target app. So how we can achieve this if target app using Alamofire for Network call. Plz help....
    sean dev
    @Dev-
    Is there a troubleshooting channel?
    For getting help with Alamofire -- basically I have one request and it just seems to execute the Success block in a .responseJSON even though the error code is 404 and I'm at a loss as to why this is happening.
    Maybe I'm in the wrong place but was hoping someone could point me in the right direction.
    Jon Shier
    @jshier
    @Dev- Without a validate() call as part of your request chain, no status code validation is done, so it’s treated as a success.
    sean dev
    @Dev-
    Thanks -- that helped! Out of curiosity how can I read the body of a response in the failure block after a HTTP failure error code is received or has it simply not been serialized by Alamofire?
    Alexis A. Banaag Jr.
    @aabanaag
    Any help regarding setting up the simulator for xcode 10.1? *** Building scheme "Alamofire iOS" in Alamofire.xcworkspace Could not find any available simulators for iOSgot this error when trying to run carthage update --platform iOS
    Alexis A. Banaag Jr.
    @aabanaag
    Hello, Any documentation for the Alamofire 5 beta?
    Jon Shier
    @jshier
    @aabanaag Just the inline documentation right now. Feel free to ask questions in our topic on the Swift forums, or quick questions here.
    Ted Butler
    @brimestone
    Hey guys, Im new to Alamofire and started using version5 (beta) is there a document reference out there? Im constantly getting confused with the current doc + conversion to what it might be for version 5
    Jon Shier
    @jshier
    @brimestone Currently we only have inline and generated documentation, no guidance documentation. We’ll be rewriting it soon. In the meantime, asking specific questions on our Swift forums (https://forums.swift.org/c/related-projects/alamofire) is probably the best way to get answers.
    Ted Butler
    @brimestone
    Thanks!
    AJBeltran3
    @AJBeltran3
    Hey everyone, looking into starting a new project, not sure whether to go with alamofire 5 beta or back to 4.8.1 to start? Any suggestions?
    Jon Shier
    @jshier
    @AJBeltran3 I’d suggest starting with Alamofire 5, which just hit beta 2. New architecture, new features. Feel free to ask questions on our Swift Forums section.
    Gunter
    @kwontaewan
    hello guys
    May I ask you my issue?
    image.png
    "======================================="
    2019-02-21 17:56:27.685045+0900 Alamofire-SSLPinning-Issue[2860:2368515] CredStore - performQuery - Error copying matching creds. Error=-25300, query={
    class = inet;
    "m_Limit" = "m_LimitAll";
    ptcl = htps;
    "r_Attributes" = 1;
    sdmn = "surf.ddns.net";
    srvr = "surf.ddns.net";
    sync = syna;
    }
    $ curl -v \
    -H "User-Agent: Alamofire-SSLPinning-Issue/1.0 (com.oleg.sample.Alamofire-SSLPinning-Issue; build:1; iOS 11.4.0) Alamofire/4.8.1" \
    -H "Accept-Encoding: gzip;q=1.0, compress;q=0.5" \
    -H "Accept-Language: ko-KR;q=1.0" \
    "https://surf.ddns.net:8443/terms"
    "======================================="
    2019-02-21 17:56:28.552891+0900 Alamofire-SSLPinning-Issue[2860:2368575] CredStore - copyIdentPrefs - Error copying Identity cred. Error=-25300, query={
    class = idnt;
    labl = "https://surf.ddns.net:8443/";
    "r_Ref" = 1;
    }
    2019-02-21 17:56:28.565525+0900 Alamofire-SSLPinning-Issue[2860:2368575] [BoringSSL] Function boringssl_session_errorlog: line 2866 [boringssl_session_handshake_continue] SSL_ERROR_SSL(1): operation failed within the library
    2019-02-21 17:56:28.566811+0900 Alamofire-SSLPinning-Issue[2860:2368575] [BoringSSL] Function boringssl_session_handshake_error_print: line 2805 boringssl ctx 0x1022765b0: 4411365856:error:10000410:SSL routines:OPENSSL_internal:SSLV3_ALERT_HANDSHAKE_FAILURE:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-109.50.14/ssl/tls_record.c:547:SSL alert number 40
    2019-02-21 17:56:28.567191+0900 Alamofire-SSLPinning-Issue[2860:2368575] [BoringSSL] Function boringssl_context_get_os_status: line 4268 SSL_AD_HANDSHAKE_FAILURE
    2019-02-21 17:56:28.579089+0900 Alamofire-SSLPinning-Issue[2860:2368575] TIC TCP Conn Failed [1:0x1022552c0]: 3:-9824 Err(-9824)
    2019-02-21 17:56:28.580169+0900 Alamofire-SSLPinning-Issue[2860:2368575] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)
    2019-02-21 17:56:28.580533+0900 Alamofire-SSLPinning-Issue[2860:2368575] Task <EFDC6262-1F45-463E-A7EF-5D24B510DF7D>.<1> HTTP load failed (error code: -1200 [3:-9824])
    2019-02-21 17:56:28.581979+0900 Alamofire-SSLPinning-Issue[2860:2368574] Task <EFDC6262-1F45-463E-A7EF-5D24B510DF7D>.<1> finished with error - code: -1200
    no response
    Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x10227abb0>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9824, NSErrorPeerCertificateChainKey=(
    "<cert(0x103019a00) s: surf.ddns.net i: Let's Encrypt Authority X3>" ), NSUnderlyingError=0x102284730 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=1, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x10227abb0>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9824, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9824, kCFStreamPropertySSLPeerCertificates=( "<cert(0x103019a00) s: surf.ddns.net i: Let's Encrypt Authority X3>"
    )}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://surf.ddns.net:8443/terms, NSErrorFailingURLStringKey=https://surf.ddns.net:8443/terms, NSErrorClientCertificateStateKey=1}
    I tried searching for the error code in the github issue, but it does not work.
    magnolima
    @magnolima
    hello
    alvileg
    @alvileg
    hello
    is there people here that can help?
    Svyatoslav
    @SvyatoslavLynda
    Hello, who know how to set timeout for SessionManager?
    https://stackoverflow.com/questions/42759693/alamofire-timeout-not-working
    Anthony Plunkett
    @doobeh
    Hi, for those wanting to try out the beta version-- is there any documentation you're tending to refer newcomers to for a basic common API calls (JSON/post etc)
    Jon Shier
    @jshier
    @doobeh The high level APIs are very similar to v4, so that documentation should still work, though you need AF.request instead of Alamofire.request. We’re still working on the rest of the documentation, so let us know if you have any usage questions, either here or on our Swift Forums.
    There is also a new set of top level APIs which accept Encodable parameters and not just [String: Any] dictionaries, use those if you can.