首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >RadPHP可以用来构建应用程序吗?

RadPHP可以用来构建应用程序吗?
EN

Stack Overflow用户
提问于 2012-05-29 11:35:44
回答 1查看 1.4K关注 0票数 3

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

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

RadPHP是为iOS创建了一个类似的包,还是这是一个真正的本地应用程序?

我无法测试它的iOS版本,因为我没有密钥,也不知道编译后的格式。

如果是的话,苹果会接受创建的应用吗?

编辑/更新:我编译了这个应用程序(带有假苹果id),它当然失败了,但是在输出目录中生成了一些C目标(.h,.m)文件。目录类中有一个名为AppDelegate.m的文件。当您查看该文件时,可以看到它为WebView创建了一个HTML包装器(下面是代码中的一个片段):

代码语言:javascript
复制
/**
 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)。

苹果接受phonegap生成的应用程序,但它仍然不确定它是否进入了AppStore,这取决于你对它做了什么。我认为简单的应用程序会成功的。另见:http://www.phonegap.com/faq

关于RadPHP生成的HTML的通知它不是W3C。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-05-30 00:52:02

RadPHP使用PhoneGap将应用程序打包为安卓、iOS或黑莓应用程序。一般情况下,这三个移动平台的工作方式是相同的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10798340

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档