profile
viewpoint
Alamofire Alamofire http://alamofire.org Elegant Networking in Swift

Alamofire/Alamofire 33908

Elegant HTTP Networking in Swift

Alamofire/AlamofireImage 3521

AlamofireImage is an image component library for Alamofire

Alamofire/AlamofireNetworkActivityIndicator 622

Controls the visibility of the network activity indicator on iOS using Alamofire.

Alamofire/Foundation 342

Official Policies for the Alamofire Software Foundation

Alamofire/Rdar-StringInterpolationMemoryLeak 2

Rdar example project demonstrating the string interpolation memory leak in the Response object.

Alamofire/Rdar-URLSessionTaskMetrics 2

Rdar sample project demonstrating the linker issue with URLSessionTaskMetrics on watchOS.

startedAlamofire/Alamofire

started time in 12 minutes

fork javiermanzo/Alamofire

Elegant HTTP Networking in Swift

fork in 34 minutes

startedAlamofire/Alamofire

started time in 5 hours

startedAlamofire/Alamofire

started time in 5 hours

startedAlamofire/Alamofire

started time in 6 hours

issue commentAlamofire/Alamofire

[Alamofire 5] po command in LLDB is not working

This seems to be better in Xcode 12, please take a look.

himaratsu

comment created time in 8 hours

fork Akinrujomuoluwatobi/Alamofire

Elegant HTTP Networking in Swift

fork in 10 hours

startedAlamofire/AlamofireImage

started time in 11 hours

startedAlamofire/Alamofire

started time in 12 hours

fork TatsunoriKanada/Alamofire

Elegant HTTP Networking in Swift

fork in 13 hours

issue commentAlamofire/Alamofire

[Alamofire 5] po command in LLDB is not working

I'm also facing this issue. Any solution yet?

himaratsu

comment created time in 14 hours

issue commentAlamofire/Alamofire

[Alamofire 5] po command in LLDB is not working

Still no solution?

himaratsu

comment created time in 16 hours

startedAlamofire/Alamofire

started time in 18 hours

startedAlamofire/Alamofire

started time in 21 hours

fork NBTech-JK/Alamofire

Elegant HTTP Networking in Swift

fork in a day

startedAlamofire/Alamofire

started time in a day

startedAlamofire/Alamofire

started time in a day

fork dan-c-underwood/Alamofire

Elegant HTTP Networking in Swift

fork in a day

startedAlamofire/Alamofire

started time in a day

fork kkamkari/Alamofire

Elegant HTTP Networking in Swift

fork in a day

startedAlamofire/Alamofire

started time in a day

startedAlamofire/Alamofire

started time in 2 days

startedAlamofire/Alamofire

started time in 2 days

startedAlamofire/Alamofire

started time in 2 days

fork YUNUSMAKAN/Alamofire

Elegant HTTP Networking in Swift

fork in 2 days

startedAlamofire/Alamofire

started time in 2 days

startedAlamofire/Alamofire

started time in 2 days

startedAlamofire/Alamofire

started time in 3 days

startedAlamofire/Alamofire

started time in 3 days

startedAlamofire/Alamofire

started time in 3 days

startedAlamofire/Alamofire

started time in 3 days

issue commentAlamofire/Alamofire

Alamofire 5 (refined) Advanced Usage with OAuth2 token refreshing mechanism example

@GuillaumeBourge you need to draw a line here - and understand Interceptor is actually composed from two distinct protocols Adapter & Retrier:

public protocol RequestInterceptor: RequestAdapter, RequestRetrier

Every supplements that you need to provide your request with - you do it in Adapter methods (thus you "adapt" the request) While all of the retrying & refreshing goes into Retrier.

nugmanoff

comment created time in 3 days

startedAlamofire/Alamofire

started time in 3 days

startedAlamofire/Alamofire

started time in 3 days

fork MingliZhao/Alamofire

Elegant HTTP Networking in Swift

fork in 3 days

issue commentAlamofire/Alamofire

AuthenticationInterceptor(Alamofire5.2) retry process doesn't work well

If you're getting a 401 error, you shouldn't hitting that else case, as it should only fire when you don't have both a request and response. Can you double check your investigation? Or perhaps provide a runnable project which replicates the issue?

k-masashi

comment created time in 3 days

pull request commentAlamofire/Alamofire

On Hold: Add withAllRequests API

The unfortunate fact of the matter is that there doesn't seem to be a good solution for usability coming any time soon. In order to fix the conflict between wanting the single closure using the action and the multiple closure's version having the action in the first closure position, we need to overload the API to drop the completion closure in one version. 😢

I'll make the update and we can ship this API.

jshier

comment created time in 3 days

PR opened Alamofire/Alamofire

A Better debugDescription

Goals :soccer:

This PR enhances the debugDescription for DataResponse and DownloadResponse to include more detail. It also stops decoding body Data as a String if the Content-Type doesn't contain xml, json, or text, with more possible. Additionally, it won't print bodies over 100K in length.

Implementation Details :construction:

A fileprivate namespace, DebugDescription has been added which contains the various logic used between both responses to generate the description. It's all private unless we want to expose it for some reason.

Testing Details :mag:

No tests added, unless we want to do some simple sanity checks or something. I chose not to for now.

+93 -41

0 comment

4 changed files

pr created time in 3 days

create barnchAlamofire/Alamofire

branch : enhancement/better-debug-message

created branch time in 3 days

startedAlamofire/Alamofire

started time in 3 days

startedAlamofire/AlamofireImage

started time in 3 days

startedAlamofire/Alamofire

started time in 3 days

issue commentAlamofire/Alamofire

Alamofire 5 (refined) Advanced Usage with OAuth2 token refreshing mechanism example

No, your credentials are applied to URLRequests through some type conforming to the Authenticator protocol. That type would be responsible for accessing the credential from whatever storage you have. Since it also triggers the refresh, it would also be responsible for storing the new values.

nugmanoff

comment created time in 3 days

issue commentAlamofire/Alamofire

Alamofire 5 (refined) Advanced Usage with OAuth2 token refreshing mechanism example

@GuillaumeBourge Concurrent calls should be handled automatically. The interceptor enqueues any additional requests that were made while refreshing and lets them move forward once the token is updated.

Thanks for the answer ! My bad i was not using the same instance of interceptor on different call.. I have a second question, credentials are retained and "managed" by the interceptor, am i right ? How can i handle token persistance for app restart ?

  • save new tokens at the end of "refresh" function of the interceptor in KeyChain for exemple
  • start an unique instance at the application Start with Tokens from Keychain ?
nugmanoff

comment created time in 3 days

issue commentAlamofire/Alamofire

Alamofire 5 (refined) Advanced Usage with OAuth2 token refreshing mechanism example

@GuillaumeBourge Concurrent calls should be handled automatically. The interceptor enqueues any additional requests that were made while refreshing and lets them move forward once the token is updated.

nugmanoff

comment created time in 3 days

issue commentAlamofire/Alamofire

Alamofire 5 (refined) Advanced Usage with OAuth2 token refreshing mechanism example

@cnoon Thanks for this feature, but how can we handle concurrent calls ? Exemple : I have my accessToken expired, and two different call are fired at the same time "getUser" and "getActivities". Now both fire the refresh event and the last of two to reach the server failed (cause the first successfully get the new couple of tokens).

Ideally the first request to call "refresh" should lock every other requests until the reception of the response, and moreover propagate the new token

nugmanoff

comment created time in 3 days

startedAlamofire/Alamofire

started time in 3 days

fork coderxdotwang/Alamofire

Elegant HTTP Networking in Swift

fork in 4 days

startedAlamofire/Alamofire

started time in 4 days

fork ahmedbenahmed/Alamofire

Elegant HTTP Networking in Swift

fork in 4 days

startedAlamofire/Alamofire

started time in 4 days

startedAlamofire/Alamofire

started time in 4 days

startedAlamofire/Alamofire

started time in 4 days

startedAlamofire/Alamofire

started time in 4 days

startedAlamofire/Alamofire

started time in 4 days

startedAlamofire/Alamofire

started time in 4 days

fork musoga/Alamofire

Elegant HTTP Networking in Swift

fork in 4 days

startedAlamofire/AlamofireImage

started time in 4 days

fork juneha14/Alamofire

Elegant HTTP Networking in Swift

fork in 4 days

fork renatogirao/Alamofire

Elegant HTTP Networking in Swift

fork in 4 days

startedAlamofire/Alamofire

started time in 4 days

startedAlamofire/Alamofire

started time in 4 days

issue closedAlamofire/Alamofire

How to calling previous token in Alamofire?

I have already make my Login page using basic authentication token. I just save the token that I have already got in keychain. When I wanna call that token in another API Class, it shows an error "500, invalid token, data null". Is it correct if I only make the request interceptor only in my other API class (not in my login page too)?

closed time in 4 days

haruharuya

issue commentAlamofire/Alamofire

How to calling previous token in Alamofire?

Alamofire supports adding RequestInterceptors, including adapters, on a per-Request basis, so you should be able to only add it to those requires which need authorization. You could also use a single, global adapter which just ignores the login URL when attempting to add credentials.

haruharuya

comment created time in 4 days

issue commentAlamofire/Alamofire

when I upload single image . I got the response when progress is 1.0 but in middle it does provide progress like 0.1, 0.2, 0.3...09

Progress callbacks are not guaranteed and they're especially not guaranteed to produce a certain number of intermediate values. Alamofire's progress callbacks are based on the URLSession delegate callbacks, so we only update as often as the system calls those methods. If the upload is fast or the payload small you won't see many, if any, callbacks at all.

abbasnaqvi200

comment created time in 4 days

issue closedAlamofire/Alamofire

when I upload single image . I got the response when progress is 1.0 but in middle it does provide progress like 0.1, 0.2, 0.3...09

Alamofire.upload(multipartFormData: { (multipartFormData) in

        multipartFormData.append(image, withName: "image" fileName: "file.mp4)", mimeType: "jpg")
        


        print(param)
        }, to:url)
    { (result) in
        switch result {
        case .success(let upload, _, _):
            upload.uploadProgress(closure: { (progress) in

//this function is not calling .. i want progress of image

            })

            upload.responseJSON { response in
            }
        
        case .failure( _): break
        
        }
    }

closed time in 4 days

abbasnaqvi200

fork bzhoek/Alamofire

Elegant HTTP Networking in Swift

fork in 4 days

issue closedAlamofire/Alamofire

Crash Using Alamofire Within App Clip

[ * ] I've read, understood, and done my best to follow the *CONTRIBUTING guidelines.

What did you do?

Added the Alamofire to my App Clip target using Cocapods

What did you expect to happen?

It to work as per other targets.

What happened instead?

I get an on-launch crash with the error:

dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
  Referenced from: /private/var/containers/Bundle/Application/53C78E93-79E0-438F-AA1C-11324FE1B0D4/SleepiestAppClip.app/SleepiestAppClip
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb) 

Pod File:

use_frameworks!

target 'Sleepiest' do
platform :ios, '11.0'
pod 'Alamofire', '~> 5.2'
end

target 'SleepiestAppClip' do
platform :ios, '14.0'
pod 'Alamofire', '~> 5.2'
end

Alamofire Environment

**Alamofire version: 5.2 **Xcode version: 12.0 beta 2 **Swift version: 5 **Platform(s) running Alamofire: iOS App Clip **macOS version running Xcode: 10.15.4

Demo Project

Seems to happen with any empty project with an App Clip target.

closed time in 4 days

AssyriaGameStudio

issue commentAlamofire/Alamofire

Crash Using Alamofire Within App Clip

This is an issue with CocoaPods which is fixed on their master branch. In the mean time you could try their prerelease version or use SPM through Xcode to integrate your dependencies.

AssyriaGameStudio

comment created time in 4 days

issue openedAlamofire/Alamofire

Crash Using Alamofire Within App Clip

[ * ] I've read, understood, and done my best to follow the *CONTRIBUTING guidelines.

What did you do?

Added the Alamofire to my App Clip target using Cocapods

What did you expect to happen?

It to work as per other targets.

What happened instead?

I get an on-launch crash with the error:

dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
  Referenced from: /private/var/containers/Bundle/Application/53C78E93-79E0-438F-AA1C-11324FE1B0D4/SleepiestAppClip.app/SleepiestAppClip
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb) 

Pod File:

use_frameworks!

target 'Sleepiest' do
platform :ios, '11.0'
pod 'Alamofire', '~> 5.2'
end

target 'SleepiestAppClip' do
platform :ios, '14.0'
pod 'Alamofire', '~> 5.2'
end

Alamofire Environment

**Alamofire version: 5.2 **Xcode version: 12.0 beta 2 **Swift version: 5 **Platform(s) running Alamofire: iOS App Clip **macOS version running Xcode: 10.15.4

Demo Project

Seems to happen with any empty project with an App Clip target.

created time in 4 days

startedAlamofire/Alamofire

started time in 4 days

fork wise-emotions/Alamofire

Elegant HTTP Networking in Swift

fork in 5 days

fork sameh0/Alamofire

Elegant HTTP Networking in Swift

fork in 5 days

startedAlamofire/Alamofire

started time in 5 days

startedAlamofire/Alamofire

started time in 5 days

startedAlamofire/Alamofire

started time in 5 days

startedAlamofire/Alamofire

started time in 5 days

startedAlamofire/Alamofire

started time in 5 days

startedAlamofire/Alamofire

started time in 5 days

startedAlamofire/Alamofire

started time in 5 days

issue commentAlamofire/Alamofire

Xcode 12 Beta Archive issue

Encountered this at Xcode 12 beta 2 as well :(

kamzab95

comment created time in 5 days

fork pykaso/Alamofire

Elegant HTTP Networking in Swift

fork in 5 days

fork jasdeepsaini/Alamofire

Elegant HTTP Networking in Swift

fork in 5 days

fork samdrumond/Alamofire

Elegant HTTP Networking in Swift

fork in 5 days

startedAlamofire/Alamofire

started time in 5 days

startedAlamofire/Alamofire

started time in 5 days

fork bigosm/Alamofire

Elegant HTTP Networking in Swift

fork in 5 days

startedAlamofire/Alamofire

started time in 5 days

startedAlamofire/Alamofire

started time in 6 days

fork tjasajan/Alamofire

Elegant HTTP Networking in Swift

fork in 6 days

startedAlamofire/Alamofire

started time in 6 days

startedAlamofire/Alamofire

started time in 6 days

startedAlamofire/Alamofire

started time in 6 days

startedAlamofire/Alamofire

started time in 6 days

startedAlamofire/Alamofire

started time in 6 days

startedAlamofire/Alamofire

started time in 6 days

fork tonywakuu/Alamofire

Elegant HTTP Networking in Swift

fork in 6 days

startedAlamofire/Alamofire

started time in 6 days

startedAlamofire/Alamofire

started time in 6 days

issue openedAlamofire/Alamofire

How to calling previous token in Alamofire?

I have already make my Login page using basic authentication token. I just save the token that I have already got in keychain. When I wanna call that token in another API Class, it shows an error "500, invalid token, data null". Is it correct if I only make the request interceptor only in my other API class (not in my login page too)?

created time in 6 days

more