3

昨日、私は RadPHP を試しました。これは Delphi に非常によく似ており、そのプロパティは非常に優れています。

私はそれをテストするためにいくつかのデモアプリをセットアップしました.(Androidに)コンパイルした後、HTMLコンテンツを表示するためのWebビューを作成するコンパイル済みアプリのようです. 私には少し奇妙に聞こえますか?

RadPHP は iOS 用の類似パッケージを作成しますか? それともこれは本当のネイティブ アプリですか?

キーがなく、コンパイルされた形式について何も知らないため、iOS バージョンでテストすることはできません。

もしそうなら、アップルは作成されたアプリを受け入れますか?

編集/更新: アプリを(偽のapple-idで)コンパイルしましたが、もちろん失敗しますが、出力ディレクトリにいくつかのC-Objective( .h、 .m)ファイルが生成されます。ディレクトリ クラスには、AppDelegate.m という名前のファイルがあります。ファイルを表示すると、WebView への HTML ラッパーが作成されていることがわかります (コードのスニペットを次に示します)。

/**
 Called when the webview finishes loading.  This stops the activity view and closes the imageview
 */
- (void)webViewDidFinishLoad:(UIWebView *)theWebView
{
    // only valid if StreambutlerRemoteControl.plist specifies a protocol to handle
    if(self.invokeString)
    {
        // this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready
        NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString];
        [theWebView stringByEvaluatingJavaScriptFromString:jsString];
    }
    return [ super webViewDidFinishLoad:theWebView ];
}

- (void)webViewDidStartLoad:(UIWebView *)theWebView
{
    return [ super webViewDidStartLoad:theWebView ];
}

/**
 * Fail Loading With Error
 * Error - If the webpage failed to load display an error with the reason.
 */
- (void)webView:(UIWebView *)theWebView didFailLoadWithError:(NSError *)error
{
    return [ super webView:theWebView didFailLoadWithError:error ];
}

/**
 * Start Loading Request
 * This is where most of the magic happens... We take the request(s) and process the response.
 * From here we can re direct links and other protocalls to different internal methods.
 */
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
 NSURL *url = [request URL];
  if ([[url scheme] isEqualToString:@"http"] || [[url scheme] isEqualToString:@"https"]) {
    return YES;
  }
  else {
    return [ super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType ];
  }
}

結論: ネイティブ アプリになりますが、Webview のラッパーです (すべてがネイティブではありません)。受け入れられた回答で述べたのとまったく同じです。すべてのモバイル アプリは、Webview を使用して作成されます。RadPHP は、プログラミング インターフェイスが好きな場合にのみ役立ちますが、モバイル アプリを作成する必要はありません (代わりに phonegap を直接使用できます)。RadPHP の例では、アプリを作成するためにまだ Mac が必要です (XCode が必要です)。

Apple は phonegap で生成されたアプリケーションを受け入れますが、それが AppStore に届いたかどうかはまだわかりません。シンプルなアプリでうまくいくと思います。参照: http://www.phonegap.com/faq

RadPHP が生成する HTML に関する注意 W3C ではありません。

4

1 に答える 1

1

RadPHP は PhoneGap を使用して、アプリを Android、iOS、または Blackberry アプリとしてパッケージ化します。通常、これら 3 つのモバイル プラットフォームすべてで同じように機能します。

于 2012-05-30T00:52:02.883 に答える