It does not appear possible to edit previous markup on the iOS Swift Playgrounds app directly. The only way that I have found is to export the file into an Xcode Playground, perform the editing, then re-import it back into the iOS app. This is a bit long winded! Has anyone found a simpler method?
Running latest Swift Playgrounds app under iOS 12.2 on an iPad Pro 2018.
You are right, the markup part of a playground page can only be changed in an external editor. So your workflow
Testing on iPad -> Editing in Xcode -> Syncing with iPad
is just fine.
Currently, this seems to be the philosophy behind Swift Playgrounds.
The developer is intended to build a playground in Xcode, which the user can experience on their iPad. This includes the restriction to certain editable regions within a playground page. The user is not (yet) supposed to change major parts of the source code (including markup parts) solely on iPad.
Related
I'm trying to work on editing grids sample app in playgrounds. It works fine on my iPad but it is not working on my Mac. I can see the code but I get an error message that minimum deployment target is 16 and there is no preview showing. MacOS is up to 13 no? So I guess it is refering to iPad OS 16? How do I fix this on my Mac?
Also the code references NavigationStack which now replaced NavigationView but in Xcode it doesn't show up in autocomplete and the compiler doesn't recognize it.
When I go into apple store both xcode and playground just say "open", there is no update option.
What do I do?
Edit: Probable Bug. Seeking fix or workaround…
How can I get the system’s text styles to be available in the interface builder when using Xcode 11?
I just started using Xcode 11 this week. In the interface builder (storyboard mode), when I go to assign a dynamic type text style to a Label or Button, using the Font -> Style pop-up, all the text styles are missing from the popup menu.
I do have the Dynamic Type “Automatically Adjusts Font” checkbox checked, as well.
I’m not sure if this is a bug, an intentional change I can’t find documentation for, or something else.
The expected behaviour is described in Apple’s developer documentation “Scaling Fonts Automatically”. Specifically, in the “Configuring Text Styles Using Interface Builder” section.
Further exploration: I’ve tried it with new projects, old projects (from Xcode 10), projects targeting iOS 12.2 and 13.1. All had the same problem of no text styles in the popup menu.
I experience the same problem when upgrading from Xcode 11.0 to Xcode 11.1 or 11.2 beta 2:
Xcode 11.0:
Xcode 11.1:
I also filed a bug report (FB7415999) with Apple and also opened an issue with them.
**My curren solution at the moment is a downgrade to Xcode 11.0 for UI development and a parallel install of Xcode 11.2 beta for on device runs **
This is probably a bug in Xcode 11.1. I ran into the same thing and filed a bug with Apple (FB7368959). A colleague running Xcode 11.1 on Catalina did not have the same problem, nor did another running Xcode 11.1 on Mojave.
Here is a workaround that got me back on track: I opened the problematic project in both Xcode 10.3 and 11.2 beta. In both, the dynamic type styles were available in IB. I didn't change anything, but reverted to Xcode 11.1, and now the styles are there, too. Hopefully this works for Grant and anyone else that runs into this annoyance.
Edit Mar. 17, 2020: This problem has reoccurred for me on Xcode 11.3.1. It seemed to happen with a specific project, and the problem spread to a second machine as soon as I opened that project. My workaround didn't help when I opened the project in 11.4 beta 3.
I develop mainly IOS apps but, recently, I worked on an OSX app. Both are possible with Xcode (I use 8, with swift).
Unfortunately, when I switched back to my already-existing IOS project (after restarting Xcode), the storyboard selection menu for the object library shows only OSX objects, not IOS (e.g. UIImageView).
I have googled without success and tried restarting Xcode, also without success. Can anyone help me fix this?
I did a lot more searching and came up with:
Xcode is loading in OS X objects instead of iOS objects
There there are other solutions proposed but the one that worked for me was to close the assistant editor and then, in the file list ( leftmost window in Xcode 8), I double clicked on the storyboard file. Problem solved. I am surprised that this bug still exists in this latest version...it is very troublesome.
I have an android background, but am just learning how to build iPhone apps using swift. I am using the book Beginning iPhone Development with Swift 2: Exploring the iOS SDK.
Problem is that it refers to Buttons and such being in the Object Library and I don't have anything in my object library. I have clicked on the View as instructed.
I have a newly installed MacBook and am running Xcode 8.1, which is newer than the book's directions. It refers to iOS UIkit, but I don't know how to install this.
I did Single View Application under iPhone to get where I am. Can anyone point me to what I need to do? I am brand new to the Apple world entirely.
Aha! In the main window, I clicked on the storyboard and that allowed the Object Library to contain the view items, including buttons.
So, click on the storyboard in the main window, then click on the view in the IB.
I got this error "There was a problem rendering this document" when i tried to load my storyboard in my xamarin iOS application. I created another xamarin iOS project and still got the same error.
You can not do much there right now.
There are two options one should do:
1. Use Xcode storyboard if you can.
2. If the first one is not an option, create and use multiple storyboards in your project, since after your storyboard gets big enough xamarin has a lot of problems rendering and working with it. You have a lot of documentation on how to use multiple storyboards in your project.