airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
203 stars 11 forks source link

App area scaled completely wrong on ios. #269

Open kingbaggot opened 4 years ago

kingbaggot commented 4 years ago

App launch image displays fine. Then stage appears at original pixel-size (unscaled) top left. App functionality fine otherwise.

Sdk 33.1.1.63 Building swf in Flash CS5.5 - compiling IPA with a .bat file. Have never had this problem before with air 27,28,31,32 or 33.0, so surprised no one else has reported it. Would roll back to 33.0 but have crashes with that sdk.

Steps to Reproduce

Draw anything on the stage in Flash. Export swf and build ipa from that. Install via testfairy or cable and that's it.

FliplineStudios commented 4 years ago

Hmm I haven't had any issues myself with scaling or resolution with 33.1.1.63 on iOS, though I've only tried with Launchscreen.storyboard instead of Launch Images (the App Store will no longer accept Launch Images anymore starting in April and will require Storyboards instead). Is this happening with separate launch images instead of a storyboard? I know 33.1.1.63 uses a newer iOS SDK, maybe it no longer supports determining resolution from Launch Images?

hardcoremore commented 4 years ago

@FliplineStudios What is the process of compiling iOS app with AIR and Storyboards? Is this supported in current AIR. How do you use Storyboard instead of launch images?

kingbaggot commented 4 years ago

Thanks for the response. Yes I was still using the Launch Images.

However I've followed the guide here to create a storyboard (https://community.adobe.com/t5/flash-player/6-16-2016-release-air-22-runtime-and-sdk/td-p/8403498?page=1) and the app created with it still displays at flash stage pixel size - rather than being scaled up (as it does all all previous sdk versions)

here's the air 33.1 build screen. IMG-2071

and here's the original 32.0 IMG-2072

this is my bat file.

cd .. "C:\Users\kb\Documents\Air\air40_act33_3\bin\adt.bat" -package -target ipa-app-store -storetype pkcs12 -keystore "provisioning\mbeDev_10.p12" -storepass xxxxx -provisioning-profile "provisioning\a2PsyRevDev.mobileprovision" a2psyRevDev2020.ipa "provisioning\edappgAppSettings.xml" "finalQuiz.swf" Assets.car LaunchScreen.storyboard provisioning -extdir NativeExtensions

here's a code paste of the pList

https://paste.ofcode.org/dpTNStpVDL8xbgVVCWsAEM

FliplineStudios commented 4 years ago

We had a different problem with 33.1.1.63 with crashing on iOS, but it was related to the Transform class. Andrew posted a patch for that here, it might be worth trying since maybe the way your app scales its content is having issues with Transform as well: https://github.com/Gamua/Adobe-Runtime-Support/issues/258#issuecomment-597066323

Also we used a slightly different way to add the storyboard to our app following this tutorial: https://wiki.starling-framework.org/manual/ios_launch_images#using_launchscreenstoryboard

The main difference being adding it to the InfoAdditions: `

UILaunchStoryboardName LaunchScreen ]]>

`

kingbaggot commented 4 years ago

Hi Flipline - thanks for responding.

Pre sdk 33 there hasn't been anything in the AS3 that scales any of our apps to fit the screen - Air just takes whatever the stage size is set to any scales up to fit the device. I haven't used Starling in a while - is this something Starling handles ?

I'm really surprised no-one else on the forums has experienced this. Is there any chance someone could try test-compile this 33.1 build swf (which is just some text in a rectangle on a 640x400 stage) and see if they get the same result that I do ?

https://drive.google.com/file/d/173109hcFoqSGbFSiwPmlCRM6CL1TZDvx/view?usp=sharing

I would be eternally grateful and could stop pulling my hair out !

FliplineStudios commented 4 years ago

No problem, just tested it and it looks good to me, here's a photo of how it appears on an iPhone X:

iphone_test_pic_air33_1

I used an Assets.car and LaunchScreen.storyboardc generated with XCode, both included as files with the build, and adding this to the iPhone InfoAdditions:

<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>

This was with 33.1.1.63 (including Andrew's patch for Transform classes), packaged as ipa-ad-hoc, using these settings for initialWindow:

<initialWindow>   
<content>filenamehere.swf</content>  
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<fullScreen>true</fullScreen>
<aspectRatio>landscape</aspectRatio>
<renderMode>gpu</renderMode>
<autoOrients>true</autoOrients>
</initialWindow>

Let me know if you need any other info from this test!

FliplineStudios commented 4 years ago

One more quick note: Make sure you're using the LaunchScreen.storyboardc with the "c" at the end, just noticed in your earlier post you mentioned a different file without the "c"! On Windows it shows up as a folder rather than a file, which includes a couple .nib files and an Info.plist.

kingbaggot commented 4 years ago

Flipline - thanks so much for testing my .swf. That you can build it properly it should narrow my problem down - it's nothing IN the app itself, it must be my build process. Even with those initialWindow settings & Andrews patch dropped in to the Air33.1 lib/aot/lib folder I'm still getting the size issue on ios AND android - so it's possibly not the storyboardc issue either (android not using Storyboards so far)

I can't see what could be incorrect in the .bat file - it's all the usual references (the Launchscreen is the only new addition)

air33\bin\adt.bat" -package -target  ipa-ad-hoc -storetype pkcs12 -keystore "provisioning\mbeDev_10.p12" -storepass ps -provisioning-profile "provisioning\a2PsyRevDev.mobileprovision" a2psyRevDev2020.ipa "provisioning\edappgAppSettings.xml" "finalQuiz.swf" Assets.car LaunchScreen.storyboardc 
 provisioning -extdir NativeExtensions

The descriptor file is here - Have amended in line with yours. https://paste.ofcode.org/bzteEFAbSmdxfgFD7PNgYu

I really have no idea what has occurred - it just seems bananas that everything but the scaling issue is fine functionally. I'm going to download the sdk again and see if that fixes it.

kingbaggot commented 4 years ago

Re-downloaded Air and Installed Flash Develop and followed the ipa generation process there using the .swf Flipline managed to compile successfully and I still have the same issue with the app not scaling to fill the screen.

Flipline could you tell me what process you use to compile to an .ipa file ? Are you using starling ?

@ajwfrost Have you any idea what might be messing with my Build process ? - I'll just sum up..

air32.0 - fine on ios & android, but will stop being submittable on appstore come April 1st. air33.02.88 - fine on android, crashes after splash screen on ios. air33.1.1.63 - won't scale up app content (remains at pixel stage size) on android OR ios (when built from my own .bat file or Flash Develop . All other functionality fine. however @FliplineStudios have managed to do a build with my .swf which scales properly on an iphoneX, so it's not the swf that is the issue.

help ! I have 10 days left to solve this !

FliplineStudios commented 4 years ago

That's very strange, I used adt in a .bat file which seems basically the same as what you're using:

adt -package -target ipa-ad-hoc  -storetype pkcs12 -keystore ../certificates/2019Certificate.p12 -storepass xxxx -provisioning-profile ../certificates/Ad_Hoc_Dev_Testing.mobileprovision "devtesting_adhoc.ipa" "DevTesting-app.xml" "DevTesting.swf" Assets.car LaunchScreen.storyboardc AppIconsForPublish

And here's the application descriptor XML: https://paste.ofcode.org/83ZEpX9em4aHxmWksmds8Z

If you're testing on a specific device, if I have the same one I can try testing on it too. I can try an Android build too to see if it works or not.

kingbaggot commented 4 years ago

Ha ! - yes similar .bat file and I used your XML to build it and I still get the issue on IphoneX,Ipad3, google pixel 2.

I'm going to try set up another PC to do the build and see what happens. Thanks for replying, esp. on the weekend !

kingbaggot commented 4 years ago

Have built a .apk and .ipa file on different pc. Same issue as before.

One final roll of the dice - @FliplineStudios or @ajwfrost could you download my build folder and point it at your sdk and see if you get the same issue ? You'd just need to drop in your p12,mob prov, and change the id.

https://drive.google.com/file/d/1TPJBatRrjfojfG20ngXimkMIKqjXlEPz/view?usp=sharing

On the plus side, all this technical frustration is distracting me from C-19-based anxieties !

FliplineStudios commented 4 years ago

That's so strange, I just tried your build and everything worked fine for me! Maybe it's something different between our setups that is somehow affecting it compiling for you. For reference, I'm using Windows 10, using the "Full AIR SDK" download of AIR SDK for Windows, 33.1.1.63, and using the Harman license to remove the splash screen. Not sure what else might be different under the hood, looks like I'm using an older version of Java, Version 1.8.0_144-b01.

FliplineStudios commented 4 years ago

@kingbaggot Looks like I found the issue, once I removed our Harman license file and compiled with the Harman splash screen, then it started showing up broken like you mentioned, with the scaling incorrect.

@ajwfrost It looks like the current Harman splash screen is causing scaling issues here -- it sounded like you were working on some splash screen changes for the next version, so hopefully this can be fixed in that as well! For reference, @kingbaggot 's build folder linked above should be a good test case, where the content appears correctly full-screen without the splash, but appears smaller in the top-left when the Harman splash is present.

ajwfrost commented 4 years ago

Hi guys - thanks for all this! Apologies we'd not been on top of this quite as much as we'd hoped. The splash screen we put into the earlier 33.1 releases is using a SWF mechanism (so that it's nicely cross-platform, plus we can get a bit of an animation going) but this has caused other side-effects too so we're taking that out! Having to replace it with a static platform-specific splash screen which perhaps isn't ideal but should mean that these issues no longer occur..

We will use this test case though to ensure that the new mechanism isn't affecting things as well! we'v been seeing some odd things about how iOS works out the screen resolution, so are hoping we can just avoid changing this - aiming for a release during this coming week.

thanks

kingbaggot commented 4 years ago

@FliplineStudios @ajwfrost many thanks for the Detective work Flipline - I never would have solved that one, I owe you a round of pints. and Good luck Andrew & co sorting this issue out , thanks for all your hard work on these Air 33 sdks.

mucoci commented 4 years ago

I have the same issue in last days...

even I create a new project with a circle image in iOS and android, it all have the same issue

I hope next SDK will solve it

kingbaggot commented 4 years ago

Hi @ajwfrost - hope you and the team are all ok, did this get fixed ?

mucoci commented 4 years ago

@kingbaggot I have test this issue in 33.1.1.98, and it was solved.

I test it on Android phone and a iPad. but there is still some issue in iPad...the Harman logo in my iPad is vertical, but you know...the iPad is horizontal.

Any way, it was solved

by the way...the time of Harman logo in 33.1.1.98 is so short, it is hard to see what is that!