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 readme section #42

Open
auraxangelic opened this issue Mar 3, 2021 · 10 comments
Open

iOS readme section #42

auraxangelic opened this issue Mar 3, 2021 · 10 comments

Comments

@auraxangelic
Copy link

The iOS section of the Readme.md isn't clear with the prerequisites of running a clean base project.

Please correct me if I'm wrong, but the current base project seems to require a robovm call in the ios build.gradle file. Mobivm seems to require a real signing (iosSkipSigning = false) with a real iosSignIdentity and iosProvisioningProfile.

I'm curious as to what everyone's experience with iOS setup have been like, and if we can add anything to the readme to help future liftoffers.

@tommyettinger
Copy link
Member

Yeah, this would be handy to know. I have mostly copied what I can from gdx-setup's iOS projects, but their code seems even more tangled than liftoff's. Since I don't have a Mac, and I'm not really willing to go the Hackintosh route if I don't own any iOS devices to test on, I'm dependent on user recommendations here. @JojoIce seems to have made some progress on iOS, and has given some really valuable guidance for what to do in iOS projects. I think the last few bugs with the generated projects should be fixed in the latest release, Release 1.9.14.2, but I don't know what else is needed for setup. Any help is appreciated!

@JojoIce
Copy link

JojoIce commented Mar 8, 2021

The last version did not fully work, so I have not tested that, but I don't think that the projects created by liftoff has any other requirements compared to other projects (gdx-setup or homemade). If it isn't liftoff specific then I think it belongs at libgdx documentation (quite possible that needs updating). But I am not quite sure of what is referred to. I build and sign my app from Eclipse using RoboVM plugin and a distribution cert, and I don't think anything will be needed to change in the files generated from liftoff for that, but maybe if you want to distribute it in other ways it will be needed. Or maybe there is a more clever way to create iOS distributions with gradle today and that is what it relates to. If so please share.

@auraxangelic
Copy link
Author

auraxangelic commented Mar 17, 2021

@JojoIce I've tried on IntelliJ using the MobiVM 2.3.12 plugin. I can create the IPA, but I'm having some trouble installing it on both device and virtual device. Which flavor of provisioning profile and signing identity are you using? Is it App ID/iOS App Development?

@JojoIce
Copy link

JojoIce commented Mar 18, 2021

First off I looked into your suggestion a bit better and I guess that is to enter some configuration in gradle settings and then use gradle instead of the plugin to generate the IPA. It looks like it could be a better fit especially if you want to automate steps, so that might be a thing to consider for liftoff. It could even be an idea for a setting in the GUI. I use one wildcard profile for all my games, so that would be sweet to have that automatically in the file. I have not yet tested the gradle approach though so I don't know the detail really.

Regarding profiles (sorry @tommyettinger for derailing agin. Tell us to take it elsewhere if you want this strictly for the specific issue). All I really know is that it is a real pain. Probably best to ask in the iOS section of LibGdx Discord. However I think that you need a distribution profile and certificate if you want to upload to apple (even just for internal testing) and development if you just hook up your device to you mac. What I also know is that thousands of things can go wrong with this (even if you have the profile and cert right) and if they can go wrong they will do so. Also using "auto" for selecting profile and cert generally goes wrong for me, so I always specify the specific one.

@tommyettinger
Copy link
Member

No problem with derailing here; I don't follow any of this conversation yet so I'm hoping I can absorb some useful info. The Discord is indeed a good choice; link here.

@auraxangelic
Copy link
Author

auraxangelic commented Mar 19, 2021

Ok. I've found some success with some help of some colleagues. I'm still new to this so I'm curious if this makes sense to anyone, and if you have the same experience. Feel free to correct me.

  • Install Xcode.
  • Prerequisite for all iOS development certs/profile:
    • Create a certificate signing request from Keychain Access app.
    • Create either a distribution or development certificate using that signing request in the Apple development portal webpage.
    • If using development cert/profile, you need to add the UDID of the device to the provisioned list.
    • Create an identifier that matches the app.id field in robovm.properties
    • Create and a provisioning profile (either ad hoc for distribution cert or development for development cert) with that identifier.
    • Download and install the cert and the profile by double clicking on them.
  • Get Ecllipse/Intellij with MobiVM Plugin.
  • Open the project with the IDE.
  • For Development:
  • For Deployment:
    • Select "Create IPA" using MobiVM Plugin.
    • Select the appropriate signing identity, and provisioning profile. They should automatically show up. It seems like x86 architecture is not supported so you cannot install the app on a virtual device. You must have a physical device.
    • Here's the part that tripped me up. How you install a package from a Mac to the physical device matters. This is the way it worked for me: Open Xcode's Devices with command+shift+2. Click the + under Installed Apps. Select the .app file that was created with the IPA.

With all that, I now have Super Koalio working using the 1.9.14.3 version of gdx-liftoff on my iPhone!

@auraxangelic
Copy link
Author

auraxangelic commented Mar 19, 2021

Those are what I believe to be the minimum steps to get it working on iOS. If that makes sense, I think we should write something like that in the readme so others won't have to suffer like I did.

@auraxangelic
Copy link
Author

auraxangelic commented Mar 19, 2021

stosho has informed me that for development, instead of Creating IPA using MobiVM Plugin, we can follow step 5 here: https://medium.com/@bschulte19e/deploying-your-libgdx-game-to-ios-in-2020-4ddce8fff26c Running this config would automatically install it on your physical iPhone device. Much better than creating IPA every time for dev.

The cert/profile must to be the dev flavor for the run config.

@auraxangelic
Copy link
Author

auraxangelic commented Mar 19, 2021

@tommyettinger I think we have pretty much the entirety of the extremely long setup summarized here. We'll leave it up to you if you want to put any of it into the readme. None of it ended up being liftoff specific, but neither is any of it documented very well in any gdx docs. Feel free to close if you're happy with this.

As for the optional robovm config, I think we can punt that. It would be good info for anyone doing CICD, but maybe not as much for small shop game devs like us.

@JojoIce
Copy link

JojoIce commented Mar 19, 2021

Well that link you provided is written by MrSthalfelge, who I think is also a committer of LibGdx, so that must be legit. Shame that it is not in the libGdx wiki. I think adding the link to the liftoff documentation would be very helpful, as that seems to be the best current description around. The list above from @auraxangelic actually also holds some great information that is not part of step 4 from the mendium site, and that is probably where many get it wrong, so that would be very useful to have documented somewhere. Maybe a subpage on the wiki here, as it is not directly liftoff but very useful to most who want to use iOS after creating project with liftoff.

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