Running on a real device (iPhone) linker error for an archive file - iphone

I'm using CorePlot in my project by adding the project file directly in the project. When I compile it for simulator it is fine, but when I try to compile it for the real device it says:
"clang: error: no such file or directory:
'/Users/t2wu/Library/Developer/Xcode/DerivedData/HRM-fqohcvzyvosuqmerfynaixyulpta/Build/Products/Debug-iphoneos/libCorePlot-CocoaTouch.a'"
What could be the problem? I'm using iPhone 4S with iOS 6 SDK with architecture set to Standard(armv7, armv7s) for both the super project and the embedded CorePlot.

In Target Project Build Setting Make Buidl Architecture Only = YES. This will solve your problem.

Clang is the compiler. Make sure you have a libCorePlot-CocoaTouch.a file in your project.

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.

clang: error no such file or directory: */Debug-iphonesimulator/MailCore/MailCore

I am using mailcore2 in my ios app from fetching my gmail account emails on my device. I have changed the ios sdkversion from 6.1 to 6.0 in the mailcore2 scripts bcz I am trying to compile and run the app using iPhone simulator 6.0 which uses ios sdkversion 6.0. Doing so I am getting the following clang error.
clang: error: no such file or directory: '/Users/shujaat/Library/Developer/Xcode/DerivedData/MyTestApp-ditognlaoajwldfliplqecnxqbfj/Build/Products/Debug-iphonesimulator/MailCore/MailCore'
While trying to compile and run my app using iphone simulator 6.1 (uses ios sdk 6.1), with no changes in the ios sdk version in the shell scripts, I am getting the following error:
/bin/sh /Users/shujaat/Documents/WemoTech/Products/WantList/sourcecode/ThirdPartyLib/MailCore2/Externals/builds/workdir/20130930192723/src/libetpan/build-mac/update.sh
configuring
running prepare-cyrus-sasl.sh
prepare sources
patching file lib/client.c
building tools
generated makemd5i386 properly
building for iPhoneOS - armv7
CONFIGURE FAILED
Command /bin/sh failed with exit code 1
These issues are driving me crazy for the last couple of days. Need your help.
Go to your main project target->"Build phases"->"Target dependencies" add mailcore2 ios
You need to read Check Adding MailCore to Your iOS Project carefully.
These issues are fixed now. I want to explain what I did to get rid of them for others facing same issues:
I made a separate project, and made mailcore2 as a part of it (didn't include the #import line in any of the project files at first). I compiled and run the project and copied the resultant mailcore 2 from it to my original project. It's compiling and running fine now.

facebook ios sdk build fails on device, works on simulator

I am trying to build an app (with ARC) that uses the facebook_ios_sdk (the latest version on github).
As recommended by Facebook, I used the build script to create a static library and then added it to the project.
Now when I build the project for an iPhone 5.1 Simulator, it works fine. However, on running it for an actual device (which is running 5.1), it gives the following build error -
ld: in ../facebook-ios-sdk/libfacebook_ios_sdk.a, file is universal but does not contain a(n) armv7 slice for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestions on how to resolve this?
You could modify the build script for static library (which was too complicated for me), or just skip the library approach:
add the Facebook sources from SDK to your project
if using ARC, go to "target->build phases->compile sources" and mark all the Facbook source files with the--fno-objc-arc flag
That's it, works for me.
One work around that worked was to change the Valid Architectures from"armv6 armv7" to just armv6

SenTestingKit Not found In Xcode4

When I tried to import <SenTestingKit/SenTestingKit.h>, I get this error: SenTestingKit/SenTestingKit.h: No such file or directory.
I am using unit testing for the first. I am using xcode 4.2 with ios 5 sdk. But in my system I have two xcode version installed,4.2 and 3.2.5. Although i am using xcode 4.2 ,xcode3.2.5 is the default xcode in my system. Can any one help me with the unit testing?
SenTestingKit.framework is at :
/Developer/Library/Frameworks/SenTestingKit.framework (OS X)
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOSX.X.sdk/Developer/Library/Frameworks/SenTestingKit.framework (iOS)
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulatorX.X.sdk/Developer/Library/Frameworks/SenTestingKit.framework (simulator)
for Xcode versions 4.3 and above prepend /Applications/Xcode.app/Contents/ to the paths above
I don't know, but the frameworks path will be different for both xcodes. it might be in 3.2.5 frameworks path and when using 4.2, it may not find it. Correct me if I'm wrong.

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.