【问题标题】:Is RadPHP good to go to build apps?RadPHP 适合构建应用程序吗?
【发布时间】:2012-06-03 15:05:42
【问题描述】:

昨天我试用了RadPHP,它看起来很像Delphi,它的属性非常好。

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

RadPHP 是为 iOS 创建一个类似的包还是一个真正的原生应用程序?

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

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

编辑/更新: 我已经编译了应用程序(使用假的 apple-id),它当然会失败,但会在输出目录中生成一些 C-Objective (.h,.m) 文件。在目录类中有一个名为 AppDelegate.m 的文件。当您查看该文件时,您可以看到它为 WebView 创建了一个 HTML 包装器(这里是代码中的一个 sn-p):

/**
 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。

【问题讨论】:

  • 这个问题有什么不好的,我真的不明白。
  • 这个问题没什么不好,但是你有posted it twice这个事实不好
  • 还有“如果是这样,是不是很好?”是非常主观的。 SO 不适合提出主观问题。
  • 删除了翻倍的帖子并删除了“good to go”。但是当这个问题不适合在这里问的时候,我在哪里可以问而不有人认为这是主观问题。

标签: android ios build radphp


【解决方案1】:

RadPHP 使用 PhoneGap 将您的应用程序打包为 Android、iOS 或 Blackberry 应用程序。对于所有这三个移动平台,它通常以相同的方式工作。

【讨论】:

  • 抱歉,漏掉了一部分。 Apple App Store 确实接受以这种方式创建的应用程序 - HTML/CSS/JavaScript 用 RadPHP 编写并使用包含的 PhoneGap 向导打包为 iOS 原生应用程序。 phonegap.com/faq
  • 感谢您的明确答复。我在问题中对您的解决方案做了一些 cmets - 请参阅“编辑/更新”
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-01-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-06-23
相关资源
最近更新 更多