joshuaauerbachwatson / anyCards

Multi-person card game with no built-in rules
Apache License 2.0
0 stars 0 forks source link

[client] Set up for true "ad hoc distribution" #11

Closed joshuaauerbachwatson closed 1 year ago

joshuaauerbachwatson commented 1 year ago

Currently, the app is not registered in app store connect and I have no plans to distribute it with test flight. Rather, I want to try using apple's ad hoc distribution. We are already doing a degenerate form of it ... I have "installed" the app on my own iPad and on the Jones family iPad ("iPad(3)") using the XCode build/run capability (that is, without creating an archive). But, this only works when the target iPad is local. The Jones family iPad was only visiting and is now a three hour drive away and this lack of proximity will probably apply to other testers I may acquire. There are already newer versions of the software than what I put on the Jones' iPad yesterday.

As I understand it, I can start generating archives for ad hoc distribution and make them network accessible, after which I can enlist users who are remote. They do have to discover the UDID of the machine and give it to me so I can enter them as eligible devices in my developer account but then there should be a way for them to install. This will be limited to 100 iPads but I think that should be fine.

I believe I can get this going and get the kinks out of it using my own iPad and then see if it works for the Jones family.

joshuaauerbachwatson commented 1 year ago

I have something that works with my own machine here.

The steps are:

  1. Create an archive (just as with TestFlight or AppStore submissions).
  2. In the organizer, select Distribute App, then select Ad Hoc.
  3. I believe you don't have to generate the manifest every time; it's possible version numbers and other details may have to be edited from time to time.
  4. Move the .ipa file that was generated to the web folder of the repo, which also holds image files, the manifest.plist file, and a little index.html to satisfy the AP static site detection logic that this really is a static site.

The crazy URL to use for distribution (email to collaborators) is itms-services://?action=download-manifest&url=https://unigame-befsi.ondigitalocean.app/install/manifest.plist

I will wait until someone else has successfully done this before closing the issue. It might be good also to see if we can fully equip a new iPad without ever having it physically present. The tricky part is getting it entered as a valid device in my apple developer account. The tricky part of that is capturing the UDID for the new device. This can be done (slightly scary) by opening Safari and visiting showmyudid.com. It will download a profile that you have to allow and then open and install in settings (despite a warning or two). The result is that your UDID will be captured to the web site and you can copy it or email it.

joshuaauerbachwatson commented 1 year ago

It turns out I don't have a spare iPad any more, so I tried using the ad hoc distribution method with my iPhone 7. I turned off Xcode and was able to capture the UDID using only a cable connection and About this Mac -> System Report -> USB (then scroll down to find the iPhone ... what is stated to be a serial number is actually a UDID). I then entered the iPhone as an official test device in my account and tried the install.

It didn't work. I was asked if I wanted to install but the install just stopped silently without installing anything.

It turns out the game was not setup to be installed on iPhones. I tried doing the same thing using Xcode and was told what the problem was. I fixed the device eligibility in the app, but the game is unacceptably strange-looking on a phone (issue #17). I feel I should address that before going through a new build cycle and trying again, so I'll come back to this.

It turns out the Jones family doesn't have a second iPad but Jessie has one (more than one, actually) so I can try again with her cooperation.

As an entirely different thought, however, I'm not sure it wouldn't just be a whole lot easier to register this app for a TestFlight beta.

joshuaauerbachwatson commented 1 year ago

I have put in a review request for TestFlight external testing. If I get a promising response I will drop the ad hoc distribution idea entirely. It's just a little too much bother and TestFlight is so easy. Keeping this open until I hear from Apple

joshuaauerbachwatson commented 1 year ago

Apple has approved the game for beta distribution, so I will drop the ad hoc distribution idea. This means removing the static site component in my digital ocean account and removing the web folder from the repo. XCode takes care of beta builds for me. The link for the beta distribution is now on the README and also on the joshuaauerbachsoftware web site.