I can get the device token for my ipad, but the problem is that it is the database in the server via PHP code How to send / P>
I tested php code and it is working.
This is my job to send this device token:
- (zero) Application: (UIApplication *) Application AppliedContactNotationEducationToken: (NSDT *) DeviceToken {NSString * devToken = [[[[Tooltoken description] StringBeerPloolingAcransOffString: @ "& lt;" WithString: @ ""] String Bayer Replacing Occurrence Offstring: @ "& gt;" WithString: @ ""] String Bayer Replacing Occurrence With Strings: @ "" With String: @ ""]; NSLog (@ "% @", DEVTOKEN); NSString * sli = [NSString stringWithFormat: @ "http: // localhost: 8888 / insertiphone.php? Number =% @", devToken]; NSURL * url = [NSURL URLWithString: sli]; NSData * test = [NSData dataWithContentsOfURL: url]; If ([length of examination] == 0) {NSLog (@ "did not"); }} This is not working ..
And this is php code:
Update, I also tried with these codes but not working
NSString * devToken = [[[Tooltoken details] stringByReplacingOccurrencesOfString: @ "& Lt;" String with: @ ""] string by replacing optical: authoring: @ "& gt;" WithString: @ ""] String Bayer Replacing Occurrence With Strings: @ "" With String: @ ""]; NSString * sli = [NSString stringWithFormat: @ "http: // localhost: 8888 / insertiphone.php? Number =% @", devToken]; NSLog (@ "% @", SLI); NSURL * url = [NSURL URLWithString: sli]; NSURLRequest * urlr = [NSRR request request with url: url cache policy: NSRREX exposure policy policy timeout interval: 10.0]; NSURLConnection * connection = [[NSURLConnection alloc] initWithRequest: urlr Rep: Self]; If (connections) {NSLog (@ "connecting"); } And {nslog (@ "error"); } It says that connecting but nothing in the database will be inserted
Check for zero (can return zero to some issue)
You request better error information and control (connection: didFailWithError :) or send request to requestFailed :) Will get to.
P>
In addition, does the iPhone execute the server code while requesting the customer?
You can also see what is happening on the wire and who is coming back.
Here is one of the blogs debugging connection problems with Charles Proxy
Finally, [machinename] as a try. Local: 8888 ... In this event you are resolving the name, issues of local settlement issues, etc. ... issues.
Comments
Post a Comment