I want to open app from SMS (url schemes). For example, If someone send me text “myapp://abcd” I can open this url with safari and open application with abcd value by [url host]. But, the problem is if it is not english? For example “myapp://สวัสดี” (in thai) or “myapp://おはよう” (in japanese) and i open application with xn--l3c1bib8a0a instead of “สวัสดี”.
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Test"
message:[url host]
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
return YES;
}
Thanks in advance.
The SMS character set is 7-bit and a bit special, so it looks like your service provider is translating international urls to their punycode (http://en.wikipedia.org/wiki/Punycode) equivalent…