Ergebnis 1 bis 2 von 2
  1. #1
    Schweizer Glockenapfel
    Themenstarter
    Avatar von Chriis
    Registriert
    01.2010
    Ort
    Sauerland
    Beiträge
    1.377

    iPad WebView Application reloadet nicht zuverlässig iPad oder PHP?

    Liebe ATer,

    Ich habe ein Problem.
    Ich habe mir eine WebView Application für iPad geschrieben. Diese WebView App zeigt eine Website an, die mit PHP arbeitet.
    Diese Seite wird automatisch nach 40 Sekunden reloadet. (Beispielsweise - das soll hinterher einstellbar sein).
    Nur wirklich zuverlässig läuft der Reload nicht. Mal funktioniert er eine halbe Stunde und dann mal eine Zeit nicht.
    Auch ist es passiert, dass mal ein Bild nicht angezeigt worden ist. Ich kann das absolut nicht rekonstruieren, weil es ja auch ne halbe Stunde läuft ohne Probleme.

    Daher meine Frage - liegt das am PHP, am JavaScript welches den Reload durchführt, oder an der App Programmierung?

    Meine Index.html
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="expires" content="-1">
    <script src='http://code.jquery.com/jquery-1.4.2.min.js' type='text/javascript'></script>
    <script src='jquery.divslideshow-1.2-min.js' type='text/javascript'></script>
    <script type="text/JavaScript">
    <!--
    function timedRefresh(timeoutPeriod) {
    	setTimeout("location.reload(true);",timeoutPeriod);
    }
    //   -->
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    
    <title>Test</title>
    </head>
    
    
    <body onload="JavaScript:timedRefresh(40000);" style="background-image:url(back.jpg)">
    
    
    
    
    <script>
        $(document).ready(function(){
    	    $('#slideshow').divSlideShow(
    	    	{width:1024, height:768, arrow:'split', controlClass:'custom', delay: 10000});
    	    });
    </script>
    
    
    <div id='slideshow' style="height:768px; overflow:hidden;">
        <div class='slide'><iframe src="seite.php" height="768px" width="1024px" frameborder="0" scrolling="no"></iframe></div>
        <div class='slide'><iframe src="seite.php" height="768px" width="1024px" frameborder="0" scrolling="no"></iframe></div>
        <div class='slide'><iframe src="seite.php" height="768px" width="1024px" frameborder="0" scrolling="no"></iframe></div>
        <div class='slide'><iframe src="seite.php" height="768px" width="1024px" frameborder="0" scrolling="no"></iframe></div>
    </div>
    
    
    </body>
    </html>
    Meine Seite.php:
    Code:
    <?php // WebYep init WebYepV1
    /* ><table><tr><td bgcolor=white><h2>WebYep meldet: Fehler, PHP inaktiv</h2>
    <font color=red>Der PHP-Code in dieser Seite wird nicht durchgef&uuml;hrt!<ul>
    <li>Entweder rufen Sie die Seite nicht &uuml;ber den WebServer sondern direkt
    von Ihrer Festplatte aus auf (zB. mittels &quot;Voransicht im Browser&quot; im Dreamweaver).</li>
    <li>Oder Sie haben der Datei nicht die richtige Dateierweiterung (extension) gegeben -
    WebYep-Seiten m&uuml;ssen die Erweiterung &quot;.php&quot; aufweisen und <b>nicht</b> ".html" bzw. ".htm"!</li>
    </ul></font></td></tr></table><!--
    */
    $webyep_sIncludePath = "./";
    $iDepth = 0;
    while (!file_exists($webyep_sIncludePath . "webyep-system")) {
    	$iDepth++;
    	if ($iDepth > 10) {
    		error_log("webyep-system Ordner nicht gefunden.", 0);
    		echo "<html><head><title>WebYep</title></head><body><b>WebYep:</b> Diese Seite kann leider nicht angezeigt werden <br>Problem: Der webyep-system Ordner konnte nicht gefunden werden!</body></html>";
    		exit;
    	}
    	$webyep_sIncludePath = ($webyep_sIncludePath == "./") ? ("../"):("$webyep_sIncludePath../");
    }
    if (file_exists("${webyep_sIncludePath}webyep-system/programm")) $webyep_sIncludePath .= "webyep-system/programm";
    else $webyep_sIncludePath .= "webyep-system/program";
    include("$webyep_sIncludePath/webyep.php");
    // -->?>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="expires" content="-1">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=992, user-scalable=yes"/><title>Index</title>
    <link rel="stylesheet" href="Index.css?version=7" type="text/css" />
    </head>
    <body>
    <div id="div_174">
    	<p id="textarea_181">
        	Veranstaltungsbeginn: <?php webyep_shortText("Beginn", false); // WebYepV1 ?><br><br>
    	  <?php webyep_longText("Informationen", false, "", true); // WebYepV1 ?>
    <br><br></p>
    </div>
    <div id="div_175">
      <?php webyep_image("Bild", false, '', '', '', 440, 0, false, 0, 0); // WebYepV1 ?>
    </div>
    <div id="div_176">
    <div id="div_177">
    		<p id="textheader_180">
    		  <?php webyep_shortText("Untertitel", false); // WebYepV1 ?>
    		</p>
    	</div>
    	<p id="textheader_179"> 
    	  <?php webyep_shortText("Überschrift", false); // WebYepV1 ?>
    	</p>
    </div>
    </body>
    </html>
    Die App:
    Der ViewController.m:
    Code:
    ////  WebiPadViewController.m
    //  WebiPad
    //
    //  Created by Chakra on 14/04/10.
    //  Copyright Chakra Interactive Pvt Ltd 2010. All rights reserved.
    //
    
    
    #import "WebiPadViewController.h"
    
    
    @implementation WebiPadViewController
    
    
    @synthesize webDisplayiPad;
    
    
    /*
    // The designated initializer. Override to perform setup that is required before the view is loaded.
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
        if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
            // Custom initialization
        }
        return self;
    }
    */
    
    
    /*
    // Implement loadView to create a view hierarchy programmatically, without using a nib.
    - (void)loadView {
    }
    */
    
    
    
    
    
    
    // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
    - (void)viewDidLoad {
    	
    NSString *urlAddress = @"http://192.168.178.56";
    	
    //Create a URL object.
    	NSURL *url = [NSURL URLWithString:urlAddress];
    	
    //URL Requst Object
    	NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    	
    //Load the request in the UIWebView.
    	[webDisplayiPad loadRequest:requestObj];
    	
    	
    	
        [superviewDidLoad];
    }
    
    
    
    
    
    
    // Override to allow orientations other than the default portrait orientation.
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    returnYES;
    }
    
    
    - (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
        [superdidReceiveMemoryWarning];
    	
    // Release any cached data, images, etc that aren't in use.
    }
    
    
    - (void)viewDidUnload {
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
    }
    
    
    
    
    - (void)dealloc {
    	[webDisplayiPadrelease];
        [super dealloc];
    }
    
    
    @end
    Der ViewController.h:
    Code:
    ////  WebiPadViewController.h
    //  WebiPad
    //
    //  Created by Chakra on 14/04/10.
    //  Copyright Chakra Interactive Pvt Ltd 2010. All rights reserved.
    //
    
    
    #import <UIKit/UIKit.h>
    
    
    @interface WebiPadViewController : UIViewController {
    
    
    	IBOutlet UIWebView *webDisplayiPad;
    }
    
    
    @property(nonatomic,retain) UIWebView *webDisplayiPad;
    
    
    
    
    @end
    Beste Grüße,
    Chris

    iPad WebView Application reloadet nicht zuverlässig iPad oder PHP?
    MacBook Pro Retina 2,6GHz 512GB 16GB RAM
    iPad 3 32GB + 4G Black, iPad Mini ​16GB White iPhone 5 32GB Black
    Spaß an kreativer Arbeit in der 2. und 3. Dimension

  2. #2
    Schweizer Glockenapfel
    Themenstarter
    Avatar von Chriis
    Registriert
    01.2010
    Ort
    Sauerland
    Beiträge
    1.377
    So, ich habe die Lösung.
    Es lag am PHP Server, der da etwas Chaos verursacht hat.

    Jetzt habe ich einen anderen Server rausgekramt und nun laufen 3 iPads seit etwa einer Stunde fehlerfrei!
    MacBook Pro Retina 2,6GHz 512GB 16GB RAM
    iPad 3 32GB + 4G Black, iPad Mini ​16GB White iPhone 5 32GB Black
    Spaß an kreativer Arbeit in der 2. und 3. Dimension

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •