pmusolino / wormholy Goto Github PK
View Code? Open in Web Editor NEWiOS network debugging, like a wizard ๐งโโ๏ธ
License: MIT License
iOS network debugging, like a wizard ๐งโโ๏ธ
License: MIT License
Found an issue with library.
After making an api call which is a POST request with multi-part content. Every next API call results into timeout.
Please suggest a resolution for this?
Hi! I just notice that now by default, shakeEnabled is false. Is this the intended behaviour? @davedelong I've created a PR to change that value
The current way of invoking Wormholy mentioned in the documentation doesn't work:
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "wormholy_fire"), object: nil)
Please update wormholy_fire
-> wormholy_shake
.
Is there a way to export the network data for a specific endpoint?
Hi there,
I'm trying to use the library via CocoaPods but it gives the error below.
[!] Unable to find a specification for
Wormholy
Maybe something got broken in latest version of .podspec file.
Thnx already.
Currently Wormholy
will log all the network calls that uses NSURLSession
so you will see many requests being triggered by third party SDKs which I don't want always to see but I would like to see all the requests related to my domain.
Also it would be nice if we can clear the log.
When I update the Xcode to 10.2, our App crashed at launch time with the log:
"Swift class extensions and categories on Swift classes are not allowed to have +load methods"
I removed Wormholy and no crash appear.
Currently if a UIViewController has presented a modal, Wormholy is unable to get presented.
I made a PR #43 to fix this by recursively checking the presentedViewController
that's my code
NSMutableURLRequest *request = [requestSerializer requestWithMethod:[obj methodString] URLString:[NSString stringWithFormat:@"%@%@", [obj apiUrl]] parameters:params error:nil];
NSURLSessionDataTask *dataTask = [self.manager dataTaskWithRequest:request uploadProgress:^(NSProgress * _Nonnull uploadProgress) {
} downloadProgress:^(NSProgress * _Nonnull downloadProgress) {
} completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject,
breakpoint not run here in wormholy
override init(request: URLRequest, cachedResponse: CachedURLResponse?, client: URLProtocolClient?) {
super.init(request: request, cachedResponse: cachedResponse, client: client)
if session == nil {
session = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
}
}
Response body formatter for JSON and XML contents
It would be nice to be able to tell Wormholy which URLs to ignore from saving response data to memory.
We use it in our current project and we were downloading some big files, until we realized that Wormholy was storing that data in memory for the request history. We kept Wormholy but had to tweak it to avoid this (CustomHTTPProtocol.swift
file, urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data)
function implementation).
It would be ideal to have this array of URL to ignore (or in fact, URL regex to ignore), and maybe if it's useful for someone, URL to ignore completely (request and response).
I think you probably forgot about your other project PMAlertController, and since you are apparently active here I'm asking you here to please respond to my latest comment on this issue.
Thanks.
Launching an app containing Wormholy results in an immediate abort with this message:
| Swift class extensions and categories on Swift classes are not allowed to have +load methods
The last new version doesn't trunk push to the cocoapods.
Install Wormholy via cocoapods , and get the version "1.0.1"
please check it
Repeated instance view controller if you "shake" the device twice or more after shaking the first time.
Additional options to enable toast to show realtime network calls while navigating my app
In the method:
private func body(from request: URLRequest) -> Data? { return request.httpBody ?? request.httpBodyStream.flatMap { stream in let data = NSMutableData() stream.open() while stream.hasBytesAvailable { var buffer = [UInt8](repeating: 0, count: 1024) let length = stream.read(&buffer, maxLength: buffer.count) data.append(buffer, length: length) } stream.close() return data as Data } }
In the row "data.append(buffer, length: length)"
I'm getting a crash, when my app is uploading a chunk of data:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSConcreteMutableData appendBytes:length:]: range {204800, 18446744073709551615} causes integer overflow'
The file is not so big - a photo sent as a single chunk.
When I press on any of requests in list app crashes with exception:
Please file a radar on UIKit with this log if you see this assertion. selectorString = setKeyboardAppearance:, exercisedImplementations = {
"setKeyboardAppearance:" = (
);
}
Any suggestions what am I doing wrong? :(
I have 4 schemes in my project except Release and I want to integrate in all the schemes except Release version.
Can anyone please explain the steps required to achieve my requirement?
Thanks in advance
Hi
I'd like to offer you increase the number of lines for the urlLabel
at the RequestCell
since it's impossible to see the full path of a request if the host is quite long.
while using CocoaPods version > 1.7.0, the below code in PodFile to support swift version will not work and get error when pod install.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
The CocoaPods blog says that CocoaPods 1.7.0 deprecated the .swift-version
file, the swift_version
should be moved to .podspec file,
Deprecating .swift-version File
Up until now, most pod authors have been relying on specifying a .swift-version file at the root of their repo in order to successfully publish their pod with the Swift version they officially support. However, this information is never transcribed within the published podspec and therefore during integration none of it is taken into consideration when choosing which Swift version to use.
This can cause numerous issues especially when a new version of Swift is released. This is because a consumer will automatically pick the latest version of Swift to use without the pod author officially claiming that it is supported.
We strongly recommend pod authors to migrate over to use the officially supported swift_version DSL within their podspec instead.
We also recommend deleting the .swift-version file in your repo unless you use it for other tools such as swiftenv. The swift_version DSL will always take precedence over the .swift-version file.
Finally, a warning will be displayed during lint that encourages pod authors to migrate away from using the .swift-version file and in a future major release of CocoaPods we plan to completely remove support for it.
http://blog.cocoapods.org/CocoaPods-1.7.0-beta/
maybe adding this line in .podspec will helps:
s.swift_version = '4.2'
As wormholy is using method swizzling if we install along with AFNetworkActivityLogger, it is not able to record requests
It'd be nice if Wormholy captured and displayed response headers as well.
I'll see if I can work up a PR at some point to add these.
Situation: First try installing Wormholy in my app
Result after:
/Pods/Wormholy/Sources/Subclasses/WHBaseViewController.swift:44:91: 'shared' is unavailable: Use view controller based solutions where appropriate instead.
If I call the Wormholy.enable(_:sessionConfiguration:)
to disable logging of network traffic on either the URLSessionConfiguration.default
or URLSessionConfiguration.ephemeral
, the next time either of those configurations are referenced, Wormholy will re-enable logging for those configurations as the swizzled accessors in NSURLSessionConfiguration+Wormholy
automatically enable logging.
As of now, I'm not really sure how to completely disable logging without completely removing the framework.
Hi!
Great idea!
If I use the flag "use_modular_headers!" in my pod file I get the following error:
/Pods/Wormholy/Sources/Objc/Wormholy+Foo.m:9:9: 'Wormholy/Wormholy-Swift.h' file not found
I use the latest build for cocoapods directly from the repository.
Wormholy is the only pod that gives me grief.
SettingWORMHOLY_SHAKE_ENABLED
to NO
in environment variables doesn't work for me.
Xcode 9.4.1
iOS 11.4.1
I can run my App in my device or simulator, but when I try to archive, I got a "'Wormholy-Swift.h' file not found" message.
Quickly skimming through code I didn't fine anything indicating that this is currently possible and screenshots in README also prove that. Would be nice to be able to share not just individual screenshots but the whole network session, in a for of archive probably. As well as individual request completely, not just its body and response body.
I'm cloning the project now to see if I can add this.
Looking forward to integrate this in my current project!
I have an idea to be able to capture the i/o of the networking stack and to share it automatically to some server. Or, at least, be able to share all the captured information as archive.
#import <Wormholy/Wormholy.h> doesn't expose the shakeEnabled variable and therefore can't be disabled from ObjC
extension UIApplication {
private static let invokeAwakeTestOnce: Void = {
SwiftAwakeFactory.awakeAllClass()
}()
open override var next: UIResponder? {
UIApplication.invokeAwakeTestOnce
return super.next
}
}
So, I want to install Wormholy in my project but my app is still on Swift 4, can I install newest version with Swift 4 support or do I need to install 1.1.3 version? I tried to install the newest version but I got a few errors.
Give the possibility to change the invocation method between
Trying to use the current version 1.5.1 in an old Objective-C project I get an error:
Wormholy
does not specify a Swift version and none of the targets (xxxx
,xxxx
) integrating it have theSWIFT_VERSION
attribute set. Please contact the author or set theSWIFT_VERSION
attribute in at least one of the targets that integrate this pod.
The problem is - I don't have such a setting in the project and post_install
script doesn't work - I don't get to that stage at all so I can't set the version using Podfile
script.
Is it possible to add the SWIFT_VERSION
as the warning suggests or is there any other way to install Wormholy without modifying the project much?
Would be great (if possible) to enable requests sent via a WKWebView to be intercepted and shown within Wormholy's debug menu.
These resources might help:
Hi,
While installing via Pod file getting error, that Wormholy pod file not found. Please help in this.
Check possible override of still used "shake" functions inside debugged App
Wormholy overriding certificate pinning options while using with Alamofire.
I'm using the example code block to pin certificates. While Wormholy enabled, it is not working correctly.
var serverTrustPolicies: [String: ServerTrustPolicy] = [:]
let trustPolicy = ServerTrustPolicy.pinCertificates(
certificates: ServerTrustPolicy.certificates(),
validateCertificateChain: true,
validateHost: true)
serverTrustPolicies["xxxxx.com"] = trustPolicy
let configuration = URLSessionConfiguration.default
let serverTrustPolicyManager = ServerTrustPolicyManager(policies: serverTrustPolicies)
let sessionManager = SessionManager(
configuration: configuration,
serverTrustPolicyManager: serverTrustPolicyManager
)
return sessionManager
After Installing pod, getting swift compiler errors in following files :
CodeAttributesString.swift
Highlighter.swift
RequestModelBeautifier.swift
Theme.swift
Error : Method does not override any method from its super class
Swift version 3.3
When using Wormholy, a UIWebView that receives a 302 Redirect response issues 2 requests for the redirect URL. You can see it happening by monitoring the web requests in Charles. This does not happen with WKWebView but there is a bug with that implementation which means I have to use UIWebView for now.
I've attached a sample project which demonstrates the failing behaviour, and also screenshots illustrating the duplicate request.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.