purchases-ios: 'SubscriptionPeriod' is ambiguous for type lookup in this context - iOS 18.4
Can’t compile project.
iOS 18.4 Purchases 5.20.2
var unit: SubscriptionPeriod.Unit?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 14
- Comments: 31 (7 by maintainers)
Same issue with React Native and
"react-native-purchases": "^7.28.0"when trying to build on top of Expo SDK 53.Bumping the dependency to the latest version (i.e.
8.9.6) fixed the issue.Also experiencing this issue in Kotlin Multiplatform for the iOS-target.
purchases-kmp = "1.8.0+13.32.0"👀 We’ve just linked this issue to our internal tracker and notified the team. Thank you for reporting, we’re checking this out!
@fire-at-will Thanks a bunch man, I solved it with the Flutter SDK version 8.5.2, Thanks a lot, I was stuck for a day. This and other bunch of errors appeared out of nowhere after updating the iOS simulator version to 18.4. i regretted updating it afterward, and there is no workaround that, to build ios you gotta switch to the updated version
Hi @fire-at-will I updated to version 5.20.2, and it worked. Thank you!!
@fire-at-will you are the best. I’ll always take your SubscriptionPeriod over Apple’s.
Hi everyone!
@haarj You should be able to resolve the ambiguity in your code by prefixing the class with
RevenueCat, like so:Let me know if that works for you!
@lrochadel That issue should have been resolved in SDK version 5.18.0. Can you try updating to the most recent SDK version (5.20.2) and see if that resolves your issue?
@iamsannyrai Can you ensure that you’re on a recent version of purchases-flutter? I believe that specifying
purchases_flutter ^6.24.0won’t ever update past the 6.X.X series of releases, so you’re missing out on the 7.X and current 8.X releases. When updating to the most recent SDK version, please make sure that you upload your in-app purchase key (instructions here) to make sure that purchases will continue to work with StoreKit 2.If that doesn’t work, can you please provide more details on the compilation issue, including the full error message, and the affected file/line number?
Thanks y’all! 🙌
Hello, same issue,
Flutter: 3.22.2 Purchases: 8.1.0 | 8.8.1 | 9.0.0-beta.1 // tried each of those options Xcode: 16.3
Can we open this thread as the issue is still not resolved?
Hey y’all, since this issue has been resolved, I’m going to go ahead and close out the issue. Feel free to open another issue or reach out to support if you run into any other issues.
Thanks!
@fire-at-will, thanks! I’ll try that again soon. When I tried that change earlier today, shortly after my initial comment, I wasn’t able to change the version number for the Dependency Rule for purchases-ios. I’m not sure why I couldn’t change the version number, but I’ll try that in another iOS project.
@ahmedtanjim What is the version of the Flutter RevenueCat SDK that you’re using? This issue should be resolved in version 8.5.2 of the RevenueCat Flutter SDK. Updating to the most recent version of the RevenueCat SDK should fix the issue.
When updating to the most recent SDK version, please make sure that you upload your in-app purchase key (instructions here) to make sure that purchases will continue to work with StoreKit 2.
@ahmedtanjim Does updating to the most recent Flutter SDK version resolve the issue for you? If not, can you provide the version of the Flutter SDK you’re using along with the exact build error, including the file and line number?
Thanks!