Inateck-Technology-Inc / ios_sdk

0 stars 1 forks source link

Issue with Mach-O File in 'libuniffi_scanner.a' during iOS SDK Integration #1

Closed pniteshnoble closed 4 months ago

pniteshnoble commented 8 months ago

I am facing an issue when attempting to integrate the iOS SDK (ios_sdk) into my project. The error message states: "Archive member '/' not a mach-o file in '/Users/user/Downloads/ios_sdk-master/ios_sdk/lib/libuniffi_scanner.a'". This error occurs during the build process and prevents successful compilation.

Steps to Reproduce:

  1. Download the iOS SDK from the official repository.
  2. Attempt to build the project.

Error: The build process fails with the error message: "Archive member '/' not a mach-o file in '/Users/user/Downloads/ios_sdk-master/ios_sdk/lib/libuniffi_scanner.a'".

Additional Information:

Xcode Version: 15.1 iOS SDK Version: 17.2

Attached is a screenshot of the error encountered during the build process. Screenshots:

Screenshot 2024-02-29 at 1 35 51 PM
kantilalpatel commented 7 months ago

@pniteshnoble Did you able to figure out the solution for this?

pniteshnoble commented 7 months ago

@pniteshnoble Did you able to figure out the solution for this?

Not yet, I will surly post here, If I found any solution.

soSeven commented 5 months ago

The new version is available for use.

bentayloruk commented 5 months ago

@soSeven this is great! I was literally writing to ask if anyone had a solution to this and your comment popped up in front of me! I'll give it a go now.

bentayloruk commented 5 months ago

@soSeven I've got the latest version and am on the master branch, but I get a lot of build errors. Should the project build "out of the box" or are there steps I need to take before it will work? I'm not finding the README very clear on this point. I'm a newbie to XCode and iOS development, but have years of general programming experience, so sorry if this is a dumb question!

Undefined symbol: enum case for InateckScannerBleKit.BLEManager.ScanStatus.scan(InateckScannerBleKit.BLEManager.ScanStatus.Type) -> (InateckScannerBleKit.BLEDevice) -> InateckScannerBleKit.BLEManager.ScanStatus

Undefined symbol: enum case for InateckScannerBleKit.BLEManager.ScanStatus.stop(InateckScannerBleKit.BLEManager.ScanStatus.Type) -> InateckScannerBleKit.BLEManager.ScanStatus

Undefined symbol: enum case for InateckScannerBleKit.BLEManager.ScanStatus.start(InateckScannerBleKit.BLEManager.ScanStatus.Type) -> InateckScannerBleKit.BLEManager.ScanStatus

Undefined symbol: type metadata accessor for InateckScannerBleKit.BLEManager.ScanStatus

Undefined symbol: dispatch thunk of InateckScannerBleKit.BLEManager.scanDevices(timeoutAfter: Swift.Double, completion: (InateckScannerBleKit.BLEManager.ScanStatus) -> ()) -> ()

Undefined symbol: dispatch thunk of InateckScannerBleKit.BLEManager.disconnectHandler.setter : ((InateckScannerBleKit.BLEDevice) -> ())?

Undefined symbol: static InateckScannerBleKit.BLEManager.shared.getter : InateckScannerBleKit.BLEManager

Undefined symbol: dispatch thunk of InateckScannerBleKit.BLEManager.devices.getter : [InateckScannerBleKit.BLEDevice]

Undefined symbol: dispatch thunk of InateckScannerBleKit.BLEManager.stopScan() -> ()

Undefined symbol: type metadata accessor for InateckScannerBleKit.BLEManager

Undefined symbol: InateckScannerBleKit.MessageManager.getVersion((Swift.Result<Swift.String, Swift.Error>) -> ()) -> ()

Undefined symbol: InateckScannerBleKit.MessageManager.getBatteryInfo((Swift.Result<Swift.Int, Swift.Error>) -> ()) -> ()

Undefined symbol: InateckScannerBleKit.MessageManager.getSettingInfo((Swift.Result<(Swift.String, Foundation.Data), Swift.Error>) -> ()) -> ()

Undefined symbol: InateckScannerBleKit.MessageManager.setSettingInfo(with: Swift.String, completion: (Swift.Result<(Swift.String, Foundation.Data), Swift.Error>) -> ()) -> ()

Undefined symbol: InateckScannerBleKit.MessageManager.getHardwareInfo((Swift.Result<Swift.String, Swift.Error>) -> ()) -> ()

Undefined symbol: InateckScannerBleKit.BLEDevice.disconnect(completion: (Swift.Result<(), Swift.Error>) -> ()) -> ()

Undefined symbol: enum case for InateckScannerBleKit.BLEDevice.ConnectType.connecting(InateckScannerBleKit.BLEDevice.ConnectType.Type) -> InateckScannerBleKit.BLEDevice.ConnectType

Undefined symbol: enum case for InateckScannerBleKit.BLEDevice.ConnectType.disconnected(InateckScannerBleKit.BLEDevice.ConnectType.Type) -> InateckScannerBleKit.BLEDevice.ConnectType

Undefined symbol: enum case for InateckScannerBleKit.BLEDevice.ConnectType.disconnecting(InateckScannerBleKit.BLEDevice.ConnectType.Type) -> InateckScannerBleKit.BLEDevice.ConnectType

Undefined symbol: enum case for InateckScannerBleKit.BLEDevice.ConnectType.none(InateckScannerBleKit.BLEDevice.ConnectType.Type) -> InateckScannerBleKit.BLEDevice.ConnectType

Undefined symbol: enum case for InateckScannerBleKit.BLEDevice.ConnectType.connected(InateckScannerBleKit.BLEDevice.ConnectType.Type) -> InateckScannerBleKit.BLEDevice.ConnectType

Undefined symbol: type metadata accessor for InateckScannerBleKit.BLEDevice.ConnectType

Undefined symbol: dispatch thunk of InateckScannerBleKit.BLEDevice.connectState.getter : InateckScannerBleKit.BLEDevice.ConnectType

Undefined symbol: InateckScannerBleKit.BLEDevice.messageManager.getter : InateckScannerBleKit.MessageManager

Undefined symbol: dispatch thunk of InateckScannerBleKit.BLEDevice.name.getter : Swift.String?

Undefined symbol: dispatch thunk of InateckScannerBleKit.BLEDevice.uuid.getter : Swift.String

Undefined symbol: InateckScannerBleKit.BLEDevice.connect(timeout: Swift.Double, completion: (Swift.Result<(), Swift.Error>) -> ()) -> ()

Undefined symbol: type metadata accessor for InateckScannerBleKit.BLEDevice

Undefined symbol: nominal type descriptor for InateckScannerBleKit.BLEDevice

Linker command failed with exit code 1 (use -v to see invocation)
bentayloruk commented 5 months ago

From the build log, it looks like this is due to a CPU architecture config issue or something. Posting here in case this helps, but will investigate (and learn!) further. Will raise as a new issue if I can't get it going.

image
soSeven commented 5 months ago

Please run the demo on a real device, not on an emulator.

bentayloruk commented 5 months ago

Thank you for the reply @soSeven! I figured this out a little while later and have the app running on my phone. Unfortunately, my BCST-73 requires a firmware update to work with the SDK, so I'm waiting on Inateck support to provide the firmware file. I was suprised it is not possible to download it.