3

昨天我尝试了RadPHP,它看起来非常类似于Delphi,它的属性非常好。

我设置了一些演示应用程序来测试它,在编译(到 android)之后,它似乎是一个编译后的应用程序,它创建了一个 webview 来显示 HTML 内容。对我来说听起来有点奇怪,不是吗?

RadPHP 是否为 iOS 创建了一个类似的包,或者这是一个真正的原生应用程序?

我无法针对 iOS 版本对其进行测试,因为我没有密钥,而且我对编译格式一无所知。

如果是这样,苹果会接受创建的应用程序吗?

编辑/更新: 我已经编译了应用程序(带有假苹果 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 应用程序。对于所有这三个移动平台,它通常以相同的方式工作。

于 2012-05-30T00:52:02.883 回答