{"id":294,"date":"2019-02-12T06:47:45","date_gmt":"2019-02-12T06:47:45","guid":{"rendered":"https:\/\/www.londonbuspal.co.uk\/blog\/?p=294"},"modified":"2019-02-12T06:47:47","modified_gmt":"2019-02-12T06:47:47","slug":"flutter-in-app-purchases-part-2","status":"publish","type":"post","link":"https:\/\/www.londonbuspal.co.uk\/blog\/flutter-in-app-purchases-part-2\/","title":{"rendered":"Flutter in-app purchases (part 2)"},"content":{"rendered":"\n<p>My previous post (<a href=\"https:\/\/www.londonbuspal.co.uk\/blog\/flutter-in-app-purchases-part-1\/\">part 1<\/a>) on implementing in-app purchases in my Flutter app, was a bit of a vent after being incredibly frustrated with Apple&#8217;s process for using in-app purchases.  It went relatively well implementing it for Android, but I had some challenges with Apple.<\/p>\n\n\n\n<p>Appears though, I have to eat some humble pie!  Despite a strange approval process with Apple, it would seem like the purchases work without requiring their approval (at least they load up, not sure if I can actually buy something).  I had incorrectly assumed that I wasn&#8217;t seeing them in my app, because they still required some approval.  It turns out, I had to just write my code properly and it will all work.<\/p>\n\n\n\n<p>I am not completely done yet with Apple, however, I believe I&#8217;m on the home stretch.  I deleted my old, incorrectly named in-app purchases and replaced them with new ones which are named according to the suggested convention.  I updated the code to work with the new names and submitted my app.<\/p>\n\n\n\n<p>Yesterday, it was approved by Apple and I also had a courtesy note to say that the in-app purchases which I deleted, was approved at the same time.<\/p>\n\n\n\n<p>Now the entire in-app purchase submission confuses me.  I tried to submit the new ones with my build yesterday, but couldn&#8217;t really find them.  Today, I thought I would check this again and try to submit a new build.  The option is still not there, but I noticed the in-app purchases have changed status to &#8220;In review&#8221;.  Apple&#8217;s &#8220;developer console&#8221; makes me feel very uneasy &#8211; it isn&#8217;t always clear how or where to do things and having a section like the in-app purchase submission only appear in certain circumstances is not very user-friendly.<\/p>\n\n\n\n<p>I might just leave the app alone for a day and see if my purchases are approved.  At least the app has been approved, so all good from that point of view.<\/p>\n\n\n\n<p>When using libraries in Flutter, one of the main usability features for me, is that I don&#8217;t want to have different code for iOS and Android.  Two days ago when I assumed that Apple was in the wrong, I was thinking that this library doesn&#8217;t really protect that developer experience.  In hindsight though, it completely protects that because I managed to use the same code apart from my list of in-app purchase names for both platforms.<\/p>\n\n\n\n<p>Now I just have to wait for the money to roll in!<\/p>\n\n\n\n<p>The library in questioned which I used was <a href=\"https:\/\/pub.dartlang.org\/packages\/flutter_inapp_purchase\">flutter_inapp_purchase<\/a> (version 0.8.8+2 at time of writing).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"920\" src=\"https:\/\/www.londonbuspal.co.uk\/blog\/wp-content\/uploads\/2019\/02\/tipscreen.png\" alt=\"\" class=\"wp-image-292\" srcset=\"https:\/\/www.londonbuspal.co.uk\/blog\/wp-content\/uploads\/2019\/02\/tipscreen.png 640w, https:\/\/www.londonbuspal.co.uk\/blog\/wp-content\/uploads\/2019\/02\/tipscreen-209x300.png 209w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>My first implementation of the support me screen.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>My previous post (part 1) on implementing in-app purchases in my Flutter app, was a bit of a vent after [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[],"class_list":["post-294","post","type-post","status-publish","format-standard","hentry","category-london-bus-pal"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/posts\/294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=294"}],"version-history":[{"count":2,"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/posts\/294\/revisions"}],"predecessor-version":[{"id":298,"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/posts\/294\/revisions\/298"}],"wp:attachment":[{"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.londonbuspal.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}