diff --git a/Assets/Plugins/UnityPurchasing/Bin/Android/AmazonAppStore.aar b/Assets/Plugins/UnityPurchasing/Bin/Android/AmazonAppStore.aar index ec1cafc2..22420d1d 100644 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Android/AmazonAppStore.aar and b/Assets/Plugins/UnityPurchasing/Bin/Android/AmazonAppStore.aar differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar b/Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar index 6c0f918d..2b7d2b4a 100644 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar and b/Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar.meta b/Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar.meta index 84ed660a..1c75180a 100644 --- a/Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar.meta +++ b/Assets/Plugins/UnityPurchasing/Bin/Android/CloudMoolah.aar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: b43266f2885014b678ad6d4f97e97243 -timeCreated: 1487022644 +guid: 1b2e1f539bbe74d46baa369ea1ba1385 +timeCreated: 1487787625 licenseType: Pro PluginImporter: serializedVersion: 1 diff --git a/Assets/Plugins/UnityPurchasing/Bin/Android/GoogleAIDL.aar b/Assets/Plugins/UnityPurchasing/Bin/Android/GoogleAIDL.aar index 3e86f66b..3834da9e 100644 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Android/GoogleAIDL.aar and b/Assets/Plugins/UnityPurchasing/Bin/Android/GoogleAIDL.aar differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Android/GooglePlay.aar b/Assets/Plugins/UnityPurchasing/Bin/Android/GooglePlay.aar index 2d1f33e4..ab7b92db 100644 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Android/GooglePlay.aar and b/Assets/Plugins/UnityPurchasing/Bin/Android/GooglePlay.aar differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Android/SamsungApps.aar b/Assets/Plugins/UnityPurchasing/Bin/Android/SamsungApps.aar index dc34b14b..ff5aa50c 100644 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Android/SamsungApps.aar and b/Assets/Plugins/UnityPurchasing/Bin/Android/SamsungApps.aar differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Android/common.aar b/Assets/Plugins/UnityPurchasing/Bin/Android/common.aar index 4c644b4d..e576fe0e 100644 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Android/common.aar and b/Assets/Plugins/UnityPurchasing/Bin/Android/common.aar differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Apple/Apple.dll b/Assets/Plugins/UnityPurchasing/Bin/Apple/Apple.dll old mode 100644 new mode 100755 index b3cbcf1d..b62c837f Binary files a/Assets/Plugins/UnityPurchasing/Bin/Apple/Apple.dll and b/Assets/Plugins/UnityPurchasing/Bin/Apple/Apple.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Apple/live/Apple.dll b/Assets/Plugins/UnityPurchasing/Bin/Apple/live/Apple.dll old mode 100644 new mode 100755 index dd24037e..62943d68 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Apple/live/Apple.dll and b/Assets/Plugins/UnityPurchasing/Bin/Apple/live/Apple.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Common.dll b/Assets/Plugins/UnityPurchasing/Bin/Common.dll deleted file mode 100644 index 95fb87c3..00000000 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Common.dll and /dev/null differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Editor.dll b/Assets/Plugins/UnityPurchasing/Bin/Editor.dll old mode 100644 new mode 100755 index 5d02eed9..cfe2411d Binary files a/Assets/Plugins/UnityPurchasing/Bin/Editor.dll and b/Assets/Plugins/UnityPurchasing/Bin/Editor.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Facebook.meta b/Assets/Plugins/UnityPurchasing/Bin/Facebook.meta new file mode 100644 index 00000000..4c52ce91 --- /dev/null +++ b/Assets/Plugins/UnityPurchasing/Bin/Facebook.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 494a5b0308f234877b86d667857db84c +folderAsset: yes +timeCreated: 1497567783 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UnityPurchasing/Bin/Facebook/FacebookStore.dll b/Assets/Plugins/UnityPurchasing/Bin/Facebook/FacebookStore.dll new file mode 100755 index 00000000..cd098f89 Binary files /dev/null and b/Assets/Plugins/UnityPurchasing/Bin/Facebook/FacebookStore.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Facebook/FacebookStore.dll.meta b/Assets/Plugins/UnityPurchasing/Bin/Facebook/FacebookStore.dll.meta new file mode 100644 index 00000000..19779a6f --- /dev/null +++ b/Assets/Plugins/UnityPurchasing/Bin/Facebook/FacebookStore.dll.meta @@ -0,0 +1,82 @@ +fileFormatVersion: 2 +guid: 282e7a4569d314342849ac78f7305a4a +timeCreated: 1473188566 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 1 + settings: + CPU: AnyCPU + Any: + enabled: 1 + settings: {} + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 1 + settings: + CPU: x86 + Linux64: + enabled: 1 + settings: + CPU: x86_64 + LinuxUniversal: + enabled: 1 + settings: + CPU: AnyCPU + OSXIntel: + enabled: 1 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 1 + settings: + CPU: AnyCPU + OSXUniversal: + enabled: 1 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 1 + settings: + STV_MODEL: STANDARD_13 + Tizen: + enabled: 1 + settings: {} + WebGL: + enabled: 1 + settings: {} + Win: + enabled: 1 + settings: + CPU: AnyCPU + Win64: + enabled: 1 + settings: + CPU: AnyCPU + WindowsStoreApps: + enabled: 1 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + tvOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UnityPurchasing/Bin/Facebook/live.meta b/Assets/Plugins/UnityPurchasing/Bin/Facebook/live.meta new file mode 100644 index 00000000..8a5fd45b --- /dev/null +++ b/Assets/Plugins/UnityPurchasing/Bin/Facebook/live.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4288317330cd1475c9a3236f608b654f +folderAsset: yes +timeCreated: 1497567784 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UnityPurchasing/Bin/Facebook/live/FacebookStore.dll b/Assets/Plugins/UnityPurchasing/Bin/Facebook/live/FacebookStore.dll new file mode 100755 index 00000000..3480ab73 Binary files /dev/null and b/Assets/Plugins/UnityPurchasing/Bin/Facebook/live/FacebookStore.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Facebook/live/FacebookStore.dll.meta b/Assets/Plugins/UnityPurchasing/Bin/Facebook/live/FacebookStore.dll.meta new file mode 100644 index 00000000..c51d2ec6 --- /dev/null +++ b/Assets/Plugins/UnityPurchasing/Bin/Facebook/live/FacebookStore.dll.meta @@ -0,0 +1,79 @@ +fileFormatVersion: 2 +guid: 97e43e86f5dfe4cb4a0eeee600af6b43 +timeCreated: 1473188568 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: None + Linux64: + enabled: 0 + settings: + CPU: None + LinuxUniversal: + enabled: 0 + settings: + CPU: None + OSXIntel: + enabled: 0 + settings: + CPU: None + OSXIntel64: + enabled: 0 + settings: + CPU: None + OSXUniversal: + enabled: 0 + settings: + CPU: None + SamsungTV: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + WebGL: + enabled: 0 + settings: {} + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + tvOS: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll b/Assets/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll new file mode 100755 index 00000000..f21e0d8a Binary files /dev/null and b/Assets/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Common.dll.meta b/Assets/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll.meta similarity index 86% rename from Assets/Plugins/UnityPurchasing/Bin/Common.dll.meta rename to Assets/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll.meta index d40a7aca..66c18ee8 100644 --- a/Assets/Plugins/UnityPurchasing/Bin/Common.dll.meta +++ b/Assets/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 60bba0e8f98754f4baba50aa1a6418d1 -timeCreated: 1456320430 +guid: 449b37a211b3c44f1b4d14d620670e79 +timeCreated: 1487789098 licenseType: Pro PluginImporter: serializedVersion: 1 diff --git a/Assets/Plugins/UnityPurchasing/Bin/Security.meta b/Assets/Plugins/UnityPurchasing/Bin/Security.meta new file mode 100644 index 00000000..45724c29 --- /dev/null +++ b/Assets/Plugins/UnityPurchasing/Bin/Security.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 88cb58f5be85146488a7d6c3b661acce +folderAsset: yes +timeCreated: 1495220307 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UnityPurchasing/Bin/Security/Security.dll b/Assets/Plugins/UnityPurchasing/Bin/Security/Security.dll new file mode 100755 index 00000000..c4b9827a Binary files /dev/null and b/Assets/Plugins/UnityPurchasing/Bin/Security/Security.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Security/Security.dll.meta b/Assets/Plugins/UnityPurchasing/Bin/Security/Security.dll.meta new file mode 100644 index 00000000..4b78ba1b --- /dev/null +++ b/Assets/Plugins/UnityPurchasing/Bin/Security/Security.dll.meta @@ -0,0 +1,69 @@ +fileFormatVersion: 2 +guid: 68649ec498df74bff882e597d9e76ab1 +timeCreated: 1495220308 +licenseType: Free +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Editor: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 1 + settings: + STV_MODEL: STANDARD_13 + Tizen: + enabled: 1 + settings: {} + WebGL: + enabled: 1 + settings: {} + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + WindowsStoreApps: + enabled: 1 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + SDK: AnySDK + ScriptingBackend: AnyScriptingBackend + data: + enabled: 0 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UnityPurchasing/Bin/Security/live.meta b/Assets/Plugins/UnityPurchasing/Bin/Security/live.meta new file mode 100644 index 00000000..63300b21 --- /dev/null +++ b/Assets/Plugins/UnityPurchasing/Bin/Security/live.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9dc8e7589c2d8425d8eaa71ddef59033 +folderAsset: yes +timeCreated: 1495220307 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UnityPurchasing/Bin/Security.dll b/Assets/Plugins/UnityPurchasing/Bin/Security/live/Security.dll old mode 100644 new mode 100755 similarity index 51% rename from Assets/Plugins/UnityPurchasing/Bin/Security.dll rename to Assets/Plugins/UnityPurchasing/Bin/Security/live/Security.dll index 3931945c..6e1c67e2 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Security.dll and b/Assets/Plugins/UnityPurchasing/Bin/Security/live/Security.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Security.dll.meta b/Assets/Plugins/UnityPurchasing/Bin/Security/live/Security.dll.meta similarity index 88% rename from Assets/Plugins/UnityPurchasing/Bin/Security.dll.meta rename to Assets/Plugins/UnityPurchasing/Bin/Security/live/Security.dll.meta index 8eb2fcae..6220ad60 100644 --- a/Assets/Plugins/UnityPurchasing/Bin/Security.dll.meta +++ b/Assets/Plugins/UnityPurchasing/Bin/Security/live/Security.dll.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3b26978bdb89a4d31bb9d29ce8b17be0 +guid: 2ea2f530b8c7e44899b29d862bb887c3 timeCreated: 1456320429 licenseType: Pro PluginImporter: @@ -64,11 +64,11 @@ PluginImporter: iOS: enabled: 1 settings: - CompileFlags: - FrameworkDependencies: + CompileFlags: + FrameworkDependencies: tvOS: enabled: 1 settings: {} - userData: - assetBundleName: - assetBundleVariant: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/UnityPurchasing/Bin/Stores.dll b/Assets/Plugins/UnityPurchasing/Bin/Stores.dll old mode 100644 new mode 100755 index 4e19591f..aef57b9e Binary files a/Assets/Plugins/UnityPurchasing/Bin/Stores.dll and b/Assets/Plugins/UnityPurchasing/Bin/Stores.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Tizen/Tizen.dll b/Assets/Plugins/UnityPurchasing/Bin/Tizen/Tizen.dll old mode 100644 new mode 100755 index 2d83799a..26253828 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Tizen/Tizen.dll and b/Assets/Plugins/UnityPurchasing/Bin/Tizen/Tizen.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/Tizen/live/Tizen.dll b/Assets/Plugins/UnityPurchasing/Bin/Tizen/live/Tizen.dll old mode 100644 new mode 100755 index 702fee0c..acc75cd1 Binary files a/Assets/Plugins/UnityPurchasing/Bin/Tizen/live/Tizen.dll and b/Assets/Plugins/UnityPurchasing/Bin/Tizen/live/Tizen.dll differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Info.plist b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Info.plist index 460ab980..2385129c 100644 --- a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Info.plist +++ b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 16D32 + 16F73 CFBundleDevelopmentRegion English CFBundleExecutable @@ -47,17 +47,17 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 8C1002 + 8E3004b DTPlatformVersion GM DTSDKBuild - 16C58 + 16E185 DTSDKName macosx10.12 DTXcode - 0821 + 0833 DTXcodeBuild - 8C1002 + 8E3004b NSHumanReadableCopyright Copyright © 2013 Alex McAusland. All rights reserved. diff --git a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Info.plist.meta b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Info.plist.meta index 6aec1e01..702dc930 100644 --- a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Info.plist.meta +++ b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Info.plist.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 6e4c351d26b1f41039fb193808aa4e7e -timeCreated: 1487022635 +guid: 2a265fe24c77e40e0aab0d61612dc219 +timeCreated: 1487787616 licenseType: Pro DefaultImporter: userData: diff --git a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/MacOS/unitypurchasing b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/MacOS/unitypurchasing old mode 100644 new mode 100755 index fff3e286..51e59f63 Binary files a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/MacOS/unitypurchasing and b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/MacOS/unitypurchasing differ diff --git a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/MacOS/unitypurchasing.meta b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/MacOS/unitypurchasing.meta index edb958e8..dd1d3bba 100644 --- a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/MacOS/unitypurchasing.meta +++ b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/MacOS/unitypurchasing.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 9ed33c2e0ffbe4a51bef0dc38008c5d9 -timeCreated: 1487022635 +guid: caaf8410df6c3419b946f344b83a2cf7 +timeCreated: 1487787616 licenseType: Pro DefaultImporter: userData: diff --git a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Resources/en.lproj/InfoPlist.strings.meta b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Resources/en.lproj/InfoPlist.strings.meta index 59cf14c8..7668d5cc 100644 --- a/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Resources/en.lproj/InfoPlist.strings.meta +++ b/Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle/Contents/Resources/en.lproj/InfoPlist.strings.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: fd8a02044b62e43668a37aae2494f138 -timeCreated: 1487022635 +guid: be0da190aa7a44e2296ea4badec2967f +timeCreated: 1487787616 licenseType: Pro DefaultImporter: userData: diff --git a/Assets/Plugins/UnityPurchasing/Changelog.md b/Assets/Plugins/UnityPurchasing/Changelog.md index 0a2fd1ca..9539a572 100644 --- a/Assets/Plugins/UnityPurchasing/Changelog.md +++ b/Assets/Plugins/UnityPurchasing/Changelog.md @@ -1,3 +1,48 @@ +## [1.11.2] - 2017-05-30 +### Added +- Apple platforms - Parse the app receipt when retrieving product information and attempt to set receipt fields on Product. With this change the hasReceipt field on Apple platforms will work more like it does on non-Apple platforms. + +### Fixed +- FacebookStore - Better error handling for cases where store configuration changes after purchases have already been made. +- General - Better momentary memory performance for local receipt validation and other JSON parsing situations. +- Editor menus - Targeted Android store menu checkmark are set and valid more often. +- Installer - Fix error seen during install, `ReflectionTypeLoadException[...]UnityEditor.Purchasing.UnityIAPInstaller.`. + + +## [1.11.1] - 2017-05-23 +### Fixed +- GooglePlay - Fix regression seen during purchasing where GooglePlay Activity forces screen orientation to portrait and turns background black. Restores neutral orientation and transparent background behavior. + +## [1.11.0] - 2017-05-01 +### Added +- FacebookStore - Facebook Gameroom Payments Lite support. Available on Unity 5.6+ when building for Facebook Platform on Gameroom (Windows) and WebGL. Preliminary documentation is available [here](https://docs.google.com/document/d/1FaYwKvdnMHxkh47YVuXx9dMbc6ZtLX53mtgyAIn6WfU/) +- Apple platforms - Added experimental support for setting "simulatesAskToBuyInSandbox". Please let us know how this impacts ask-to-buy testability for you. +```csharp +extensions.GetExtension().simulateAskToBuy = true; +``` +- Apple platforms - Added support for setting "applicationUsername" field which will be added to every payment request to help the store detect fraud. +```csharp +// Set the applicationUsername to help Apple detect fraud +extensions.GetExtension().SetApplicationUsername(hashedUsername); +``` + +### Requirement +- GooglePlay - "Android SDK API Level 24 (7.0)" (or higher) must now be installed. To upgrade, either perform the one-time step of setting the project's "Android Player Settings > Other Settings > Minimum API Level" to 24, building an APK, then resetting to the project's previous value. Or, run the `android` Android SDK Manager tool manually and install "Android 7.0 (API 24)". Addresses build error messages: "Unable to merge android manifests." and "Main manifest has \ but library uses targetSdkVersion='24'". Note the Minimum API Level support is unchanged; merely the installation of API 24 SDK is now required for Daydream VR. + +### Fixed +- GooglePlay Daydream VR - Uses decoration-free Activity for purchasing +- GooglePlay - Avoids sporadic price serialization exception +- Apple App Stores - Improve handling of the situation where an attempt to finish a transaction fails (if the user is signed out of the store and cancels the sign in dialog, for example). The Apple store implementation will now remember that the transaction should be finished, and attempt to call finishTransaction again if the transaction is retrieved from the queue again. When this happens, the store will call OnPurchaseFailed with the reason "DuplicateTransaction"—this prevents a situation where a call to InitiatePurchase could result in no call to ProcessPurchase or OnPurchaseFailed. +- Amazon - Fix for a crash when loading product metadata for subscription parent products + +## [1.10.1] - 2017-03-29 +### Fixed +- GooglePlay - Suspending and resuming from app-icon while purchase dialog displayed no longer generates both OnPurchaseFailed then ProcessPurchase messages, only whichever callback is correct. +- Remove cloud JSON exporter that was erroneously showing in the IAP Catalog export list +- Fixed a bug when parsing localized prices when the device's localization does not match the number format rules for the currency +- Resolved DLL name conflict by renaming Assets/Plugins/UnityPurchasing/Bin/Common.dll to Purchasing.Common.dll +- Installer - Suppressed multiple redundant dialogs + ## [1.10.0] - 2017-01-23 ### Added - Samsung Galaxy Apps - In-App Purchase SDK v4. Simplifies flow for first-time payment users. See [Samsung Developer IAP Documentation](http://developer.samsung.com/iap) for more. diff --git a/Assets/Plugins/UnityPurchasing/Editor.meta b/Assets/Plugins/UnityPurchasing/Editor.meta index 0d41aa00..7b4939e4 100644 --- a/Assets/Plugins/UnityPurchasing/Editor.meta +++ b/Assets/Plugins/UnityPurchasing/Editor.meta @@ -2,7 +2,7 @@ fileFormatVersion: 2 guid: beabab81fac9c4cfeb330a7a850aeccc folderAsset: yes timeCreated: 1456232042 -licenseType: Store +licenseType: Pro DefaultImporter: userData: assetBundleName: diff --git a/Assets/Plugins/UnityPurchasing/iOS/UnityPurchasing.h b/Assets/Plugins/UnityPurchasing/iOS/UnityPurchasing.h index 768a8d4f..c399ff6f 100644 --- a/Assets/Plugins/UnityPurchasing/iOS/UnityPurchasing.h +++ b/Assets/Plugins/UnityPurchasing/iOS/UnityPurchasing.h @@ -5,7 +5,7 @@ typedef void (*UnityPurchasingCallback)(const char* subject, const char* payload, const char* receipt, const char* transactionId); @interface ProductDefinition : NSObject - + @property (nonatomic, strong) NSString *id; @property (nonatomic, strong) NSString *storeSpecificId; @property (nonatomic, strong) NSString *type; @@ -23,6 +23,7 @@ typedef void (*UnityPurchasingCallback)(const char* subject, const char* payload NSSet* productIds; SKProductsRequest *request; NSMutableDictionary *pendingTransactions; + NSMutableSet *finishedTransactions; } + (NSArray*) deserializeProductDefs:(NSString*)json; @@ -34,5 +35,7 @@ typedef void (*UnityPurchasingCallback)(const char* subject, const char* payload -(void) addTransactionObserver; @property (nonatomic, strong) ReceiptRefresher* receiptRefresher; @property (nonatomic, strong) SKReceiptRefreshRequest* refreshRequest; +@property BOOL simulateAskToBuyEnabled; +@property (nonatomic, copy, readwrite) NSString* applicationUsername; @end diff --git a/Assets/Plugins/UnityPurchasing/iOS/UnityPurchasing.m b/Assets/Plugins/UnityPurchasing/iOS/UnityPurchasing.m index 5303fd53..66150de6 100644 --- a/Assets/Plugins/UnityPurchasing/iOS/UnityPurchasing.m +++ b/Assets/Plugins/UnityPurchasing/iOS/UnityPurchasing.m @@ -46,24 +46,24 @@ @implementation UnityPurchasing int delayInSeconds = 2; -(NSString*) getAppReceipt { - + NSBundle* bundle = [NSBundle mainBundle]; if ([bundle respondsToSelector:@selector(appStoreReceiptURL)]) { NSURL *receiptURL = [bundle appStoreReceiptURL]; if ([[NSFileManager defaultManager] fileExistsAtPath:[receiptURL path]]) { NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; - + #if MAC_APPSTORE // The base64EncodedStringWithOptions method was only added in OSX 10.9. NSString* result = [receipt mgb64_base64EncodedString]; #else NSString* result = [receipt base64EncodedStringWithOptions:0]; #endif - + return result; } } - + UnityPurchasingLog(@"No App Receipt found"); return @""; } @@ -104,7 +104,7 @@ -(NSString*) selectReceipt:(SKPaymentTransaction*) transaction { } NSString* receipt; receipt = [[NSString alloc] initWithData:transaction.transactionReceipt encoding: NSUTF8StringEncoding]; - + return receipt; } else { return [self getAppReceipt]; @@ -136,7 +136,7 @@ -(void) refreshReceipt { // Handle a new or restored purchase transaction by informing Unity. - (void)onTransactionSucceeded:(SKPaymentTransaction*)transaction { NSString* transactionId = transaction.transactionIdentifier; - + // This should never happen according to Apple's docs, but it does! if (nil == transactionId) { // Make something up, allowing us to identifiy the transaction when finishing it. @@ -144,11 +144,19 @@ - (void)onTransactionSucceeded:(SKPaymentTransaction*)transaction { UnityPurchasingLog(@"Missing transaction Identifier!"); } + // This transaction was marked as finished, but was not cleared from the queue. Try to clear it now, then pass the error up the stack as a DuplicateTransaction + if ([finishedTransactions containsObject:transactionId]) { + [[SKPaymentQueue defaultQueue] finishTransaction:transaction]; + UnityPurchasingLog(@"DuplicateTransaction error with product %@ and transactionId %@", transaction.payment.productIdentifier, transactionId); + [self onPurchaseFailed:transaction.payment.productIdentifier reason:@"DuplicateTransaction"]; + return; // EARLY RETURN + } + // Item was successfully purchased or restored. if (nil == [pendingTransactions objectForKey:transactionId]) { [pendingTransactions setObject:transaction forKey:transactionId]; } - + [self UnitySendMessage:@"OnPurchaseSucceeded" payload:transaction.payment.productIdentifier receipt:[self selectReceipt:transaction] transactionId:transactionId]; } @@ -157,8 +165,9 @@ -(void) finishTransaction:(NSString *)transactionIdentifier { SKPaymentTransaction* transaction = [pendingTransactions objectForKey:transactionIdentifier]; if (nil != transaction) { UnityPurchasingLog(@"Finishing transaction %@", transactionIdentifier); - [[SKPaymentQueue defaultQueue] finishTransaction:transaction]; + [[SKPaymentQueue defaultQueue] finishTransaction:transaction]; // If this fails (user not logged into the store?), transaction is already removed from pendingTransactions, so future calls to finishTransaction will not retry [pendingTransactions removeObjectForKey:transactionIdentifier]; + [finishedTransactions addObject:transactionIdentifier]; } else { UnityPurchasingLog(@"Transaction %@ not found!", transactionIdentifier); } @@ -190,18 +199,37 @@ -(void) purchaseProduct:(ProductDefinition*)productDef { // Look up our corresponding product. SKProduct* requestedProduct = [validProducts objectForKey:productDef.storeSpecificId]; - + if (requestedProduct != nil) { UnityPurchasingLog(@"PurchaseProduct: %@", requestedProduct.productIdentifier); - + if ([SKPaymentQueue canMakePayments]) { - SKPayment *paymentRequest = [SKPayment paymentWithProduct:requestedProduct]; - [[SKPaymentQueue defaultQueue] addPayment:paymentRequest]; + SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:requestedProduct]; + + // Modify payment request for testing ask-to-buy + if (_simulateAskToBuyEnabled) { + if ([payment respondsToSelector:@selector(setSimulatesAskToBuyInSandbox:)]) { + UnityPurchasingLog(@"Queueing payment request with simulatesAskToBuyInSandbox enabled"); + [payment performSelector:@selector(setSimulatesAskToBuyInSandbox:) withObject:@YES]; + //payment.simulatesAskToBuyInSandbox = YES; + } + } + + // Modify payment request with "applicationUsername" for fraud detection + if (_applicationUsername != nil) { + if ([payment respondsToSelector:@selector(setApplicationUsername:)]) { + UnityPurchasingLog(@"Setting applicationUsername to %@", _applicationUsername); + [payment performSelector:@selector(setApplicationUsername:) withObject:_applicationUsername]; + //payment.applicationUsername = _applicationUsername; + } + } + + [[SKPaymentQueue defaultQueue] addPayment:payment]; } else { UnityPurchasingLog(@"PurchaseProduct: IAP Disabled"); [self onPurchaseFailed:productDef.storeSpecificId reason:@"PurchasingUnavailable"]; } - + } else { [self onPurchaseFailed:productDef.storeSpecificId reason:@"ItemUnavailable"]; } @@ -243,14 +271,14 @@ -(void) addTransactionObserver { // Store Kit returns a response from an SKProductsRequest. - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { - + UnityPurchasingLog(@"Received %lu products", (unsigned long) [response.products count]); // Add the retrieved products to our set of valid products. NSDictionary* fetchedProducts = [NSDictionary dictionaryWithObjects:response.products forKeys:[response.products valueForKey:@"productIdentifier"]]; [validProducts addEntriesFromDictionary:fetchedProducts]; NSString* productJSON = [UnityPurchasing serializeProductMetadata:response.products]; - + // Send the app receipt as a separate parameter to avoid JSON parsing a large string. [self UnitySendMessage:@"OnProductsRetrieved" payload:productJSON receipt:[self selectReceipt:nil] ]; } @@ -263,7 +291,7 @@ - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProdu - (void)request:(SKRequest *)request didFailWithError:(NSError *)error { delayInSeconds = MIN(MAX_REQUEST_PRODUCT_RETRY_DELAY, 2 * delayInSeconds); UnityPurchasingLog(@"SKProductRequest::didFailWithError: %ld, %@. Unity Purchasing will retry in %i seconds", (long)error.code, error.description, delayInSeconds); - + [self initiateProductPoll:delayInSeconds]; } @@ -300,11 +328,11 @@ - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)tran UnityPurchasingLog(@"UpdatedTransactions"); for(SKPaymentTransaction *transaction in transactions) { switch (transaction.transactionState) { - + case SKPaymentTransactionStatePurchasing: // Item is still in the process of being purchased break; - + case SKPaymentTransactionStatePurchased: case SKPaymentTransactionStateRestored: { [self onTransactionSucceeded:transaction]; @@ -318,7 +346,7 @@ - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)tran // Purchase was either cancelled by user or an error occurred. NSString* errorCode = [NSString stringWithFormat:@"%ld",(long)transaction.error.code]; UnityPurchasingLog(@"PurchaseFailed: %@", errorCode); - + NSString* reason = [self purchaseErrorCodeToReason:transaction.error.code]; [self onPurchaseFailed:transaction.payment.productIdentifier reason:reason]; @@ -338,7 +366,7 @@ - (void)paymentQueue:(SKPaymentQueue *)queue removedTransactions:(NSArray *)tran // Called when SKPaymentQueue has finished sending restored transactions. - (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue { - + UnityPurchasingLog(@"PaymentQueueRestoreCompletedTransactionsFinished"); [self UnitySendMessage:@"onTransactionsRestoredSuccess" payload:@""]; } @@ -348,7 +376,7 @@ - (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedW { UnityPurchasingLog(@"restoreCompletedTransactionsFailedWithError"); // Restore was cancelled or an error occurred, so notify user. - + [self UnitySendMessage:@"onTransactionsRestoredFail" payload:error.localizedDescription]; } @@ -389,19 +417,19 @@ + (NSString*) serializeProductMetadata:(NSArray*)appleProducts UnityPurchasingLog(@"Product is missing an identifier!"); continue; } - + NSMutableDictionary* hash = [[NSMutableDictionary alloc] init]; [hashes addObject:hash]; - + [hash setObject:[product productIdentifier] forKey:@"storeSpecificId"]; - + NSMutableDictionary* metadata = [[NSMutableDictionary alloc] init]; [hash setObject:metadata forKey:@"metadata"]; - + if (NULL != [product price]) { [metadata setObject:[product price] forKey:@"localizedPrice"]; } - + if (NULL != [product priceLocale]) { NSString *currencyCode = [[product priceLocale] objectForKey:NSLocaleCurrencyCode]; [metadata setObject:currencyCode forKey:@"isoCurrencyCode"]; @@ -412,7 +440,7 @@ + (NSString*) serializeProductMetadata:(NSArray*)appleProducts [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; [numberFormatter setLocale:[product priceLocale]]; NSString *formattedString = [numberFormatter stringFromNumber:[product price]]; - + if (NULL == formattedString) { UnityPurchasingLog(@"Unable to format a localized price"); [metadata setObject:@"" forKey:@"localizedPriceString"]; @@ -425,7 +453,7 @@ + (NSString*) serializeProductMetadata:(NSArray*)appleProducts } else { [metadata setObject:[product localizedTitle] forKey:@"localizedTitle"]; } - + if (NULL == [product localizedDescription]) { UnityPurchasingLog(@"No localized description for: %@. Have your products been disapproved in itunes connect?", [product productIdentifier]); [metadata setObject:@"" forKey:@"localizedDescription"]; @@ -433,8 +461,8 @@ + (NSString*) serializeProductMetadata:(NSArray*)appleProducts [metadata setObject:[product localizedDescription] forKey:@"localizedDescription"]; } } - - + + NSData *data = [NSJSONSerialization dataWithJSONObject:hashes options:0 error:nil]; return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; } @@ -445,6 +473,7 @@ - (id)init { if ( self = [super init] ) { validProducts = [[NSMutableDictionary alloc] init]; pendingTransactions = [[NSMutableDictionary alloc] init]; + finishedTransactions = [[NSMutableSet alloc] init]; } return self; } @@ -524,4 +553,20 @@ void unityPurchasingRefreshAppReceipt() { BOOL getUnityPurchasingCanMakePayments () { return [SKPaymentQueue canMakePayments]; -} \ No newline at end of file +} + +void setSimulateAskToBuy(BOOL enabled) { + UnityPurchasingLog(@"setSimulateAskToBuy %@", enabled ? @"true" : @"false"); + UnityPurchasing_getInstance().simulateAskToBuyEnabled = enabled; +} + +BOOL getSimulateAskToBuy() { + return UnityPurchasing_getInstance().simulateAskToBuyEnabled; +} + +void unityPurchasingSetApplicationUsername(const char *username) { + if (username == NULL) + return; + UnityPurchasing_getInstance().applicationUsername = [NSString stringWithUTF8String:username]; +} + diff --git a/Assets/Plugins/UnityPurchasing/script/IAPDemo.cs b/Assets/Plugins/UnityPurchasing/script/IAPDemo.cs index ab9dd6dc..1c35d1df 100644 --- a/Assets/Plugins/UnityPurchasing/script/IAPDemo.cs +++ b/Assets/Plugins/UnityPurchasing/script/IAPDemo.cs @@ -3,8 +3,10 @@ // before receipt validation will compile in this sample. // #define RECEIPT_VALIDATION #endif +//#define DELAY_CONFIRMATION // Returns PurchaseProcessingResult.Pending from ProcessPurchase, then calls ConfirmPendingPurchase after a delay using System; +using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -95,7 +97,7 @@ public void OnInitialized(IStoreController controller, IExtensionProvider extens for (int t = 0; t < m_Controller.products.all.Length; t++) { var item = m_Controller.products.all[t]; - var description = string.Format("{0} - {1}", item.metadata.localizedTitle, item.metadata.localizedPriceString); + var description = string.Format("{0} | {1} => {2}", item.metadata.localizedTitle, item.metadata.localizedPriceString, item.metadata.localizedPrice); // NOTE: my options list is created in InitUI GetDropdown().options[t] = new Dropdown.OptionData(description); @@ -122,9 +124,6 @@ public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e) m_LastReceipt = e.purchasedProduct.receipt; m_PurchaseInProgress = false; - // Now that my purchase history has changed, update its UI - UpdateHistoryUI(); - #if RECEIPT_VALIDATION // Local validation is available for GooglePlay and Apple stores if (m_IsGooglePlayStoreSelected || @@ -191,8 +190,32 @@ public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e) // m_Controller.ConfirmPendingPurchase(Product) to complete handling // this purchase. Use to transactionally save purchases to a cloud // game service. +#if DELAY_CONFIRMATION + StartCoroutine(ConfirmPendingPurchaseAfterDelay(e.purchasedProduct)); + return PurchaseProcessingResult.Pending; +#else + UpdateHistoryUI(); return PurchaseProcessingResult.Complete; +#endif + } + +#if DELAY_CONFIRMATION + private HashSet m_PendingProducts = new HashSet(); + + private IEnumerator ConfirmPendingPurchaseAfterDelay(Product p) + { + m_PendingProducts.Add(p.definition.id); + Debug.Log("Delaying confirmation of " + p.definition.id + " for 5 seconds."); + UpdateHistoryUI(); + + yield return new WaitForSeconds(5f); + + Debug.Log("Confirming purchase of " + p.definition.id); + m_Controller.ConfirmPendingPurchase(p); + m_PendingProducts.Remove(p.definition.id); + UpdateHistoryUI(); } +#endif /// /// This will be called is an attempted purchase fails. @@ -306,7 +329,13 @@ public void Awake() #if RECEIPT_VALIDATION - validator = new CrossPlatformValidator(GooglePlayTangle.Data(), AppleTangle.Data(), Application.bundleIdentifier); + string appIdentifier; + #if UNITY_5_6_OR_NEWER + appIdentifier = Application.identifier; + #else + appIdentifier = Application.bundleIdentifier; + #endif + validator = new CrossPlatformValidator(GooglePlayTangle.Data(), AppleTangle.Data(), appIdentifier); #endif // Now we're ready to initialize Unity IAP. @@ -508,14 +537,15 @@ public void UpdateHistoryUI() var itemText = "Item\n\n"; var countText = "Purchased\n\n"; - for (int t = 0; t < m_Controller.products.all.Length; t++) - { - var item = m_Controller.products.all [t]; - + foreach (var item in m_Controller.products.all) { // Collect history status report - itemText += "\n\n" + item.definition.id; - countText += "\n\n" + item.hasReceipt.ToString(); + countText += "\n\n"; +#if DELAY_CONFIRMATION + if (m_PendingProducts.Contains(item.definition.id)) + countText += "(Pending) "; +#endif + countText += item.hasReceipt.ToString(); } // Show history diff --git a/Assets/Plugins/UnityPurchasing/script/PurchasingCheck.cs b/Assets/Plugins/UnityPurchasing/script/PurchasingCheck.cs index f288360b..f5409f2a 100644 --- a/Assets/Plugins/UnityPurchasing/script/PurchasingCheck.cs +++ b/Assets/Plugins/UnityPurchasing/script/PurchasingCheck.cs @@ -1,5 +1,3 @@ -/* -#if !UNITY_PURCHASING -#error "Unity IAP plugin is installed, but Unity IAP is not enabled. Please enable Unity IAP in the Services window." -#endif -*/ \ No newline at end of file +#if !UNITY_PURCHASING +#warning "Unity IAP plugin is installed, but Unity IAP is not enabled. Please enable Unity IAP in the Services window." +#endif \ No newline at end of file diff --git a/Assets/Plugins/UnityPurchasing/script/UnibillDemo.cs b/Assets/Plugins/UnityPurchasing/script/UnibillDemo.cs deleted file mode 100644 index 9b652e0d..00000000 --- a/Assets/Plugins/UnityPurchasing/script/UnibillDemo.cs +++ /dev/null @@ -1 +0,0 @@ -// This file can be safely deleted. diff --git a/Assets/Plugins/UnityPurchasing/script/UnibillDemo.cs.meta b/Assets/Plugins/UnityPurchasing/script/UnibillDemo.cs.meta deleted file mode 100644 index 310b638a..00000000 --- a/Assets/Plugins/UnityPurchasing/script/UnibillDemo.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6b92bbbe2771e440ab13bb05afcb9fd7 -timeCreated: 1439309260 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: