HMS-Core / hms-react-native-plugin

This repo contains all of React-Native HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
245 stars 68 forks source link

iOS builds broken with react-native-hms-analytics #83

Closed Aletagro closed 3 years ago

Aletagro commented 3 years ago

Description Add @hmscore/react-native-hms-analytics in project, add the AppGallery Connect configuration file and run the pod install command:

[!] Unable to determine Swift version for the following pods:

- react-native-hms-analytics does not specify a Swift version and none of the targets (`Sima`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

Environment

rozeridilar commented 3 years ago

Hello, thank you for informing. Can you please delete package-lock.json and try running the project with react-native-hms-analytics -version 5.1.0-300-02?

Aletagro commented 3 years ago

Hello, thank you for informing. Can you please delete package-lock.json and try running the project with react-native-hms-analytics -version 5.1.0-300-02?

Thanks for the answer. But it didn't help

rozeridilar commented 3 years ago

I created a new project by running following command: $ react-native init newproject then added react-native-hms-analytics in package.json file and ran $ npm install then directed into ios file and ran $ pod install and everything works. Even with 5.1.0-300-01 version it was working. I think the problem is in your XCode target. Have you configured SWIFT_VERSION in Build Settings earlier?

If you are not using swift in your project,

If you have implemented swift earlier in your project, Make sure you followed below statements: