If you're building into your iPhone, you'll just need to support ARM64.If you're building a debug config, then it will only build for the CPU architecture of the destination's platform. If I don't exclude any architecture and platform, what will happen? The default Xcode ONLY_ACTIVE_ARCH settings for this are: It's because it prioritizes 'development speed' over 'complete correctness'. Yet a 'Debug' builds onto your physical devices won't attempt to build for a different platform or architecture. If you're using a Release config, then you'll end up archiving your product for BOTH arm64 and x86_64 architectures.ĭuring the archive process (often in your CI/CD) then things will fail because the simulator architectures are selected as well. Will you always be building for one combination? Otherwise some system libraries won't exist on the operating system, or the CPU instructions can't get processed. This ultimately means the built binary and the environment (device/simulator) you're running it in, will need to match. See How does building for iOS device and simulator actually differ?Īnd different CPU Architectures use different CPU instructions. This is because a macOS vs iOS vs iOS simulator will use different libraries. Simulator "generic/platform=iOS Simulator".When you build an app, you build for a specific platform and CPU Architecture combination. So I guess we should be good if we archive our app choosing that as a run destination. However, I noticed the documentation says (highlighted in the attached picture) that this setting will be ignored when we choose "Generic iOS Device/Any Device" as the run destination, since it doesn't define any specific architecture. During archiving applications usually take the "Release" configuration and since this will be creating a release build considering only the active architecture of the current run destination, with this approach, we may lose the slices for armv7, armv7s, etc. One thing I was concerned about that what will be the impact of this when we actually archive the libraries and applications. Target.build_configurations.each do |config|Ĭonfig.build_settings = "YES" podspec, you can always update the settings during installation of the pods: post_install do |installer| However, if you don't have access to the. However, this could be necessary for successful linting of podspecs. So it should be the responsibility of the consumer project to override the setting by some means. I personally don't like the second line since pods shouldn't pollute the target project and it could be overridden in the target settings, itself. You have to do the same for the Pod project until all the Cocoa pod vendors are done adding following in their Podspec. If you are using custom XCConfig files, you can simply add this line for excluding simulator architecture. To do that, navigate to Build Settings of your project and add Any iOS Simulator SDK with value arm64 inside Excluded Architecture. What may be going on here? I have not been able to reproduce this with a simpler project yet.īasically, you have to exclude arm64 for the simulator architecture, both from your project and the Pod project. I have nothing set in excluded architectures. Architectures is set to $(ARCHS_STANDARD). In Xcode 12, that setting goes away, as per Apple's documentation. Previously, the project had Valid Architectures set to: armv7, armv7s and arm64. When I go run lipo -info on the framework, it has: armv7s armv7 i386 x86_64 arm64. Unable to load standard library for target 'arm64-apple-ios11.0' When I do a build, I get the following error on a pod framework:īuilding for iOS Simulator, but linking in object file built for iOS, for architecture arm64 I have pulled the new beta of CocoaPods with Xcode 12 support (currently 1.10.0.beta 2). The codebase was previously in Objective-C, but now it contains both Objective-C and Swift, and uses pods that are Objective-C and/or Swift as well. I am trying to get a large (and working on Xcode 11!) project building in Xcode 12 (beta 5) to prepare for iOS 14.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |