Unclear how to get the free trial duration in iOS release builds #57
Replies: 2 comments
-
I ended applying this patch which solved the iOS release build issue: diff --git a/node_modules/expo-iap/ios/ExpoIapModule.swift b/node_modules/expo-iap/ios/ExpoIapModule.swift
index 51ff38f..af4abee 100644
--- a/node_modules/expo-iap/ios/ExpoIapModule.swift
+++ b/node_modules/expo-iap/ios/ExpoIapModule.swift
@@ -124,8 +124,8 @@ func serializeProduct(_ p: Product) -> [String: Any?] {
"id": p.id,
"title": p.displayName,
"isFamilyShareable": p.isFamilyShareable,
- "jsonRepresentation": serializeDebug(
- String(data: p.jsonRepresentation, encoding: .utf8) ?? ""),
+ "jsonRepresentation": String(
+ data: p.jsonRepresentation, encoding: .utf8) ?? "",
"price": p.price,
"subscription": p.subscription,
"type": p.type, |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is a really good catch! Thank you for sharing and providing the detailed analysis. I've implemented the fix in #69. Please feel free to submit PRs whenever you discover other issues in the future - your contributions are very much appreciated! Thank you again for bringing this to our attention. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was able to determine the free trial duration period from the
jsonRepresentation
property when developing with an expo development client but I discovered that this property isnull
for iOS release builds. Is this for performance reasons? I didn't see thatexpo-iap
does export anisEligibleForIntroOffer
function but that still doesn't give me the free trial duration. Right now I'm considering forking the project and removing thedebugSerialize
call in expo-iap/ios/ExpoIapModule.swiftBeta Was this translation helpful? Give feedback.
All reactions