I am trying to port an application written for Mac to iPhone device. However, I get compilation error for
import CoreAudio/CoreAudio.h // No such file
Could you please let me know how can fix it?
Thanks.
The error is pretty specific, there is no such file as CoreAudio.h for iPhone apps, and that's why the compiler can't find it. You can't make Xcode find it because it's not there.
Therefore, commenting out the line removes the problem.
Assuming you're actually using CoreAudio, the reason the app compiles is because you did include the right headers.
Related
I am trying to play RTSP url in my iPhone app. I have used many Third-party API's like Live555,FFMpeg
I got code Live555 but it is not running in simulator as well as device. There is showing no error. It is always showing Build Succeeded.
Pls let me know what and how can i do in this case.
Thanks in advance.
We can certainly help, but I need some more details on what you are trying to do , and the type of errors you are getting. We also have some other frameworks to try, what would help best I think is if you had a public url for whatever feed you are attempting to play.
If you like you can also compile and try it on the device using
https://github.com/mooncatventures-group
performance on device and simulator vary so much, that we just don't bother with the simulator , so everything is compiled for the device.
I'm really newbie in iOS and I have to handle a complicated situation. I was given an iPhone app developed by someone and I have to make it work. The guy who developed it has told me that it worked, but sometimes crashed in an iPhone. I've never developed using iOS and I don't really know how this app works.
Well, when I open the app with Xcode, the first problem that I detect is some errors with the references. The app uses the project CorePlot-CocoaTouch.xcodeproj. I've added again this project and solved the references (I've followed some other posts like this one: http://www.jaysonjc.com/programming/pie-chart-drawing-in-iphone-using-core-plot-library.html).
I want to test it with the simulator (I don't have an iPhone yet). I have a doubt here...should I use iOS Device, or iOS Simulator as Base SDK? Firstly I chose iOS Simulator, but it appeared a problem with Cocoa.framework (it turned into red).
Anyway, using iOS Device as Base SDK, I build the project and it says "Build failed (59 errors, 3 warnings)". I check out the errors, and most of them are "Expected specifier-qualifier-list before ..."
Can anyone help me? This is more or less the situation, but I can provide more specific details if they're needed.
I'm sorry if I'm talking about something really basic, but I've been trying to solve it for 2 weeks and I give up. I've tried to talk to the guy, but he's not really helpful..
Thanks for the replies!
By the way, I didn't say it and I don't know if it's relevant or what it means. The guy has a directory called "Libraries" where it's stored the CorePlot. The files there are the same than if you download the CorePlot project from other source. The only exception is a folder called "SDKBuild", which contains files like "build.sh", "iphoneos-SDKSettings.plist" or "iphonesimulator-SDKSettings.plist". I'm really newbie, so it's probably obvious, but I have no idea...
just try to add CocoaTouch framework to your project.
and for base SDK use "latest iOS".
Right click on the project name in 'group & files' set on the left of xcode. Choose add -> Existing Frameworks.
Find Cocoa.framwork and click add. Do this to all red colored framework.
Choose IOS Simulator as base SDK.
Try run it..
If you want to run the app on simulator, you have to build with iOS simulator. The base SDK basically sets the OS version (this will be the same regardless of whether you are running the app on simulator or device). You should be chaining the build settings to device only if the device is connected and if you have installed the appropriate provisioning profiles.
I'm running into problems archiving an app using Xcode 4.2 iOS5 b6 under an EnterpiseDistributionProfile.
The Error is:
The bundle “ITunesSoftwareService” couldn’t be loaded because it is damaged or missing necessary resources
Could not find out anything about this, didn't use it on purpose. What is is? Is this a problem with the beta?
I can publish the app via iTunes by the way and it seems to work, just a little trouble with a pickerView after coming back from camera use. But I don't think it is related to this missing framework.
Please bear with me, newbie just learning the ropes.
I am getting the below message, when I try and run my app, it quiets, but then does let me re-open fine after the first quit.
I tried a few things and if I turn on if i 'activate breakpoints' it all works fine...
Tried a few suggestions, 'deleting build folder', 'restarting xCode' nothing seems to work...
dyld: Library not loaded:
/System/Library/Frameworks/UIKit.framework/UIKit
Referenced from:
/Volumes/MyBook/Apps/CToolBox/build/Debug-iphonesimulator/CToolBox.app/CToolBox Reason: image not found
The Debugger has exited due to signal
5 (SIGTRAP).The Debugger has exited
due to signal 5 (SIGTRAP).
Thanks in advance.
Try this
Just delete your personal settings files for the project.Right click on .xcodeproj file and select show package contents .They will be username.mode1v3 and username.pbxuser. I didn’t figure out which file was the cause, but deleting them sorted it out.
One other way I found today is, turning the Framework (in this case UIKit) in question as "optional". I hope you know how to do that :)
PS. I still wanna know the real reason of this abnormal linking failure? my code was working perfectly till today!
It looks like its trying to find the UIKit Framework in the wrong location. It shouldn't be looking in system frameworks but in a path like this:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk/System/Library/Frameworks/UIKit.framework
Get info on the UIKit framework within Xcode and see where it thinks the path to is at. If you installed in a non-standard location that might be your problem. You could also remove and readd the framework to try and change its path.
You should also check the configuration popup to make sure you're not trying to build for Cocoa.
You can also get this sort of error message trying to write a Mac OS app if you try to use a framework that's not available on your OS version, e.g. trying to write a MacOS SpriteKit app in Mountain Lion.
When I start my iPhone application it boots up fine, shows the first settings screen and all after I have given input and pressed save, the debug window says
Debugging Terminated
without any hint to why in the crash logs.
First I thought it was my programming, but then I went ahead and tested the app on multiple 'real' iPhones and it never crashed.
Why does the simulator keeps crashing?
A common cause of crashes on the simulator but not the device and vice versa is using precompiled libraries that were compiled on the other hardware. Check if you've got something compile for ARM that is trying to run on the Intel.
In XCode try Build > Clean All Targets
Have you tried resetting the simulator? iPhone Simulator -> Reset Content and Settings
Then do a clean build of your project.
Annoying :)
Put NSLog statements around where you think that it's crashing and look at the output. That shoud give you more of an idea where the crash is occurring.
If that doesn't help, post the lines causing the crash in the question and see if anyone can help then.
Sam
This tends to happen when you declare a variable and then use it without actually creating it. I would check variables you are using to make sure you are actually creating them before using (i.e. with alloc or the convenience methods).