I am currently developing my first iOS app which i have tested on simulator till date. Yesterday my developer account was approved and with a mammoth amt of excitement, I tried to deploy my app on the device for testing.
My device iOS is 4.1 and I am currently using Xcode 4.2
While compiling, it generated 1 error and the message was:
ld: framework not found com.apple.mobileicons
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1
In detail
Ld /Users/adstuckltd/Library/Developer/Xcode/DerivedData/fbee-hkxqvccjpaucdlfsdppurvxweneb/Build/Intermediates/fbee.build/Debug-iphoneos/fbee.build/Objects-normal/armv6/fbee normal armv6
cd "/Users/adstuckltd/Desktop/MacBook Updtes/02 June/fbee"
setenv IPHONEOS_DEPLOYMENT_TARGET 4.1
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Users/adstuckltd/Library/Developer/Xcode/DerivedData/fbee-hkxqvccjpaucdlfsdppurvxweneb/Build/Products/Debug-iphoneos "-L/Users/adstuckltd/Desktop/MacBook Updtes/02 June/fbee/AviaryInc-Mobile-Feather-SDK-for-iOS-fb6747f/AviarySDK" -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system "-L/Users/adstuckltd/Desktop/MacBook Updtes/02 June/fbee/AviaryInc-Mobile-Feather-SDK-for-iOS-b4367ba/AviarySDK" -F/Users/adstuckltd/Library/Developer/Xcode/DerivedData/fbee-hkxqvccjpaucdlfsdppurvxweneb/Build/Products/Debug-iphoneos -F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/Developer/Library/Frameworks "-F/Users/adstuckltd/Desktop/MacBook Updtes/02 June/fbee/Images/Image Ref/Heavy Metal HD.theme/Bundles" -filelist /Users/adstuckltd/Library/Developer/Xcode/DerivedData/fbee-hkxqvccjpaucdlfsdppurvxweneb/Build/Intermediates/fbee.build/Debug-iphoneos/fbee.build/Objects-normal/armv6/fbee.LinkFileList -dead_strip -fobjc-arc -miphoneos-version-min=4.1 -lz.1.2.5 -lsqlite3.0 -framework SystemConfiguration -framework SenTestingKit -framework CFNetwork -framework Accelerate -framework CoreData -framework StoreKit -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -lAviarySDK -framework com.apple.mobileicons -o /Users/adstuckltd/Library/Developer/Xcode/DerivedData/fbee-hkxqvccjpaucdlfsdppurvxweneb/Build/Intermediates/fbee.build/Debug-iphoneos/fbee.build/Objects-normal/armv6/fbee
What could be the problem ? Please help me out, I really want to see how my app works on an actual device.
Thanx
Make sure you have the listed frameworks linked in Build Phase Link Binary with Libraries
SenTesting
CFNetwork
Accelerate
Core Data etc.
I would also update to the newest iOS 5.1.1 and Xcode 4.3.2
Related
I got this Error from Xcode when trying to run my app on my device.
Ld "/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Intermediates/Store Locator In App.build/Debug-iphoneos/Store Locator In App.build/Objects-normal/armv7s/Store Locator In App" normal armv7s
cd "/Users/admin/Desktop/peboom 5"
setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -L/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Products/Debug-iphoneos "-L/Users/admin/Desktop/peboom 5" -F/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Products/Debug-iphoneos -filelist "/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Intermediates/Store Locator In App.build/Debug-iphoneos/Store Locator In App.build/Objects-normal/armv7s/Store Locator In App.LinkFileList" -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=5.1 -lsqlite3.0 -framework MediaPlayer -framework AudioToolbox -framework AVFoundation -framework SystemConfiguration -framework CFNetwork -framework MobileCoreServices -framework MessageUI -framework CoreLocation -framework QuartzCore -framework MapKit -framework UIKit -framework Foundation -framework CoreGraphics -lGoogleAnalytics_NoThumb -lGoogleAnalytics -o "/Users/admin/Library/Developer/Xcode/DerivedData/Store_Locator_In_App-hbygxaouhvxmvwdudbwamekfbima/Build/Intermediates/Store Locator In App.build/Debug-iphoneos/Store Locator In App.build/Objects-normal/armv7s/Store Locator In App"
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/admin/Desktop/peboom 5/libGoogleAnalytics_NoThumb.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The new iPhone 5 processor has a custom ARMv7 core which uses a new architecture called armv7s.
The linker is returning that error because the armv7s slice is missing from the libGoogleAnalytics_NoThumb library you're referencing in your project.
Simply update the GoogleAnalitics SDK to the latest version (1.5.1) you can download here: https://developers.google.com/analytics/devguides/collection/ios/resources
I am trying to reuse one code in ios application . That code has several frameworks for mac and ios both . I don't know which file is for mac os and which one is for ios , so I included all in new project ,Included frameworks also , But I am receiving error for Application services framework . I know Application Services framework is only available for MAC Os not for ios . But If I delete ApplicationServices framework from my project then it will give more errors , since it is being used in some class. Here is my error log
ld /Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator/FlacPlayerUniversal.app/FlacPlayerUniversal normal i386
cd "/Users/Documents/ios5 Examples/FlacPlayerUniversal"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator "-L/Users/Documents/ios5 Examples/FlacPlayerUniversal/opt/iphone-4.3/lib" "-L/Users/Documents/ios5 Examples/FlacPlayerUniversal/opt/iphone-simulator-4.3/lib" -F/Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator "-F/Users/Documents/ios5 Examples/FlacPlayerUniversal" -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/Developer/Library/Frameworks -filelist /Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Intermediates/FlacPlayerUniversal.build/Debug-iphonesimulator/FlacPlayerUniversal.build/Objects-normal/i386/FlacPlayerUniversal.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework CoreGraphics -framework ApplicationServices -framework Accelerate -framework CoreFoundation -framework CFNetwork -framework AudioToolbox -framework CoreAudio -framework UIKit -framework Foundation -lFLAC++ -lFLAC -lmpg123 -logg -lsndfile -lspeex -lspeexdsp -lvorbis -lvorbisenc -lvorbisfile -lwavpack -lFLAC++ -lFLAC -lmpg123 -logg -lsndfile -lspeex -lspeexdsp -lvorbis -lvorbisenc -lvorbisfile -lwavpack -o /Users/Library/Developer/Xcode/DerivedData/FlacPlayerUniversal-bupfypehvcjbrofyhhjbqudwhdre/Build/Products/Debug-iphonesimulator/FlacPlayerUniversal.app/FlacPlayerUniversal
ld: framework not found ApplicationServices
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ failed with exit code 1
Please help to solve this error .
OS X and iOS have similar but not the same frameworks. You should remove anything which depends on OS X frameworks not available for iOS.
The ApplicationServices framework is not available on iOS. So you need to modify your framework so that it doesn't attempt to link to the ApplicationServices framework for its iOS variant. It thus also may not try to call any Mac OS X specific functions or reference any Mac OS X specific symbols when you compile for iOS. There is no way to make it work otherwise.
I have this weird problem.
I'm trying to move to XCode 4.2, so I opened my project in XCode 4.2 and tried to build my project for iOS device. The build failed with no issues or any explanation. The weirdest thing is that the project is built with no problems for the Simulator and on XCode 3.2.6 (device and simulator).
This is the result I get when building:
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1
With no other issues.
I checked my Bundle Identifier and Product name and they do not contain illegal characters (only a-zA-Z).
I Also tried building with Apple's LLVM 3.0 which got the same result.
Provisioning profile was also double-checked.
Is there anything else that could cause that? What can I do?
edit:
Here are the details from the log:
Ld /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos/MyApp.app/MyApp normal armv7
cd /Users/user/Documents/Projects/MyApp
setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -L/Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos -LRouteMe/MapView -LRouteMe/MapView/GTM -LRouteMe/MapView/Map -LRouteMe/MapView/UnitTesting -LRouteMe/MapView/Map/Cache.xcdatamodel -LRouteMe/MapView/Map/FMDB -LRouteMe/MapView/Map/Resources -F/Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos -filelist /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/armv7/MyApp.LinkFileList -dead_strip -ObjC -all_load -miphoneos-version-min=4.0 /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos/libMapView.a -framework AudioToolbox -framework AVFoundation -framework CoreGraphics -framework CoreLocation -framework Foundation -framework MapKit -framework MediaPlayer -framework OpenAL -framework QuartzCore -framework SystemConfiguration -framework UIKit -lsqlite3.0 -lstdc++.6 -framework CoreData -framework StoreKit -framework CoreMotion -o /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dyvsuphvmlexzzghpgbnkfzmtqas/Build/Products/Debug-iphoneos/MyApp.app/MyApp
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1
I've finally found the solution! (thanks to Jesse Rusak's advice)
I used CloudMade's library for displaying a map. This library probably caused the problem.
I removed the library and removed all the library and header search paths to it.
After that I changed the base SDK of CloudMade's projects to "Latest iOS" and re-added the library to my project again. Re-added it to the library and header search path and thats it! it worked!
Thanks everyone!
Just replaced my XCode 4.0.1 with 4.2. Trying to run the iPhone game project I’m currently working on, faced the error:
ld: library not found for -lz.1.2.3
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ failed with exit code 1
The full text:
Ld "/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator/Hit The Road.app/Hit The Road" normal i386
cd "/MyProjects/Hit The Road"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator -F/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator -filelist "/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Intermediates/HitTheRoad.build/Debug-iphonesimulator/Drive.build/Objects-normal/i386/Hit The Road.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lz -ObjC -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000 -lz.1.2.3 -weak_framework MapKit -framework CoreLocation -weak_framework GameKit -framework AddressBookUI -framework AddressBook -framework CFNetwork -framework MobileCoreServices -lsqlite3.0 -framework SystemConfiguration -framework Security -framework QuartzCore -weak_framework UIKit -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework AVFoundation -weak_framework Foundation -framework CoreGraphics -o "/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator/Hit The Road.app/Hit The Road"
Trying to figure out what’s wrong, found out that it could be about the Mac OS X Deployment Target. So I’ve tried to set it to 10.4 10.5 and 10.6. Unfortunately it didn’t help.
I’m working on MacOS 10.6.8
Did anybody get such errors before?
Maybe someone know at least what this error is about?
Click the Project in the File Navigator, then select the Target. Scroll down to Linked Frameworks and Libraries and find the libz library being used and remove it, the name may be colored red. Next, click "+" and type libz and add a version 1.2.3 or newer. Often, simply selecting libz.dylib will work. Finally, clean and rebuild.
I almost done my app but suddenly an error appear
The ERROR:
Ld build/urbantest.build/Release-iphoneos/urbantest.build/Objects-normal/armv7/urbantest normal armv7
cd /Users/mbp/Apps/Testing/urbantest
setenv IPHONEOS_DEPLOYMENT_TARGET 4.1
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -L/Users/mbp/Apps/Testing/urbantest/build/Release-iphoneos -L/Users/mbp/Apps/Testing/urbantest/Airship -F/Users/mbp/Apps/Testing/urbantest/build/Release-iphoneos -filelist /Users/mbp/Apps/Testing/urbantest/build/urbantest.build/Release-iphoneos/urbantest.build/Objects-normal/armv7/urbantest.LinkFileList -dead_strip -all_load -weak_library /usr/lib/libSystem.B.dylib -miphoneos-version-min=4.1 -framework Foundation -framework UIKit -framework CoreGraphics -lUAirship-1.0.4 -framework AudioToolbox -framework MessageUI -framework CFNetwork -framework CoreTelephony -framework MobileCoreServices -framework Security -framework StoreKit -framework SystemConfiguration -lsqlite3 -lz -o /Users/mbp/Apps/Testing/urbantest/build/urbantest.build/Release-iphoneos/urbantest.build/Objects-normal/armv7/urbantest
ld: duplicate symbol _OBJC_CLASS_$_UA_ASIDownloadCache in /Users/mbp/Apps/Testing/urbantest/Airship/libUAirship-1.0.4.a(UA_ASIDownloadCache.o) and /Users/mbp/Apps/Testing/urbantest/build/urbantest.build/Release-iphoneos/urbantest.build/Objects-normal/armv7/UA_ASIDownloadCache.o
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Plz help me solve it.
Seem like you are trying to use AirShip library for Push Notification that embed ASIHTTPRequest library. Have you also add by yourself ASIHTTPRequest for network stuff?
If yes the linker found two symbol with the same name (= two definition for the same class) one in AirShip Library and One in ASIHHTPRequest.
You can remove your ASIHTTPRequest and use the one shipped with AirShip library.