Xcode keeps asking if I want to open a playground - xcode

If I want to open a playground downloaded from the internet, I get asked if I want to open that playground. I say yes, but it keeps asking each time I get back to it.
The problem occurs with this NSHipster playground.
No other steps required.
Xcode version is 6.3.2 (6D2105)
Any way to fix this?
To clarify: I have "Anywhere" checked in my security settings.
I also tried doing a chown and chmod, but doesn't help.

It could be related to your security settings:
Check if you have anywhere checked.

I got the same issue with xcode 6.3.2. I got the issue when I downloaded it via ibook link. Once I downloaded it via we, it worked. https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html#//apple_ref/doc/uid/TP40014097-CH2-ID1
My previous version was playground version='1.0' and the new one also same. But it includes lots of new libraries.

Related

AudioKit 4.11.2 Playgrounds: "No such module AudioKitPlaygrounds"

It has been a year since updating so I downloaded AudioKit 4.11.2 yesterday. I built all of the frameworks, including the AudioKit and AudioKitUI xcframeworks.
Then I began playing with the Playgrounds. Right away Xcode tells me the build failed because it can't find the AudioKit frameworks. It appears that the Search Paths that are set in the original project file need tweaking so I set it to "$(inherited)../Frameworks".
Now it builds but still will not run, saying on the import AudioKitPlaygrounds statement that there is No such module AudioKitPlaygrounds.
Odd, because that is the target of the build and it exists in the Derived Data Products folder.
Searching through StackOverflow shows that AudioKit has had similar problems like this in the past but none of the proposed solutions seemed relevant to my situation.
What other tricks are necessary to get the Playgrounds running? Shouldn't it build and run straight out of the box without messing with the project search paths?
My environment is:
macOS 10.15.6
MacBookPro
Xcode 12.0.1
I ran through a similar problem with macOS 10.15.7, XCode 12.1 and AudioKit 4.11.2.
I got the same “No such module AudioKitPlaygrounds” message.
The "Build Active Scheme" option was unchecked in my File Inspector >> Playground Settings, so I checked it, rebuild the "Introduction and Hello World" .playground and it worked.
Edit (04/15/2021): David Thery gave a more complete answer in the following answers.
Also, make sure to:
run 'pod install' + automatically converting to swift5 in XCode
check "Build Active Scheme" as mentioned by Miguel FOR EACH single playgrounds you want to run.
run the playground with the play button in the editor, not the xcode main run button
If you want instead to use AudioKit in another XCode project, only two steps:
download AudioKit and AudioKitUI frameworks from here:
embed them in General > Frameworks, Libraries, and Embedded content, as shown on the screenshot below.
How did you build the frameworks? The assumption when it comes to the paths in other projects (including Playgrounds) is that they have been built via the build_frameworks.sh and build_xcframework.sh scripts in the Frameworks directory.
The end result should be a set of XCFrameworks in that same Frameworks directory, which is in turn referenced by examples and the playgrounds project.
To anyone still experiencing this issue, I just found a really simple solution. I was opening my playground files directly from 'Open Recent'. Problem is, Xcode doesn't automatically look at the parent directory and included files. Just close Xcode and open the AudioKitPlaygrounds.xcodeproj from finder. When you open your playground files from there they should work properly.

Xcode Error: "An internal error occured. Editing functionality may be limited" For all projects

I'm getting the following error:
An internal error occured. Editing functionality may be limited
for all my projects I open with xcode. I've tried the solutions that I've read on here, the only thing I haven't done is restart my Mac, as I am working with macincloud. The error is there for all my old projects. How can I fix this when I'm using macincloud?
This happened to me when I had two versions of Xcode running on the same machine.
The Xcode-select value could be pointing to the wrong version. (For example, if you're running Xcode 9, but it's pointing to an Xcode 8 version that's also installed on your machine, you might run into this)
If this is your issue, then try changing the value to the right directory by using something like this:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
This also, however, happens if files have incorrect permissions or a library/developer file has been manually deleted.
If you have only one version of Xcode installed, try deleting the derived data of the project and force-closing + restarting Xcode, or even reinstalling the IDE. More on deleting derived data here.
Let me know if any of this was helpful!
I recommend shutting down the app and then restarting. If this doesn't work, then it could be that you have to update XCode. You could also use an alternative to MacinCloud, like XCodeClub.com
Hope this helps!
I had this similar issue in my Mac and the issue has been resolved by my self. I had tried all the answers and also some from other links.
At last what I did is, I checked the storyboard that I have been working as, source code. Then removed the last view controller (Scene) that I had created and been working on from that storyboard file. Then cleaned and removed derived data. Restarted Xcode. And then it was looking fyn. I think there were some issues with the constraints on a storyboard that had around 8 scenes, so that Xcode LLVM couldn't load it correctly. Thanks for the response.

Xcode 9 code completion and highlighting not working

I have seen many threads about this online, but not for Xcode 9. For some reason code completion and syntax highlighting is no longer working. Last week it was fine.
Using the GM build.
Anyone have this issue or know how to resolve it? A restart of Xcode and my computer did not help.
In Finder I navigated to user->Library->Developer->Xcode->DerivedData and deleted the subfolder of the project in question. After next build of the project the syntax highlighting and code completion returned.
In my situation, there are a few of .swift files not working. I've overcome by removing these files from project and re-adding them back.
Quitting Xcode then reopening it works for me.
To make it work again, I have to restart the macOS System.
I'm using Xcode 11.0 (11A420a), at the same time, Xcode 10 works OK.
So I think there is some process does not work, which should work for code coloring.
For me, code completion/highlighting not working due to the missing file in the Compile Sources under Build Phases. I added that file and it works.
Hope this helps anyone.
I have observed the same problem while writing in swift on xcode 9.0, Seems it is fixed in 9.1 i am using 9.1 which is fine, please update xcode to 9.1 or newer.

Packaging error when switching to arm64 (arm5 was OK)

I just plugged in a new iPhone 6, created a provisioning profile and then I launched the app I'm developing on the device. It compiled fine, but at linking stage it errored out with:
ProcessProductPackaging
...
error: class '(null)' of input object does not respond to either selector writeToFile:options:error: or writeToFile:atomically
I cannot find any information of what that is. I do not get any specific code reference to relate it to. Did anyone experience this?
Personally I was able to solve this issue by rebuilding the project a second time. I think I was only experiencing it after revoking and requesting a certificate.
Odd for it to jump at me and disappear though.
I just restarted Xcode then the error was disappeared
I've tried turning the "Automatically managed signing" off and on again, then the issue disappeared. Note: rebuilding didn't help for me, cleaning either.
I removed an external library and related code I had and it's now working.
I just changed some provisioning setting and then restarted the xcode afterwards the error was disappeared and archived and then uploaded successfully
Rebuilding the project does the job for me. Actually I was making changes in capabilities while Xcode was building that makes build failed.
The error occurred after I made manual changes to the Xcode .entitlements and Info.plist files: I removed some entries. None of the above mentioned solution attempts worked for me. Every try to create an archive failed.
The solution was to go to Xcode's Capabilities section and switched everything on and off again.
I had the same problem specifically on an App Extension we used for Push Notifications, and I was using Automatically manage signing but it seems the App Groups in capabilities were failing, so I just had to make sure the App Groups were retrieved correctly and this fix it.
Also if you have .entitlements files, and you have App Groups there, make sure they are the same you are using in the capabilities configuration.
Restarted XCode and enabled and disabled to Automatically manage signing

AppleDoc Categories not showing in quickhelp

I've succesfully generated a docset with AppleDoc by following the installation instructions. If i got into XCode Documentation Organiser, everything is there, including the categories:
But when I ⌥-click on one of my category methods I see nothing but this:
I've tried a lot of things but none of these work:
Adding --no-merge-categories
Adding --merge-categories
Changing filename extensions
Restart XCode
Restart macbook
Search google (AppleDoc quickhelp categories)
Search stackoverflow
Search gitHub repository issue list (https://github.com/tomaz/appledoc)
Please help, because I want to generate documentation, and most of my library consists of categories. I'm using the latest AppleDoc (appledoc 2.1 (build 858)), and Xcode 4.6.3.
Edit: are there users actually using AppleDoc? Does the quick help actually work for you? I also note a lack of documentation even though the repository is updated regularly.
It seems nobody else is using appledoc but me. Anyway, it looks like it is a bug in XCode, i have pushed a workaround in github. Comment if you want details.
Update: my pull request has been accepted, check here for details:
Pull request https://github.com/tomaz/appledoc/pull/375
related issue: https://github.com/tomaz/appledoc/issues/374

Resources