libz.tbd, missing required architecture unknown - ios

My project uses libz.tdb in the build phases.
On the simulator, all is well. But when I try to run it on my iPhone 6, I get:
ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/usr/lib/libz.tbd, missing required architecture unknown in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/usr/lib/libz.tbd (3 slices)
Why is it looking for an "unknown" architecture?

Maybe its Architectures debug and release error.
First of all go to your projects Build Settings.
then go to Architectures in Build Settings.there is debug and release option in these option you want to select Standard architectures(armv7,armv64) - $(ARCHS_STANDARD).
In your plist file add Required device capabilities as string armv7.
May its working.

Related

ARCHS[#]: unbound variable in Xcode 12

Our iOS project is built successfully in Xcode 11. However, on Xcode 12, it shows an error like this:
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/NgoHoangLien/Library/Developer/Xcode/DerivedData/BeneKitten-asctqxwawireafgebpjujkfxjvcg/Build/Intermediates.noindex/BeneKitten.build/Debug-iphoneos/BeneKitten\ Dev.build/Script-6F989132ECCA2B13FEF9458F.sh (in target 'BeneKitten Dev' from project 'BeneKitten')
cd /Users/NgoHoangLien/Project/Benekitten-iOS
/bin/sh -c /Users/NgoHoangLien/Library/Developer/Xcode/DerivedData/BeneKitten-asctqxwawireafgebpjujkfxjvcg/Build/Intermediates.noindex/BeneKitten.build/Debug-iphoneos/BeneKitten\\\ Dev.build/Script-6F989132ECCA2B13FEF9458F.sh
sent 1868986 bytes received 70 bytes 3738112.00 bytes/sec
total size is 1868525 speedup is 1.00
/Users/NgoHoangLien/Project/Benekitten-iOS/Pods/Target Support Files/Pods-BeneKitten Dev/Pods-BeneKitten Dev-frameworks.sh: line 144: ARCHS[#]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code.
I followed guides on the internet to make "arm64" for EXCLUDED_ARCHS. Delete VALID_ARCHS. But it still cannot compile. I hope you the senior engineers, experts like you can help me.
Note :- React native developers
After wasting couple of hours only solution that worked for me was
Open VSCode and go to directory ios/App/App.xcodeproj/project.pbxproj that file
and perform a search EXCLUDED_ARCHS
EXCLUDED_ARCHS = arm64;
and delete everyline containing EXCLUDED_ARCHS
For Xcode 12.3, when there is no VALID_ARCHS property, follow below steps:
Build Settings -> Build Active Architecture Only -> Debug -> Yes
Add "arm64" in "Excluded Architectures" in build settings of both project and pods project, to run the app in simulator. Remove it while making build on device or archiving the app.
You may try below steps:
In Main Project(Not TARGETS), Go to build settings and add Simulator-iOS 14.0 SDK with value arm64 inside Excluded Architecture and repeat the same for the Pod project too.
Delete VALID_ARCHS from your Main project and Pod project both.(You may open the project file in editor to delete this) [You already did this ✅ ]
Upgrade all Pods to the latest version available.
Last, Clean Project and Re-Build.
I got this error in my React Native app and finally found the issue and the fix.
Initially I added the arm64 for all 4 like this in Build Settings -> Architectures -> Excluded Architecture. And this was my issue.
But it should be like this. Only for Any iOS Simulator SDK in both Debug and Release.
Then my error fixed.
I think this will help you. Happy coding!
In my case for Xcode 13.1, Here's what I did:
Build Settings -> Build Active Architecture Only -> Debug -> No (both project and pods project)
Remove the "arm64" in "Excluded Architectures" in build settings of both project and pods project.
I was running on my real device if you try with simulator you might need to do the opposite
In our case, we needed to add x86_64 to VALID_ARCHS to build on simulator.
Make sure that in your
Project -> build settings -> Excluded Architecture
and
Pods -> build settings -> Excluded Architecture
The same values.
In my case, this soap is due to in Project architecture was arm64 but in Pods nothing
Just remove arm64 from Excluded Architecture if you start Archive or installing on real device
All the answers here are probably wrong for your project, and have the potential of breaking your project. You can only remove excluded archs completely if all your pods use xcframework and are ready for the arm64 simulator architecture.
The correct answer is to remove excluded archs from directly to the right of "Debug" and "Release", and add arm64 for excluded arch for "Any iOS Simulator SDK" only:
Adding arm64 as an excluded arch directly to the right of "Debug" and "Release" will exclude arm64 for the physical iOS device, and all physical iOS devices are arm64, hence why the build cannot be packaged.
The Build Settings editor no longer includes the Valid Architectures build setting (VALID_ARCHS), and its use is discouraged. Instead, there is a new Excluded Architectures build setting (EXCLUDED_ARCHS). If a project includes VALID_ARCHS, the setting is displayed in the User-Defined section of the Build Settings editor. (15145028)
-> https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes
It works for me by removing VALID_ARCHS lines on my project.pbxproj
you need to open this page and delete excluded architectures inside debug and release section if it is default arm64 delete it!
clean your project (cmd + shift + k)
clean derived data (dev.cleaner)
and restar your mac
I've got the same issue here.
I want to launch the application either on a connected device or on a simulator. And I get the error ARCHS[#] unbound variable trying to use the simulator.
Steps to fix the issue:
Choose the architecture either x86_64 for the simulator or arm64 for the device picture 1
Check VALID_ARCHS list contains the target architecture picture 2
Launch pod install command (the step propagates the right architecture to the pod-generated Xcode projects)
Build and launch the application
In build-settings, set VALID_ARCHS to $(ARCHS_STANDARD).
i had the same issue once we converted to XCFramework,
fixed by(still not for debugging and only for archiving)
1.build active architecture only - YES
2.remove arm64 from excluded architecture( if it was given)
3.valid_archs - arm64 (only arm64 )
after that i am able to build successfully on "any device"

How to switch flutter plugin architecture from arm64 to armv7

When I tried to decrease my flutter app's deployment target (iOS 12 to 9.3), I received this error when running flutter build ios:
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
fatal error: lipo: -extract armv7 specified but fat file:
/Users/xxx/development/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/flutter_webview_plugin.framework/flutter_webview_plugin does not contain that architecture
Failed to extract armv7 for /Users/xxx/development/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/flutter_webview_plugin.framework/flutter_webview_plugin. Running
lipo -info:
Architectures in the fat file: /Users/xxx/development/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/flutter_webview_plugin.framework/flutter_webview_plugin are:
arm64
I am unable to find any information on how to change the architecture in question - can I even do this? Or is this something the plugin developer has to build in?
I would like to be able to run the app with the lowest possible iOS version for maximum compatibility.
In the project build settings, there is a section called Architectures, there you can set the ones you need. As far as I know, the latest iPhones need to use arm64, but in my picture you can see that I'm also set as valid armv7, that seems to be your problem.

Xcode 6.3 missing required architecture arm64 [duplicate]

Just upgraded to Xcode 5.1, getting the following error:
ignoring file
...Dependencies/SalesforceNetworkSDK/libSalesforceNetworkSDK.a,
missing required architecture arm64 in file
...Dependencies/SalesforceNetworkSDK/libSalesforceNetworkSDK.a (3
slices)
If I turn off build active archs only and remove arm64 from valid archs I get:
Build/Products/Debug-iphoneos/libPods.a, file was built for archive
which is not the architecture being linked (armv7)
According to apple's release note, see the following note point.
Note:
Be aware of the following architectures issues when opening your
existing projects in Xcode 5.1:
When building for all architectures, remove any explicit
architectures setting and use the default Standard Architectures
setting. For projects that were previously opted-in using “Standard
Architectures Including 64-Bit”, switch back to the “Standard
architectures” setting.
When opening an existing project for the first time, Xcode 5.1 may
display a warning about the use of the Xcode 5.0 architectures
setting. Selecting the warning provides a workflow to revise the
setting.
Projects not able to support 64-bit need to specifically set the
architectures build setting to not include 64-bit.
So you've to set architecture as below to support libs architecture.
Reference from this post.
Update: From May 15, you've to take build from 5.1.1, see this post.
Don't know previous iOS but Setting Build Active Architecture Only to YES in iOS 8 did the trick.
I ended up getting my project to build by (1) turning off build active archs only (2) removing arm64 from valid archs and (3) making sure that the Pods project was building for only armv7 and armv7s.
Also worth noting here, that at the time of writing this edit, Salesforce mobile SDK was not available for arm64
I just changed the Debug from Yes to No,
Build Settings -> Architectures -> Build Active Architecture Only -> Debug -> NO.
This one fixed my error.

Xcode Validating App: No architectures?

i using xcode 5.1 and i would like to validate my product. Here is the error, that i get:
No architectures in the binary. Lipo is failed to detect any architectures in the bundle executable
I have Standard Architectures in the Build Settings and armv7 and armv7s in Valid architectures(i tried even with all of them) and Build active architectures is set to No.
I have no idea what happening here. I think if i can't resolve this I'll Distribute it without Validation... Please help me
My Deployment target is 7.0
Check your target deployment target and Architectures.
Kindly refer this link as well Xcode 5 and iOS 7: Architecture and Valid architectures

Supress `missing required architecture i386` warning for Optional Frameworks?

I have some Framework linked as OPTIONAL (using camera), so it won't compile for Simulator, which is great. The app builds, runs fine on Simulator.
Is there any way to supress missing required architecture i386 warning when build for Simulator?
Full warning:
ld: warning: ignoring file <WhateverFramework>, missing required architecture i386 in file <WhateverFramework> (2 slices)
An "Optional" framework is optional at runtime only. It is required to be present at build time.
You can use platform-specific build settings to avoid linking to that framework at all in simulator builds.

Resources