Topics

Invitation to test the iOS edition of BBC BASIC

Richard Russell
 

I think I've figured out how to distribute beta-test copies of 'BBC BASIC for iOS', within the constraints imposed by Apple anyway.  The main restrictions are that every tester must be individually registered by me, and that the test version times out after 60 days (or is it 90, I'm not sure) unless I release an update.

If anybody would like to try it, the minimum requirement is a 64-bit iOS device, so that means an iPhone 5S or later, or an iPad Air or later.  Please don't ask whether it will run on anything older, IT WON'T!

If you have a suitable device, and would like to try the app, please send me a personal email (do not post here) containing the UDID of your device.  To discover the UDID (consisting of 40 letters and numbers) you will need to perform the following steps:

1.  Connect your device to a PC or Mac running iTunes, as you would to sync music or photos.
2.  When the device has been recognised by iTunes, click on the corresponding icon that appears.
3.  The Serial Number will be displayed; this is NOT what I need.  Click on the Serial Number to reveal the UDID.
4.  Right click (on a PC, I'm not sure what the equivalent is on a Mac) and copy the UDID to the clipboard.
5.  Paste the UDID into an email and send it to me.

I should be able to tell whether the UDID is valid, but try not to make any mistakes (copying-and-pasting is far preferable to typing it in)!  I will reply to your email with installation instructions.

I'm sorry the process is rather involved, but blame Apple rather than me.

Richard.

caffey
 

I have a iPod Touch that I would like to test this on.

I'm not 100% but I thought Apple had something called TestFlight that made it easier to install beta type apps.   I'm testing a beta messaging app called Tungsten through TestFlight

My main device is an Android though

Good luck

Richard Russell
 

On Wed, Mar 7, 2018 at 04:11 am, caffey wrote:
I have a iPod Touch that I would like to test this on.
I didn't mention iPods because only the very last iteration ('6th generation') has a 64-bit CPU and receives OS updates.  If that is what you have, I will keep an eye out for your email.  

I'm not 100% but I thought Apple had something called TestFlight
> that made it easier to install beta type apps. 

TestFlight is not appropriate because it requires the app to meet App Store requirements (it gets reviewed just like an App Store submission) which it is unlikely BBC BASIC could meet.  It is also more intended for professional app developers (with a limit of 10,000 beta testers I think!) so really is in a completely different league.  With an absolute maximum of (I would guess) a dozen people interested in BBC BASIC for iOS the method I am using is the right one.

Richard.

Storer, Darren
 

For previous iOS app testing projects I've used UDID finder (link below) but of course, Richard's method to find the UDID is just as valid:

https://itunes.apple.com/gb/app/udid-finder/id384382012

Regards

Darren

On 6 March 2018 at 22:21, Richard Russell <news@...> wrote:
I think I've figured out how to distribute beta-test copies of 'BBC BASIC for iOS', within the constraints imposed by Apple anyway.  The main restrictions are that every tester must be individually registered by me, and that the test version times out after 60 days (or is it 90, I'm not sure) unless I release an update.

If anybody would like to try it, the minimum requirement is a 64-bit iOS device, so that means an iPhone 5S or later, or an iPad Air or later.  Please don't ask whether it will run on anything older, IT WON'T!

If you have a suitable device, and would like to try the app, please send me a personal email (do not post here) containing the UDID of your device.  To discover the UDID (consisting of 40 letters and numbers) you will need to perform the following steps:

1.  Connect your device to a PC or Mac running iTunes, as you would to sync music or photos.
2.  When the device has been recognised by iTunes, click on the corresponding icon that appears.
3.  The Serial Number will be displayed; this is NOT what I need.  Click on the Serial Number to reveal the UDID.
4.  Right click (on a PC, I'm not sure what the equivalent is on a Mac) and copy the UDID to the clipboard.
5.  Paste the UDID into an email and send it to me.

I should be able to tell whether the UDID is valid, but try not to make any mistakes (copying-and-pasting is far preferable to typing it in)!  I will reply to your email with installation instructions.

I'm sorry the process is rather involved, but blame Apple rather than me.

Richard.


Storer, Darren
 

How embarrassing - the UDID Finder app needs to be updated for iOS 11 support. In my haste to be helpful I neglected to test the app before posting.

Apologies !

Darren

On 7 March 2018 at 15:32, Storer, Darren <darren.storer@...> wrote:
For previous iOS app testing projects I've used UDID finder (link below) but of course, Richard's method to find the UDID is just as valid:

https://itunes.apple.com/gb/app/udid-finder/id384382012

Regards

Darren

On 6 March 2018 at 22:21, Richard Russell <news@...> wrote:
I think I've figured out how to distribute beta-test copies of 'BBC BASIC for iOS', within the constraints imposed by Apple anyway.  The main restrictions are that every tester must be individually registered by me, and that the test version times out after 60 days (or is it 90, I'm not sure) unless I release an update.

If anybody would like to try it, the minimum requirement is a 64-bit iOS device, so that means an iPhone 5S or later, or an iPad Air or later.  Please don't ask whether it will run on anything older, IT WON'T!

If you have a suitable device, and would like to try the app, please send me a personal email (do not post here) containing the UDID of your device.  To discover the UDID (consisting of 40 letters and numbers) you will need to perform the following steps:

1.  Connect your device to a PC or Mac running iTunes, as you would to sync music or photos.
2.  When the device has been recognised by iTunes, click on the corresponding icon that appears.
3.  The Serial Number will be displayed; this is NOT what I need.  Click on the Serial Number to reveal the UDID.
4.  Right click (on a PC, I'm not sure what the equivalent is on a Mac) and copy the UDID to the clipboard.
5.  Paste the UDID into an email and send it to me.

I should be able to tell whether the UDID is valid, but try not to make any mistakes (copying-and-pasting is far preferable to typing it in)!  I will reply to your email with installation instructions.

I'm sorry the process is rather involved, but blame Apple rather than me.

Richard.



Richard Russell
 

On Wed, Mar 7, 2018 at 07:32 am, Storer, Darren wrote:
For previous iOS app testing projects I've used UDID finder
Knowing some people's (understandable) reluctance to install apps of unknown 'pedigree', and noting the customer reviews ("Gives a random string in place of the device's actual UDID") I didn't want to recommend this method.  But if you find it works it's certainly more convenient than connecting to a PC or Mac.

Richard.

Storer, Darren
 

Hi Richard,

Seemingly/annoyingly the UDID "finder" family of 3rd party apps stopped working after iOS 7. The last time I used it successfully was for Reuben Scratton's iBeeb (BBC Micro Emulator) which even ran Elite but sadly the project was never released via the Apple App Store.

Thanks for the opportunity to help with iOS testing.

Regards

Darren


On 7 March 2018 at 15:39, Richard Russell <news@...> wrote:
On Wed, Mar 7, 2018 at 07:32 am, Storer, Darren wrote:
For previous iOS app testing projects I've used UDID finder
Knowing some people's (understandable) reluctance to install apps of unknown 'pedigree', and noting the customer reviews ("Gives a random string in place of the device's actual UDID") I didn't want to recommend this method.  But if you find it works it's certainly more convenient than connecting to a PC or Mac.

Richard.


Richard Russell
 

On Wed, Mar 7, 2018 at 08:07 am, Storer, Darren wrote:
Seemingly/annoyingly the UDID "finder" family of 3rd party apps stopped working after iOS 7.
Had Apple wanted the UDID to be discoverable on the device itself they would have displayed it in the settings!  For whatever reason (and I've given up trying to decode Apple's motives) they evidently don't think that is desirable, so any app that does it is presumably using some undocumented and unsupported method.  It's hardly surprising, therefore, that it stops working after an iOS update (and frankly I don't know how it got into the App Store in the first place).

Of all the platforms on which I am trying to support BBC BASIC, the Apple ones (both Mac OS and iOS) give me far more grief than the others.  I wouldn't say I am an 'Apple hater' but I am far from being a fan of their Big Brother, 'we know best', attitude to everything.

Richard.

Richard Russell
 

When you start either the Android or iOS edition of BBC BASIC the program that initially runs is the 'Touch IDE' (touchide.bbc in the tools directory).  It is this program that allows you to navigate the file hierarchy, run a program by tapping on its name, scroll and zoom the file list, edit and copy programs etc.  Brief instructions for the use of the Touch IDE can be found at the website.

There's nothing to stop you running 'touchide.bbc' in the same way as any of the other supplied example programs (by navigating to the tools directory and tapping on it).  The difference is that, since it's the program that is already running, nothing obvious happens - the program simply CHAINs itself!  Sadly some people completely misinterpret this apparent lack of action and report that "touchide is not working"!

Richard.

Richard Russell
 

After some rather intense 'forensic debugging' I've discovered what was making the graphics so slow on iOS - a 'feature' of SDL2, when running on iOS (only), which results in the SDL_PumpEvents function (and the SDL_PollEvent function, which calls it) running very slowly.   It's even commented in the code of SDL if you know where to look: 

    /* Let the run loop run for a short amount of time: long enough for
       touch events to get processed (which is important to get certain
       elements of Game Center's GKLeaderboardViewController to respond
       to touch input), but not long enough to introduce a significant
       delay in the rest of the app.
    */
    const CFTimeInterval seconds = 0.000002;

Two microseconds may not sound like much, but it's an age on a modern CPU (and in fact I suspect the pause is much longer).  The comment "not long enough to introduce a significant delay in the rest of the app" is far from the case with BBC BASIC!

Fortunately a workaround in my code was possible, so those of you who have downloaded the iOS edition of BBCSDL please replace it with the latest version.  You should notice a worthwhile speed improvement, indeed in a few cases it will be very marked (I reckon 'scarab.bbc' is now running about a hundred times faster than it was!).

Richard.

Richard Russell
 

I've updated 'BBC BASIC for iOS' so that @usr$ now points to a 'shared' directory.  This means that you can easily transfer files (e.g. BASIC programs) into or out of BBC BASIC using iTunes or a file manager like iMazing.  Also, I believe that iTunes will automatically backup any files and programs you store in @usr$.

To update your copy simply re-visit the original download URL and tap on the blue link again.  I've not changed the displayed version number (0.20i) but the internal build number has increased.  Let me know if you have any problems with this new release.

If you've got a suitable iOS device (anything that can run iOS 11 should be OK) and haven't yet asked to try BBC BASIC, what are you waiting for?!  Just contact me privately with your UDID, obtained as described at the beginning of this thread.

Richard.

Dagfinn
 

I received the iOS app last night and it installed without problem. First impressions:

Sound and graphics worked great, as did touch input. Happily, I can also report that file transfer via iTunes went smooth. Note: I wrote the file to be transferred on my desktop BBC4W editor in order to get the right file format.

To be able to write and run BBC Basic programs on the PC and then distribute them cross-platform, even to iPhones and iPads, is a very fine thing indeed. To my mind it would justify resurrecting BBC Basic both as a pedagogical tool and an all-round coding tool.

Actually I have now tried SDL BBC Basic on Android, iOS, PC and Linux. Overall impression very favorable! In particular the speed is mindboggling for an interpreted  language.

Best regards,
Dagfinn

Dagfinn
 

PS. This was on an iPhone SE running iOS 11.2.6.

Richard Russell
 

I've updated 'BBC BASIC for iOS' to build 0006. The main change in this release is that it now supports a 'custom URL scheme'. What this means is that you can run BBC BASIC and tell it automatically to launch a specified program; this is similar to the capability of the Android edition which allows shortcuts to BBC BASIC programs to be placed on the home screen.

Unfortunately (as is so often the case) Apple don't make things as straightforward as they are in Android! The only way of running BBC BASIC with a program-name parameter is via a special URL that Safari can handle. In this case the URL takes the following form:

      bbcbasic://program.bbc

Assuming BBC BASIC is not already running (unfortunately neither iOS nor Android currently supports multiple instances of the same app) this will run BBC BASIC and immediately launch 'program.bbc' in the @usr$ directory.

You can manually activate this feature by typing a URL of that form into Safari, but its real power comes from the ability to automate this process. In principle (and once upon a time in practice) this allows you to create a home-screen shortcut to run a BBC BASIC program of your choosing, but Apple (in their infinite wisdom) seem to have decided that this is not a good idea and have blocked Safari's ability to create a shortcut when it leads to a custom URL scheme. You can create a Bookmark however.

Nevertheless, with some effort, it should still be possible to create a home screen shortcut to a 'web app' which itself activates the BBC BASIC URL. I've not succeeded in doing this myself because I'm not an HTML expert, but if somebody does so I would be very interested to learn the details.

Richard.

Rob O'Donnell
 



On 19 March 2018 at 15:35, Richard Russell <news@...> wrote:
Unfortunately (as is so often the case) Apple don't make things as straightforward as they are in Android! The only way of running BBC BASIC with a program-name parameter is via a special URL that Safari can handle. In this case the URL takes the following form:

      bbcbasic://program.bbc

Nevertheless, with some effort, it should still be possible to create a home screen shortcut to a 'web app' which itself activates the BBC BASIC URL. I've not succeeded in doing this myself because I'm not an HTML expert, but if somebody does so I would be very interested to learn the details.


I don't have any IOS devices to actually test this on, but here's a couple of options.

Server based (PHP)
which will redirect to a bbcbasic: URL.  Just change fn to the program name requested.  (alphanumerics only, "for security" :D ) 

<?php
if (isset($_GET['fn'])) {
        $fn = preg_replace("/[^a-z0-9.]+/i", "", $_GET['fn']);
        header('Location: bbcbasic://' . $fn );
} else {
        die ('Please specify fn');
}


HTML/Javascript

You should be able to save that page locally (without the #program.bbc, but add that within a shortcut to it.)

<script>
document.location = "bbcbasic://" + window.location.hash.substr(1);
</script>


Rob.

Rob

 

Richard Russell
 

On Mon, Mar 19, 2018 at 09:59 am, Rob O'Donnell wrote:
I don't have any IOS devices to actually test this on, but here's a couple of options.
So how do I actually deploy them locally (i.e. on the iOS device itself)?  I'd know how to save a file on a PC and direct a browser to it, but I have no idea what the equivalent would be in iOS, if there is one.  Google found me this similar question but I don't understand the upvoted answer.

Richard.

Dagfinn
 

Re: Rob’s solution

 

I have implemented Rob’s solution in Javascript/HTML on my domain dagfinndybvig.no, and tried it on my iPhone. It worked.

 

If you enter in Safari on your device:

 

dagfinndybvig.no/bbc.html#yourprogram.bbc

 

And «yourprogram.bbc» is in @usr$, the online script should open the url (and hence the program) on your device. (Unless some security measure interferes!)

 

The link to the url «dagfinndybvig.no/bbc.html#yourprogram.bbc» can be put on the homescreen in the usual manner.

 

 

So far so good. The problem is to do it locally, without involving an outside server.

 

Dagfinn

 

Sendt fra E-post for Windows 10

 

Richard Russell
 

On Tue, Mar 20, 2018 at 07:53 am, Dagfinn wrote:
So far so good. The problem is to do it locally, without involving an outside server.
Thanks for confirming that; I was going to do it myself (using Rob's links) but hadn't got around to it.  If you look at the Stack Overflow question to which I linked, the upvoted answer implies that by means of a 'manifest' it should be possible to force the browser to cache the page 'indefinitely', thus requiring an internet connection just the once.  But I don't know if that interpretation is correct, nor what form such a manifest needs to take.

Richard.

Dagfinn
 

Re: Caching

 

I will give this caching business some thought, using the link you provided. It is tricky – sometimes the browser caches permanently when you don’t want it to, but when you need it, it does not necessarily want to. I also think a combination of script and browser-settings are at work, and thus that there is more than one way to do it (working in sync with Safari on a Mac.)

 

The best thing would be if someone proficient in Safari/OS/iOS dealt with it – I know more about Chrome/Android 😊As the Stack Overflow link suggested, what needs to be done is probably more difficult on iOS (Safari) than on Android anyway, so expert help would be welcome.

 

By the way, the ability to lauch with «bbcbasic://program.bbc» is a lovely feature in itself; it would be fantastic to be able to combine it with a link to the homescreen!

 

Dagfinn

 

Sendt fra E-post for Windows 10

 

Rob O'Donnell
 

I know nothing about ios, so can't help with specifics, but a bit of googling shows that Apple seem very resistant to allowing you to store an html file locally and launch it. I've seen suggestions of apps to use as work-arounds, but I am in no position to evaluate these, and I'm sure asking people to download something else as well isn't a good idea. 

Random thought. Is it possible for an app to fire off Safari with locally generated html? Someone (Richard?) could then create a tiny little launcher that must reads @usr$ and creates a web page with a list of links.. 

Rob. 

--
Sent from a mobile device. Please excuse brevity or spoiling mistooks.

On Wed, 21 Mar 2018, 09:31 Dagfinn, <dagfinn.dybvig@...> wrote:

Re: Caching

 

I will give this caching business some thought, using the link you provided. It is tricky – sometimes the browser caches permanently when you don’t want it to, but when you need it, it does not necessarily want to. I also think a combination of script and browser-settings are at work, and thus that there is more than one way to do it (working in sync with Safari on a Mac.)

 

The best thing would be if someone proficient in Safari/OS/iOS dealt with it – I know more about Chrome/Android 😊As the Stack Overflow link suggested, what needs to be done is probably more difficult on iOS (Safari) than on Android anyway, so expert help would be welcome.

 

By the way, the ability to lauch with «bbcbasic://program.bbc» is a lovely feature in itself; it would be fantastic to be able to combine it with a link to the homescreen!

 

Dagfinn

 

Sendt fra E-post for Windows 10