just got some errors runnign ZBar with my iOS App.
I included the newest Beta Version 1.3.1 in my Project and am Running the App locally on my iOS7 Device (iPhone 5).
When trying to archive it for Distribution, there is the error with arm64.
I've tried to recompile the source to generate my own libzbar.a (which was generated) with selected arm64 armv7 and armv7s, but even here the error was the same..
So what should I do?
Thnaks for help!
You can download the zbar library compiled for arm7, arm7s and arm64 here
EDIT: I am still getting upvotes on this answer, the real current answer is that now the AV Foundation framework includes barcode scanning as of iOS 7. I would recommend using this over ZBar from here on out.
Useful tutorial using AV Foundation to scan with sample code and supported types list or here
above answers don't really help
follow this guide:
http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/
But before building change the Architectures to include arm64
I was on the ZBar train as well for quite a while dealing with these issues since they have not been updating the SDK. Luckily if your app only has to support iOS7 onwards (which most iOS users are on now!) there is now QR Code reading support in AVFoundation so you can build your own reader very easily. Check out this tutorial:
http://www.appcoda.com/qr-code-ios-programming-tutorial/
Then bask in the beauty that is a totally Apple supported QR Code reader!
Using the beta you linked and changing this setting worked for me:
Settings that worked:
I am able to build to the 5s and 5c.
Try only armv7, armv7s for "Architectures" build settings. I think static library doesn't have arm64 binaries included.
For more info
Xcode 5 and iOS 7: Architecture and Valid architectures
Here (http://zbar.sourceforge.net/iphone/sdkdoc/install.html) is the installing SDK guide, I did this and it worked perfectly.
Hope it helps.
How i resolve the problem is link binary with libraries. Base on the tutorial here
Now Select project (Blue Icon) go to --> Build Phases --> Link Binary With Libraries.
Click the + and add each of these seven frameworks.
AVFoundation.framework
List item
CoreGraphics.framework
CoreMedia.framework
CoreAudio.framework
CoreVideo.framework
QuartzCore.framework
libiconv.dylib (I use libz.tbd & libicon.tbd)
**set enable bitcode --> No
build! hope this help.
Related
I am trying to integrate Google cast SDK but not working in Apple M1 Pro chipset.
pod 'google-cast-sdk'
I am tried with every possibilities but not worked well and it's throwing as error like attached image. Any idea to get rid of this error.
Any help more appreciated.
Thanks in Advance
The Google Cast SDK you integrate with CocoaPods contains a binary framework which currently does not contain the arm64 simulator binaries, thus the linker error you experience when building the project for the arm64 simulator.
arm64 simulator binaries are namely different from arm64 device binaries, as this excellent article series explains in great detail. An XCFramework is needed instead so that both the arm64 device and simulator slices can coexist in the same package, thus addressing all possible build scenarios.
Google engineers are currently working on this known issue and a proper XCFramework should be delivered early January 2022 for version 4.7 of the Google Cast SDK. Though this is not mentioned explicitly I hope they will update the pod accordingly at the same time.
At the time of this writing (early January 2022) this XCFramework should be around the corner, so I would recommend working with the x64 simulator or an arm64 device in the meantime if you can.
If you cannot afford this compromise you can transform arm64 device binaries into arm64 simulator binaries. The article series listed above describes how this can be achived both for static as well as dynamic binaries, as Google Cast provides its SDK in both flavors.
Can try. Target > Build Settings > Architectures > Excluded Architectures > Debug > add "arm64"
Urban Airship provides an iOS 8+ framework called AirshipKit.framework. Linking and embedding this framework works fine in both the simulator and device. However, when I go to archive the binary and validate it, iTunes Connect says the app contains code for unsupported architectures i386 and x86_64. How can I get Xcode to remove support for these architectures from the archived app?
Under Build Settings I have:
Architectures: Standard architectures (armv7, armv7s)
Build Active Architecture Only: Yes for debug, No for release
Supported Platforms: iOS
Valid Architectures: arm64 armv7 armv7s
You could use lipo to extract the arm code to a new file and submit that one, but it sounds like something is very wrong - you shouldn't need to do anything like this to submit, it might be a bug in Xcode. Which version are you using? Did any other settings in the build get changed (the text would be bold if the build setting is modified from the default)?
There is a new version of the Urban Airship SDK, 5.0.3
Are you still seeing this issue when building with the new Framework version?
I struggled with the same problem for a couple of days until I realized my own idiocy. My app is set to support 7.0+ and yet I still had the Airship.framework, which as the UA (Urban Airship) documentation strictly recommends, was only to be used for 8.0 +
I removed the framework and the validation came back success!
So if your app is inclusive of 7.0 or lower, then all you need is the libUAirship-5+ library. As #aschuman suggested, there is a new one available (libUAirship-5.0.3.a)
I have an iPhone app (for iOS 7 & above) which uses the ZBar SDK. I'm struggling to update it for iOS 7 using Xcode 5.1.1.
I was getting this arm64 build error, but I've managed to fix that by recompiling libzbar.a according to the instructions here.
The app now archives successfully. However, when I try to validate it in the Xcode Organizer I get the following error: "This bundle is invalid. Apps that include an arm64 architecture are required to include both armv7 and armv7s architectures."
I have "Standard architectures (armv7, armv7s, arm64)" set for my project's Architectures and "arm64 armv7 armv7s" for the Valid Architectures.
I not sure what else to try at the moment, so any help would be much appreciated.
Unplugging my iOS device and re-archiving the build helped me.
I could not find anything that would solve this problem. After going around in circles for several days, I removed every trace of the ZBar SDK from my app and instead used Apple's AVFoundation for QRCode support. This option was not available prior to iOS 7, but now that it is life becomes a whole lot easier!
I am using Xcode 4.5.2 and have a project which cannot be compiled for an iPhone running iOS 6.0.1 though other projects compile fine with the same settings as shown in the picture below.
Any ideas on how to solve this?
You're probably using some third party lib that doesn't yet support armv7s architecture. You can just remove armv7s from your settings. Your app will still be able to run on iPhone 5 although it might not be taking full advantage of the new architecture.
If on XCODE 12 just goto Build Settings search for VALID_ARCHS. Under the User-Defined section select Valid Architectures and click Delete.
Set valid architecture for iOs simulator to armv7 and armv7s.( simulators are 32 bit ).
for device set to arm64 (64 bit all new ios device).
I'm using MGTwitterEngine in my apps and till iOS5, the app is working fine. I'm using twitter engine that as ".a" file.
But when compiling with latest XCode, its showing error that armv7s slice is not available.
I tried removing armv7s from the valid architectures and the problem solved. I'm able to build the app, run the app successfully on iPhone4, iPhone4S and also on iPhone5.
My questions is whether I'm following right way or not. Will Apple approve the apps that are not built with armv7s architecture?
There's no other go with it
Libraries are precompiled code. so they are built as per the architectures selected during compilation.
In latest iOS, its better to use Twitter/Social framework (as per iOS version)