diff --git a/GlassfyGlue.podspec b/GlassfyGlue.podspec index db96f82..4a37330 100644 --- a/GlassfyGlue.podspec +++ b/GlassfyGlue.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'GlassfyGlue' - s.version = '1.3.6' + s.version = '1.4.0' s.summary = 'Glassfy Glue' s.homepage = 'https://github.com/glassfy/glassfy-glue.git' @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.source_files = 'ios/Source/Public/*.h', 'ios/Source/*.{h,m}' s.public_header_files = 'ios/Source/Public/*.h' - s.dependency 'Glassfy', '1.3.8' + s.dependency 'Glassfy', '1.4.0' s.test_spec 'GlassfyGlueTests' do |test_spec| test_spec.source_files = 'ios/Tests/*.{h,m,swift}' diff --git a/README.md b/README.md index 403002e..944bec1 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ GlassfyGlue is available through [CocoaPods](https://cocoapods.org) and [Maven C Add the following line to your Podfile: ```ruby -pod 'GlassfyGlue', '~> 1.3.6' +pod 'GlassfyGlue', '~> 1.4.0' ``` ### Install on android @@ -26,7 +26,7 @@ Add the dependency to your module-level `build.gradle`: ```gradle dependencies { [...] - implementation 'io.glassfy:androidglue:1.3.11' + implementation 'io.glassfy:androidglue:1.4.0' } ``` diff --git a/android/build.gradle b/android/build.gradle index 60aa946..9aaac1a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { id 'com.android.library' version '7.1.2' apply false - id 'org.jetbrains.kotlin.android' version '1.6.10' apply false - id 'org.jetbrains.dokka' version '1.6.10' apply false + id 'org.jetbrains.kotlin.android' version '1.8.10' apply false + id 'org.jetbrains.dokka' version '1.8.10' apply false id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' apply true } diff --git a/android/buildSrc/src/main/kotlin/io/glassfy/glue/Configuration.kt b/android/buildSrc/src/main/kotlin/io/glassfy/glue/Configuration.kt index 905a897..78809da 100644 --- a/android/buildSrc/src/main/kotlin/io/glassfy/glue/Configuration.kt +++ b/android/buildSrc/src/main/kotlin/io/glassfy/glue/Configuration.kt @@ -5,8 +5,8 @@ object Configuration { const val targetSdk = 28 const val minSdk = 21 private const val majorVersion = 1 - private const val minorVersion = 3 - private const val patchVersion = 11 + private const val minorVersion = 4 + private const val patchVersion = 0 const val versionName = "$majorVersion.$minorVersion.$patchVersion" const val snapshotVersionName = "$versionName-SNAPSHOT" const val artifactGroup = "io.glassfy" diff --git a/android/glue/build.gradle.kts b/android/glue/build.gradle.kts index 8ae9013..9218b28 100644 --- a/android/glue/build.gradle.kts +++ b/android/glue/build.gradle.kts @@ -50,7 +50,7 @@ android { } dependencies { - implementation("io.glassfy:androidsdk:1.3.11") + implementation("io.glassfy:androidsdk:1.4.0") } // Sources diff --git a/android/glue/src/main/kotlin/io/glassfy/glue/GlassfyEncoding.kt b/android/glue/src/main/kotlin/io/glassfy/glue/GlassfyEncoding.kt index a7cd19b..e204f31 100644 --- a/android/glue/src/main/kotlin/io/glassfy/glue/GlassfyEncoding.kt +++ b/android/glue/src/main/kotlin/io/glassfy/glue/GlassfyEncoding.kt @@ -3,10 +3,8 @@ package io.glassfy.glue import io.glassfy.androidsdk.model.* import org.json.JSONArray import org.json.JSONObject -import java.text.DateFormat -import java.text.SimpleDateFormat -fun encodeArray(array:List):JSONArray { +fun encodeArray(array:List): JSONArray { val all = JSONArray() array.forEach { all.put(it) @@ -14,7 +12,7 @@ fun encodeArray(array:List):JSONArray { return all } -fun encodeStringArray(array:List):JSONArray { +fun encodeStringArray(array:List): JSONArray { val all = JSONArray() array.forEach { all.put(it) @@ -146,13 +144,6 @@ fun Transaction.encodedJson(): JSONObject { return jo } -fun skuFromJsonObject(jo: JSONObject):Sku { - val skuId = jo.optString("skuId") - val productId = jo.optString("productId") - - return Sku(skuId,productId, emptyMap(), null) -} - fun attributionItemFromJsonObject(jo: JSONObject): AttributionItem? { val joType = jo.optInt("type",-1) @@ -162,17 +153,6 @@ fun attributionItemFromJsonObject(jo: JSONObject): AttributionItem? { return if (type != null) AttributionItem(type, value) else null } -fun attributionItemsFromJsonArray(ja: JSONArray): List { - val items = mutableListOf() - for (i in 0 until ja.length()) { - val jo = ja.getJSONObject(i) - attributionItemFromJsonObject(jo)?.let { item -> - items.add(item) - } - } - return items -} - fun attributionItemTypeFromValue(value: Int): AttributionItem.Type? = when (value) { 1 -> AttributionItem.Type.AdjustID @@ -184,7 +164,7 @@ fun attributionItemTypeFromValue(value: Int): AttributionItem.Type? = else -> null } -fun SkuDetails.encodedJson():JSONObject{ +fun SkuDetails.encodedJson(): JSONObject{ val jo = JSONObject() jo.put("identifier", this.sku) @@ -218,7 +198,7 @@ fun SkuDetails.encodedJson():JSONObject{ return jo; } -fun UserProperties.encodedJson():JSONObject { +fun UserProperties.encodedJson(): JSONObject { val jo = JSONObject() jo.put("email", this.email) jo.put("token", this.token) diff --git a/android/glue/src/main/kotlin/io/glassfy/glue/GlassfyGlue.kt b/android/glue/src/main/kotlin/io/glassfy/glue/GlassfyGlue.kt index f72b17c..a6cf573 100644 --- a/android/glue/src/main/kotlin/io/glassfy/glue/GlassfyGlue.kt +++ b/android/glue/src/main/kotlin/io/glassfy/glue/GlassfyGlue.kt @@ -2,6 +2,7 @@ package io.glassfy.glue import android.app.Activity +import android.content.Context import io.glassfy.androidsdk.Glassfy import io.glassfy.androidsdk.Glassfy.sku import io.glassfy.androidsdk.GlassfyError @@ -10,234 +11,247 @@ import io.glassfy.androidsdk.model.AttributionItem import io.glassfy.androidsdk.model.ProrationMode import io.glassfy.androidsdk.model.SubscriptionUpdate import io.glassfy.androidsdk.model.Store -import org.json.JSONArray import org.json.JSONObject typealias GlueCallback = (String?, String?) -> Unit interface Filter { - fun filterError(result: T, err: GlassfyError, callback: GlueCallback, processvalue: (T) -> String) + fun filterError( + result: T, + err: GlassfyError, + callback: GlueCallback, + processvalue: (T) -> String + ) } object GlassfyGlue { + fun sdkVersion(callback: GlueCallback) { + val jo = JSONObject() + jo.put("version", Glassfy.sdkVersion) + callback(jo.toString(), null) + } + + fun initialize( + ctx: android.content.Context, + apiKey: String, + watcherMode: Boolean, + crossPlatformSdkFramework: String, + crossPlatformSdkVersion: String, + callback: GlueCallback + ) { + var options = Glassfy.InitializeOptions(ctx, apiKey) + options.watcherMode(watcherMode) + options.crossPlatformSdkFramework(crossPlatformSdkFramework) + options.crossPlatformSdkVersion(crossPlatformSdkVersion) + + Glassfy.initialize(options) { _, err -> + callback(null, err?.toString()) + } + } + + fun setLogLevel(logLevel: Int) { + if (logLevel == 0) + Glassfy.setLogLevel(LogLevel.NONE) + else if (logLevel == 1) + Glassfy.setLogLevel(LogLevel.ERROR) + else if (logLevel >= 2) + Glassfy.setLogLevel(LogLevel.DEBUG) + } + + fun offerings(callback: GlueCallback) { + Glassfy.offerings { offerings, err -> + if (err != null) { + callback(null, err.toString()) + } else if (offerings != null) { + val offeringEncoded = offerings.encodedJson() + callback(offeringEncoded.toString(), null) + } + } + } + + fun purchaseHistory(callback: GlueCallback) { + Glassfy.purchaseHistory { history, err -> + if (err != null) { + callback(null, err.toString()) + } else if (history != null) { + val historyEncoded = history.encodedJson() + callback(historyEncoded.toString(), null) + } + } + } + + fun permissions(callback: GlueCallback) { + Glassfy.permissions { permissions, err -> + if (err != null) { + callback(null, err.toString()) + } else if (permissions != null) { + val permissionsEncoded = permissions.encodedJson() + callback(permissionsEncoded.toString(), null) + } + } + } + + fun skuWithId(identifier: String, callback: GlueCallback) { + sku(identifier) { sku, err -> + if (err != null) { + callback(null, err.toString()) + return@sku + } else if (sku != null) { + val skuEncode = sku.encodedJson() + callback(skuEncode.toString(), null) + } + } + } + + fun setAttribution(type: Int, value: String?, callback: GlueCallback) { + val gyAttribution = attributionItemTypeFromValue(type) + if (gyAttribution == null) { + callback.invoke(null, "invalid attribution type") + return + } + Glassfy.setAttribution(gyAttribution, value) { err -> + callback.invoke(null, err?.toString()) + } + } + + fun setAttributions(attributions: List>, callback: GlueCallback) { + val items = mutableListOf() + for (attribution in attributions) { + val type = attribution["type"] as? Int + val gyAttribution = attributionItemTypeFromValue(type ?: -1) + if (gyAttribution == null) { + callback.invoke(null, "invalid attribution type") + return + } + val value = attribution["value"] as? String + val item = AttributionItem(gyAttribution, value) + items.add(item) + } + Glassfy.setAttributions(items) { err -> + callback.invoke(null, err?.toString()) + } + } + + fun skuWithIdAndStore(identifier: String, store: Int, callback: GlueCallback) { + val gyStore = when (store) { + Store.AppStore.value -> Store.AppStore + Store.PlayStore.value -> Store.PlayStore + Store.Paddle.value -> Store.Paddle + Store.Stripe.value -> Store.Stripe + Store.Glassfy.value -> Store.Glassfy + else -> { + callback(null, "invalid store") + return + } + } + sku(identifier, gyStore) { sku, err -> + if (err != null) { + callback(null, err.toString()) + return@sku + } else if (sku != null) { + val skuEncode = sku.encodedJson() + callback(skuEncode.toString(), null) + } + } + } + + fun purchaseSku( + activity: Activity, + skuId: String, + updateSkuId: String?, + updateSkuProration: Int?, + callback: GlueCallback + ) { + sku(skuId) { sku, skuerr -> + if (skuerr != null) { + callback(null, skuerr.toString()) + return@sku + } else if (sku == null) { + callback(null, "InternalError") + return@sku + } + + val updateSku = updateSkuId?.let { s -> + updateSkuProration?.let { + try { + ProrationMode.fromProrationModeValue(it) + } catch (e: Exception) { + null + } + }?.let { + SubscriptionUpdate(s, it) + } ?: SubscriptionUpdate(s) + } + + Glassfy.purchase(activity, sku, updateSku) { transaction, err -> + if (err != null) { + callback(null, err.toString()) + return@purchase + } + callback(transaction?.encodedJson().toString(), null) + } + } + } + + fun purchaseSku(activity: Activity, skuId: String, callback: GlueCallback) { + return purchaseSku(activity, skuId, null, null, callback) + } + + fun restorePurchases(callback: GlueCallback) { + Glassfy.restore() { permissions, err -> + if (err != null) { + callback(null, err.toString()) + return@restore + } else if (permissions == null) { + callback(null, "InternalError") + return@restore + } + val permissionsEncode = permissions.encodedJson() + callback(permissionsEncode.toString(), null) + } + } + + fun setEmailUserProperty(email: String, callback: GlueCallback) { + Glassfy.setEmailUserProperty(email) { err -> + callback(null, err?.toString()) + } + } - fun sdkVersion(callback: GlueCallback) { - val jo = JSONObject() - jo.put("version", Glassfy.sdkVersion) - callback(jo.toString(), null) - } - - fun initialize( - ctx: android.content.Context, - apiKey: String, - watcherMode: Boolean, - crossPlatformSdkFramework: String, - crossPlatformSdkVersion: String, - callback: GlueCallback - ) { - var options = Glassfy.InitializeOptions(ctx, apiKey) - options.watcherMode(watcherMode) - options.crossPlatformSdkFramework(crossPlatformSdkFramework) - options.crossPlatformSdkVersion(crossPlatformSdkVersion) - - Glassfy.initialize(options) { _, err -> - callback(null, err?.toString()) - } - } - - fun setLogLevel(logLevel:Int) { - if (logLevel == 0) - Glassfy.setLogLevel(LogLevel.NONE) - else if (logLevel == 1) - Glassfy.setLogLevel(LogLevel.ERROR) - else if (logLevel >= 2) - Glassfy.setLogLevel(LogLevel.DEBUG) - } - - fun offerings(callback: GlueCallback) { - Glassfy.offerings { offerings, err -> - if (err != null) { - callback(null, err.toString()) - } else if (offerings != null) { - val offeringEncoded = offerings.encodedJson() - callback(offeringEncoded.toString(), null) - } - } - } - - fun purchaseHistory(callback: GlueCallback) { - Glassfy.purchaseHistory { history, err -> - if (err != null) { - callback(null, err.toString()) - } else if (history != null) { - val historyEncoded = history.encodedJson() - callback(historyEncoded.toString(), null) - } - } - } - - fun permissions(callback: GlueCallback) { - Glassfy.permissions { permissions, err -> - if (err != null) { - callback(null, err.toString()) - } else if (permissions != null) { - val permissionsEncoded = permissions.encodedJson() - callback(permissionsEncoded.toString(), null) - } - } - } - - fun skuWithId(identifier: String, callback: GlueCallback) { - sku(identifier) { sku, err -> - if (err != null) { - callback(null, err.toString()) - return@sku - } else if (sku != null) { - val skuEncode = sku.encodedJson() - callback(skuEncode.toString(), null) - } - } - } - - fun setAttribution(type: Int, value: String?, callback: GlueCallback) { - val gyAttribution = attributionItemTypeFromValue(type) - if (gyAttribution == null) { - callback.invoke(null, "invalid attribution type") - return - } - Glassfy.setAttribution(gyAttribution, value) { err -> - callback.invoke(null, err?.toString()) - } - } - - fun setAttributions(attributions: List>, callback: GlueCallback) { - val items = mutableListOf() - for (attribution in attributions) { - val type = attribution["type"] as? Int - val gyAttribution = attributionItemTypeFromValue(type ?: -1) - if (gyAttribution == null) { - callback.invoke(null, "invalid attribution type") - return - } - val value = attribution["value"] as? String - val item = AttributionItem(gyAttribution, value) - items.add(item) - } - Glassfy.setAttributions(items) { err -> - callback.invoke(null, err?.toString()) - } - } - - fun skuWithIdAndStore(identifier: String, store: Int, callback: GlueCallback) { - val gyStore = when (store) { - Store.AppStore.value -> Store.AppStore - Store.PlayStore.value -> Store.PlayStore - Store.Paddle.value -> Store.Paddle - Store.Stripe.value -> Store.Stripe - Store.Glassfy.value -> Store.Glassfy - else -> { - callback(null, "invalid store") - return - } - } - sku(identifier,gyStore) { sku, err -> - if (err != null) { - callback(null, err.toString()) - return@sku - } else if (sku != null) { - val skuEncode = sku.encodedJson() - callback(skuEncode.toString(), null) - } - } - } - - fun purchaseSku(activity: Activity, skuId: String, updateSkuId: String?, updateSkuProration: Int?, callback: GlueCallback) { - sku(skuId) { sku, skuerr -> - if (skuerr != null) { - callback(null, skuerr.toString()) - return@sku - } else if (sku == null) { - callback(null, "InternalError") - return@sku - } - - val updateSku = updateSkuId?.let { s -> - updateSkuProration?.let { - try { ProrationMode.fromProrationModeValue(it) } catch (e: Exception) { null } - }?.let { - SubscriptionUpdate(s, it) - } ?: SubscriptionUpdate(s) - } - - Glassfy.purchase(activity, sku, updateSku) { transaction, err -> - if (err != null) { - callback(null, err.toString()) - return@purchase - } - callback(transaction?.encodedJson().toString(), null) - } - } - } - - fun purchaseSku(activity: Activity, skuId: String, callback: GlueCallback) { - return purchaseSku(activity, skuId, null, null, callback) - } - - fun restorePurchases(callback: GlueCallback) { - Glassfy.restore() { permissions, err -> - if (err != null) { - callback(null, err.toString()) - return@restore - } else if (permissions == null) { - callback(null, "InternalError") - return@restore - } - val permissionsEncode = permissions.encodedJson() - callback(permissionsEncode.toString(), null) - } - } - - fun setEmailUserProperty(email: String,callback: GlueCallback) { - Glassfy.setEmailUserProperty(email) { err -> - callback(null, err?.toString()) - } - } - - fun setExtraUserProperty(extra:Map?,callback: GlueCallback) { - Glassfy.setExtraUserProperty(extra) { err -> - callback(null, err?.toString()) - } - } - - fun getExtraUserProperty(callback: GlueCallback) { - Glassfy.getUserProperties { extra, err -> - if (err != null) { - callback(null, err.toString()) - return@getUserProperties - } else if (extra == null) { - callback(null, "InternalError") - return@getUserProperties - } - val extraEncode = extra.encodedJson() - callback(extraEncode.toString(), err?.toString()) - } - } - - fun connectCustomSubscriber(subscriberId:String?,callback: GlueCallback) { - Glassfy.connectCustomSubscriber(subscriberId){ err -> - callback(null, err?.toString()) - } - } - - fun connectPaddleLicenseKey(licenseKey:String,force:Boolean,callback: GlueCallback) { - Glassfy.connectPaddleLicenseKey(licenseKey,force){ err -> - callback(null, err?.toString()) - } - } - - fun connectGlassfyUniversalCode(universalCode: String, force: Boolean, callback: GlueCallback) { - Glassfy.connectGlassfyUniversalCode(universalCode, force) { err -> - callback(null, err?.toString()) - } - } + fun setExtraUserProperty(extra: Map?, callback: GlueCallback) { + Glassfy.setExtraUserProperty(extra) { err -> + callback(null, err?.toString()) + } + } + + fun getExtraUserProperty(callback: GlueCallback) { + Glassfy.getUserProperties { extra, err -> + if (err != null) { + callback(null, err.toString()) + return@getUserProperties + } else if (extra == null) { + callback(null, "InternalError") + return@getUserProperties + } + val extraEncode = extra.encodedJson() + callback(extraEncode.toString(), err?.toString()) + } + } + + fun connectCustomSubscriber(subscriberId: String?, callback: GlueCallback) { + Glassfy.connectCustomSubscriber(subscriberId) { err -> + callback(null, err?.toString()) + } + } + + fun connectPaddleLicenseKey(licenseKey: String, force: Boolean, callback: GlueCallback) { + Glassfy.connectPaddleLicenseKey(licenseKey, force) { err -> + callback(null, err?.toString()) + } + } + + fun connectGlassfyUniversalCode(universalCode: String, force: Boolean, callback: GlueCallback) { + Glassfy.connectGlassfyUniversalCode(universalCode, force) { err -> + callback(null, err?.toString()) + } + } } \ No newline at end of file diff --git a/ios/GlassfyGlue.xcodeproj/project.pbxproj b/ios/GlassfyGlue.xcodeproj/project.pbxproj index 85127eb..31e846f 100644 --- a/ios/GlassfyGlue.xcodeproj/project.pbxproj +++ b/ios/GlassfyGlue.xcodeproj/project.pbxproj @@ -7,9 +7,11 @@ objects = { /* Begin PBXBuildFile section */ + 64307B162A2093750011894D /* GYSku+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 64307B152A2093750011894D /* GYSku+GGEncode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 64CDBC772A39F0AA000273C2 /* Glassfy in Frameworks */ = {isa = PBXBuildFile; productRef = 64CDBC762A39F0AA000273C2 /* Glassfy */; }; 8118FF7C294B41F6009512BB /* GlassfyGlueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8118FF56294B41E1009512BB /* GlassfyGlueTests.swift */; }; 8118FF7D294B4216009512BB /* GYTransaction+GGEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8118FF5C294B41E1009512BB /* GYTransaction+GGEncode.m */; }; - 8118FF7E294B4216009512BB /* GYTransaction+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF6B294B41E1009512BB /* GYTransaction+GGEncode.h */; }; + 8118FF7E294B4216009512BB /* GYTransaction+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF6B294B41E1009512BB /* GYTransaction+GGEncode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8118FF7F294B4216009512BB /* GYOfferings+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF77294B41E1009512BB /* GYOfferings+GGEncode.h */; }; 8118FF80294B4216009512BB /* GYUserProperties+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF66294B41E1009512BB /* GYUserProperties+GGEncode.h */; }; 8118FF81294B4216009512BB /* GYOffering+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF67294B41E1009512BB /* GYOffering+GGEncode.h */; }; @@ -21,7 +23,6 @@ 8118FF87294B4216009512BB /* GYPermissions+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF5D294B41E1009512BB /* GYPermissions+GGEncode.h */; }; 8118FF88294B4216009512BB /* GYPermissions+GGEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8118FF6A294B41E1009512BB /* GYPermissions+GGEncode.m */; }; 8118FF89294B4216009512BB /* GYSkuBase+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF5B294B41E1009512BB /* GYSkuBase+GGEncode.h */; }; - 8118FF8A294B4216009512BB /* GYSku+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF73294B41E1009512BB /* GYSku+GGEncode.h */; }; 8118FF8B294B4216009512BB /* SKPaymentDiscount+GGEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8118FF59294B41E1009512BB /* SKPaymentDiscount+GGEncode.m */; }; 8118FF8C294B4216009512BB /* GYUserProperties+GGEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8118FF7A294B41E1009512BB /* GYUserProperties+GGEncode.m */; }; 8118FF8D294B4216009512BB /* GYOffering+GGEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8118FF79294B41E1009512BB /* GYOffering+GGEncode.m */; }; @@ -36,12 +37,11 @@ 8118FF96294B4216009512BB /* SKProduct+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF78294B41E1009512BB /* SKProduct+GGEncode.h */; }; 8118FF97294B4216009512BB /* GYStoreInfo+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF63294B41E1009512BB /* GYStoreInfo+GGEncode.h */; }; 8118FF98294B4216009512BB /* GYPermission+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF64294B41E1009512BB /* GYPermission+GGEncode.h */; }; - 8118FF99294B4216009512BB /* GGCodableProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF69294B41E1009512BB /* GGCodableProtocol.h */; }; + 8118FF99294B4216009512BB /* GGCodableProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF69294B41E1009512BB /* GGCodableProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8118FF9A294B4216009512BB /* GYStoresInfo+GGEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF74294B41E1009512BB /* GYStoresInfo+GGEncode.h */; }; 8118FF9B294B4216009512BB /* GYStoreInfo+GGEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8118FF76294B41E1009512BB /* GYStoreInfo+GGEncode.m */; }; 8118FF9C294B4216009512BB /* SKProductDiscount+GGEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 8118FF71294B41E1009512BB /* SKProductDiscount+GGEncode.m */; }; 8118FF9D294B421B009512BB /* GlassfyGlue.h in Headers */ = {isa = PBXBuildFile; fileRef = 8118FF6E294B41E1009512BB /* GlassfyGlue.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8118FFA0294B445E009512BB /* Glassfy in Frameworks */ = {isa = PBXBuildFile; productRef = 8118FF9F294B445E009512BB /* Glassfy */; }; 81AC1329294B419A00C2C486 /* GlassfyGlue.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81AC1320294B419A00C2C486 /* GlassfyGlue.framework */; }; /* End PBXBuildFile section */ @@ -56,6 +56,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 64307B152A2093750011894D /* GYSku+GGEncode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GYSku+GGEncode.h"; sourceTree = ""; }; 8118FF56294B41E1009512BB /* GlassfyGlueTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlassfyGlueTests.swift; sourceTree = ""; }; 8118FF57294B41E1009512BB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8118FF59294B41E1009512BB /* SKPaymentDiscount+GGEncode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SKPaymentDiscount+GGEncode.m"; sourceTree = ""; }; @@ -83,7 +84,6 @@ 8118FF70294B41E1009512BB /* SKPaymentDiscount+GGEncode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SKPaymentDiscount+GGEncode.h"; sourceTree = ""; }; 8118FF71294B41E1009512BB /* SKProductDiscount+GGEncode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SKProductDiscount+GGEncode.m"; sourceTree = ""; }; 8118FF72294B41E1009512BB /* GYSkuPaddle+GGEncode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GYSkuPaddle+GGEncode.h"; sourceTree = ""; }; - 8118FF73294B41E1009512BB /* GYSku+GGEncode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GYSku+GGEncode.h"; sourceTree = ""; }; 8118FF74294B41E1009512BB /* GYStoresInfo+GGEncode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GYStoresInfo+GGEncode.h"; sourceTree = ""; }; 8118FF75294B41E1009512BB /* GYPermission+GGEncode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "GYPermission+GGEncode.m"; sourceTree = ""; }; 8118FF76294B41E1009512BB /* GYStoreInfo+GGEncode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "GYStoreInfo+GGEncode.m"; sourceTree = ""; }; @@ -100,7 +100,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8118FFA0294B445E009512BB /* Glassfy in Frameworks */, + 64CDBC772A39F0AA000273C2 /* Glassfy in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -115,6 +115,13 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 6486FD9F2A0B947100A729BB /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; 8118FF55294B41E1009512BB /* Tests */ = { isa = PBXGroup; children = ( @@ -128,7 +135,6 @@ isa = PBXGroup; children = ( 8118FF6D294B41E1009512BB /* Public */, - 8118FF69294B41E1009512BB /* GGCodableProtocol.h */, 8118FF5F294B41E1009512BB /* GlassfyGlue.m */, 8118FF6F294B41E1009512BB /* GYAccountableSku+GGEncode.h */, 8118FF5A294B41E1009512BB /* GYAccountableSku+GGEncode.m */, @@ -140,7 +146,6 @@ 8118FF75294B41E1009512BB /* GYPermission+GGEncode.m */, 8118FF5D294B41E1009512BB /* GYPermissions+GGEncode.h */, 8118FF6A294B41E1009512BB /* GYPermissions+GGEncode.m */, - 8118FF73294B41E1009512BB /* GYSku+GGEncode.h */, 8118FF5E294B41E1009512BB /* GYSku+GGEncode.m */, 8118FF5B294B41E1009512BB /* GYSkuBase+GGEncode.h */, 8118FF6C294B41E1009512BB /* GYSkuBase+GGEncode.m */, @@ -150,7 +155,6 @@ 8118FF76294B41E1009512BB /* GYStoreInfo+GGEncode.m */, 8118FF74294B41E1009512BB /* GYStoresInfo+GGEncode.h */, 8118FF65294B41E1009512BB /* GYStoresInfo+GGEncode.m */, - 8118FF6B294B41E1009512BB /* GYTransaction+GGEncode.h */, 8118FF5C294B41E1009512BB /* GYTransaction+GGEncode.m */, 8118FF66294B41E1009512BB /* GYUserProperties+GGEncode.h */, 8118FF7A294B41E1009512BB /* GYUserProperties+GGEncode.m */, @@ -167,7 +171,10 @@ 8118FF6D294B41E1009512BB /* Public */ = { isa = PBXGroup; children = ( + 8118FF69294B41E1009512BB /* GGCodableProtocol.h */, 8118FF6E294B41E1009512BB /* GlassfyGlue.h */, + 64307B152A2093750011894D /* GYSku+GGEncode.h */, + 8118FF6B294B41E1009512BB /* GYTransaction+GGEncode.h */, ); path = Public; sourceTree = ""; @@ -178,6 +185,7 @@ 8118FF58294B41E1009512BB /* Source */, 8118FF55294B41E1009512BB /* Tests */, 81AC1321294B419A00C2C486 /* Products */, + 6486FD9F2A0B947100A729BB /* Frameworks */, ); sourceTree = ""; }; @@ -202,10 +210,10 @@ 8118FF90294B4216009512BB /* SKProductDiscount+GGEncode.h in Headers */, 8118FF94294B4216009512BB /* GYAccountableSku+GGEncode.h in Headers */, 8118FF99294B4216009512BB /* GGCodableProtocol.h in Headers */, - 8118FF8A294B4216009512BB /* GYSku+GGEncode.h in Headers */, 8118FF89294B4216009512BB /* GYSkuBase+GGEncode.h in Headers */, 8118FF7F294B4216009512BB /* GYOfferings+GGEncode.h in Headers */, 8118FF80294B4216009512BB /* GYUserProperties+GGEncode.h in Headers */, + 64307B162A2093750011894D /* GYSku+GGEncode.h in Headers */, 8118FF81294B4216009512BB /* GYOffering+GGEncode.h in Headers */, 8118FF96294B4216009512BB /* SKProduct+GGEncode.h in Headers */, 8118FF9D294B421B009512BB /* GlassfyGlue.h in Headers */, @@ -235,7 +243,7 @@ ); name = GlassfyGlue; packageProductDependencies = ( - 8118FF9F294B445E009512BB /* Glassfy */, + 64CDBC762A39F0AA000273C2 /* Glassfy */, ); productName = GlassfyGlue; productReference = 81AC1320294B419A00C2C486 /* GlassfyGlue.framework */; @@ -286,7 +294,7 @@ ); mainGroup = 81AC1316294B419900C2C486; packageReferences = ( - 8118FF9E294B445E009512BB /* XCRemoteSwiftPackageReference "ios-sdk" */, + 64CDBC752A39F07A000273C2 /* XCRemoteSwiftPackageReference "ios-sdk" */, ); productRefGroup = 81AC1321294B419A00C2C486 /* Products */; projectDirPath = ""; @@ -591,20 +599,20 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 8118FF9E294B445E009512BB /* XCRemoteSwiftPackageReference "ios-sdk" */ = { + 64CDBC752A39F07A000273C2 /* XCRemoteSwiftPackageReference "ios-sdk" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/glassfy/ios-sdk"; requirement = { - kind = exactVersion; - version = 1.3.5; + kind = upToNextMajorVersion; + minimumVersion = 1.4.0; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 8118FF9F294B445E009512BB /* Glassfy */ = { + 64CDBC762A39F0AA000273C2 /* Glassfy */ = { isa = XCSwiftPackageProductDependency; - package = 8118FF9E294B445E009512BB /* XCRemoteSwiftPackageReference "ios-sdk" */; + package = 64CDBC752A39F07A000273C2 /* XCRemoteSwiftPackageReference "ios-sdk" */; productName = Glassfy; }; /* End XCSwiftPackageProductDependency section */ diff --git a/ios/GlassfyGlue.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/GlassfyGlue.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6ec47f8..e310391 100644 --- a/ios/GlassfyGlue.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ios/GlassfyGlue.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,14 +1,16 @@ { - "pins" : [ - { - "identity" : "ios-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/glassfy/ios-sdk", - "state" : { - "revision" : "cdbbc31645a65bfa2cda2319aecd109473d8fb9f", - "version" : "1.3.5" + "object": { + "pins": [ + { + "package": "Glassfy", + "repositoryURL": "https://github.com/glassfy/ios-sdk", + "state": { + "branch": null, + "revision": "fff920920656555fbd40137a2a9397edb46f96f1", + "version": "1.4.0" + } } - } - ], - "version" : 2 + ] + }, + "version": 1 } diff --git a/ios/Source/GlassfyGlue.m b/ios/Source/GlassfyGlue.m index 416f629..9d775db 100644 --- a/ios/Source/GlassfyGlue.m +++ b/ios/Source/GlassfyGlue.m @@ -20,12 +20,12 @@ @implementation GlassfyGluePurchaseDelegateObject +(GlassfyGluePurchaseDelegateObject *)shared { static dispatch_once_t initOnceToken; static GlassfyGluePurchaseDelegateObject *singleton = nil; - + dispatch_once(&initOnceToken, ^{ singleton = [[GlassfyGluePurchaseDelegateObject alloc] init]; singleton.delegate = nil; }); - + return singleton; } @@ -50,9 +50,9 @@ - (void)handlePromotedProductId:(NSString *)productid @implementation GlassfyGlue + (void)sdkVersionWithCompletion:(GlassfyGlueCompletion _Nonnull)block { - NSMutableDictionary *sdkVersion = [[NSMutableDictionary alloc] init]; - sdkVersion[@"version"] = [Glassfy sdkVersion]; - block(sdkVersion, nil); + NSMutableDictionary *sdkVersion = [[NSMutableDictionary alloc] init]; + sdkVersion[@"version"] = [Glassfy sdkVersion]; + block(sdkVersion, nil); } + (void)initializeWithApiKey:(NSString *_Nonnull)apiKey @@ -61,185 +61,185 @@ + (void)initializeWithApiKey:(NSString *_Nonnull)apiKey crossPlatformSdkVersion:(NSString *_Nonnull)crossPlatformSdkVersion withCompletion:(GlassfyGlueCompletion _Nonnull)block; { - GYInitializeOptions* options = [GYInitializeOptions initializeOptionsWithAPIKey: apiKey]; - [options watcherMode: watcherMode]; - [options crossPlatformSdkFramework: crossPlatformSdkFramework]; - [options crossPlatformSdkVersion: crossPlatformSdkVersion]; - [Glassfy initializeWithOptions: options]; - block(nil, nil); + GYInitializeOptions* options = [GYInitializeOptions initializeOptionsWithAPIKey: apiKey]; + [options watcherMode: watcherMode]; + [options crossPlatformSdkFramework: crossPlatformSdkFramework]; + [options crossPlatformSdkVersion: crossPlatformSdkVersion]; + [Glassfy initializeWithOptions: options]; + block(nil, nil); } + (void)setLogLevel:(int)logLevel { - if (logLevel == 0) { - [Glassfy setLogLevel:GYLogLevelOff]; - } else if (logLevel == 1) { - [Glassfy setLogLevel:GYLogLevelError]; - } else if (logLevel == 2) { - [Glassfy setLogLevel:GYLogLevelDebug]; - } else if (logLevel == 3) { - [Glassfy setLogLevel:GYLogLevelInfo]; - } else if (logLevel == 4) { - [Glassfy setLogLevel:GYLogLevelAll]; - } + if (logLevel == 0) { + [Glassfy setLogLevel:GYLogLevelOff]; + } else if (logLevel == 1) { + [Glassfy setLogLevel:GYLogLevelError]; + } else if (logLevel == 2) { + [Glassfy setLogLevel:GYLogLevelDebug]; + } else if (logLevel == 3) { + [Glassfy setLogLevel:GYLogLevelInfo]; + } else if (logLevel == 4) { + [Glassfy setLogLevel:GYLogLevelAll]; + } } + (void)purchaseHistoryWithCompletion:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy purchaseHistoryWithCompletion:^(GYPurchasesHistory *history, NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - - NSDictionary *retHistory = [history encodedDictionary]; - block(retHistory, nil); - }]; + [Glassfy purchaseHistoryWithCompletion:^(GYPurchasesHistory *history, NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + + NSDictionary *retHistory = [history encodedDictionary]; + block(retHistory, nil); + }]; } + (void)offeringsWithCompletion:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy offeringsWithCompletion:^(GYOfferings *offerings, NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - - NSDictionary *retOfferings = [offerings encodedDictionary]; - block(retOfferings, nil); - }]; + [Glassfy offeringsWithCompletion:^(GYOfferings *offerings, NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + + NSDictionary *retOfferings = [offerings encodedDictionary]; + block(retOfferings, nil); + }]; } + (void)permissionsWithCompletion:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy - permissionsWithCompletion:^(GYPermissions *permissions, NSError *error) { + [Glassfy + permissionsWithCompletion:^(GYPermissions *permissions, NSError *error) { if (error != nil) { - block(nil, error); - return; + block(nil, error); + return; } - + NSDictionary *retPermissions = [permissions encodedDictionary]; block(retPermissions, nil); - }]; + }]; } + (void)skuWithId:(NSString *_Nonnull)skuid - withCompletion:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy skuWithId:skuid - completion:^(GYSku *sku, NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - - NSDictionary *retSku = [sku encodedDictionary]; - block(retSku, nil); - }]; + withCompletion:(GlassfyGlueCompletion _Nonnull)block { + [Glassfy skuWithId:skuid + completion:^(GYSku *sku, NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + + NSDictionary *retSku = [sku encodedDictionary]; + block(retSku, nil); + }]; } + (void)skuWithId:(NSString *)skuid store:(GYStore)store completion:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy skuWithId:skuid - store:store - completion:^(GYSkuBase *skuBase, NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - NSDictionary *retSku = [skuBase encodedDictionary]; - block(retSku, nil); - }]; + [Glassfy skuWithId:skuid + store:store + completion:^(GYSkuBase *skuBase, NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + NSDictionary *retSku = [skuBase encodedDictionary]; + block(retSku, nil); + }]; } + (void)purchaseSku:(NSDictionary *_Nonnull)sku withCompletion:(GlassfyGlueCompletion _Nonnull)block { - if (![sku isKindOfClass:[NSDictionary class]]) { - block(nil, [GlassfyGlue errorWithCode:-42 - description:@"invalid parameter"]); - return; - } - NSString *skuId = sku[@"skuId"]; - if (skuId == nil) { - block(nil, [GlassfyGlue errorWithCode:-42 - description:@"invalid parameter"]); - return; - } - [Glassfy skuWithId:skuId - completion:^(GYSku *sku, NSError *error) { + if (![sku isKindOfClass:[NSDictionary class]]) { + block(nil, [GlassfyGlue errorWithCode:-42 + description:@"invalid parameter"]); + return; + } + NSString *skuId = sku[@"skuId"]; + if (skuId == nil) { + block(nil, [GlassfyGlue errorWithCode:-42 + description:@"invalid parameter"]); + return; + } + [Glassfy skuWithId:skuId + completion:^(GYSku *sku, NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + + [Glassfy purchaseSku:sku + completion:^(GYTransaction *transaction, NSError *error) { if (error != nil) { - block(nil, error); - return; + block(nil, error); + return; } - - [Glassfy purchaseSku:sku - completion:^(GYTransaction *transaction, NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - NSDictionary *retTransaction = - [transaction encodedDictionary]; - - block(retTransaction, nil); - }]; - }]; + NSDictionary *retTransaction = + [transaction encodedDictionary]; + + block(retTransaction, nil); + }]; + }]; } + (void)restorePurchasesWithCompletion:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy restorePurchasesWithCompletion:^(GYPermissions *permissions, - NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - - NSDictionary *retPermissions = [permissions encodedDictionary]; - block(retPermissions, nil); - }]; + [Glassfy restorePurchasesWithCompletion:^(GYPermissions *permissions, + NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + + NSDictionary *retPermissions = [permissions encodedDictionary]; + block(retPermissions, nil); + }]; } + (void)setDeviceToken:(NSString *)token withCompletion:(GlassfyGlueCompletion _Nonnull)block; { - [Glassfy setDeviceToken:token - completion:[GlassfyGlue errorOnlyCompletion:block]]; + [Glassfy setDeviceToken:token + completion:[GlassfyGlue errorOnlyCompletion:block]]; } + (void)setEmailUserProperty:(NSString *)email withCompletion:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy setEmailUserProperty:email completion:[GlassfyGlue errorOnlyCompletion:block]]; + [Glassfy setEmailUserProperty:email completion:[GlassfyGlue errorOnlyCompletion:block]]; } + (void)setExtraUserProperty:(NSDictionary *)extraProp withCompletion:(GlassfyGlueCompletion _Nonnull)block; { - [Glassfy setExtraUserProperty:extraProp - completion:[GlassfyGlue errorOnlyCompletion:block]]; + [Glassfy setExtraUserProperty:extraProp + completion:[GlassfyGlue errorOnlyCompletion:block]]; } + (void)getExtraUserPropertyWithCompletion: - (GlassfyGlueCompletion _Nonnull)block { - [Glassfy getUserProperties:^(GYUserProperties *userproperty, NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - NSDictionary *retProperty = [userproperty encodedDictionary]; - - block(retProperty, nil); - }]; +(GlassfyGlueCompletion _Nonnull)block { + [Glassfy getUserProperties:^(GYUserProperties *userproperty, NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + NSDictionary *retProperty = [userproperty encodedDictionary]; + + block(retProperty, nil); + }]; } + (void)connectPaddleLicenseKey:(NSString *)licenseKey force:(BOOL)force completion:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy connectPaddleLicenseKey:licenseKey - force:force - completion:^(NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - block(nil, nil); - }]; + [Glassfy connectPaddleLicenseKey:licenseKey + force:force + completion:^(NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + block(nil, nil); + }]; } + (void)connectGlassfyUniversalCode:(NSString*)universalCode @@ -258,42 +258,42 @@ + (void)connectGlassfyUniversalCode:(NSString*)universalCode + (void)connectCustomSubscriber:(NSString *_Nullable)customId completion:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy connectCustomSubscriber:customId - completion:^(NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - block(nil, nil); - }]; + [Glassfy connectCustomSubscriber:customId + completion:^(NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + block(nil, nil); + }]; } + (void)storeInfo:(GlassfyGlueCompletion _Nonnull)block { - [Glassfy storeInfo:^(GYStoresInfo *storeInfo, NSError *error) { - if (error != nil) { - block(nil, error); - return; - } - NSDictionary *infoStoreDict = [storeInfo encodedDictionary]; - block(infoStoreDict, nil); - }]; + [Glassfy storeInfo:^(GYStoresInfo *storeInfo, NSError *error) { + if (error != nil) { + block(nil, error); + return; + } + NSDictionary *infoStoreDict = [storeInfo encodedDictionary]; + block(infoStoreDict, nil); + }]; } + (NSError *)errorWithCode:(int)code description:(NSString *)description { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey : description, - }; - NSError *error = [NSError errorWithDomain:@"io.glassfy.glue" - code:code - userInfo:userInfo]; - return error; + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey : description, + }; + NSError *error = [NSError errorWithDomain:@"io.glassfy.glue" + code:code + userInfo:userInfo]; + return error; } + (void (^)(NSError *_Nullable))errorOnlyCompletion: - (GlassfyGlueCompletion _Nonnull)block { - return ^(NSError *_Nullable error) { - block(nil, error); - }; +(GlassfyGlueCompletion _Nonnull)block { + return ^(NSError *_Nullable error) { + block(nil, error); + }; } + (void)setPurchaseDelegate:(id _Nullable)delegate { diff --git a/ios/Source/GGCodableProtocol.h b/ios/Source/Public/GGCodableProtocol.h similarity index 100% rename from ios/Source/GGCodableProtocol.h rename to ios/Source/Public/GGCodableProtocol.h diff --git a/ios/Source/GYSku+GGEncode.h b/ios/Source/Public/GYSku+GGEncode.h similarity index 100% rename from ios/Source/GYSku+GGEncode.h rename to ios/Source/Public/GYSku+GGEncode.h diff --git a/ios/Source/GYTransaction+GGEncode.h b/ios/Source/Public/GYTransaction+GGEncode.h similarity index 100% rename from ios/Source/GYTransaction+GGEncode.h rename to ios/Source/Public/GYTransaction+GGEncode.h