Discuss Scratch
- Discussion Forums
- » Open Source Projects
- » IOS Online Scratch Project Loader
- Executec
-
100+ posts
IOS Online Scratch Project Loader
I have been working on a scratch project loader for ios so you can release scratch projects for the app store. It will basically just do the job of a web browser that doesn't let you go to other pages. So far the code is like this:
I use Swift Playgrounds for coding in swift because I don't have a mac. This code doesn't work. Can anyone explain why? In swift playgrounds when i click run code nothing happens.
import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate {
var webView: WKWebView!
override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.uiDelegate = self
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
let myURL = URL(string:"https://scratch-mit-edu.ezproxyberklee.flo.org")
let myRequest = URLRequest(url: myURL!)
webView.load(myRequest)
}}
I use Swift Playgrounds for coding in swift because I don't have a mac. This code doesn't work. Can anyone explain why? In swift playgrounds when i click run code nothing happens.
- Dot32
-
23 posts
IOS Online Scratch Project Loader
If you don't have a mac it is illegal to run X-code, and x-code includes swift. That is why people buy macs for coding.
This is incredibly annoying, but you probably wont be able to run that code.
(i could be wrong with everything i am saying here)
This is incredibly annoying, but you probably wont be able to run that code.
(i could be wrong with everything i am saying here)
- Executec
-
100+ posts
IOS Online Scratch Project Loader
I am not using xcode. I am using the swift playgrounds app on ipad. It is separate. All i have is a pc. I don't really know what i can do then, anyone who has a mac please help me…
- Dot32
-
23 posts
IOS Online Scratch Project Loader
First: Xcode includes swift i am pretty sure.
Second: Huh, seeing as it an apple machine it *should* work, but i think i remember hearing sometime a while ago that people are annoyed at how you cant program at all on an ipad.
Third: I have a mac, but i have never tried running xcode so i am not sure how that works.
Second: Huh, seeing as it an apple machine it *should* work, but i think i remember hearing sometime a while ago that people are annoyed at how you cant program at all on an ipad.
Third: I have a mac, but i have never tried running xcode so i am not sure how that works.
- Executec
-
100+ posts
IOS Online Scratch Project Loader
Oh kay. First: I know xcode includes swift. It's apple's swift interpreter for devs.
Second: there are loads of xcode programs that work on swift playgrounds, which, btw, is made by apple.
Third: ‘My browser / operating system: MacOS Macintosh X 10.15.4, Safari 13.1.1, No Flash version detected’ That's what Scratch thinks. Actually I'm My browser / operating system: IPadOS IPad Pro 2019, Safari ??.?.?, No Flash version detected
Second: there are loads of xcode programs that work on swift playgrounds, which, btw, is made by apple.
Third: ‘My browser / operating system: MacOS Macintosh X 10.15.4, Safari 13.1.1, No Flash version detected’ That's what Scratch thinks. Actually I'm My browser / operating system: IPadOS IPad Pro 2019, Safari ??.?.?, No Flash version detected
- Dot32
-
23 posts
IOS Online Scratch Project Loader
The fact that it thought you were using macos is because of a feature called desktop class browsing.
But it appears you have proven that i have no clue what i am talking about lmao
But it appears you have proven that i have no clue what i am talking about lmao
- Executec
-
100+ posts
IOS Online Scratch Project Loader
Me neither. I just copied and pasted from the in-app script documentation XD
- wai0901
-
40 posts
IOS Online Scratch Project Loader
First: Xcode includes swift i am pretty sure.
Second: Huh, seeing as it an apple machine it *should* work, but i think i remember hearing sometime a while ago that people are annoyed at how you cant program at all on an ipad.
Third: I have a mac, but i have never tried running xcode so i am not sure how that works.
So I have learned some Swift before bouncing into HTML and into UnityScript, and for me you can actually program Swift on an iPad by using Playgrounds (which is what Executec used) as it is made by Apple. It's just not as good nor as versatile as XCode. I have used Xcode before and if I was correct Swift comes standard with Xcode, Along with some neat features other text editors don't have like a actual Simulator for almost every apple iPhone and Apple TV (don't know if they have iPads yet) imaginable.
- wai0901
-
40 posts
IOS Online Scratch Project Loader
I have been working on a scratch project loader for ios so you can release scratch projects for the app store. It will basically just do the job of a web browser that doesn't let you go to other pages. So far the code is like this:import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate {
var webView: WKWebView!
override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.uiDelegate = self
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
let myURL = URL(string:"https://scratch-mit-edu.ezproxyberklee.flo.org")
let myRequest = URLRequest(url: myURL!)
webView.load(myRequest)
}}
I use Swift Playgrounds for coding in swift because I don't have a mac. This code doesn't work. Can anyone explain why? In swift playgrounds when i click run code nothing happens.
If you could make that work that would be really cool! Since I'm still trying to find ways to convert Scratch 3 projects to Windows EXEs without downloading many tools!
Last edited by wai0901 (June 17, 2020 20:29:18)
- Executec
-
100+ posts
IOS Online Scratch Project Loader
Yeah the way the code is now, it should load the scratch homepage just fine. Idk
- bigbrianman
-
100+ posts
IOS Online Scratch Project Loader
Sounds cool, are you going to try to convert it to Xcode (Scratch is written in Django) I have been working on a scratch project loader for ios so you can release scratch projects for the app store. It will basically just do the job of a web browser that doesn't let you go to other pages. So far the code is like this:import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate {
var webView: WKWebView!
override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.uiDelegate = self
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
let myURL = URL(string:"https://scratch-mit-edu.ezproxyberklee.flo.org")
let myRequest = URLRequest(url: myURL!)
webView.load(myRequest)
}}
I use Swift Playgrounds for coding in swift because I don't have a mac. This code doesn't work. Can anyone explain why? In swift playgrounds when i click run code nothing happens.
- Executec
-
100+ posts
IOS Online Scratch Project Loader
Technically it's the same language, and I don't have a mac.
- Executec
-
100+ posts
IOS Online Scratch Project Loader
Just checking if this works: http://www.youtube.com/watch?v=9lqkllZiXN4
- GraceS119
-
1 post
IOS Online Scratch Project Loader
Is there going to be an iOS scratch app
- Executec
-
100+ posts
IOS Online Scratch Project Loader
I was actually thinking of just making a converter, so you could publish scratch projects on the appstore Is there going to be an iOS scratch app
- A-E-
-
100+ posts
IOS Online Scratch Project Loader
That is blatantly false. Swift is an open source project. (Sorry for the bump, I just wanted to make sure noone was scared away from Swift If you don't have a mac it is illegal to run X-code, and x-code includes swift. That is why people buy macs for coding.
This is incredibly annoying, but you probably wont be able to run that code.
(i could be wrong with everything i am saying here)

Last edited by A-E- (Nov. 18, 2020 21:50:03)
- Executec
-
100+ posts
IOS Online Scratch Project Loader
yea okThat is blatantly false. Swift is an open source project. (Sorry for the bump, I just wanted to make sure noone was scared away from Swift If you don't have a mac it is illegal to run X-code, and x-code includes swift. That is why people buy macs for coding.
This is incredibly annoying, but you probably wont be able to run that code.
(i could be wrong with everything i am saying here))
Last edited by Executec (Nov. 18, 2020 22:37:41)
- Discussion Forums
- » Open Source Projects
-
» IOS Online Scratch Project Loader