4.5.2, manual installation
0.59.9
iOS
build success
Build failed due to unable to find IAPPromotionObserver.m
This is because IAPPromotionObserver.m is removed in https://github.com/dooboolab/react-native-iap/pull/1039
but it is still referenced in ios/RNIap.xcodeproj/project.pbxproj
Remove that reference will fix the issue.
Manually install RNIap by adding RNIap.xcodeproj to xcode and build
@howg0924 Were you able to fix this issue yourself by just removing all of those references in project.pbxproj?
A workaround might be adding IAPPromotionObserver.m file into /node_modules/react-native-iap/ios/IAPPromotionObserver.m
@danleveille Yes, open /node_modules/react-native-iap/ios/RNIap.xcodeproj in xcode and remove references of IAPPromotionObserver.m / IAPPromotionObserver.h.
Then go back your react native app and now your app can build without the issue.
This issue only occurred if you install RNIap manually by adding RNIap.xcodeproj to your RN project. I think it will not affect user who manually installs RNIap by Podfile.
@howg0924 exactly so. no issue using pods
IAPPromotionObserver is removed now in iOS. Feel free to reopen if you still find the issue with the recent version which is 4.6.3.
Believe there's still an issue with 4.6.3 while adding as a Library
clang: error: no such file or directory: '/Users/mac/Sites/eventlivernnew/node_modules/react-native-iap/ios/IAPPromotionObserver.m'
clang: error: no input files
Adding as pod didn't work due to this error:
[!] Unable to find a specification for `React-Core` depended upon by `RNIap`
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
react-native is 0.59.9
Believe there's still an issue with 4.6.3 while adding as a Library
clang: error: no such file or directory: '/Users/mac/Sites/eventlivernnew/node_modules/react-native-iap/ios/IAPPromotionObserver.m'
clang: error: no input files
Adding as pod didn't work due to this error:
[!] Unable to find a specification for React-Core depended upon by RNIap
You have either:
react-native is 0.59.9
Most helpful comment
@danleveille Yes, open /node_modules/react-native-iap/ios/RNIap.xcodeproj in xcode and remove references of IAPPromotionObserver.m / IAPPromotionObserver.h.
Then go back your react native app and now your app can build without the issue.
This issue only occurred if you install RNIap manually by adding RNIap.xcodeproj to your RN project. I think it will not affect user who manually installs RNIap by Podfile.