0

EmailComposerプラグインを iPhone アプリに追加しようとしましたが、常にエラーが発生します。

Failed to load webpage with error: The requested URL was not found on this server.

asを変更しようとしたことがありshouldStartLoadWithRequestます:

- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
    NSURL *url = [request URL];

    if ( [ [url scheme] isEqualToString:@"mailto"] ) 
    { 
        return YES; 
    } else { 
    return [self.viewController webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
    } 
}

それでも同じエラーが発生します。PhoneGap を使用して iPhone アプリにメール機能を統合した人はいますか。

PhoneGap 1.4.1 を使用しています。

前もって感謝します。

4

1 に答える 1

0

phonegapを使用している場合は、このJavaScriptコードを使用できます

window.location = 'mailto:test@example.com?body=Hello World Message'; 

または直接HTMLリンク

<a href="mailto:test@example.com?body=Hello World Message">send to friend</a>

お役に立てば幸いです。

于 2012-12-12T19:29:40.707 に答える