English 中文(简体)
当安装有ipa 文档时,申请表正常运转。
原标题:Application doesn t work properly when installed with ipa file

我正在通过使用该密码的网上电文在iPad上播放你的录像。

NSString *htmlString = [NSString stringWithFormat:@"<html>
                        <body>
                          <div id="player"> </div>
                          <script>
                            var tag = document.createElement( script );
                            tag.src = "http://www.youtube.com/player_api";
                            var firstScriptTag = document.getElementsByTagName( script )[0];
                            firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
                            var done = false;
                            var player;
                            function onYouTubePlayerAPIReady() {
                               player = new YT.Player( player , {
                               height:  %i ,
                               width:  %i ,
                               videoId:  %@ ,
                               events: {
                                 onReady : onPlayerReady,
                                 onStateChange : onPlayerStateChange
                                }
                              });
                            }
                            function onPlayerReady(evt) {
                                evt.target.playVideo();
                            }
                            function onPlayerStateChange(evt) {
                                if(evt.data==0)
                                {
                                      window.location="http:\end";
                                 }
                             }
                             function resizePlayer(width,height)
                             {
                                   player.setSize(width, height);
                             }
                           </script>
                        </body>
                     </html>",
                        height,width, videoID];

问题在于,当我通过XCode安装我的手套时,它会进行罚款,但当Im使用ipa的手法时,就没有。

最佳回答

我已经发现我的问题。

为了让我提出申请,在录像到尾的时候,我写了 Java文法,将网页转至另一个URL。 然后,我从WebView-(BOOL)webView(IDWebView *)中应用了方法。 应当: 开始LoadWithREquest:NSURLRequest * 导航Type:UIWebViewNavigationType)navigation 类型。 主要想法是,在试图进入某种特殊联系时,要结束看法,但我已犯了一个错误,即由于一些不了解的原因,我在从XCode发射我的照片时确实提出了错误。

Code with error:

-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request     navigationType:(UIWebViewNavigationType)navigationType
{
     NSString *url = [[request URL] absoluteString];
if ([url isEqualToString:@"http://youtube.com/end"])
{
    [self onCloseVideo];
    [self unsubscribe];
    return = NO;
} 
//here on else I had to return YES but I didn t
}

《刑法》没有错误:

-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request     navigationType:(UIWebViewNavigationType)navigationType
{
     NSString *url = [[request URL] absoluteString];
     BOOL shouldStartRequest = YES;
if ([url isEqualToString:@"http://youtube.com/end"])
{
    [self onCloseVideo];
    shouldStartRequest = NO;
}               

return shouldStartRequest;
}
问题回答

您面临的问题可能取决于具体装置和SOS版本(在“IDWeb”网站上出现微妙差异),而不是使用ipa文档。

So, you might try and reproduce the environment where the UIWebView fails to interpret correctly your HTML snippet. Also, don t forget to define webView:didFailLoadWithError: and give a look at a way to intercept javascript errors inside of UIWebViews and display them on the console.

希望这一帮助。





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签