I'm having trouble to build an external pre built dependency. It throws the following error:
In /Users/me/Projects/app/ThirdParty/GoodFiles/GD.framework/GD(nondga_helper.o), building for iOS, but linking in object file built for free standing, file '/Users/me/Projects/app/ThirdParty/GoodFiles/GD.framework/GD' for architecture arm64
One of the questions that really bothers me is that I don't have a real idea what "free standing" really means. I thought it had to do with being a fat binary, but after running lipo -thin arm64 GD -o GD (and verifying with -info that it really worked) in one of my build scripts I'm still seeing the same problem.
I also tried to exclude arm64 from the simulator and x86_64 from iOS builds in Excluded Architectures as mentioned elsewhere, but that didn't work either.
Removed the Xcode 12 reason. This already doesn't compile anymore in Xcode 11.
Hi there are new BB certification files you have to add along with the usual GD.Framework files. These are documented on Blackberry website
New Xcode build system
GD.framework
BlackBerryCerticom.xcframework
BlackBerryCerticomSBGSE.xcframework
Legacy Xcode build system
GD.framework
BlackBerryCerticom.framework
BlackBerryCerticomSBGSE.framework
https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-ios/8_1/blackberry-dynamics-sdk-ios-devguide/Steps-to-get-started-And-iOS/rqx1490022241984/Prepare-an-app-to-use-the-static-framework
Check:
Xcode > Preferences > Locations > Command Line Tools
In my case it was set to Xcode 12 after installing Xcode 12. There is NO Xcode 12 proof solution until mid December.
Related
I am trying to solve a problem related to Xcode 12, building for iOS Simulator, but linking in an object file built for iOS, for architecture 'arm64'
As an experiment, I wanted to see if I could configure one of my frameworks to only build x86_64 for all cases.
Here is my config:
You can see I have overridden the architectures to be x86_64 and I am excluding arm64. I am also only building active architectures only. There is no way that arm64 should ever be considered during a build.
And yet...
Here is the output of a build the very next moment. It's tons of source files that indicate they are still being compiled for arm64.
Can anyone explain this discrepancy? I am running the latest Xcode, 13.2.1, on a new M1 Max laptop.
I upgrade my xcode recently.
When I build my iOS frameworks towards My Mac, most of them works fine. However one framework build failed. The error as follow:
My Mac doesn’t support any of XXX.framework’s architectures. You can add My Mac’s x86_64h architecture to XXX.framework’s Architectures build setting.
I have tried add x86_64h, x86_64, and arm64e to valid architecture, but it doesn't work.
I also tried to compare build settings between these frameworks, but failed to find out an solution.
Any suggestion to solve this problem?
I had the same issue, then I changed Valid Architectures to arm64 x86_64.
After this, I was able to build the framework and use it.
When running an app for the first time from Xamarin Studio on an iOS 10.1 Simulator, I got the following message:
app name May Slow Down Your iPhone
The developer of this app needs to update it to improve its compatibility.
The app runs normally, and the message does not appear when I run it for the second time. How can I get rid of this message?
It turned out that the app was only built for the i386 architecture and not for the newer x86_64 one. After changing this in the build settings (to "i386 & x86_64", though I suppose "x86_64" would help as well) it didn't occur anymore.
Ref: https://releases.xamarin.com/stable-release-cycle-8-service-release-0-w-xcode8-1-support/
Remaining higher visibility known issues related to Xcode 8.1
[Xamarin Studio] – 45861 – “May Slow Down Your iPhone … The developer of this app needs to update it to improve its compatibility.” because of default “i386” supported architecture setting in the iPhoneSimulator configuration on new projects
Fix: Change Project options > iOS Build > Supported architectures to x86_64 (instead of the default i386) for the iPhoneSimulator configuration.
Why This Warning Appears
Apple added this warning in iOS 10.1. This article succinctly defines the warning:
"In a bid to push developers to update their apps to 64-bit frameworks, Apple has introduced a new warning message with iOS 10.1. The message reads: “[App Name] may slow down your iPhone”, with a slug, “The developer of this app needs to update it to improve its compatibility.” This message only appears if you're running a 32-bit app.
This won’t affect a vast majority of iOS users as Apple stopped accepting updates to 32-bit apps in June 2015."
Update: Before Cycle 8 Service Release 2, the default Build Architecture for the iOS Simulator Build Configuration did not include the 64-bit architecture.
How To Resolve/Prevent This Warning
For Xamarin apps that were created before C8SR2, you can prevent this error message by manually changing the iOS Build Architecture.
Build Architecture Causing Warning
This iOS Build Architecture does not include the 64-bit Architecture
Build Architecture Resolving/Preventing Warning
This iOS Build Architecture does include the 64-bit Architecture
Update: New Xamarin.iOS Apps
In the latest Stable version of Xamarin, Cycle 8 Service Release 2, the default Build Architecture for new Xamarin.iOS apps is x86_64 for iOS Simulator builds.
i.e. When you create a new app (File -> New), the default Build Architecture is x86_64 for iOS Simulator builds.
Compiling for x86_64
You need to build your app for the x86_64 architecture, whether you're using Xcode or Xamarin. In particular when building from the command line with xcodebuild, set ONLY_ACTIVE_ARCH=NO and be sure not to constrain the target architectures with -arch i386 because you need to allow the compiler to build for x86_64 too.
Verifying your app
To verify that your app is built for x86_64, unzip your IPA file and find the binary. <filename> and <app> are the names of your IPA and app respectively:
unzip <filename>.ipa -d $TMPDIR/app
file $TMPDIR/app/Payload/<app>.app/<app>
If you see Mach-O 64-bit executable x86_64, your app is built for x86_64. You might also see that your app is a universal binary, which is OK too as long as it contains an x86_64 slice:
Mach-O universal binary with 2 architectures
(for architecture x86_64): Mach-O 64-bit executable x86_64
(for architecture i386): Mach-O executable i386
So, I am trying to build and run an App on my iPhone 5 device. But "suddenly" (Was working fine until I ran archive to submit to iTunes connect) it is failing with errors. The app is using CorePlot graphing library and the error seems to be occurring in that library.
So, the error is
Text
ld: warning: ignoring file
path/to/libCorePlot-CocoaTouch.a,
file was built for archive which is not the architecture being linked
(armv7):
path/to/libCorePlot-CocoaTouch.a
I can understand the error. It basically says that the library was built not for armv7 architecture.
However, to confirm this I ran this terminal command against the static library.
lipo -info libCorePlot-CocoaTouch.a
and the result is,
Architectures in the fat file: libCorePlot-CocoaTouch.a are: armv7 armv7s i386 x86_64 arm64
I can't see a reason why this isn't running. The project compiles and runs on simulator but when I change to device it starts to fail.
What have I tried so far?
Seeking for solutions on Google - Failed
Cleaning project and running it again.
Quitting XCode and restarting it.
Shutting down Macbook and then restarting it.
Downloading CorePlot 1.5.1 source files and rebuilding the binary files.
After all above steps and many more. I have same error again and again. I don't know what am I done wrong.
Environment Specs:
MacBook Pro running OSX 10.9.2
XCode 5.1.1
Project > Build Settings > Architectures > Standard architectures (armv7, armvts, arm64)
Base SDK > Latest iOS (iOS 7.1)
iPhone 5 with iOS 7.1.1
If it helps, I am sharing the exact binary I am using right now with my app.
CorePlot Binary which is being used.
Any idea about what am I doing wrong? I know there is like a silly mistake somewhere. But not sure where. Any extra info please comment. I will provide it straight away. I was about to upload my App to iTunes connect.
I had one problem during building application in the recent Xcode 5.1. Compilation fails with "Undefined symbols for architecture x86_64" error.
I build my project with Valid Architecture: armv7, armv7s and arm64. After switch to the newest environment (Xcode) I rebuild libzbar.a library in the same architecture ( I have done it based on solution found at: Linker Error in Xcode-5)
Maybe somebody also had same problem and finally he had solved it, please share with solution:)
I had the same problem and I solved that way:
Remove the reference of folder ZBarSDK from your project.
Download the version for armv7, arm7s and armv64 from this link .
Replace the older folder for the new, (Save a copy in case )
Add the new folder into your project.
Clean the project and Build.
Let me know if it works for you.
Recompile ZBar for iphone 6
Steps
Download the source code (you must have Mercurial for mac):
Open Terminal and run following commands
a. hg clone http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar
b. cd zbar
c. hg checkout iPhoneSDK-1.3.1
d. open iphone/zbar.xcodeproj
In the xcode project edit the "libzbar" scheme and select Release in Build configuration
Go to Build Settings set following Architectures
a. Architectures - >Standard architectures(armv7,armv72,arm64)
b. Valid Architectures -> arm64,armv7 armv7s
Compile libzbar for device AND for simulator, here the configuration:
Find the compiled libzbar.a and go in the folder using Teminal.app,
In My Case : /Users/kappe/Library/Developer/Xcode/DerivedData/zbar-gyozyrpbqzvslmfoadhqkwskcesd/Build/Products
In this folder you you should have two sub folder Release-iphoneos and Release-iphonesimulator
using xcode command line tools build your universal lib:
lipo -create Release-iphoneos/libzbar.a Release-iphonesimulator/libzbar.a -o libzbar.a
Now you can use the libzbar.a created, both in device and simulator.
Ref: xcode 5.1 - Undefined symbols for architecture x86_64 (zbar)
Make sure your libzbar.a contains all the architectures you needed in your project. You may need following to build for device and simulator:
armv7 armv7s arm64 i386 x86_64
You can test this using following command:
xcrun -sdk iphoneos lipo -info libzbar.a
for me: xcode 6, iphone 6 works the fpauer's method!
the way:
Remove the reference of folder ZBarSDK from your project.
Download the version for armv7, arm7s and armv64 from this link .
Replace the older folder for the new, (Save a copy in case )
Add the new folder into your project.
Clean the project and Build.
I had same problem yesterday and I was finally able to build with 64-bit simulator.
After the link you tried, I replaced the library and all the header files. but it wasn't enough. Then I also unlink the libzbar.a from Link Binary With Libraries on Bulid Phases and re-add the library. Then it was working.
Let me know if it works for you.
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/Bar 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!