문제

I have to use a function in Prime31 for requestiong product data in ios. The function is

var iosProductIds = new string[] { "com.something.dollar"};

IAP.requestProductData( iosProductIds, androidSkus, productList =>
{
  Debug.Log( "Product list received" );
  Utils.logObject( productList );
});

its working fine.

But if i extract a value from array named "pArray" and declared it as a variable

var pid = pArray [0];

and passing to function as

string[] stringArray = new string[1];
stringArray[0] =pid ;
var iosProductIds = stringArray;

throws error "StoreKit: invalid productIdentifier: com.something.dollar" .

I tried

string pid = pArray [0]; 

also. But stucked with same error.

How can i clear it?

도움이 되었습니까?

해결책

string pid = pArray [0]; 
string[] stringArray = new string[1];
stringArray[0] = pid.Trim();
var iosProductIds = stringArray;

works fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top