Closed udibr closed 10 years ago
Can you please elaborate on what you mean by "bad things are happening".
Hi, I have the regular AFNetworking being used in my code. Your code started from an old branch of AFNetworking (fork from 1.x I think) and then you modified it to fit your needs. In order to avoid compilation errors for people like me, you changed the names of the constants so they will not conflict with the same names used in AFNetworking.
HOWEVER, the string values assigned to the constants (which can be any string in the world you like) remained identical to the values used in AFNetworking. As a result for example, when your code generates a notification you have a separate piece of code that wait for this event and respond BUT there is also a piece of code in AFNetworking which waits for the same event (based on the string value and not based on the name of the constant) and it also responds to the notification. By chance this may work but there is a very high probability that the code responding in AFNetworking does not behave correctly
This is what happened to me when my code switched to use AFNetworking 2.0
The notifications are supposed to be global to the app, so there can be multiple of them being posted. Will upgrading to AFNetworking 2.0 solve your issue?
No need to move to AFNetworking 2. Your code replicates AFNetworking (with minor name changes) but it generates notification that are supposed to be handled only by your replicated code and instead it is handled by both your code and the AFNetworking 2 code my App has.
What you should do is put "EN" inside the strings you hold as constants. All parts of your code will use the same constant and communicate with each other but my AFNetworking2 code will not respond.
In other words, when you decided to incorporate AFNetworking code inside your code you did the right thing in renaming the constants but you should have also renamed the string values stored in them
Thanks
You need to change the value of the constants in 3rdParty/AFNetworking/ENAFURLConnectionOperation.h and not just the name of the constants.
The values are globals in the entire App and if the App is also using AFNetworking by itself then bad things are happening
you cant use a domain name of a different company ( alamofire in this case) are you Evernote or not???? it should be com.evernote....
It looks like you have a similar problem in SSKeychain.m