Closed kickbk closed 7 months ago
@bandit-ibayashi we created a repo with a minimal project that reproduces this build-time issue: https://github.com/instamenu/starmicronics-example
The readme in that repo is an excerpt from the build log with the errors.
For those looking for a working solution: https://github.com/kickbk/react-native-star-io10 It probably needs to be updated to integrate the updates from https://github.com/star-micronics, but it'll work. Some of the fixes we introduced in the fork are hardcoded and there's a need for matching your project's Kotlin version with the one used by the lib, hence the "kotlin" branch for lack of time adding it via a config plugin. I'm not currently maintaining this fork since I don't use the library in my project.
@kickbk @marvinklein I'm afraid for not responding to this request for a long time.
Our React Native project uses native code, so we didn't consider Expo. But we noticed the official document that contained this sentence has been updated. So we are investigating this matter again, taking into account the hints we received from everyone.
We would like to thank everyone for their cooperation, and please wait a little longer to find out whether Expo will be possible or not, and if so, how we can respond.
We found to be able to support "use_frameworks" by modifying .podspec file.
Method
yarn install
, etc.)Modification
Please add the following code the above s.vendored_frameworks = 'ios/libs/StarIO10.xcframework'
.
if ENV['USE_FRAMEWORKS']
header_search_path = [
'$(SRCROOT)/../../node_modules/react/** $(SRCROOT)/../../node_modules/react-native/**'
]
exclude_source_file_name = [
'libs/StarIO10.xcframework/ios-arm64_x86_64-simulator/StarIO10.framework/Headers/*.h libs/StarIO10.xcframework/ios-arm64_x86_64-simulator/StarIO10.framework/PrivateHeaders/*.h'
]
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => header_search_path.join(" "),
"EXCLUDED_SOURCE_FILE_NAMES" => exclude_source_file_name.join(" ")
}
end
We found to be able to support "use_frameworks" by modifying .podspec file.
Method
- Download current react-native-star-io10 (
yarn install
, etc.)- Add the following code to the react-native-star-io10.podspec file located in the node_modules directory.
- Build it.
Modification
Please add the following code the above
s.vendored_frameworks = 'ios/libs/StarIO10.xcframework'
.if ENV['USE_FRAMEWORKS'] header_search_path = [ '$(SRCROOT)/../../node_modules/react/** $(SRCROOT)/../../node_modules/react-native/**' ] exclude_source_file_name = [ 'libs/StarIO10.xcframework/ios-arm64_x86_64-simulator/StarIO10.framework/Headers/*.h libs/StarIO10.xcframework/ios-arm64_x86_64-simulator/StarIO10.framework/PrivateHeaders/*.h' ] s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_path.join(" "), "EXCLUDED_SOURCE_FILE_NAMES" => exclude_source_file_name.join(" ") } end
@bandit-ibayashi will this fix be committed anytime soon?
We have released an updated version that includes the above reflections. Thank you for your patience!
react-native-star-io10
currently does not supportuse_frameworks!
which means it cannot work alongside many popular libraries, such asreact-native-firebase
. Flipper is another library that doesn't supportuse_frameworks!
and trying to meddle with overrides in the podfile will ultimately fail if using Firebase storage or Firebase functions. Could we havereact-native-star-io10
suuportuse_frameworks!
soon? Is it complicated to add support for it? If it's simply achievable some edits to the Podfile, please share instructions.