colouredFunk/stagewebviewbridge

Cannot load local files anymore?

Closed this issue · 9 comments

Flash CS5.5 publishing for iOS for iPad only and a legit developer account 
(ad-hoc to test, or quick publish). 

I cannot load local files anymore. 

What steps will reproduce the problem?
1. Download latest code (I'm using SWC, the .as gives me tons of errors but SWC 
compiles and works)
2. Import all classes (frame 1 main timeline for testing)
3. Let StageWebViewDisk initialize and listen for "END_DISK_PARSING"
4. After the event fires 'www' and 'wwwSource' are there, javascript injected 
into the new wwwSource/index.html
5. Instantiate a new StageWebViewBridge and add to the display list
6. Try to load a local file using the command: 
swvb.loadLocalURL('applink:/index.html');
7. Works fine in Flash CS5.5 IDE, I see the index file as long as I enable 
debug mode. I disable debug mode (StageWebViewDisk.setDebugMode( false );), 
make an IPA, I see nothing at all after the app is synced to my ipad
8. Change loadLocalURL() method to loadURL('http://www.google.com'); etc, it 
loads perfectly fine. 

What is the expected output? What do you see instead?
I expect to see my index file contents like I used to. I now just get nothing. 

What version of the product are you using? On what operating system?
Windows 7 64bit latest SP/updates. Flash CS5.5 latest updates. Latest code just 
deployed today for StageWebViewBridge (using the SWC)

Please provide any additional information below.

I can't get any local content at all to load via loadLocalURL(). I'm loading 
html so I use applink:/ but I tried appfile:/ as well, no change, it does not 
load. I get a blank white screen. 

Because it is extending the bitmap class I tried adjusting every possible 
combination of flash and IOS acceleration (auto, cpu, gpu). No combination 
helps. 

The old code I have for StageWebViewBridge loads files just fine, when it used 
to be the html directory (or whatever you adjusted the property to).

The entire app actually siezes upon launch. I tried adding the view, removing 
it and printing some text. Overall the app dies upon loading. I never see 
anything, just a big white screen. 

What a shame!

Original issue reported on code.google.com by jasonala...@gmail.com on 19 Sep 2011 at 10:40

Just adding that also trying to use loadString() or loadLocalString() fails as 
well. The only method currently functioning on my iPad2 (latest OS) via Flash 
CS5.5 using the SWC is the loadURL() method. Otherwise I get nothing but a 
white app overall and nothing else functions. 

All methods work just fine when debug mode is true testing in the IDE. The IPA, 
sadly, does not work at all. 

Original comment by jasonala...@gmail.com on 19 Sep 2011 at 11:05

Hi, really strange. I hace it working without problems....

Some things to test:

Is your cs5.5 overlayed with the 2.7 sdk ?

Have you include the www dir to the files to include when packagin.

Anyway, can you send me a simple example to test? 

Original comment by xperime...@gmail.com on 20 Sep 2011 at 10:55

I have made a quick example. I put all the code on the timeline just for ease. 
I also was using AIR2.6 but I am now using AIR 2.7 after I updated (via this: 
http://kb2.adobe.com/cps/908/cpsid_90810.html). I get the same exact result.

At least now the app is responsive enough to give feedback. I have a status_txt 
TextField below. 

The details are, StageWebviewDiskEvent.END_DISK_PARSING does NOT fire off. You 
will see StageWebviewDiskEvent.START_DISK_PARSING does fire off however. When I 
set the debug mode to true (desktop testing) the event fires perfectly, I see 
the index file and I can press the blue button and google loads. 

On an iPad2 (OS 4.3.5, latest) the view is just unresponsive. Even hitting the 
Google button won't load Google. 

I have removed the .p12 and mobileprovision of course. 

Do you see anything wrong with this project? Thank you greatly for your work 
and especially help with this. 

Original comment by rtpdesk...@gmail.com on 20 Sep 2011 at 5:37

Attachments:

I did forget to explain that I simply put the 30 second timer function in there 
to prove the app was actually responsive. Every 30 seconds it will appendText() 
to the status_text just letting you know the app is in fact alive. 

Original comment by rtpdesk...@gmail.com on 20 Sep 2011 at 5:39

This issue was closed by revision r71.

Original comment by xperime...@gmail.com on 21 Sep 2011 at 12:14

  • Changed state: Fixed
Hi, can you test it? I have found that StageWebviewDiskEvent.END_DISK_PARSING 
is only firing once, I think this is the problem...

Download latest version...

Update swc
Delete app from ipad.
Update version number in publish settings.( to be sure )

Say me if helps

Original comment by xperime...@gmail.com on 21 Sep 2011 at 12:22

Unfortunately that didn't solve the issue. I have it on both an iPad 1 and iPad 
2. Same project, just updated the app version number as well as of course the 
SWCs. 

This issue still exists. Shall I make a 'new' issue?

Original comment by jasonala...@gmail.com on 21 Sep 2011 at 9:28

Yes i Reopened it, really i don't know why then, is not working.... The only 
diff with you is that I am in 4.3.1.....


Original comment by xperime...@gmail.com on 21 Sep 2011 at 12:06

  • Changed state: New
This issue was closed by revision r73.

Original comment by xperime...@gmail.com on 22 Sep 2011 at 3:36

  • Changed state: Fixed