Refactor the native interface in preparation for switching iOS to use WKWebview.
* Finally rename the folder for device specific interfaces as `tablet` instead of `iPad`
* Update `import` statements to use the new name
* Create new `iOS.js` and `Android.js` based on previous `iPad/iOS.js` to separate the interfaces
* Add new `OS.js` class to manage the class variables, initialize the device interface delegate methods to the correct interface.
* refactor how `utils/lib` detects the current platform based on `navigtor.userAgent` based on https://stackoverflow.com/questions/37591279/detect-if-user-is-using-webview-for-android-ios-or-a-regular-browser. previous method relied on the Android interface being loaded or not. It can be difficult to detect the difference between in a browser and in a webview, but for now ScratchJr doesn’t need to worry about running in a browser
Added instructions to the README for how to get the google services configuration files for analytics. Removed (and ignored in future) the empty config files. Note: empty folders are ignored in git, so added an empty file `.exist` to the android folder so that it will be there as a place to hold the actual google services file.
Finally added the xCode scheme for the app that you need for newer versions of xCode.
I also decided to add the Pods directory to gitignore. It bloats the ScratchJr repo. This does mean that people will need to install cocoapods and run `pod install` the first time they build scratchjr.
* add required new app icon size
* add `LSSupportsOpeningDocumentsInPlace` property (false)
* set minimum iOS version to 8.0 (minimum allowed by this version of xCode)
ScratchJr.m: runtime: UI API called from background thread: -[UIView removeFromSuperview] must be used from main thread only
IO.m: runtime: UI API called from background thread: -[UIWebView stringByEvaluatingJavaScriptFromString:] must be used from main thread only
We know that projects with lots of (large) sounds tend to crash ScratchJr. Hopefully reducing the size of the sounds will help to reduce the number of crashes.
If the same sound gets triggered while it’s playing, the sound restarts and both sound blocks will be highlighted until the sound completes - this matches what happens on Android.
Also more formatting changes.
In the current system you can’t have the same sound playing more than once at the same time - this is how it was implemented on Android, so we used the same restriction on iOS.
However in the previous version if you interrupted the sound to play it again, it continued from where it was instead of starting over. So it didn’t appear to do anything. Added resetting the current time to 0.0 on play to restart sounds.