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.
Related
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
Can Any one Tell me how to solve this Error...
My X-Code is Version 4.2.
My IOS Simulator is Version 5.0
Ld build/Debug-iphonesimulator/M3DFree.app/M3DFree normal i386
cd "/Users/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D"
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/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D/build/Debug-iphonesimulator" "-F/Users/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D/build/Debug-iphonesimulator" -filelist "/Users/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D/build/Match3D.build/Debug-iphonesimulator/Match3DFree.build/Objects-normal/i386/M3DFree.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 AppController.m -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -framework GameKit -lsqlite3.0 -framework StoreKit -framework MediaPlayer -framework AudioToolbox -framework Foundation -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -o "/Users/savvy3/Desktop/Ayaz/Hemant Sir/PlayScreen-M3D_V2-41d4396ba6d1c8687eb2b744a700649849583714/match3D/build/Debug-iphonesimulator/M3DFree.app/M3DFree"
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
The error mentions something about
D__IPHONE_OS_VERSION_MIN_REQUIRED=30200
Which is a reference to iOS 3.2 (the first iPad OS). Check your build target and make sure that you are building for iOS 5 and that the deployment target is 4.3 or above.
If that doesn't help then it's probably just "one of those Xcode bugs" and doing a clean build, resetting your simulator, clearing your project cache and rebooting your Mac will probably fix it.
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.
d /Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator/Goozzy.app/Goozzy normal i386
cd /Users/yariksmirnov/Desktop/Goozy/branches/new
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/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator -F/Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator -filelist /Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Intermediates/Goozzy.build/Debug-iphonesimulator/Goozzy.build/Objects-normal/i386/Goozzy.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -framework CoreData -lz.1.2.3 -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/yariksmirnov/Library/Developer/Xcode/DerivedData/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux/Build/Products/Debug-iphonesimulator/Goozzy.app/Goozzy
*ld: library not found for -lz.1.2.3*
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
How do I fix this error?
It's very strange -- I compile a build for iOS, but get a error about Mac OS deployment target.
You should link libz.dylib not any specific version. The correct version gets used automatically.
Update the libz dylib version in your project definition to whatever your XCode 4.2 is providing. If you are compiling the same code for different targets, check the library version on each of them.
Since SDK 3.2 all versions of libz are symbolic links to the last version (libz.1.2.3 in SDK 4.3), so regardless of what libz-version you choose, you get the last one. See /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest/Symbols/usr/lib.
I don't know what Apple will do in the future. If you link to libz you are likely to keep linking to the latest version. A change in the major number of the library (libz-X) could break compatibility, so a safer choice is to keep linking the same version you have now. Your choice.
I am getting Apple Mach-O Linker Id error, while compiling the iphone app. And getting below error
Ld
"/Users/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Products/Debug-iphonesimulator/Tiger
Dev.app/Tiger Dev" normal i386
cd /Users/adminbluepal/Desktop/Dir-Tiger_latest
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/gcc-4.2
-arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk
-L/Users/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Products/Debug-iphonesimulator
-F/Users/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Products/Debug-iphonesimulator
-filelist "/Users/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Intermediates/Tiger.build/Debug-iphonesimulator/Tiger.build/Objects-normal/i386/Tiger
Dev.LinkFileList" -Xlinker
--no-demangle -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -liLibs -framework AVFoundation -framework AudioToolbox -framework CoreMedia
-framework Foundation -framework GameKit -framework OpenGLES -framework
QuartzCore -framework Security
-framework SystemConfiguration -framework UIKit -lz -o "/Users/adminbluepal/Library/Developer/Xcode/DerivedData/Tiger-czyksblsmfqdqybamuutemvjbdek/Build/Products/Debug-iphonesimulator/Tiger
Dev.app/Tiger Dev"
ld: library not found for -liLibs
collect2: ld returned 1 exit status
Command
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
failed with exit code 1
Please help me out of this
Thank you,
Madan Mohan
Yesterday i had this problem.... cleared that error with the help of this answer. it may help you also...
You probably don't have the CoreGraphics.framework added to your frameworks list.
To make sure, click the "Frameworks" folder on Xcode. If the framework isn't listed on the table to the right, you'll need to add it by right-clicking the Frameworks folder, chooseing "Add Existing Framework..." and then choosing it from the list.
Source stack overflow previous question
Sounds like you're trying to use the iLibs library (Google says it's something for game development). XCode cannot properly link to it. Try adding their Framework to your project, or read the help docs of the library for help with its setup. Alternatively, see if you can remove the "-liLibs" linker flag in your build settings, if you aren't using the library.