Skip to main content
Question

Failed to build iOS app - Swift Compiler Error (Xcode): 'SubscriptionPeriod' is ambiguous for type lookup in this context


Forum|alt.badge.img+1

Failed to build iOS app - Swift Compiler Error (Xcode): 'SubscriptionPeriod' is ambiguous for type lookup in this context, also on IOS emulator; already built apps cannot load subscription products, it keeps load indefinitely.   

 

Launching lib/main.dart on iPhone 16 Plus in debug mode...

Xcode build done. 26.7s

Failed to build iOS app

Swift Compiler Error (Xcode): 'SubscriptionPeriod' is ambiguous for type lookup in this context
...Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/StoreProduct+HybridAdditions.swift:47:50

Swift Compiler Error (Xcode): 'SubscriptionPeriod' is ambiguous for type lookup in this context
...ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/StoreProduct+HybridAdditions.swift:64:54

Could not build the application for the simulator.
Error launching application on iPhone 16 Plus.

 

Please i need assistance on this Thank You! 

 

This post has been closed for comments

2 replies

Forum|alt.badge.img+1
  • New Member
  • 1 reply
  • May 2, 2025

I'm having the same problem… Here's what I found:

this issue would be due to Apple introducing a new typealias called SubscriptionPeriod in iOS 18.4, which I guess clashes with an existing class in RevenueCat, because namespacing in Swift is fun.

https://developer.apple.com/documentation/storekit/subscriptionperiod

So if the code is in RevenueCat, they will need to prefix it with RevenueCat eg RevenueCat.SubscriptionPeriod.

 

Link:

https://github.com/FlutterFlow/flutterflow-issues/issues/5635#issuecomment-2795943724


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 422 replies
  • May 15, 2025

Hi ​@paschal-3b3398 and ​@nick-weiss,

Xcode 16.3 and iOS 18.4 were released recently, and those updates contain some new StoreKit typealiases that caused a few compilation issues in our SDKs.

We have released an SDK update to fix that issue, in Flutter is the version `8.5.2`.

Upgrading to that version or higher should fix it.

 

Best,


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings