Unable to build HERE SDK Premium for ios-arm64-simulator - ios

Having trouble building HERE SDK for iOS (Premium 3.19) for an ios-arm64-simulator. The error produced by Xcode 13 on an M1 pro processor is:
ld: building for iOS Simulator, but linking in dylib built for iOS, file 'Pods/HEREMaps/framework/NMAKit.xcframework/ios-arm64/NMAKit.framework/NMAKit'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After some research and testing it looks like HERE SDK's XCFramework folder as well as the Cocoapod configuration only include ios-arm64 and ios-x86_64-simulator. It looks like the podspec is attempting to fix this by overriding the target app's iOS simulator excluded architectures (adding excluded architecture "arm64"). This likely works fine in cases where only Cocoapod sourced libraries that include x86_64 are used in the target app. However, it's a problem when using libraries from other sources where there is no roll back option to x86_64 simulators (e.g. Swift Package Manager).
Is there a way to use lipo to generate ios-arm64-simulator from the two existing framework builds? Or is this something where ios-arm64-simulator needs to be built as another configuration from the HERE SDK source?

Let me tell you that we have already located this situation in the SDK and our team in charge of the SDK is working very hard to provide a solution to this problem in the next release of HERE SDK Premium.

Related

When publishing a project (swift 4.2) in the AppStore, an error occurs when linking the libPrinterSDK library.a

All kind time of day. The project on Swift uses the SDK for blueTouth printer Mini Thermal Printer POS-5805DD. The libPrinterSDK library (included with the printer) has been added to the root of the project.a and the PrinterSDK header file.h, header-file is connected via bridge, when you run the project on a real device-everything works correctly, no errors occur. But when you try to build a project to upload to the AppStore, at the very end when linovke libprintersdk library.a an error appears:
ld: bitcode bundle could not be generated because
'/Users/ivan/Documents/MyProject/PrinterSDK/libPrinterSDK.a
(GCDAsyncSocket.o)' was built without full bitcode. All object files
and libraries for bitcode must be generated from Xcode Archive or
Install build file
'/Users/ivan/Documents/MyProject/PrinterSDK/libPrinterSDK.a' for
architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If there is any experience of building a project with libPrinterSDK files.a and PrinterSDK.h, I would really appreciate any help. Thanks.
Im not sure your project has turn Enable Bitcode off yet, if not, try to set No like this image below and Archive project again.
If it doesn't work, you can refer here

How to fix this error " Could not find module 'CzsBleSdk' for architecture 'x86_64'; found: arm64, arm "

I'm working with bluetooth in an old project which was written in swift3 and i'm working on converting it in swift4 and I had this error
"Could not find module 'CzsBleSdk' for architecture 'x86_64'; found: arm64, arm"
I seems that your framework was built and published the binary for the real device - armv7, armv7s, arm64 and you try to run a build for a simulator - x86_64.
Usually when a publisher wants to share a library he should create a Universal aka Fat binary using lipo[About] command.
If it is open source project you can import the project and Xcode will solve this issue
If it is closed source you can try to find it on Cocoapods or ask the publisher to upgrade the framework
You are now using 64 bit architecture in your Swift 4 project. You'll need the latest CzsBleSdk SDK which supports 64-bit architecture. You can integrate that manually or using Pod. I personally recommend Pod.

Unable to build Xcode Project: clang error: linker command failed

I have a Unity project which I have successfully built for Android without issue. When trying to build for iOS I am encountering an issue once the project is in Xcode.
Unity compiles without any errors and creates an Xcode project.
Upon opening the Xcode project I have NO simulators available. I can get these simulators by selecting ios in the Supported Platforms section, at which point simulators become available - originally Supported Platforms is set to iphoneos. This seems extremely odd behaviour to me, and suggests something larger going wrong.
After getting a simulator to select I get the following error when trying to compile/run/build:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The full error is available on Pastebin (too large to post directly on here):
https://pastebin.com/3fYR8fE3
I'm really at a loss on what I can do. I have tried a number of things, including:
Building from Unity as Debug and Release
Building from Unity with 'Symlink Unity Libraries' on and off
Building from Unity with .Net 3.5 and .Net 4.* flavours
Manually adding the libiconv.2.dylib file in the linked frameworks tab as the .tbd equivalent
Setting the target minimum version of iOS to 9.0 (negates the need for libiconv.2.dylib entirely)
I am using latest versions of everything:
Unity 2018.2.17f1
Xcode 10.1
It seems like you have the library il2cpp built for another architecture, have you tried to change your target's "Build Settings > Build Active Architectures Only" to "No"?
However I made some researches and it seems that Unity for iPhone doesn't deploy on simulator. It only works on device or in the Unity editor. Check this link out

Build successfully for iOS Device But Build Error for iOS Simulator (Get other linker flag error)

I have been facing this lingering issue. When I try to Build the project by selecting iOS device in my Xcode it builds the code with out any error but when I trying the same with iOS simulator it shows me the following error.
ld: library not found for -lPods-ClientService
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The issue is that you are trying to use a library that you created yourself or downloaded from a 3rd party with your product, and the linker either not find it, or it does not contain a valid slice for the architecture / platform that you are trying to link.
It is most likely that the library is just an arm library, without an intel slice.
If you are building it yourself, this may be because the library and your app are in two separate Xcode projects. If you integrate them into a single project, the build system should take care of making sure that the library gets built for the correct platform and architecture(s) when building your app.

How to build Mantle v2 for iOS 7.0?

my project currently targets iOS 7.1 and up. I have built Mantle along with Carthage as described on the Mantle's GitHub site. But I get the following error when building my project:
ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later
(#rpath/Mantle.framework/Mantle) for architecture arm64 clang: error:
linker command failed with exit code 1 (use -v to see invocation)
Does somebody know how I could build the Mantle.framework for iOS 7.1 (preferably with Carthage) ?
If you want to target iOS 7.x then you cannot use frameworks as frameworks are only supported from iOS 8.0 onwards. Since Carthage creates frameworks, you also won't be able to use Carthage.
If you still want to use Mantle, either include its files into your project manually or use Cocoapods to build it as a static library using one of the existing Cocoapods spec files for Mantle.

Resources