Where are the sample projects in Xcode 4? - xcode

In older versions of Xcode they have been in the developer folder, just wondering where they are available now, do I have to download them from somewhere?

If you find the name of the project you want from the Documentation tab in Organiser you can simple choose "Open Project" and it will be downloaded to a folder of your choice.
Make sure you have downloaded the documentation first via xCode/Preferences/Downloads/Documentation/Check & Install Now.

There a lot of sample codes. Just a simple search in google.
Here:
raywenderlich iPhone Tutorials with source code
Github - search for repos
Apple's own sample codes
The Open Source iPhone Apps List in maniac dev
Cocos2d samples
https://stackoverflow.com/questions/1353130/where-can-i-find-sample-iphone-code
I bet this is a good start.
Hope this helps. Have fun.

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.

Core Audio SDK, Xcode 5.1

I've been trying to figure out how to implement Core Audio development kit into the current version of Xcode but have had no luck. I can't find where to download the SDK or where it would be located inside Xcode. The tutorial that apple offers only brings you to their website which doesn't have it, they have audio tools and examples but no SDK. Am I missing something? I have been searching my computer to see where any of the source files would be but have had no luck.
You don't need to download anything actually, it comes with XCode.
Import the CoreAudio header where you need it with
#import <CoreAudio/CoreAudio.h>
Then head over to your targets build phases to section "Link Binary With Libraries".
There you need to add CoreAudio and you are done with it.
In case you are new to CoreAudio I can highly recommend the book "Learning Core Audio". It helped me a ton.

Using Apple's coding examples in XCode 4.3.2 - Base SDK Missing

I'm discovering XCode and iOS development.
Delving into the iOS documentation, I've tried to download and run some of the programming examples.
As an example, I'll use AccelerometerGraph.
If I download the code and try to compile, i get an error message, and I realize that the Navigation panel tells me : Base SDK Missing.
After fiddling around (the existing answers on stackoverflow refer to the Xcode 3.2 answer, which doesn't work) I figured I should go to "Editor > Validate Settings…" and accept the changes.
It "seems" to work, (as in the "Missing SDK" message disappears, and I can compile) but I'm wondering if i'm missing something more fundamental.
Also, I thought if there is such a fundamental change, it would be useful to have it up there in one of the questions.
Thx
P.
Go to the project settings and choose "Latest SDK" for the SDK option and that should fix your projects.
And if you want to be super helpful, file a bug with Apple (at http://bugreporter.apple.com) and tell them to update these outdated sample projects to use the latest SDK's if possible.
Not missing something more fundamental. Apple's sample projects have a variety of vintages. Mostly they compile and link under the current versions of Xcode and friends. Some need to be brought up to date. What you found was one that was originally set up for an obsolete version of the SDK and it compiles and links fine with one that was automagically found on your system when you updated it.

Adding a Library to your build and link path in XCode

I am tryingo to build a GUI application using the JUCE framework on MAC OSX.
I have dowloaded all the API's and got a small hello World program running fine.
However, when I add files to my Xcode project I get compilation errors that say that the Juce library files don`t exist. I would like to know how to get the library API in the build and link path in XCode so that it finds the neccesary files for compilation.
What I would do on Visual Studio going to properties and adding aditional library dependencies, is what I need to do in XCode but I don't know how.
Any help greatly appreciated.
thanks.
Old question but maybe a useful answer in the future....
If you have the "Hello World" up and runnning, it should already be linked to the library. Are you using the introjucer? This should help get everything up and running for you. If you are, you need to add classes etc to the introjucer, as this sets up Xcode / VStudio for you. If not, (Presuming XCode 3 as you are using leopard) goto Xcode > Preferences. Scroll along to source trees, and add the path to the juce folder in there.

Companion sample Xcode project for "Apple Help Programming Guide"?

Does anyone know of a sample Xcode project that demonstrates how to provide user help and which closely follows the guidelines of the "Apple Help Programming Guide"?
The guide's revision history shows that one of the more recent new guidelines is to organize help books in a bundle. I'm experiencing some trouble following this guideline. Unfortunately AFAIK the guide does not make any mention of a downloadable sample Xcode project; and I cannot find any application installed on my 10.5 system with a help book organized into a bundle.
Does anyone know of a sample project or at least an open-source project which follows this "help book in a bundle" guideline?
This link provides a step-by-step guide:
http://www.codefreeze.net/documentation/step-implement-an-htmlbased-apple-help-bundle-for-snow-leopard.html
It's written for XCode3 but it worked for me using XCode4 (project's info.plist no longer displayed). The guide is bit wordy but 3 pages cover the whole process.
Apple Help Bundles can be found in
/Library/Documentation/Help
as with all bundles you have to Ctrl-Click -> Show Package Contents to see directory structure.
Many of Apple's own applications use the old Apple Help but Mail uses the new (10.6) bundle help. Look in this directory:
/Applications/Mail.app/Contents/Resources/Mail.help
Hope this helps.

Resources