Comments (7)
I also tried creating a brand new project in Xcode and only adding the following code in didFinishLaunching (after installing the Pod). I still get the same error on a breakpoint on if let packages = ...
Purchases.debugLogsEnabled = true
Purchases.configure(withAPIKey: "my-api-key")
Purchases.shared.offerings { (offerings, error) in
if let packages = offerings?.current?.availablePackages {
}
}
from purchases-ios.
What version of Purchases is actually installed? Your cocoapods might be out of data and these examples reference a more recent version of Purchases.
from purchases-ios.
@jeiting pod 'Purchases', '3.0.0'
from purchases-ios.
Is it possible your Xcode intermediates are in a bad state?
Have you tried deleting DerivedData?
from purchases-ios.
So after deleting DerivedData, this no longer shows an error:
Purchases.shared.purchaserInfo { (purchaserInfo, error) in
// I get Optional<RCPurchaserInfo> here
}
However, when I try this:
Purchases.shared.offerings { (offerings, error) in
if let packages = offerings?.current?.availablePackages {
self.packages = packages
}
}
If I do po offerings
I get
▿ Optional<RCOfferings>
- some : <Offerings {
currentOffering=(null)>
If I hover over offerings
in Xcode I get the error:
Printing description of offerings:
expression produced error: error: /var/folders/9m/qr_cnwq903n_f_xf0nbgcf140000gn/T/expr45-d72fda..swift:1:90: error: 'Purchases' is not a member type of 'Purchases'
Swift._DebuggerSupport.stringForPrintObject(Swift.UnsafePointer<Swift.Optional<Purchases.Purchases.Offerings>>(bitPattern: 0x10a329ea0)!.pointee)
from purchases-ios.
I think the "expression produced error" thing may be a Swift/Xcode issue. I think the real problem is that I'm not getting any offerings. I have them set up in the admin as well as marking one of them as "current". DEBUG shows that I have invalid product identifiers. I've triple-checked those though and I can successfully pull products down from native IAP code and SwiftyStoreKit using those identifiers. I submitted a tech support ticket about this over the weekend if you have a minute to check that out. 🙏
from purchases-ios.
Closing this since it looks like it's been solved and another issue has been opened.
from purchases-ios.
Related Issues (20)
- purchases-ios stuck fetching in Xcode HOT 4
- SPM install takes forever HOT 17
- /v1/receipts api returns status_code 529 HOT 7
- Paywall language changes on every app re-install HOT 6
- "can't find package" error. HOT 4
- Add support for the native macOS platform to the RevenueCat Paywalls HOT 2
- Way to test Promotions in-app purchases from Store HOT 1
- Unable to fetch offering on real device when using Storekit file HOT 5
- Weird state of checkTrialOrIntroDiscountEligibility HOT 6
- Bug: Writing Keys out of container HOT 7
- macOS App hanging for at least 2000 ms because of check for macOS app running on the main thread. HOT 2
- CustomerInfo needs subscriptions. HOT 6
- Subtle Paywall localization issue HOT 4
- Offerings returns available offerings, then doesn't use them HOT 3
- Template 4 As Paywall Footer Has Incorrect Size While Loading, And Never Resizes Afterwards HOT 7
- 'StoreProduct' is ambiguous for type lookup in the context when using RevenueCat with Superwall-iOS v.3.6.3 HOT 4
- "Sign in with Apple ID" modal dialog (with user already signed into App Store app) when calling `purchasePackage` HOT 10
- Should the func onChangeOf<V> be private? HOT 6
- `Xcode 16` / `iOS 18`: Thread 21: EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff8) in ETagManager.Response.encode(to:) HOT 21
- Bug: Last opened is not what is supposed to be. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purchases-ios.