2013-05-28 16 views

答えて

2

tafhは、カスタムメソッドまたはiOSようである提案としてあなたはそれをメソッドのいずれかを行います。アプリケーション開発者私は、あなたがドキュメントインタラクションコントローラと一緒に行くことを提案し、UIDocumentInteractionControllerを初期化します。これらは両方とも、対話を管理するのに役立ちます。詳細については、下のリンクを確認してください。あなたはそれがあなたに開いているすべてのURLを与えるリンク

http://handleopenurl.com/scheme/833

下記をご覧くださいのWhatsApp

+0

@Neji改訂ありがとうございます –

0

確かにわかりませんが、this linkにお問い合わせください。

また、私はgithubでWhatsApp APIを入手しました。それはあなたに役立つかもしれないことを確認してください。

+0

ご返信ありがとうございます – SampathKumar

0

私はあなたが意味を正確にわからないんだけど、おそらくこれはあなたが探しているものです:http://www.whatsapp.com/faq/en/iphone/23559013

NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?text=Hello%2C%20World!"]; 
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) { 
[[UIApplication sharedApplication] openURL: whatsappURL]; 
} 
+0

ご返信ありがとうございます – SampathKumar

1
notification = @"Your Daily Inspiration by the "; 
notification = [notification stringByAppendingString:@"\n"];  
notification = [notification stringByAppendingString:textview.text]; 
NSString *whats=notification; 
NSString *baseURL = [NSString stringWithFormat:@"whatsapp://send?text=%@",whats]; 
NSURL *url = [NSURL URLWithString:[baseURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; 

if ([[UIApplication sharedApplication] canOpenURL: url]) { 
    [[UIApplication sharedApplication] openURL: url]; 
} 
else 
{ 
    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Sorry" 
                 message:@"You can't send a thought on Whatsapp" 
                 delegate:self 
               cancelButtonTitle:@"OK" 
               otherButtonTitles:nil]; 
    [alertView show]; 

} 

すべてのアプリのスキームオプションあなたのアプリも登録してください。

0

に次の文字列を送信して、このコードのIMを使用

(UIDocumentInteractionController *) setupControllerWithURL: (NSURL) fileURL 
     usingDelegate: (id <UIDocumentInteractionControllerDelegate>) interactionDelegate { 

    UIDocumentInteractionController *interactionController = 
     [UIDocumentInteractionController interactionControllerWithURL: fileURL]; 
    interactionController.delegate = interactionDelegate; 

    return interactionController; 
} 

Here

関連する問題