iOS - 'set start-with-shell off' issue when running iPhone application in simulator - iphone

I am getting the following error when trying to debug my iPhone application in the simulator.
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
fcntl$UNIX2003 called from function irc_connect in image KadeChat.
If you are encountering this problem running a simulator binary within gdb, make sure you 'set start-with-shell off' first.
I have done a bunch of Googling on this, and it seems that it might be a bug with the simulator. Does anyone know for sure?
I am building against the 4.2 version of the iOS SDK. Does upgrading to 4.3 fix this?
Thanks!

before this cleanAll build then
In xcode go to Project > set active executable > appname - Iphone 4.0 simulator
then open simulator then go to Hardware > version > 4.0.2
then double click urapptarget and in build tab change "ios deployment target = 4.0"
now run in simulator it will work

Related

Can not run and build code which is on xCode4.2 with iPad with os 5.0

HI i am new in iPhone i have tried to build application on xcode4.2 and i have iPad with os 5.0
but when i start application to run i got following message
Xcode cannot run using the selected device.
No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.
can anybody help me how to solve this problem i have tried so much but could not find any solution from googling also
In your project's Build Settings, ensure that the deployment target is set to "iOS 5.0"

Xcode won't detect device

I'm having a bit of an issue testing my app using my iPhone. Last week I upgraded to Xcode 4.3. I was able to test my apps on my iPhone (which was running iOS 4.3). Today I upgraded my iPhone to iOS 5.1 and now Xcode wont detect my iPhone (btw SDK is 5.1).
I'm not too sure what to do, I've even tried changing the Deployment target in Xcode back down to 4.3, but still nothing.
Make sure the device is "Enabled for development" under Organizer in Xcode. I've seen cases, where Xcode doesn't recognise the device, because it wasn't setup to be a development device.
I had this problem but my device was already enabled for development. Here are the steps I took to get it working.
If you want to cheat, try the last step. That's what got it working for me!
Try restarting both Xcode and the device. Separately.
Make sure you're using the latest iOS SDK under Base SDK (in Targets / Projects > Build Settings) and that it's a greater version that what's running on your device
Check Project > Build Settings > iOS Deployment Target is less or equal to what's on your device.
It turned out, when I'd created a new project, it had chosen an iOS Deployment Target greater than my device version.

Xcode 4.2 Lion not installing / running project on older devices. iPhone 3G 4.2.1

XCode 4.2 Build 4D199 on Lion with iPhone 3G IOS 4.2.1
Project with Base SDK 5.0 and Target 4.2.
On this phone and on older iTouch the debugger never seems to startup. After pushing RUN the project compiles and then the Debug entry is in the Log Navigator with the Spinner Running. The spinner never stops and the app does not get loaded on the iPhone 3G.
Any clues on how to fix. This was working fine before the Lion Upgrade.
Need to test the older devices. Newer devices seem to work fine.
Device seems to be provisioned fine, etc.
Probably because armv6 is missing from the architectures for the Target.
Click on your Project in Xcode, then click on the Target. Double-click on 'Architectures', and delete what's current there - probably something like $(ARCHS_STANDARD_32_BIT) - using the '-' button. Next, click on the '+' button and add 'armv7', then add 'armv6'.
Hopefully, that should help.
I found when I would start a new project in xCode 4.2 (Build 4D199) it would not build to my iPod touch running 4.2.1. While I did have to set my architectures to include armv6, that alone did not do it.
In my project's Info.plist file xCode had set "Required device capabilities" to include 'armv7'. I removed that now everything is working fine.
I hope this helps someone else.

App crashes with 4.2 iPhone simulator 'set start-with-shell off'

I'm writing application which perfectly works on 4.0/4.1 iPhone simulator, but not 4.2.
I'm getting such warning:
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
fcntl$UNIX2003 called from function get_socket_nonblocking in image TestApp.
If you are encountering this problem running a simulator binary within gdb, make sure you 'set start-with-shell off' first.
How to set 'set start-with-shell off' on Xcode? I'm tried to add this line to .gdbinit but without luck.
With 4.0/4.1 SDK iPhone Simulator prints warnings about attempt to call symbol that is not present on the iPhone in debug window, but app don't crashes. Using using 4.2 app crashes. How to prevent 4.2 crashes ?
Thanks
before this cleanAll build then
In xcode go to Project > set active executable > appname - Iphone 4.0 simulator
then open simulator then go to Hardware > version > 4.0.2
then double click urapptarget and in build tab change "ios deployment target = 4.0"
now run in simulator it will work
File a bug via http://bugreporter.apple.com/
The debugger within Xcode will read ~/.gdbinit just like gdb at the command line. Try adding that line to ~/.gdbinit.
I had a similar problem with a version of libCURL that was built for an earlier OS. The solution was to rebuild the library under iOS 4.2 to eliminate the $UNIX2003 symbol decorations. (I wrote up the full details at http://www.creativealgorithms.com/blog/content/building-libcurl-ios-42.)
I was also unsuccessful adding the line to ~/.gdbinit. At the risk of stating the obvious: if you set the simulator version to 4.1 within XCode, you'll avoid the issue. This is what I do now - which is fine as long as I don't need to test an API available only on 4.2 - which we do not (we still target iOS 3.0).
I encountered a similar error:
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
pthread_rwlock_init$UNIX2003 called from function ...
I was able to fix by unchecking the 'Strip linked Product' Deployment Build Setting of the Project, ie STRIP_INSTALLED_PRODUCT = NO
Don't forget to do a full clean before rebuilding.
You probably only want to do this for the simulator. Filling a bug report is still a good idea.
If you are using native libraries, you should recompile them using iOS4 (only the i386 versions, as it works on the device).
The $2003 suffix is generated by the compiler under some circumstances which you can find fully documented in the manual entry for compat
man compat
I wrestled with this for some time before finally fixing it by setting
-mmacosx-version-min=10.3
Any version prior to 10.4 will do the job.
Hope this helps.

iphone - Xcode 3.2.3 refusing to run simulator 3.1.3

I have a project build to work with iPhone 3* and 4. Base SDK is set to 4. Target OS is set to 3. I have an iPhone 3GS with 3.1.3.
Xcode 3.2.3 refuses to install the app on this iPhone. It refuses also to run the simulator.
WHen I try to debug on the device I get "Failed to upload". When I try to debug on the simulator I get a message telling me that "simulator could not find the sdk"...
Any clues?
thanks
I have resolved partially the issue changing the compiler from GCC 4.2 to LLVM GCC 4.2.
Don't ask me why, but now I can install the application on my 3GS running 3.1.3.
The question is: why GCC 4.2 is not working.
At least the solution for this question is this.
To expand on Jason Coco's answer: If
you go to the Project Info screen and
click Build, you can choose what Base
SDK to use (4.0) and then scroll down
to iPhone OS Deployment Target version
and set it to 3.1.3 or whatever.
However, you also have to go to the
Targets section under Groups & Files
(red bullseye) select your target and
get the Info build page, and set your
iPhone OS Deployment Target there too.
Did you do that also? (from the link posted)