MetaWatchOpenProjects / MWM-for-iOS-Gen1

iOS application project that demonstrates connectivity with Meta Watch Bluetooth 4.0 capable watches
Apache License 2.0
72 stars 24 forks source link

weather widget find nothing in baden-württemberg/germany #11

Closed mash-m closed 12 years ago

mash-m commented 12 years ago

hi, the weather widget finds notinh in baden-wuerttemberg-germany like heidelberg, stuttgart, karlsruhe and so on.

mash-m commented 12 years ago

maybe the MWWeatherMonitor.h line 60 is the problem: NSUTF8StringEncoding

maybe NSASCIIStringEncoding is the sollution, i will test it.

metawatchclient commented 12 years ago

Ues this: I will push it later, but this fixed the issue.

NSString *stringReply = [[NSString alloc] initWithData:connData encoding:NSISOLatin1StringEncoding];
NSLog(@"%@", stringReply);

NSXMLParser *parser = [[NSXMLParser alloc] initWithData:[stringReply dataUsingEncoding:NSUTF8StringEncoding]];
[parser setShouldProcessNamespaces:YES];
[parser setShouldResolveExternalEntities:YES];
[parser setShouldReportNamespacePrefixes:YES];
[parser setDelegate:self];
[parser parse];

[stringReply release];
[parser release];
metawatchclient commented 12 years ago

These are the headers if you are interested:

Cache-Control: no-cache, no-store, must-revalidate Connection: close Content-Type: text/xml; charset=ISO-8859-1 Date: Fri, 13 Jul 2012 10:09:41 GMT Expires: Fri, 01 Jan 1990 00:00:00 GMT Pragma: no-cache Server: igfe X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block

mash-m commented 12 years ago

thank you

mash-m commented 12 years ago

hi, i testet the changes. works fine now, but the wather icons won´t change. i had no time to search for the error. markus