Giter VIP home page Giter VIP logo

Comments (17)

Coeur avatar Coeur commented on June 12, 2024 2

I'm not part of CocoaPods, just a random opinion:
"in the future" could potentially be far away in time depending on the rate of adoption of your new version. So you may better try to get yourself a second pod name (like 'LLDebugTool2' as an example) which doesn't have any release scraping its CocoaPods page, and advertise it around as the replacement of your deprecated pod.

Technically, I believe you can have multiple podspecs files in the same repository, so that both the old pod name and the new one would get updates until a safe version gets largely adopted.

from lldebugtool.

orta avatar orta commented on June 12, 2024 1

Yeah, I'm open to removing that code but it's at many requests per-second today.

It'll take a long time for developers to update your library, then to update their apps, then for users to update their apps. I have no idea when I can undo it though - perhaps once it starts looking like a request a minute or two.

from lldebugtool.

freak4pc avatar freak4pc commented on June 12, 2024

Adding the offending code for reference:

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// Check whether has a new LLDebugTool version.
if ([LLConfig shared].autoCheckDebugToolVersion) {
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://cocoapods.org/pods/LLDebugTool"]];
NSURLSessionDataTask *dataTask = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error == nil && data != nil) {
NSString *htmlString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSArray *array = [htmlString componentsSeparatedByString:@"http://cocoadocs.org/docsets/LLDebugTool/"];
if (array.count > 2) {
NSString *str = array[1];
NSArray *array2 = [str componentsSeparatedByString:@"/preview.png"];
if (array2.count >= 2) {
NSString *newVersion = array2[0];
if ([newVersion componentsSeparatedByString:@"."].count == 3) {
if ([[LLDebugTool versionNumber] compare:newVersion] == NSOrderedAscending) {
NSString *message = [NSString stringWithFormat:@"A new version for LLDebugTool is available, New Version : %@, Current Version : %@",newVersion,[LLDebugTool versionNumber]];
[LLTool log:message];
}
}
}
}
}
}];
[dataTask resume];
}
});

The condition is defaulted to YES here:

_autoCheckDebugToolVersion = YES;

from lldebugtool.

HDB-Li avatar HDB-Li commented on June 12, 2024

You can set autoCheckDebugToolVersion to disable this request. Also this check is actually invalid. I can't get the version number correctly. I will remove it later.

from lldebugtool.

orta avatar orta commented on June 12, 2024

Heh, yeah, I banned your pod page from showing on the CocoaPods website - basically someone shipped your pod to production and we get taken down by their users :D

from lldebugtool.

HDB-Li avatar HDB-Li commented on June 12, 2024

@orta I see. Thanks, My mistake, I will remove it tonight and release it on next version. 😆

from lldebugtool.

HDB-Li avatar HDB-Li commented on June 12, 2024

@orta One more question, When I removed this code, Could you cancel banned my pod in future?

I just wanted to push the new version to the user and add a property to turn it off. I don't think my pod has such a large number of users that would cause DDS attacks on Cocoa pods. So maybe cancel banned my pod in future? 😢

from lldebugtool.

HDB-Li avatar HDB-Li commented on June 12, 2024

@orta I see. Thank you for telling me this. I'll fix it as soon as possible

from lldebugtool.

HDB-Li avatar HDB-Li commented on June 12, 2024

@orta I'm removed the CocoaPods ping and release a new version, How long will LLDebugTool can be accessed normally in cocoapods?

from lldebugtool.

orta avatar orta commented on June 12, 2024

months, maybe years - depends on how fast people update really.

from lldebugtool.

HDB-Li avatar HDB-Li commented on June 12, 2024

So badly..... Does this affect people's ability to search and install my pod through cocoapods?

from lldebugtool.

HDB-Li avatar HDB-Li commented on June 12, 2024

@orta Is there no other way to solve this problem?

from lldebugtool.

orta avatar orta commented on June 12, 2024

Nope, not really - to give you some perspective: for every 1 normal website page view we get about 20 pings from this code (see the screenshot above)

@Coeur's point that you can re-name your library is honestly one of the best ideas

from lldebugtool.

HDB-Li avatar HDB-Li commented on June 12, 2024

@orta Will this affect when pod install or pod search my pod? Renaming is a very bad idea and the worst way. If it doesn't affect pod install or pod search, the scope of influence should not be particularly large. I can wait until the frequency of this request falls. If pod install or pod search is affected, I will probably need to rename it.

For individual developers, the loss of renaming is too great. 😭

from lldebugtool.

freak4pc avatar freak4pc commented on June 12, 2024

I believe the code Orta added only blocks your page on the CocoaPods website and not in trunk so install, etc should work. It’s probably easiest to try for yourself on a blank project :)

from lldebugtool.

orta avatar orta commented on June 12, 2024

Just the web page is blocked, everything else is the same

from lldebugtool.

HDB-Li avatar HDB-Li commented on June 12, 2024

Okey, All I can do is wait.

from lldebugtool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.