dyld: Library not loaded: /usr/lib/libc++abi.dylib - iphone

I've build my project on xcode 4.2.
I selected iPhone 4.3 simulator and build the project.
Then the error occured.
dyld: Library not loaded: /usr/lib/libc++abi.dylib
Referenced from: /Users/Player/Library/Application Support/iPhone Simulator/4.3.2/Applications/CF49143F-07C9-4609-AADB-82DD3AEAF6D9/Mahjang.app/Mahjang
Reason: image not found
How can I solve this problem?
Need your help.

I ran into this too: installed XCode 4.2 on Snow Leopard, and ran my app on the simulator. 5.0 simulator works, but forces it into Portrait mode (separate issue). The immediate problem was all the 4.x simulators that worked fine under XCode 4.1 would boot the app to the Default.png splash screen, and then just crash, with the disassembly showing:
int 3
nop
And the stack trace showing __dyld_dyld_fatal_error. Looking in gdb showed the most useful information posted in the question above.
Copying that llvm link to libc++abi.dylib into /usr/lib works, but there is a safer solution:
Answer: Add -Wl,-no_implicit_dylibs to "Other Linker Flags" in your build settings.

This is what I found out. Download zip from the below URL.
http://howardhinnant.github.io/libcppabi.zip
cp cxxabi.h to /usr/include, and cp libc++abi.dylib to /usr/lib. Now your simulator should work.
The URL seems a little funky to me, being a very non-offical location. But I got it from http://libcxx.llvm.org/ so I'm going to say it is trustworthy. Don't know what the story is here with why this is necessary.

Related

Xcode error: building for iOS Simulator, but linking in object file built for iOS

Never had a lot of problems until the time to buy Macbook Air M1. Just yesterday my app was build without any error in Xcode 12.4. I did not make any special changes and today build failed:
/Users/userName/Projects/MyApp/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/userName/Projects/MyApp/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please can you help me, how to solve it?
Looks like a missing Arm64 simulator slice in the OpenSSL-Universal CocoaPods distribution.
Make sure that you're using the latest version with pod update and contact the OpenSSL-Universal if there's still an issue.

App crash - AuthenticationServices Library not loaded

I'm trying to use AppAuth-iOS dev-logout branch and I tested on simulator 10.3.1.
When I try to run the code I get this crash:
dyld: Library not loaded:
/System/Library/Frameworks/AuthenticationServices.framework/AuthenticationServices
Reason: image not found
AuthenticationServices only appeared in iOS 12.0+, so this may be the cause of the crash.
Link to github issue: https://github.com/openid/AppAuth-iOS/issues/350
Thanks for any hint!
You can mark the AuthenticationServices.framework as Optional in the Linked Frameworks and Libraries section. This solved the problem for me.
You can add the library/framework to the Embedded libraries and frameworks section. Also have a look at OS X Framework Library not loaded: 'Image not found'
Just in case anyone is as dumb as I am:
I was running a newer version of the Xcode Beta than my device's iOS version. Updating my device fixed this is

Can't deploy to iPhone(1st Generation) after updating from Xcode 4.1 to 4.2.1

After updating from 4.1 to 4.2.1, I was not able to deploy to my 1st generation iPhone. I received a message that a debugger for version 3.0 - 3.2 needs to be downloaded. I downloaded it.
After downloading the debugger, now Xcode displays the messages:
"Build succeeded" and "Finished running....".
But the application doesn't even launch!
There haven't been any code changes.
The only other change is that Xcode suggested I update the build settings to use the llvm 3.0 compiler (all I did was click OK).
Now It won't deploy to my first gen iPhone.! :C
It seems to deploy to my 4th generation iPod touch (iOS 5.01 (9A405)) without problem though.
Is there some kind of code change or setting change I need to make?
The last version of Xcode where I could deploy was 4.1 . After that I updated to 4.2.1
EDIT: I followed rckoenes advice below, and I added armv6 & armv7 to the architectures (and removed the variable that was already there). Now the application launches on my device, but almost immediately into the launch, the following error appears :
dyld: Symbol not found: __NSConcreteStackBlock
Referenced from: /var/mobile/Applications/921C1E7F-449D-4EA1-AEAA-70A1AF60C351/ProjectX.app/ProjectX
Expected in: /usr/lib/libSystem.B.dylib
I have tried the following:
under "Build Phases" for the targets, I have added libSystem.B.dylib under "Link Binary With Libraries".
But the error message still appears.
EDIT: Marking the library as optional in "Link Binary With Libraries" makes the error go away".
You probably need to add the armv6 to you Architectures list: http://triplesoftware.nl/2011/12/running-ios-5-build-apps-on-the-orignal-iphone-ipod-touch-and-iphone-3g/

xcode invalid archive in organizer

i get message during archive validation. i've tried most of solutions from other questions. but still failed. (It was ok when i submit it last time in xcode 4.02, then i get rejected. i edited some image and .m file(not project settings).
my project Build settings:
Architectures->standard (armv7) - $(ARCH_STANDARD_32_BIT)
Base sdk->Latest ios(ios 5.0)
valid Architectures armv6 armv7 arvm7f armv7k
Build active architecture only->no
ios deployment target: ios3.0
i've tried reinstalling xcode and make sure unix is checked, 5 times.
i've tried install back to xcode 4.02, but the same message as xcode 4.2
i've tried reinstall cocos2d
i've tried to set the llvm/gcc to gcc only
warning message 1:
Project Clean-Up Outdated settings should be updated.
when i click it. one is to set gcc to llve-gcc, another is to 'Enable compiler warning for missing Function Prototypes. ' I clicked cancel
warning message 2:
Check dependencies
[BWARN]warning: iPhone apps with a deployment target lower than 4.3 should include an armv6 architecture (current IPHONEOS_DEPLOYMENT_TARGET = "4.1", ARCHS = "armv7").
warning 3:
Validate /Users/lifesucks/Library/Developer/Xcode/DerivedData/FishvsBirdsLite-frctqlpldaogcjebgvxkvvmsehie/ArchiveIntermediates/FishvsBirdsLite/InstallationBuildProductsLocation/Applications/FishvsBirdsLite.app
cd "/Users/lifesucks/my app/Fish vs Birds/FishvsBirdsLite"
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv PRODUCT_TYPE com.apple.product-type.application
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Users/lifesucks/Library/Developer/Xcode/DerivedData/FishvsBirdsLite-frctqlpldaogcjebgvxkvvmsehie/ArchiveIntermediates/FishvsBirdsLite/InstallationBuildProductsLocation/Applications/FishvsBirdsLite.app
2011-06-14 01:30:10.948 Validation[8609:607] *** Warning: Defaulting to the standard codesign tool
warning: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 (-19033)
Unable to validate your application. - (null)
warning: There is no codesign_wrapper executable. Please reinstall the Xcode developer tools. (-19058)
Unable to validate your application. - (null)
the error message in organizer is:
the archive is invalid. /var/folders/H5/.../app.ipa does not exist.
I actually don't know why, but it works now. I reinstall back to xcode 4.0.2. then recreated a project, copied over all my classes. i assume that the problem is 'Architectures->standard (armv7)', in xcode 4.0.2 the Architectures is standard armv6/armv7, maybe it's because of cocos2d compatibility to the new version i don't know. anyway if you encounter the same problem, just install back to non-beta and create a new project (since the original setting of 'Architecture' will be modified to 'armv7 standard'. ) hope it helps.
This happened to me when I updated to Xcode 4.2. I went back to the latest non-Beta Xcode version to fix it. The key is, when uninstalling Xcode, you must do it via the following command in Terminal:
sudo /Developer/Library/uninstall-devtools –mode=all
This takes a few minutes. But when it's done, install the non-Beta Xcode (4.0.2 at this time), and then RESTART before using it. Worked for me.
Remove iphoneossimulator from supported platforms for the distribution/release build configuration. That is if you have it.
You cannot have that for distribution, it is only for your debug configurations.
Check the image below for distribution configuration (ignore release config).

problem while installing app on iphone

H everyone
i have up graded my xcode to xcode 4 & i am trying to install a app through this xcode on to a iphone but i am getting following error & i am unable to launch the app
warning: Unable to read symbols for /var/mobile/Applications/7A08B9EA-DD46-47B4-8E0C-BF081BDB1F4B/QIA All.app/QIA All (file not found).
dyld: Library not loaded: /System/Library/Frameworks/QuickLook.framework/QuickLook
Referenced from: /var/mobile/Applications/7A08B9EA-DD46-47B4-8E0C-BF081BDB1F4B/QIA All.app/QIA All
Reason: image not found
i have following warning in my app
ld: warning: directory not found for option '-F/Developer/new xcode/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/PrivateFrameworks'
is from this warning
how can i fix this?,,,thanx in advance
you have to check that all images and framework are included friend. may b any image is missing that is deleted from project folder .check if you get any image in red then add that image
Looks like your app is still trying to link to the 3.1.2 SDK. You need to change the SDK in the project settings to Base SDK: Latest (iOS 4.3). Also make sure to clear out any settings in the target for this value so that it inherits it properly.