Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS issues #28

Open
JojoIce opened this issue Sep 17, 2020 · 13 comments
Open

iOS issues #28

JojoIce opened this issue Sep 17, 2020 · 13 comments

Comments

@JojoIce
Copy link

JojoIce commented Sep 17, 2020

Using just the plain output from liftoff and sending it to apple will generate a few errors, of which all of them are fairly easily fixed. I have pasted the error from Apple followed by the solution.

ERROR ITMS-4236: "Invalid value '0.0.1-SNAPSHOT' for bundle_short_version_string" at SoftwareAssets

robovm.properties
app.version=0.0.1
(remove all letters)

ERROR ITMS-90208: "Invalid Bundle. The bundle IOSLauncher.app does not support the minimum OS Version specified in the Info.plist."

<key>MinimumOSVersion</key>
<string>7.1.2</string>

I am not sure 7.1.2 is the correct to go with, but that is what I had in another project...

ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight' in bundle 'com.trilligames.trillitest'."

https://www.badlogicgames.com/forum/viewtopic.php?t=27402

ERROR ITMS-90475: "Invalid Bundle. Your app supports Multitasking on iPad, so you must include the UILaunchStoryboardName key in your bundle, 'com.xxxxxx.xxx’. Learn more (https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW40)."

https://developer.apple.com/forums/thread/20405

WARNING ITMS-90025: "Missing recommended icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 7.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface"

https://appicon.co/
Generate icons there and follow general guidelines for how to add them (basically add result in ios/data/ and remove the old stuff)
Next two errors are the same problems.

WARNING ITMS-90026: "Missing recommended icon file. The bundle does not contain an app icon for iPad of exactly '152x152' pixels, in .png format for iOS versions >= 7.0. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface"

WARNING ITMS-90026: "Missing recommended icon file. The bundle does not contain an app icon for iPad of exactly '76x76' pixels, in .png format for iOS versions >= 7.0. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface"

@tommyettinger
Copy link
Member

Thanks so much! This really helps a lot. I guess I'll try to fix this using the steps you gave, and post a beta release here.

@tommyettinger
Copy link
Member

OK, sorry this took so long; I got stuck trying to figure out what to do with the iconset, so I just copied what gdx-setup does. The Info.plist is also now copied, and the robovm.properties shouldn't generate with any hyphens or letters now. Here's the latest "beta-ish" jar in a zip:
gdx-liftoff-1.9.11.3-SNAPSHOT.jar.zip . I think it should work better; I don't know if it's all the way to where it should be, yet.

@JojoIce
Copy link
Author

JojoIce commented Sep 22, 2020

I haven't had the time to test this, but just wanted to let you know that THIS version of gdx-liftoff-1.9.11.3-SNAPSHOT.jar works fine on osx! (As opposed to the one with same name in other ticket).

If I recall correctly, the gdx-setup way of handling icons was already outdated, and created issues with certain new Apple hardware. This is a bit of a blur, and I might confuse it with the splash screens, but that also needs updating. Maybe if you send me the biggest version of the icon that you have, then I can create a more modern version.

To really make this a sweet setup tool, one should be able to provide an image to liftoff, that then would create the correct icons and splashscreen for both iOS and Android and maybe even PC.

@payne911
Copy link
Contributor

To really make this a sweet setup tool, one should be able to provide an image to liftoff, that then would create the correct icons and splashscreen for both iOS and Android and maybe even PC.

Oh, interesting idea.

@tommyettinger
Copy link
Member

Yeah, icons would be good. The only change between 1.9.11.3-SNAPSHOT versions is a switch to libGDX 1.9.12-SNAPSHOT, which updates LWJGL3, and that breaks something. I think I need to post an issue on the libGDX repo; something is definitely broken on MacOS.

@tommyettinger
Copy link
Member

Oh, and as for the logo, is Adobe Illustrator's AI format OK? I tried to export as .svg but a lot of the image got messed up. There's 3 .ai files I used here:
liftoff-ai.zip
You probably don't need the logo for liftoff, and the libGDX branding info, like the logo, is available here.

@JojoIce
Copy link
Author

JojoIce commented Sep 24, 2020

It just depends on what icons you want liftoff to produce. Realistically they will all be replaced anyway with the real game icons later, so these will just be placeholders. Ideally the image then provided by the user and scaled by liftoff. I have some old messy unmaintained hack lib that does that and a whole lot of other things, that I can share, but realistically it might be easier to just to write new code to read, rescale and write in new code, to keep liftoff clean.

I will basically just mash it through something like this: https://appicon.co/
So an image (png) of 1024x1024 is good to start with. I can wrangle the ai into 1024x1024. If you want to just start with a template with liftoff image.

Then there is the LaunchScreen.storyboard (splash-screen) which is a way to scale and stretch images according to the device resolution. Then only one image is needed for any formfactor. Maybe the same 1024x1024 can be OK there as well. I think that is the latest apple way of doing it. I think it can be possible to create a template where the developer just have to replace one image and then it would be a nice splash-screen. As I said, it is a bit of a blur, but I wrestled with it quite a bit a year ago.

Basically it will be like this:
ios/data $ ls -R
Base.lproj Media.xcassets logo.png

./Base.lproj:
LaunchScreen.storyboard

./Media.xcassets:
AppIcon.appiconset Contents.json back.imageset

./Media.xcassets/AppIcon.appiconset:
100.png 114.png 144.png 167.png 20.png 40.png 57.png 60.png 76.png 87.png 1024.png 120.png 152.png 180.png 29.png 50.png 58.png 72.png 80.png Contents.json

./Media.xcassets/back.imageset:
Contents.json back.png

Stuff in bold would then be nice to generate from a user defined image.

@tommyettinger
Copy link
Member

Yeah, hm... Would it be a good idea to just link to appicon.co and say where to put the icons? The icon requirements seem to change often, and I doubt liftoff can keep up with Apple's whims; a dedicated site like appicon.co seems more capable there. I think they also may handle scaling an input image that isn't already the right size. Right now I'm using the libGDX logo from the libGDX repo, which I think has all the needed PNGs.

@JojoIce
Copy link
Author

JojoIce commented Mar 9, 2021

So still in latest version of liftoff you get
ERROR ITMS-4236: "Invalid value '0.0.1-SNAPSHOT' for bundle_short_version_string" at SoftwareAssets
If you create an iOS version and upload to Apple. Simply changing the version to 0.0.1 will fix it.
Then the question is if you want to change the default version to be 0.0.1 just for iOS developers. It is easily changed in the liftoff gui, but can be confusing to a new user since the message from apple isn't super-clear and you will probably get it wrong at least the first time. Most are moving away from having "snapshot" versions anyway, so that would be my vote.

Regarding icons. I don't think this type of icons/media will be outdated anytime soon for iOS, and it could even be used for android and PC as well (template image to different icons and splashscreens per platform). That is a manual step you always will end up having to do otherwise, but it will add more complexity and code to liftoff naturally. Link in doc will otherwise be good.

@tommyettinger
Copy link
Member

I'm wondering if I can strip out -SNAPSHOT just for the iOS version, or maybe remove anything that isn't a digit or .. I guess it's fine to default to 0.0.1 and remove the -SNAPSHOT for a default project, because that suffix is mostly used for libraries anyway.

@tommyettinger
Copy link
Member

OK, 0.0.1 is now the default version in new projects, and the README.md has been updated to link to appicon.so and list the locations of icons that might need changing. I'll leave this open until someone tests and finds no iOS issues remaining. I don't have too much hope that I've gotten everything, but I hope this is at least usable.

@JojoIce
Copy link
Author

JojoIce commented Apr 6, 2024

Not sure if I should awaken this thread, but I saw it was open and I found a related Reddit post (regarding icons):

https://www.reddit.com/r/libgdx/comments/1bilggo/warning_google_play_console_suspened_my_game/

A bit related to comment on Sep 22, 2020 #28 (comment)

Someone got a game suspended because he used the libGdx icon and that had probably already been used by some other game and Google interpreted that as plagiarism and blocked the app and then also the name of the game.

I still think that it would be a very nice thing to have icons and splash screens generated by liftoff from a provided image. By now it is more complex since Android has this layer thing going on for the icon, but... good challenge?

Anyway, I read above that the readme should contain info regarding icons, and I do not see that. Maybe it has been removed since the comment above or I looked in the wrong place.

I am probably guilty of already submitting a (not published) app when I was testing out the iOS build. I took an unaltered project and sent it to both Google and Apple just to verify if Liftoff created functional projects. That could mean that anyone sending in a game without changing the icons might have to go through what the poor chap in reddit had to, including renaming the game which can be painful.

I see now that @tommyettinger called out for verification that things worked for iOS and well... I guess they did... until now sort of... 😄 Sorry.

@tommyettinger
Copy link
Member

Most info got moved from README.md to GUIDE.md ; there's also a Troubleshooting.md file where this might belong. Being able to take an image in the setup would be nice, especially if it could be automatically resized and its format adapted for the different platforms. A likely problem there is that most users won't start out with an icon for their app at project creation time. It doesn't seem that difficult to generate a moderately eye-pleasing icon randomly per-project, based on hashes of the initially given package and project name. This would ensure icons don't overlap if you forget to change them, or submit some version before you have an icon.

(I actually already started work on generating random icons using OpenMoji emoji, it might not be bad at all.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants