CoreAudio PublicUtility on Xcode 4.3.1 iOS 5.1 - iphone

I've an app using low level CoreAudio C functions, usually located under /Volumes/Xcode/Xcode.app/Contents/Developer/Extras/CoreAudio/PublicUtility/. Just installed Xcode 4.3.1 and iOS 5.1 and Public Utility seems gone away.
My missing files are:
CADebugMacros.h
CAMath.h
CAStreamBasicDescription.cpp
CAStreamBasicDescription.h
Anyone knows if these files have been removed from this last release or should I just copy the files from previous Xcode version?
CoreAudio Public Utility has been there since iOS 2 (at least).
Ty!

This is explained in the Xcode 4.3 what's new documentation.
Choose this menu:
Xcode > Open Developer Tool > More Developer Tools...
and download "Audio Tools for Xcode".

Better place to get them is directly from the Apple Sample Code Reference Library.
http://developer.apple.com/library/ios/#samplecode/CoreAudioUtilityClasses/Introduction/Intro.html
Sample code links in the RefLib. also provides versioning and modification history information which is helpful allowing you to stay current if there's any bug fixes with these sources.
Apple appears to be updating all their Audio samples to contain whatever subset of public utility is required by each sample, but if you want it all (and I suggest that you do as it's oozing with goodness), grab it from the above link.

Related

Problems getting TestFlight to work with Monotouch app

Am struggling to get TestFlight working with my MonoTouch app (Monotouch 5, IOS5) and have not found any MonoTouch documentation for TestFlight.
Here is what I tried so far.
Downloaded TestFlight bindings from https://github.com/mono/monotouch-bindings/tree/master/TestFlight -- after adding this as a reference it seemed that the TestFlight methods were actually not exposed at all, so I looked for another set of bindings.
Downloaded ayoung's TestFlight bindings from https://github.com/ayoung/monotouch-testflight. Built monotouch-testflight.dll with Make, copied it to the project and added to References -- this time the TestFlight methods were all visible.
Added libTestFlight.a to the Lib folder in my MonoTouch project with BuildAction set to Nothing. (I also have RedLaser in there).
Per ayoung, I enabled LLVM compiler (with ARMv7); ayoung states it is required. In Project Options -> iPhone Build my additional mtouch arguments are:
-cxx -nosymbolstrip -nostrip -gcc_flags "-lgcc_eh -framework SystemConfiguration -framework CFNetwork -framework CoreVideo -framework CoreMedia -framework AVFoundation -framework OpenGLES -framework Security -L${ProjectDir}/Lib -ltestflight -RedLaserSDK -ObjC"
Note: The app worked ok with RedLaser before TestFlight was added to the project.
Here -lgcc_eh is as per ayoung -- I have not been able to find out what it is or what it is for. Perhaps I should have a gcc_eh.dll (?) but I don't AFAIK, and I don't know where I could find such a thing.
In Main.cs I added
using TestFlightSdk;
and In FinishedLaunching I added
TestFlight.TakeOff( "(downloaded team token is here)" );
Compiled and installed with no error (Release|iPhone).
When I now run the app on the device, it exits immediately with no diagnostic that I can discover.
The app also exits immediately if compiled to Debug|iPhone. In this case, however, if I turn off LLVM despite ayoung's strictures then in Application Output I see the following:
TestFlight: Started Session
TestFlight: Crash Handlers are installed
Thread started:
Thread started:
TestFlight: Team Token is recognized
TestFlight: End of Session
TestFlight: Communication with TestFlight is currently disabled, check earlier in your log for details
This might be because I have not yet uploaded the app's .ipa file to TestFlight?? (The app does launch in this case however.)
I am trying to find out how to generate a .ipa file. TestFlight documentation shows how to do this from XCode but my app is code-only with no .xib so that option seems to be out? TestFlight documentation also shows how to generate a .ipa from the .app file. Here my problem is, how do I lay my hands on the .app file for a device build?
Any help with these issues would be so much appreciated.
-lgcc_eh is needed to include the Exception Handling GCC library, which is often required if you link with C++ libraries.
You also have a lot of -framework options that do not look required (MonoTouch already adds them) - but that won't be the cause of your problem. If you're curious about what mtouch use/provide at compilation time then you can add "-v -v -v" to the "additional touch arguments" in your project options (and look at the build output).
As for the main issue I think it's related to the fact the TestFlight handlers are not compatible (presently) with MonoTouch (5.0). MonoTouch exception handling already provides it's own crash handlers (e.g. for NullReferenceException) and adding other handlers needs to be done with care (how and when to do it is very important). This is likely why the current bindings in monotouch-bindings don't include every feature available in testflight.
I suggest you to open a bug report at bugzilla.xamarin.com and you'll get email updates on the progress (and know exactly when the feature will become available).
p.s. try to break your issues into several (stack overflow) questions, you're more likely to receive answers that way since not everyone knows all the answers to every question you might have :-)
I was going down the wrong track entirely. Finally found the MonoTouch documentation which describes the built-in support for TestFlight:
http://docs.xamarin.com/ios/tutorials/TestFlight_Support
Will try this, it should solve the problem.
Distributing throug testflightapp is a different thing than using the testflightsdk in you app.
The first one is by clicking the upload to testflight button in the menu.
The second is by including the actual sdk.
In the last few day they (xamarin) released new testflight sdk bindings. That don't recuire you to modify the mtouch parameters. So it should be much easier to include it.
Personally i really like the testflight sdk... Helps me better (let) test my apps.
From the sound of this Xamarin bug report, it seems as though even if you get the TestFlight SDK native library working with MonoTouch bindings or by linking it yourself, you're still going to have the problem that TestFlight is not going to properly handle any NullReference exceptions and is simply going to crash the app when it encounters one. This makes the whole point of the TestFlight SDK kind of pointless until either a) MonoTouch is re-tooled to deal with it or b) TestFlight releases a managed Mono library.
Don't get me wrong, I REALLY want to be able to use the TestFlight SDK with MonoTouch. I've been beating my head against the wall trying to get it work all day. Something is failing when I call the TestFlight.TakeOff("MyKey") method. Control does return from the method, but then it crashes shortly thereafter...about 1 second after it's called. Weird.
If anyone else has gotten it work, I'd love to hear about your experiences. Thanks.

How to add armv6 architecture to Xcode project?

I got a warning that my project needs to include the armv6 binary.. but I don't really know how to do that. Have been googling for an answer, but non of the suggestions seems to fit?
Is armv6 something I need to download to support in my app, or does Xcode have it, I just need to include it in my project settings?
Also, my app should support OS back till 3.1.
I have added i386 behind armv6 and armv7 in the Debug section, but I dunno if that fixes the problem. Does this seem right to you people with more experience?
Follow my step
In your picture you choose level change it to "Combined"
Click at Standard (armv7) $(ARCHS_STANDARD_32_BIT)
Choose "Other"
CLick at "$(ARCHS_STANDARD_32_BIT)" and the Click "-" to delete it
Click "+" to add new item
Type "armv6"
Click "+" again
Type "armv7"
Click anywhere to finish
I hope this help
I just have the same problem and I try to do this and it work for me
I could run my code on an old 1st generation iPhone using the string armv6 armv7 instead of $(ARCHS_STANDARD_32_BIT) in architectures and setting "Build Active Architecture Only" to YES.
In Project Settings, select "Standard" for the architecture (not "Optimized"). This should allow you to select "armv6" for the Active Architecture. This means it should also work on older devices (barring any other deprecations) once it's on the app store.
Change your base SDK to iOS Device 4.x or below so you can see your armv6 architecture.
I just had this same problem. I loaded up a number of older XCode projects and they would compile and run fine with the simulator however as soon as you tried to run or debug on the device (which in my case in a iTouch v2) it would simply say it was running, then say the application exited. No errors, no logs.
Thanks to someone on the iOS Developer forums for putting me on the right track. At some point over the last couple of XCode releases (not counting the XCode releases for OSX Lion as I have access only to OSX Snow Leopard) Apple changed how projects were set up even older ones that were loaded.
The standard architecture used to include both arm6 and arm7 however, and at least with XCode 4.2 standard now only includes Arm 7 $(ARCHS_STANDARD_32_BIT) and apparently resets an old project's settings as well. Which went un-noticed to me as I used the simulator.
I tried changing the configuration string to "arm6 arm7" and this did not work. However the error that was returned contained the solution (at least for me an hopefully others still having this problem.)
In XCode 4.2 if you wish to build down to older hardware such as v1 and v2 devices simply change the project setting for Architectures to $(VALID_ARCHS) which defaults to the old standard of Arm6 and Arm7.
You may as mentioned previously be required to set the Build Active Architecture Only to "Yes" for the debug option (this however is not confirmed by me to be required).
I hope this helps anyone else still having this issue and I apologize for bumping this thread.
That's because you use the new iOS 5 SDK. Apple drop the armv6 architecture from the standard architectures.
You can have more information on this thread I've started before.

Building the Objective-C XML-RPC Framework for iOS

I'm fairly new to the iOS SDK and Xcode and I stumbled across this XML-RPC framework https://github.com/eczarny/xmlrpc that I'd really like to use in one of my projects. I downloaded the sources, the initial target was set to Mac OS, so I changed that to iOS 4.3 but got the following dependency error:
target specifies product type 'com.apple.product-type.framework', but there's no such product type for the 'iphoneos' platform
So I removed all the targets and added a new one from scratch using the Cocoa Touch Static Library, and it seems like it's been built just fine. Now my question is whether this is the correct way to build that library for iOS development, and where do I take it from here? I can't find the .framework directory anywhere (the install dir was set to "#executable_path/../Frameworks") so I can't embed it in my iOS project. How exactly does this go? Thanks!
Thanks for your help and sorry if this is too "newbish". Cheers!
If you're using Xcode 4.x open the Organizer, select the Projects tab and then down the left hand side you should see an entry relating to the XML-RPC project. Select that and under the Derived Data heading you'll see a path which if you follow using finder should lead you to the folder containing the static library you've built.

iPhone framework paths?

I recently moved my projects to a new mac, along with a newer version of Xcode.
When i opened my project i noticed that some files were red. So i remapped them by setting the path (by project path) and then providing the proper path location.
Now my problem is that the frameworks that i have are red, and i cant find their location! I did set the framework paths to be "relative to current SDK" however.
Can anybody help me get my frameworks mapped correctly?
The frameworks im using are:
- QuartzCore.framework
- libsqlite3.0.dylib
- UIKit.framework
- Foundation.frameowrk
- CoreGraphics.framework
The XCode version is 3.1.4 (the only one installed).
The iPhone app was originally created using a prior version of Xcode (i dont remember which version).
I still dont have an answer. Im going deeper into this mess of a problem that Apple created.
In all my .m files im importing
How can i add this UIKit framework to my project Target with respect to the current SDK?
In fact, forget about the ref w/ respect to the SDK, let's just get the framework from the 3.0 SDK as a referenced framework. Right now when i reference it is red.
Note: references related to frameworks, everything about it, is driving me insane, and making me more frustrated at apple for this sloppiness, more than ever.
Any help is greatly appreciated.
I had exactly this problem. Somehow 'Base SDK' in Build Settings of a project was set to Mac OS X after I have installed Xcode 4.2.
Click on your project, change Base SDK to 'Latest iOS' and enjoy the vibe.
If you double click on your target to bring up the info pane you will see a tab labeled "Linked Libraries". From here you can click the plus button to add the libraries and xcode will do the right thing when you add the desired frameworks
I was having the same issue with red frameworks and bad pathing. If you're getting an error that says, "Base SDK Missing" you'll need to Get Info on your Xcode Project and check that it can find the right SDK.
Near the bottom of the General Info tab there will be an option Base SDK for All Configurations. Select a different SDK and see if that helps.
I ran into issues when I upgraded to a beta SDK and it was loading up deprecated frameworks from an old SDK.

UnitTesting on iPhone doesn't build

I am trying to perform some unit testing on the iphone but for some reason I cannot get it to build the executable
I have downloaded TestMyApp from the Standford lecture slides and that compiles and runs perfectly. I have created a test project and even gone as far as to use the test code from the Stanford sample but for some reason depsite every setting looking identical I get the following precompiler errors:
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13:26:
error: AppKit/AppKit.h: No such file
or directory
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:14:30:
error: CoreData/CoreData.h: No such
file or directory
N.B> Only other point to note is that Im running it on a "tweaked" xcode install on a PPC not an Intel mac
If you right click on your unit test target and select the "get info" menu you will see your target options.
At the bottom of the pane, you'll see a section called "User Defined": remove the entry containing the path to cocoa.h.
I don't remember the name of this entry as I removed it, but this fixes the same problem I had before.
I also changed Base SDK to be Device - iPhone OS 2.2
and other linker flags to -framework Foundation -framework SentestingKit
AppKit is not available for iPhone development. Looks like you downloaded a desktop mac app project. iPhone dev uses UIKit in place of AppKit.
CoreData is not available for iPhone dev as well.
Try setting up a Desktop cocoa application, and these frameworks and objects should be available.
For unit testing an iPhone app, the Google Toolbox for mac is useful.
GTM iPhone docs
You can find instructions and a sample project on Sen:te web site: http://www.sente.ch/s/?p=535&lang=en
I had to remove the value for GCC_PREFIX_HEADER in the "User Defined Section". It was using
$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h
Once I removed that, I got past this problem.
Do you have the iPhone SDK 2.2 installed? Without using the GTM for iPhone, OCunit doesn't work with iPhone SDK < 2.2.
I have been working with the Stanford example code as well. When I try to set up my own project, I wasn't able to get my tests to run. So, I took the Stanford example projects and renamed everything. Now the OCunit testing is working fine.
Do not use the Sen:te thing for testing any classes that make use of the UIKit framework. It will fail with code 139. Use Google's GTM.