Does anyone knows if I can have an deep link in my iOS app to wechat account? I have an developer account with wechat (Chinese acc) just want to check if there are ways to deep link wechat account in my iOS app. So is there a way to deep link in my iOS app to wechat account chat?
Asked
Active
Viewed 1,862 times
0
-
what do you mean by deep linking? What feature of we chat you want to use from your mobile app? – Bluewings Aug 24 '15 at 08:26
-
@Bluewings is there a way to transfer user to wechat app on ios app? when user click on a button on my app? – Kimberlee Ho Aug 24 '15 at 16:09
1 Answers
0
You can use the url schemes to open another iOS Apps from your iOS app.
Find below code to open the wechat app from your app when pressing button.
- (void)buttonPressed:(UIButton *)button
{
NSString *customURL = @"weixin://";
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:customURL]])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]];
}
else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"URL error"
message:[NSString stringWithFormat:@"No custom URL defined for %@", customURL]
delegate:self cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert show];
}
}
refer Apple documentation
Another SO Answer.