読者です 読者をやめる 読者になる 読者になる

all green

プログラム、アプリ作成、Web等備忘録が中心です

通信不可状態でUnityPurchasing.Initializeの挙動

通信ができない状態(機内モードで確認)のUnityPurchasing.Initializeの挙動について


・環境
Unity 5.3.2p2

iOS

1.機内モードにする
2.アプリを起動
3.UnityPurchasing.Initializeを呼ぶ
⇒OnInitialized、OnInitializeFailedどちらも呼ばれない

XCode上でログを確認したところ以下のようなエラー。

2016-03-15 13:06:35.092 chearem[16598:4056934] UnityPurchasing:Requesting product data...
2016-03-15 13:06:35.248 chearem[16598:4056934] UnityPurchasing:SKProductRequest::didFailWithError: 0, Error Domain=SKErrorDomain Code=0 "(null)". Unity Purchasing will retry in 4 seconds
2016-03-15 13:06:39.663 chearem[16598:4056934] UnityPurchasing:Requesting product data...
2016-03-15 13:06:39.729 chearem[16598:4056934] UnityPurchasing:SKProductRequest::didFailWithError: 0, Error Domain=SKErrorDomain Code=0 "(null)". Unity Purchasing will retry in 8 seconds
2016-03-15 13:06:48.525 chearem[16598:4056934] UnityPurchasing:Requesting product data...
2016-03-15 13:06:48.589 chearem[16598:4056934] UnityPurchasing:SKProductRequest::didFailWithError: 0, Error Domain=SKErrorDomain Code=0 "(null)". Unity Purchasing will retry in 16 seconds

2016-03-15 13:07:06.196 chearem[16598:4056934] UnityPurchasing:Requesting product data...
2016-03-15 13:07:06.262 chearem[16598:4056934] UnityPurchasing:SKProductRequest::didFailWithError: 0, Error Domain=SKErrorDomain Code=0 "(null)". Unity Purchasing will retry in 32 seconds

2016-03-15 13:07:41.482 chearem[16598:4056934] UnityPurchasing:Requesting product data...
2016-03-15 13:07:41.547 chearem[16598:4056934] UnityPurchasing:SKProductRequest::didFailWithError: 0, Error Domain=SKErrorDomain Code=0 "(null)". Unity Purchasing will retry in 60 seconds

Android


1.機内モードにする
2.アプリを起動
3.UnityPurchasing.Initializeを呼ぶ
⇒OnInitialized、OnInitializeFailedどちらも呼ばれない

03-15 14:04:16.469: I/Unibill(27996): getSkuDetails() failed: 6:Error
03-15 14:04:16.469: I/Unibill(27996): onQueryInventoryFinished: false
03-15 14:04:16.469: I/Unibill(27996): Error refreshing inventory (querying prices of items). (response: 6:Error)
03-15 14:04:16.469: I/Unibill(27996): Failed to Query inventory. Unibill will automatically retry in 5000ms
03-15 14:04:16.470: I/Unibill(27996): QueryInventory: 7
03-15 14:04:16.470: I/Unibill(27996): invoking callback

03-15 14:04:21.653: I/Unibill(27996): getSkuDetails() failed: 6:Error
03-15 14:04:21.653: I/Unibill(27996): onQueryInventoryFinished: false
03-15 14:04:21.653: I/Unibill(27996): Error refreshing inventory (querying prices of items). (response: 6:Error)
03-15 14:04:21.653: I/Unibill(27996): Failed to Query inventory. Unibill will automatically retry in 10000ms


通信できない場合は自動でリトライをしてくれるようです。