iPhone apps with a deployment target lower than 4.3 should include an armv6 architecture - xcode

I have a problem :-( When I build my application for release XCode shows a warning saying:
iPhone apps with a deployment target lower than 4.3 should include an armv6 architecture (current IPHONEOS_DEPLOYMENT_TARGET = "3.0", ARCHS = "armv7").
But how can I set armv6 in my build settings? I'm using XCode 4.2 and here's my build settings:
Thanks!

I haven't used the version, but the current Xcode won't support signing for iOS 2.0 , so when iOS 5 comes out, 3.0 might have the same issue of not being supported
This is from http://www.weston-fl.com/blog/?p=3050 (This site has helped me resolve so many errors, so props to Mike D.)
In Xcode navigate to Build Settings and find Architectures group (it’s on the top, so hard to miss). Add armv6 to Architectures line. It should contain armv6, armv7 or Standard (armv6 armv7)
Set Base SDK to Latest iOS (currently set to iOS …)
Uncheck Build Active Architecture Only or set it to NO.
Valid Architectures must show armv6 armv7
When your project uses your own dependent libraries, build them with the same (correct) configuration.

Related

XCFrameworks missing slices

I'm working on a framework that has two dependencies, one of them is built to support iOS10 and has armv7 and i386 slices and arm64 and x86_64. The second is iOS11+, and there are no arm7 and i386.
So, I set my own framework min iOS version to 11. But the build failed due to the missing slices (armv7) in the iOS 11 framework.
Is there any chance to build my framework by ignoring armv7 and i836 slices from the dependent framework?
Both frameworks are added by cocoapods.
Thanks in advance.

Mac Catalyst build fails with "building for Mac Catalyst-x86_64 but attempting to link with file built for Mac Catalyst-arm64"

After updating to Xcode 12.2, my project started failing to compile because of Apple Silicon-related linking errors. I seem to have most of them fixed, but one sub-project that builds a statically-linked framework is giving me problems. And yet a sibling sub-project with apparently identical build settings doesn't.
During linking, I get this warning about the one framework:
ld: warning: ignoring file ...Build/Products/Debug-maccatalyst/TCSiOSC.framework/TCSiOSC, building for Mac Catalyst-x86_64 but attempting to link with file built for Mac Catalyst-arm64
I'm building on an Intel Mac, to boot (so "build active architecture only" is not a factor). I can't find any build setting that would address this problem, and a Web search turns up no hits on this exact error. Any ideas appreciated!
I consulted Apple for this one, and their engineer recommended some things:
Turn any Swift sub-projects into Swift packages, not embedded Xcode projects. So, I deleted one library's Xcode project from the parent project, and dragged its top-level directory into the parent project to include it as a Swift package. Now... this particular sub-project (SQLite.swift) already had a Swift package defined. I haven't generated a Swift package myself before, so I can't help with that. Also, don’t forget to add it to the Frameworks, Libraries, and Embedded Content list on the app’s target.
Go into your project's build settings and delete the "Supported platforms" setting. If you click on the "levels" button above the build-settings list, you can see where each setting is coming from. "Supported platforms" should be non-bold. Highlight the line and press Delete if it's bold. Then go into your target and do the same thing: delete "Supported platforms."
Set the Base SDK at your project (top) level to iOS; this is a must. Delete it from the target level, so it inherits from the project; I don't know if this holds true for multiple kinds of targets or all projects, but it's working for me.
Remove the VALID_ARCHS build setting from all targets, if it's present. That setting is deprecated.
The "build active architecture" setting doesn't make any difference after these changes in my case. The project now builds and runs under Catalyst just fine.
I have the same issue and found this question. In my case, building on Debug succeeds but on Release fails. The reason is exactly the "build active architecture only" option. It is an option can be found in your PROJECT - "Build Setting" Tab then "Architectures" section. There is a setting for "Build active architecture only". By default, the Debug mode it is Yes while Release mode it is no. That caused my build to fail in release.

How to set a watchOS minimum deployment target?

I just upgraded to Xcode Version 10.3 (10G8) and can now no longer run my app on the watch simulator. I get the error message
Apple Watch Series 2 - 38mm runs watchOS 5.3, which is lower than
XXX’s minimum deployment target. Change your project’s minimum
deployment target or upgrade Apple Watch Series 2 - 38mm’s version of
watchOS.
However, the deployment target of the Watch target as well as the Watch Extension target are both set to 4.0. 4.0 is also the highest deployment target that I can set in Xcode.
I thought these were the minimum deployment targets, but maybe they are not.
Any suggestions?

Google iOS SDK fails to archive (use of undeclared identifier errors)

I have attempted to archive my project for submission to App Store, however, every time I get errors "use of undeclared identifier" for everything related to google iOS SDK. The application itself runs and builds flawlessly with the discussed SDK integrated, the only thing that fails is the archive process. I have tried both cocoa pods and manual method of integration (separately, of course). Furthermore, I used the latest xCode versions (6.4 and 7 beta 4) on two different macs running OS X 10.10.4. This is the guide I have been using.
Your issue has something to do with the configuration of archiving in combination with your Release settings. If you change the scheme settings Command + < to use the Debug configuration for archiving, you may be able to successfully archive your app. This means that somewhere you are probably not matching the Debug and Release configurations.
See the following screenshot for example project Build Settings that are missing the Swift bridging header in release:
Add bridge.h to the release configuration and you will be able to build with the Release schema and you will be able to archive under release configuration.

Linker errors for gcov in Xcode

When adding gcov to an Xcode project, I'm getting linker errors: the symbols __gcov_init and __gcov_merge_add are not found.
This is on Mac OS X 10.5 and Xcode 3.1.4, it's a Quartz Composer Plugin project and I'm trying to add gcov to the OCUnit test cases target. The Base SDK and Deployment Target are both set to Mac OS X 10.5. The GCC version is set to 4.0.
I was able to successfully create another (very simple) Quartz Composer Plugin project with gcov and OCUnit. I may be missing something but the build settings between the two projects seemed identical in anything that could possibly affect gcov linkage. (The only differences I see are the C Language Dialect, some extra settings in the not-working project for Interface Builder Compiler, and a user-defined setting that runs Clang.)
Any suggestions would be appreciated.
Shaggy Frog had the right idea-- the -lgcov flag was not appearing in the output. My project had a unit testing target and separate configurations for with and without coverage. The Other Linker Flags setting was different in the unit testing target and the coverage configuration, with -lgcov being set in only one of those. Instead of adding in all of the flags, Xcode was overriding one set of flags with the other.

Resources