Questions tagged [ipad-playgrounds]

iPad playgrounds are Swift playgrounds running on iOS through the Swift Playgrounds app, only available for iPad. These are not the same as Swift playgrounds available on macOS via Xcode - for questions about those, use the [swift-playground] tag instead.

For more information, see the Swift playgrounds Apple page.

For questions related to Swift playgrounds in Xcode, use the swift-playground tag.

15 questions
1
vote
1 answer

How do you render Text("Content") in SwiftUI on an iPad in Swift Playgrounds vs. Xcode on a Mac?

The above code works on a Mac, using the Xcode editor. However, the same code returns: abort() called on an iPad using Swift Playground's editor. How do I render Text() on the iPad? I followed the directions in this…
Matthew
  • 91
  • 3
  • 10
1
vote
2 answers

SpriteKit; How to add a physicsbody to CGMutablePath/SKShapeNode (drawn line)?

I am currently trying to implement in SpriteKit that previously generated SpriteNodes bounce off a line drawn by the user. For this I need to give them a physicsbody so that the objects can collide. Does anyone have an idea how to implement…
chickenbox
  • 25
  • 6
1
vote
0 answers

Use Swift Playground with BLE and HM-10

I’m currently trying to build a swift playground that can communicate with a HM-18 BLE module. I’m new to swift. I just don’t get the delegate thing and what objects I need to assign there (???). Let me break down one line and explain what parts I…
1
vote
1 answer

Add JSON file to Swift Playgrounds

I've created a playground book on swift playgrounds, but I don't know how to add a JSON file to the directory. Can you add JSON files to swift playgrounds (ipad)? If so, how?
Jules
  • 23
  • 1
  • 4
1
vote
1 answer

How to change struct properties in Swift

I’m trying out Swift playgrounds and I cannot find a way to change value of a struct. Below I want to change properties of Shadow from default values. I’ve tried the initialiser and dot syntax but I get ‘field is inaccessible due to internal…
user14492
  • 2,116
  • 3
  • 25
  • 44
1
vote
2 answers

IPad Playground Has Different View.Frame

I am trying to show this simple ViewController in iPad Playgrounds with this code: import UIKit import PlaygroundSupport class MyViewController : UIViewController { override func viewDidLoad() { super.viewDidLoad() setupViews() } func…
user11141180
0
votes
0 answers

Swift Playground on iPad issue with zoomed app

I try to create simple calculator app for study purpose but when I try to preview the result it’s zoomed and not in correct size. this is my sample code: struct CalculatorView: View { var buttonTypes: [[ButtonType]] { [[.allClear,…
mfranc28
  • 1,325
  • 2
  • 8
  • 4
0
votes
0 answers

& - error

I’m kinda new to Swift and when I run my code in SwiftPlaygrounds on my iPad, I get those two errors: ollRow & ollView -> Instance member 'ollName' cannot be used on type 'ollCase'; did you mean to use a value of this type instead? + ollView ->…
Shae
  • 1
  • 1
0
votes
0 answers

AR Quick Look doesn't work in Swift Playgrounds

I have a question regarding AR Quick Look, I have a simple view with an ARQLView showing a .usdz file of a Nike shoe. This code works perfectly fine on my iPad if I sideload the app using Xcode. The problem is, when I try to use the same code in…
June
  • 13
  • 6
0
votes
1 answer

Need advice on writing iOS apps on iPad with Swift Playgrounds

I want to write a keyboard app for iOS, but I only have an iPad at my disposal at the moment. I've been searching Apple Developer documentation as well as online forums and I'm not finding the answers I need to get started. There is focused…
Kristopher
  • 19
  • 2
0
votes
2 answers

Export a project to the Playgrounds app on the iPad

Can I transfer the project on the Xcode application in SwiftUI language on the Mac to the iPad in the Playgrounds application I've searched a lot about it and couldn't find anything Can you help me with this
bdriii
  • 31
  • 7
0
votes
1 answer

Swift Playgrounds (iPad) does not build an app with implemented ARSessionDelegate.session(_:didUpdate:) functions

I found an error while trying to implement a SwiftUI representation of ARView with ARSessionDelegate based on Apple’s official example “Building an immersive experience with RealityKit”. There is the error Method '__preview__session(_:didUpdate:)'…
Erik
  • 1
  • 1
  • 3
0
votes
2 answers

Want to sound different tone each time it's called

Beginner of programming. The code below can sounds fine, but repeats the same tone 5 times. I want to change tone each time it's called. Please help me to solve this problem. (I don't have Mac but iPad only. And making programs with Swift…
0
votes
1 answer

How Can I Make Swift Playgrounds Be Borderless on my iPad?

In Swift playgrounds, I started with an empty playground template (I'm new to playgrounds) and wanted to have the Live View take up the whole screen. I saw this: Fullscreen for Swift Playgrounds on iPad Which said to modify a Manifest.plist file but…
Brad Kyle
  • 27
  • 6
0
votes
0 answers

Using Pages in iPad Playgrounds

The documentation mentions: add pages to your playground to help organize your code. But I’m unable to access a class from a different Page. I tried setting everything public, and even creating the class in the Sources folder by starting the…
pesch
  • 1,976
  • 2
  • 17
  • 29