kAudioFormatAppleIMA4 undeclared - iphone

I just updated to use XCode 4 and got the following error when running one of the previous projects:
Use of Undeclared Identifier 'kAudioFormatAppleIMA4'
The AVFoundation.framework is linked and is imported to that file.
Any ideas why this error started to occur?
Thanks,
Sami

Have you also included the CoreAudio.framework? I believe that kAudioFormatAppleIMA4 is in there.

When you have a problem like this, check the documentation. When you search for kAudioFormatAppleIMA4 in the docs and scroll to the top of the page you fine, it says:
Core Audio Data Types Reference
Framework
CoreAudio/CoreAudio.h
Declared in
CoreAudioTypes.h
This means you must link to CoreAudio framework and import CoreAudio/CoreAudio.h.

Related

Use of unresolved identifier 'PFQuery'

So I am following this tutorial https://www.youtube.com/watch?v=Q6qcrO8uNzU&feature=youtu.be for Parse and when defining a PFQuery variable I get this error: "Use of unresolved identifier 'PFQuery'".
Code Below:
var getMessages = PFQuery(className:"DevelopmentMessages")
How would this be fixed? Thanks in Advance! ;)
You haven't included the Parse framework in your project correctly. This is done about 7 minutes in during Part 1 of that tutorial: http://www.youtube.com/watch?v=Q6kTw_cK3zY
It is also covered in Parse's QuickStart instructions:
https://parse.com/apps/quickstart#parse_data/mobile/ios/native/existing
All you need to do is the "Install the SDK" portion but you also need to include the Parse framework's header in your Objective-C bridging header:
#import <Parse/Parse.h>
The problem might be because you might not have imported the libraries properly. Drag drop the library files into the project properly. Make sure you have added the library inside your project folder and not outside it. Sometimes it may also be the cause of the problem.
Note - Please don't forget to check the option "Copy files if needed" while dragging and dropping the library files.
Update - If you have named your project as "parse" then it will not work. So rename your project to any other name and try it.

Cannot access "Parse.setApplicationId()"

I'm trying to make an app with swift/Obj-c (Bridging Header) with parse.com
So here's my question:
I saw on many sites that you can use Parse.setApplicationId("appid","clientid")
When I try this code it says Use of unresolved Identifier 'Parse'
I imported the framework and set the bridging header in the properties.
I also imported the frameworks which are required like it's written on parse.com
All other Classes/Objects from parse can be used by swift in the code.
This problem was because of a bug in xcode... (I think the compiler failed)
After I restarted Xcode the error was gone.

How to solve the errror ""_CGAffineTransformMakeRotation", referenced from:"?

When i use the following code i am getting the error message that says
""_CGAffineTransformMakeRotation", referenced from:"
companyNameLbl.transform=CGAffineTransformMakeRotation(30);
Can anyone please tell me what will be the reason for this error.
If I remember correctly, those transformations require that you link against the CoreGraphics Framework.
See How to "add existing frameworks" in Xcode 4? if you have difficulties adding new frameworks in XCode.

Library not found for -lcommonCrypto

I need to link my ios 5 app with CommonCrypto. The problem is that I can't compile due to this error: 'Library not found for -lcommonCrypto'... How can I solve?
if you take out -lcommonCrypto, does the app still compile?
Looking at this duplicate question, it looks like all you need to do is include the correct #import lines in your .m file.

NSConcreteData vs NSData

I have added an extension to NSData (base64 extension), which I kept over a separate infrastructure class lib project. But when i use this method from my main project i am getting an error like this: "-[NSConcreteData encodeBase64]: unrecognized selector sent to instance 0x121e60'".
But if i keep the same class in my main project itself, this will execute with out any issue.
I call this method in the following way:
[dev setToken:[token encodeBase64]];
Please suggest why this is not working if i put the extension in another project. (I am already using some other extensions, eg. for NSDate, like this with out any issue.)
Is this on iPhone OS 3.0? The 3.0 SDK broke the use of -ObjC, but you usually are able to link in categories for a static library by adding the -all_load option to Other Linker Flags within your target application.
The issue is that the metadata necessary to configure a category is usually stripped by the linker because it appears to be dead. If you add the "-ObjC" LDFLAG to your project it will tell the linker to link all the potential ObjC info even if it appears to be dead.