Today’s topic about Xcode iOS Mobile Application Version and Bundle Changes in Apple Store involves a common enough scenario using Mac OS X on a MacBook Pro. We want to upgrade our iOS “Make Your Own Charts” mobile application, in iOS, specifically just for iPad, at this stage.
The motivation for doing this upgrade is really simple. Since the last upgrade it has become unsupported for Apple iOS UIWebView mobile application components to involve HTTP:// URLs, in favour of HTTPS:// URLs. That push we’ve started “the long haul” regarding, a couple of weeks ago, comes into play now. We’ve started changing a lot of our thinking around the goings on at the rjmprogramming.com.au domain, to involve HTTPS:// URLs, generally speaking.
That push for HTTPS:// is all fine and good, but the enthusiasm needs to be tempered a bit. We’ve found, if you haven’t been thinking this way for a long time, don’t assume you can just waltz along and change HTTP:// to HTTPS:// everywhere, and expect it all to work. For instance, one of the big “heads up” we need in this area is to examine the impact of HTTPS:// thinking regarding any PHP calling on the file_get_contents functionality.
Okay, so in our mobile development compartmentalized thinking, good reading for which is Xcode Swift iOS Application End Game Primer Tutorial, into …
- Start Game … getting set up with Xcode IDE, joining the Apple iOS Developer (and Distributor) Program and getting some real iOS devices ready with suitable iOS operating systems (get the latest, as a general rule)
- Middle Game … Xcode Swift or Objective-C mobile application development to the testing phase onto a real device
- End Game … Xcode build as Archive, through to Organizer validation, export, and upload to the Apple Store through to ITunes Connect Apple Store sales setup, and any promotion you want to undertake
- The upgrade of the Swift code to Swift 3 needed some minor changes
- That change to the code to make the UIWebView URL involve HTTPS:// rather than HTTP://
- Since the last change, we now need a 167×167 “Appicon” (Xcasset resource) to cater for the iPad Pro usage
- We need to make sure there is a 64 bit version of the web application
- We need to increase the Bundle Version of the mobile application
- We need to retest these changes on a real iPad device
- The upgrade of the Swift code to Swift 3 needed some minor changes …
- On entering the Xcode “Interactive Google Charts” project for the first time, choose Edit -> Convert -> To Current Swift Syntax… as required (and it was for us)
- This will introduce coding syntax bugs that you should Google about … we found help here, thanks, regarding this
- That change to the code to make the UIWebView URL involve HTTPS:// rather than HTTP:// …
- In ViewController.swift change the URL, that the mobile application UIWebView uses, from …
myWebView.loadRequest(URLRequest(url: URL(string: "HTTP://www.rjmprogramming.com.au/PHP/PieChart/pie_chart.php?blah=blah")!))
… to …
myWebView.loadRequest(URLRequest(url: URL(string: "HTTPS://www.rjmprogramming.com.au/PHP/PieChart/pie_chart.php?blah=blah")!))
… do you remember our preparations for this some time back at SSL Software Suite Changes Primer Tutorial?
- In ViewController.swift change the URL, that the mobile application UIWebView uses, from …
- Since the last change, we now need a 167×167 Appicon for the iPad Pro …
- On MacBook Pro before steps below organize a good “larger than anything needed” screenshot of the “Make Your Own Charts” mobile application and have it located in the Finder
- In Xcode Project Navigator -> Images.xcassets click
- Open Appicon Image Set
- Look for “iPad Pro App iOS 9-10 83.5 pt” as the one we drag that big image from the Finder onto … if not there you’ll need to two finger gesture Appicon -> Remove Selected Item, and recreate it and follow the steps below for all the Appicon variations (lots) but with different dimensions, for the most part, with the image resizing in Paintbrush advice
- Two finger gesture “iPad Pro App iOS 9-10 83.5 pt” and choose Show in Finder
- In that Finder window two finger gesture the PNG image and, for us, we want to choose Open With -> Paintbrush
- Use Paintbrush menu Image -> Image Size… pick pixels and set width and height to 167 and File -> Save
- We need to make sure there is a 64 bit version of the web application … what we had wrong, but you may be okay with was …
- In “Interactive Google Charts” project -> Build Settings -> Architectures -> Build Active Architecture Only we wrongly had Yes when it is better to say No … and some of the reason for this occurred because earlier on we …
- Make the “Interactive Google Charts” project -> Info -> iOS Deployment Target 10.3 and at “Interactive Google Charts” project -> Build Settings -> Architectures -> Base SDK -> Latest iOS (iOS 10.3) … in terms of the No above we declare this to “most likely” be the best combination of settings here
- We need to increase the Bundle Version of the mobile application …
- For Bundle version change we used the Find navigator and found references to “Bundle” and picked the one that goes $(PRODUCT_BUNDLE_IDENTIFIER) … clicking on it … which got us to Info.plist change places to make it 1.3
- We need to retest these changes on a real iPad device …
- Plug the real iPad into MacBook Pro via Apple white lead
- On iPad ignore any iTunes synching
- Back at MacBook Pro in Xcode choose Product -> Destination -> (in my case) Robert’s iPad
- Product -> Run … to satisfaction
- in Xcode project “Interactive Google Charts” main menu Product -> Archive
- Window -> Organizer -> pick top of list “Interactive Google Charts” click Validate button … this is worth doing, as it put us onto two problems above, those being the 167×167 “Appicon” (Xcasset resource) and the 64 bit requirement, two inadequacies that don’t show as problems with an Xcode build of any sort
- Click Export button
- Click Upload to App Store… button
- Back at web browser navigate to Itunes Connect
- Login with AppleID and its password
- Satisfied some maintenance tasks okaying new Apple mobile application App Store arrangements involved with the Standard Agreement and the financial side to previous 1.1 version transactions, which you have to satisfy to get anywhere else with what follows
- Click MyApps
- Click “+” button at top left and choose New App Bundle choice
- Fill out fields and get to the Build section, selecting the 1.3 version build from that Xcode Product -> Archive execution above
- Construct an application icon of 2732×2048 via iPad screenshot (remember Emailing iPad Screenshot Primer Tutorial‘s
an image or photo photo (that could have been created by simultaneously holding iPadβs large βhomeβ button and smaller opposite side button at a screenshot β¦
β¦ of interest) that can be touched in the Photos app and a Share to Email option chosen to send it on in an email
?)
- In Others sections we also added a screenshot from the previous 1.1 version release (some time ago now)
- Filled in the rest of the fields to satisfaction and clicked Save
- Click Submit for Review button to send to Apple for mobile application assessment phase
- Adding Image Assets
- Xcode Missing 64 bit error
- Error while Validating app (ITunesSoftwareServiceAuthenticationErrorDomain error 434.) … upshot … try again
- How to add that 167×167 appicon discussion
- Codesign Error discussion
… where does our “upgrade” fit? A bit of the “Middle Game” and lots of the “End Game” is our answer. The bit of the “Middle Game” was bigger than we expected, and we should go into that a bit below.
… and the means by which we dealt with all these involved …
Now, take a deep breath, as we enter the “End Game” Zone! Here’s a synopsis of what we did here in this very structured area of (iOS mobile) development work.
… and we figure we can help out a little here with some links we found useful, here, below …
We hope this gives you iOS mobile application via Xcode “food for thought”. A bit of a stream of consciousness view of it from our experience of it is viewable at our PDF slideshow presentation today.
If this was interesting you may be interested in this too.