Missing Required Architecture arm in file - iphone-sdk-3.0

When I compile my application, I get an error stating that
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/CFNetwork, missing required architecture arm in file.
I have checked all the frameworks, and they all point to the iPhone 3.0 SDK Frameworks...
What am I missing here?

Ok, so I finally solved the problem. The solution was to set the "Framework Search Paths" and "Library Search Paths" to "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Frameworks/CFNetwork.framework"
I removed the other values that were there and it seems to work. I am using more frameworks but only CFNetwork seems to be problematic (until now :) ).
Hope this helps!

That path is to one of your Mac's frameworks, which shouldn't be anywhere near your iPhone app.
Go to Targets in your Project's sidebar and check what's listed under "Link Binary with Libraries". None of them should point anywhere else but the SDK frameworks. If you don't find anything wrong there, have a look in the Build Results panel, preferably after doing a Clean. That should give you some clues as to what's happening.

Related

After checking all relevant Xcode settings, my executable still says "was compiled with optimization". Any suggestion?

I am developing a macOS application in Objective-C and I am using this apple example as a base for my project. When I try to debug the privileged helper, it always says:
com.example.apple-samplecode.EBAS.HelperTool was compiled with optimization - stepping may behave oddly; variables may not be available.
I have checked the existing SA relevant questions but could not find a solution. Any help is greatly appreciated.
EDIT:
It appears that dependencies can cause this kind of behavior. I am using the Qt frameworks in my Xcode Objective-C++ project. This could be the reason of the error. Thanks for your attention.

Parse and facebook sdk -duplicate symbol

I have parse, facebook, bolts frameworks in my project but I get this error and I don't know how to solve it.
I tried to remove framworks and add them again.
I'm using xcode 6 and parse library 1.6.
duplicate symbol _OBJC_METACLASS_$_BFMeasurementEvent in:
/Users/home/Desktop/The Live TV V2/FacebookSDK.framework/FacebookSDK(BFMeasurementEvent.o)
/Users/home/Desktop/The Live TV V2/Bolts.framework/Bolts(BFMeasurementEvent.o)
ld: 91 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation
Any idea?
I too, was searching for same, Not sure, why no body reply, but I fixed this issue by removing Bolts.framework completely from my Project, look like many of dependencies are already included in NEW Facebook SDK.,
Hope it helps you.
Using Facebook and Parse Framework at the same time will cause a multiple duplicate symbol. No idea why this happens also. Removing Bolts.framework from Parse will resolve this issue.
I removed Bolts from my project and didn't work. Then I figured out that I had to remove all the references and Add Bolts again. Finally that worked fine for me.
I know an answer has already been accepted, but this has now been resolved by Facebook.
If you download the latest Parse SDK (1.7.0) and Facebook SDK (4.0.0) as of this writing, it should work just fine. Both SDKs were updated just hours ago.
I have imported and copied Bolts.framework and Parse.framework from the Parse SDK, and then linked to Facebooks SDK (now called FBSDKCoreKit.framework), and it successfully builds the project.
This issue arises the way Bolts and FaceBookSDK is added to the project. Remove both and re-add them with copy items if needed unchecked and Create Groups selected. I hope that this helps.
I don't know this situations work for you or not but it did work in my case.
Remove all the frameworks you have added into you project and import latest Facebook SDK and Bolts using CocoaPods.
and remove all the dependencies of bolts you have added manually.
For Example in my case.
I have just commented this line and every thing works just fine.
NSString *const BFTaskMultipleExceptionsException = #"BFMultipleExceptionsException";
Hope This Works for you as well.

Zbar SDK is not working in iOS6

I was using ZBar for scanning in iOS5 and it was working well.
Now after updating to iOS6, its not working. It shows a following error.
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/mac4/Desktop/my desktop/My app/MyApp name 20:09:12 /MyApp name/ZBarSDK/libzbar.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What is wrong in my side?
In Xcode, go to the settings of your target,
change 'Valid Architectures'
from
armv7,armv7s
to
armv7
This change means your app will not take advantage of possible optimizations the new iPhone5 processor has, but you don't have to wait for 3rd party libraries to upgrade or mess with a hex editor.
i recently faced the same issue. The problem seems to be that the ZBar SDK is not ready for the armv7s architecture.
I solved the problem this way:
Go to the ZBar homepage and navigate to the mercurial repository (direct link)
Download the zbar repository as zip.
Unzip the file and navigate to the subfolder named "iphone".
Open the XCode project.
Delete the "Examples" folder (the folder caused a build error on my machine).
Hit "CMD + B" and build the source.
Find your new libzbar.a file. (User/Library/Developer/Xcode/DerivedData/zbar...)
Replace the old libzbar.a file in your project with the new one.
Hit "CMD + R" and you are good to go.
The hg sources download/re-compilation tutorial is great, but you don't need to do all that.
Just browse to http://sourceforge.net/projects/zbar/files/iPhoneSDK/beta/ and download ZBarSDK-1.3.1.dmg, and everything will work out of the box for the latest architectures (in my case armv7, armv7s).
Update:
Some of you reported issues with ZBarSDK on XCode 5, iOS 7 or architectures arm64... well I went back to this project today and experienced similar issues and found that there is a ZBarSDK library that is compiled to work with iOS 7 at: http://www.nerdvision.net/app-development/ios/zbar-sdk. I Just replaced the old files with the new ones and my project compiled. Note that the Architectures in my project's Build Settings are set to amrv7, arm64 ($ARCHS_STANDARD), Base SDK is set to iOS 8.0 and I have the Build Active Architectures Only flag set to Yes.
There is a question here at SO about this: zbar SDK dont work for armv7s(iPad 4 iOS 7)
Thanks to #cdescours for the tip!
I have same problem but I just added armv6 and armv7 then it works for iOS6. Just insert armv6.
your binary library does not have code for armv7s. So you should recompile it for the current archtitectures.
Recompile the source, I download the source code for zbar and compile into new project. It's simple.
Clone the Mercurial repository and build with Xcode. It's very easy. Here's a link to the repository:
http://zbar.hg.sourceforge.net/hgweb/zbar/iphone/summary
Came here with the same problem after downloading the tutorial code RDC provided in his blog. Very useful post, but the most helpful answer here was posted by RacZo on 3/29. I just downloaded the original ZBarSDK-1.3.1.dmg image, removed the ZBarSDK from my project and replaced with the original. Done.
I am learning IOS development. After few days digging,
Here is the tutorial for installing ZBar SDK.
1, The accepted answer is correct, but with some limitations. (tried, works!)
2, The alternative solution is here. (tried, works!)
3, The best is to build the all different architectures separated then bind them using lipo: Great Solution (tried, brilliant!)
Some readings for understanding those architectures:
http://wanderingcoder.net/2010/07/19/ought-arm/
http://wanderingcoder.net/2011/09/25/compiling-armv7/

UIKit.h not found error

I made a single view app for the ipad, with a movie, webview and button, and I get this error when I try and run it. I have restarted the application, and reinstalled it, but nothing is working. This error keeps coming up in my MoviePlayer_Prefix.pch file. Can someone help me out?
I have had the same issue with being unable to compile project due to UIKit.h not being found + "unable to load standard library for target..."
The solution for me was very simple - to quit (CMD+Q) and relaunch Xcode. I have found out that with Xcode opened, macOS seems to have removed command line tools for Xcode because it was preparing for a update and relaunching Xcode triggered the "install additional components" update and it made the problem disappear.
Like Faul Textor said, most likely your XCode updated to 12.1 but your Command Line Tools didn't. You need to quit XCode completely and then start it again and you should get a pop-up saying "Install Additional Components"
Sorry, this should have been a comment to his reply but I cannot do that.
It sounds like you removed the UIKit.framework from your project at some point. Check if it is listed in your project navigator. If it's not there, go to your project in the project navigator pane, select your target, go to the build phases tab, click on link binary with libraries, hit the plus button, find the UIKit.framework there and add it to your project.
EDIT:
This answer suggests that there mayb be an issue with your framework search paths build setting. Check that out and if the path is empty and it still doesn't work, a re-install of Xcode would fix it, I think.
Just wanted to add my two cents on not making a dumb-ass mistake - came across this answer hoping to solve same problem.
Turns out I had written #import "<UIKit/UIKit.h>" instead of #import <UIKit/UIKit.h>.
Thought I would add in case someone else makes a simple mistake like me.

json-framework doesn't work with iPhone SDK 3.0

I can't seem to get my app to compile when using JSON-framework http://code.google.com/p/json-framework/ with iPhone SDK 3.0.
My app compiles fine for the simulator, but when I go to compile for my device I get a 'codesign error' code 1. I've followed all of the installation instructions correctly, and when I remove the 'Additional SDK' reference and 'Other Linker Flags: -Obj-C -ljson' it compiles just fine...but obviously I then can't use JSON in my app.
Any ideas?
You may want to just switch to the code version and not link in the static lib.
It should compile and work fine on 3.0.
On my own project, I too ran into this problem. I was not able to build my app for iPhone OS 2.x using the iPhone 3.0 SDK.
The fix was to set the following at the project level (Get Info):
BaseSDK to iPhone Device 3.0
iPhone Deployment Target to iPhone OS 2.x
Code Signing Resource Rules Path to the same 2.x plist (e.g. /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/ResourceRules.plist)
The last bit allows a distribution (app store) build to code sign correctly... Otherwise you'll encounter an error "object file format invalid or unsuitable" since the code signer by default will use the same resource rules as the BaseSDK (i.e. 3.0), which is unsuitable for a 2.x app.
Also, be sure to clear any of the above settings at the target level (again, via Get Info).
Phew.
Codesign error means you do not have a valid provisioning profile for the device you are trying to compile to, using the current built settings.
Can you build and deploy sample apps to your phone?
I started using the lovely json-framework for the iPhone but then suddenly found that if I compiled for anything greater than 2.1 for a device, that it would pop up with:
Codesign error: “object file format invalid or unsuitable”
It took me a long time to figure out what was going on, but thanks to a blog post, the fix is this:
On the project settings, on the build tab, search for “Code Signing Resource Rules Path” and set “$(SDKROOT)/ResourceRules.plist” as its value.
I’m not sure how it works as it looks like that is the path it already has, but hey, it seems to work!
that solves the codesign error i was getting, but now I cant compile on 3.0 for some other reason. i'm going to try to link to the code rather than the library.
Sounds like an issue you would want to discuss with the developers, see the support group.
It seems like the code signing isn't extending to the framework. Have you tried linking the framework differently?
And for French persons, here is a tutorial too here too (en Français)
But for your problem I think it's not about JSON but more with your key developer.