ProductName length cause connection problem
It seems incredible but if I put a productName (not BundleNamethat appears in home screen) longer than 10 chars my app works well except from I'm not able to get response of my connection requets.
I mean...for example if I put APPNAME123 in productName I obtain APPNAME123.app and all works fine. If i put APPNAME1234 in productName I obtain APPNAME1234.app and app works except for connections methods...for example if I cal开发者_JAVA百科l www.mydomain.com/example.asp I got no errors, but zero bytes as response!!!!
I use
NSURLRequest *request=[NSURLRequest requestWithURL:MYURL];
NSData *result = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
and result is not nil but with zero length while error is nil
Of course I tried in various way (both on simulator and device), cleaning and rebuilding project avery time, and of course I tried with other names...same results..if longer than 10 chars I got same problems! I've also created a new project with desired name longer than 10 chars and I got the same problem.
That made me crazy for a whole day...because I didn't find a specification for this and the rest of app wiorking good!!! I'd like to know:
1) if anyone else notice this or itis just my problem, maybe some dirty on my mac 2) if there some documentation about this everywhere
thanks in advance for your answers
that doesn't sound like your problem, sounds totally unrelated, perhaps remove products from simulator and do a clean and build. My guess is that you have 2 copies, one working and one broken on the simulator, and it is launching the wrong one.
Sounds more like a memory issue. What's about response, do you read it immediately? What if appname has a length of 12, 13, ... characters, any change than? Have you tried to have a look into memory browser before/after calling sendSyncRequest?
精彩评论