{"id":2493,"date":"2022-07-05T11:45:15","date_gmt":"2022-07-05T15:45:15","guid":{"rendered":"https:\/\/bitpost.com\/news\/?p=2493"},"modified":"2022-07-07T11:34:29","modified_gmt":"2022-07-07T15:34:29","slug":"kicking-off-a-mobile-app-in-mid-2022","status":"publish","type":"post","link":"https:\/\/bitpost.com\/news\/2022\/kicking-off-a-mobile-app-in-mid-2022\/","title":{"rendered":"Kicking off a mobile app in mid-2022"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/i0.wp.com\/bitpost.com\/news\/wp-content\/uploads\/photo1657035397.jpeg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"863\" data-attachment-id=\"2504\" data-permalink=\"https:\/\/bitpost.com\/news\/2022\/kicking-off-a-mobile-app-in-mid-2022\/photo1657035397\/\" data-orig-file=\"https:\/\/i0.wp.com\/bitpost.com\/news\/wp-content\/uploads\/photo1657035397.jpeg?fit=647%2C863&amp;ssl=1\" data-orig-size=\"647,863\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"photo1657035397\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/bitpost.com\/news\/wp-content\/uploads\/photo1657035397.jpeg?fit=225%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/bitpost.com\/news\/wp-content\/uploads\/photo1657035397.jpeg?fit=647%2C863&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/bitpost.com\/news\/wp-content\/uploads\/photo1657035397.jpeg?resize=647%2C863&#038;ssl=1\" alt=\"\" class=\"wp-image-2504\" srcset=\"https:\/\/i0.wp.com\/bitpost.com\/news\/wp-content\/uploads\/photo1657035397.jpeg?w=647&amp;ssl=1 647w, https:\/\/i0.wp.com\/bitpost.com\/news\/wp-content\/uploads\/photo1657035397.jpeg?resize=225%2C300&amp;ssl=1 225w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/a><\/figure>\n\n\n\n<p>I went swimming in the Atlantic for a couple hours.  With my Samsung phone in my pocket.<\/p>\n\n\n\n<p>So when I got an updated Android phone, I got an iPhone too.  Time for some mobile app development.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Here&#8217;s what I got through on the long weekend&#8230;<\/p>\n\n\n\n<p>I briefly considered Flutter, Xamarin, and React Native to give me one code base for both systems.  The guarantee of a smooth future using Apple and Google tooling won me over though.  Boning up on two familiar systems outweighed learning a new one that will likely go out of fashion before long.<\/p>\n\n\n\n<p><span style=\"font-size: revert; color: initial;\">iPhone app development requires a macOS to publish to the app store.  So I set up an <a href=\"https:\/\/github.com\/thenickdude\/KVM-Opencore\" target=\"_blank\" rel=\"noreferrer noopener\">OpenCore<\/a> VM on Proxmox, and my old MacBook Pro has risen from the ashes, <a href=\"https:\/\/bitpost.com\/wiki\/IOS\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"\">virtualized<\/a>.  Not trivial, not extremely difficult.<\/span><\/p>\n\n\n\n<p>The Apple docs to <a href=\"https:\/\/developer.apple.com\/tutorials\/app-dev-training\" target=\"_blank\" rel=\"noreferrer noopener\">set up a Swift 5.0 application<\/a> are great to get an initial UI going.<\/p>\n\n\n\n<p>The back end will consist of hitting my API and getting the JSON data needed to populate the UI data.  The classic solution is <a href=\"https:\/\/github.com\/Alamofire\/Alamofire\">Alamofire<\/a>.  The modern iOS 15 solution is async\/await-aware variant of URLSession.  A <a href=\"https:\/\/gs.statcounter.com\/ios-version-market-share\/all\/united-states-of-america\" target=\"_blank\" rel=\"noreferrer noopener\">quick look<\/a> at iOS marketshare says 80% of users have iOS 15.  I&#8217;ll pull the trigger and future-proof my work by going with the modern approach, which requires a recent version of iOS.<\/p>\n\n\n\n<p>There are a couple libraries that might help (<a href=\"https:\/\/github.com\/freshOS\/Networking\" target=\"_blank\" rel=\"noreferrer noopener\">FreshOS\/Networking<\/a>, <a href=\"https:\/\/github.com\/immobiliare\/RealHTTP\" target=\"_blank\" rel=\"noreferrer noopener\">RealHTTP<\/a>) but keeping dependencies out is good too.  I want to keep my mobile apps absolutely as simple as possible so I will use the simplest code I can (something like <a href=\"https:\/\/www.ralfebert.com\/ios-app-development\/swiftui-async-await-tutorial\/\" target=\"_blank\" rel=\"noreferrer noopener\">this<\/a>) to do a modern JSON API pull.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I went swimming in the Atlantic for a couple hours. With my Samsung phone in my pocket. So when I got an updated Android phone, I got an iPhone too. Time for some mobile app development.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[204],"tags":[306,308,307],"class_list":["post-2493","post","type-post","status-publish","format-standard","hentry","category-a-better-trader","tag-macos","tag-proxmox","tag-swift"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9M11L-Ed","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/2493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/comments?post=2493"}],"version-history":[{"count":9,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/2493\/revisions"}],"predecessor-version":[{"id":2509,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/2493\/revisions\/2509"}],"wp:attachment":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/media?parent=2493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/categories?post=2493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/tags?post=2493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}