Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS build failed, cannot find IAPPromotionObserver.m #1077

Closed
howg0924 opened this issue Aug 19, 2020 · 8 comments
Closed

iOS build failed, cannot find IAPPromotionObserver.m #1077

howg0924 opened this issue Aug 19, 2020 · 8 comments
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS

Comments

@howg0924
Copy link

Version of react-native-iap

4.5.2, manual installation

Version of react-native

0.59.9

Platforms you faced the error (IOS or Android or both?)

iOS

Expected behavior

build success

Actual behavior

Build failed due to unable to find IAPPromotionObserver.m

This is because IAPPromotionObserver.m is removed in #1039
but it is still referenced in ios/RNIap.xcodeproj/project.pbxproj

Remove that reference will fix the issue.

Tested environment (Emulator? Real Device?)

Steps to reproduce the behavior

Manually install RNIap by adding RNIap.xcodeproj to xcode and build

@danleveille
Copy link

@howg0924 Were you able to fix this issue yourself by just removing all of those references in project.pbxproj?

@gurol
Copy link

gurol commented Aug 23, 2020

A workaround might be adding IAPPromotionObserver.m file into /node_modules/react-native-iap/ios/IAPPromotionObserver.m

@howg0924
Copy link
Author

howg0924 commented Aug 23, 2020

@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.

@EgorKazachenko
Copy link

@howg0924 exactly so. no issue using pods

@hyochan
Copy link
Owner

hyochan commented Sep 26, 2020

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.

@hyochan hyochan closed this as completed Sep 26, 2020
@hyochan hyochan added 🙏 help wanted Extra attention is needed 📱 iOS Related to iOS labels Sep 26, 2020
@mkrn
Copy link

mkrn commented Sep 28, 2020

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

@vish2595
Copy link

vish2595 commented Feb 7, 2021

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

@aidan-doherty
Copy link

aidan-doherty commented Feb 16, 2021

Same issue here on react-native:0.59.10. react-native-iap:5.2.7 Does it not support this version of react-native with pod install? working fine for andorid as i upgraded due to the new google billing library v3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS
Projects
None yet
Development

No branches or pull requests

8 participants