I’ve an Expo app which goes to speak with a bluetooth machine. The producer of the machine have given me a SDK as a swift framework. Let’s name it CustomBluetoothModule.framework
. I haven’t got it is supply code. It have a pre constructed binary. The framework’s folder even have an umbrella file with some header information in it. I am making an attempt to jot down a wrapper round this Framework utilizing an expo native module in order that I can use this within the React Native code. The issue is, as quickly as I place the framework contained in the native module, it offers me compile time errors saying the header information are lacking:
› Executing expo-web-browser Pods/ExpoWebBrowser » Copy generated compatibility header
› Executing native-module-test Pods/TestLocalModule » Copy generated compatibility header
› Compiling Pods/Pods-nativemoduletest » Pods-nativemoduletest-dummy.m
› Packaging Pods/Pods-nativemoduletest » libPods-nativemoduletest.a
› Executing nativemoduletest » [CP] Verify Pods Manifest.lock
› Executing nativemoduletest » [Expo] Configure challenge
› Copying ./PrivacyInfo.xcprivacy ➜ ios/nativemoduletest/PrivacyInfo.xcprivacy
› Copying ios/nativemoduletest/Supporting/Expo.plist ➜ ./Expo.plist
› Compiling nativemoduletest » SplashScreen.storyboard
❌ (/Customers/pubudu/Library/Developer/Xcode/DerivedData/nativemoduletest-denbynqwuqfmebgdbtkenakcxmew/Construct/Merchandise/Debug-iphoneos/TestLocalModule/TestLocalModule-umbrella.h:13:9)
11 | #endif
12 |
> 13 | #import "CustomBluetoothModule-umbrella.h"
| ^ 'CustomBluetoothModule-umbrella.h' file not discovered
14 | #import "CustomBluetoothModuleDevice.h"
15 |
16 | FOUNDATION_EXPORT double TestLocalModuleVersionNumber;
❌ (/Customers/pubudu/Library/Developer/Xcode/DerivedData/nativemoduletest-denbynqwuqfmebgdbtkenakcxmew/Construct/Merchandise/Debug-iphoneos/TestLocalModule/TestLocalModule-umbrella.h:13:9)
11 | #endif
12 |
> 13 | #import "CustomBluetoothModule-umbrella.h"
| ^ 'CustomBluetoothModule-umbrella.h' file not discovered
14 | #import "CustomBluetoothModuleDevice.h"
15 |
16 | FOUNDATION_EXPORT double TestLocalModuleVersionNumber;
The folder construction of the challenge is as follows:
As you possibly can see, there is a CustomBluetoothModuleDevice.h
file which has been imported in CustomBluetoothModule-umbrella.h
. The content material of the CustomBluetoothModule-umbrella.h
file is as follows:
#import "CustomBluetoothModuleDevice.h"
I created minimal reproducable instance right here: https://github.com/THPubs/native-module-test
In there, making an attempt to run npx expo run:ios --device
will give the above error. Please assist me repair this. I am not a lot conversant in Swift.
My TestLocalModule.podspec
:
Pod::Spec.new do |s|
s.identify="TestLocalModule"
s.model = '1.0.0'
s.abstract = 'A pattern challenge abstract'
s.description = 'A pattern challenge description'
s.creator=""
s.homepage="https://docs.expo.dev/modules/"
s.platforms = {
:ios => '15.1',
:tvos => '15.1'
}
s.supply = { git: '' }
s.static_framework = true
s.dependency 'ExpoModulesCore'
# Swift/Goal-C compatibility
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
}
s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}"
s.vendored_frameworks="CustomBluetoothModule.framework"
finish