ios - In app purchase, ID products -


i'm working on in-app purchases, if found tutorial, have question. in tutorial, buy button associate method :

- (void)buybuttontapped:(id)sender {  uibutton *buybutton = (uibutton *)sender; skproduct *product = _products[buybutton.tag];  nslog(@"buying %@...", product.productidentifier); [[rageiaphelper sharedinstance] buyproduct:product];  } 

but in app, don't want use table views show products; have create uibuttons customs images.

i try code :

-(void)buypackage1 { skproduct * productpackage1; nsstring * productid = @"com.razeware.inapprage.drummerrage";   //id of tutorial productpackage1.productidentifier = productid; [[rageiaphelper sharedinstance] buyproduct:productpackage1]; } 

but gives me : "assignment readonly property"

and also, method create in-app purchase ? mean, taking code (from tutorial) , adapt interface contain uibuttons , not table view ?

see,

"assignment readonly property" indeed, `skproduct productidentifier property readonly, can't perform write operation on it.

about 2 questions firstly think requirement want in application think on , try write code according requirement told in question don't want show tableview.and tutorial give understanding of how code new thing or how improve existing thing. should see way inside tutorial have used making purchases.

i tell experience, before using inapp purchases in code. felt fear it,but read refrence guide , start reading tutorial same.learned inapp purchase. you, read reference guide it,this in app purchases , try inapp tutorials like.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -