From 959b5f66e9eff86a3771720913b6b556ba3bc51e Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Tue, 9 Oct 2018 21:30:10 -0400 Subject: [PATCH 01/11] Not too much to work with anyway --- doc/deploy/ios.md | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index 07d843d88..a5be37565 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -1,28 +1,17 @@ -## Deploying to the Apple App Store +# Building an iOS app to Deploy in XCode. -Forthcoming, aka @akaplo doesn't entirely remember and will document when he steps through the process next. However, the general process is as follows. +## Requirements -##### Prerequirements -- You **must** read the [general deploy info](README.md). -- You **must** have access to the PVTA's [Apple Developer](developer.apple.com) account. -- You **must** have Xcode >= 7 installed on macOS >= 10.11. +### General -##### Steps +### XCode -1. `npm install` - -2. Open `config.xml`. On line 2, increment `ios-CFBundleVersion` with your appropriately chosen new version number. - -3. (PVTrAck 2+) `ionic cordova build ios --prod --release` - - Troubleshooting: if you get an error related to whether this is an iOS project, try the following: +## Build the app + +## Troubleshooting +- You get an error related to whether this is an iOS project, try adding and removing the platform: ``` $ ionic platform rm ios $ ionic platform add ios ``` -4. Open the project in Xcode, where the iOS project root is at `platforms/ios/`. - -5. `TODO` Add detail and break into multiple steps. - - Build a release archive and upload it to iTunes Connect through Xcode. From 0a406548db85596f3acbbf1c9bd1e86d1faf9907 Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Tue, 9 Oct 2018 21:55:31 -0400 Subject: [PATCH 02/11] From the notes I had about deploying ios --- doc/deploy/ios.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index a5be37565..e84457ce6 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -1,13 +1,50 @@ # Building an iOS app to Deploy in XCode. ## Requirements +_It is assumed that you are using a Mac._ ### General +- Read the [general deploy doc information](README.md) first. +- Assure that you have access to [App Store Connect](https://appstoreconnect.apple.com/). +Ask @sherson if you don't have it. ### XCode +- Apple will most likely require the latest version of XCode. +That is, you maybe able to build the app in XCode x.x, +but it can't be submitted to the app store. +The latest version of XCode may involve updating to the latest +macOS and reinstalling the latest version of XCode. +1. XCode is probably already on your Mac. If not, or if you need the latest version, + download it from [apple](https://developer.apple.com/download) ## Build the app - +1. In `config.xml`, replace the value of `ios-CFBundleVersion` with the new version number. +1. Run `ionic cordova build ios --prod --release`. +1. To open the project in XCode, let's use the terminal: + 1. cd into the project directory + 1. Then, `cd /pvta-multiplatform/platforms/ios/` + 1. From there, run `open -a Finder .`. + 1. The file `PVTrAck.xcodeproj` is the one that we want to open with XCode. +1. Sign into XCode: + 1. XCode > Preferences > Accounts > + > Apple ID + 1. Click "Continue" + 1. Fill in apple ID with "pvtadeveloper@gmail.com" and password with the password from Karin, Adam, or Molly. + 1. Click "Next". + 1. Exit out of Preferences. +1. Cosign the app: + 1. Go into the project editor. Click "PVTrAck" under "TARGETS". + 1. Go to the "Signing" section. + 1. Uncheck "Automatically manage signing", select "Pioneer Valley Transit Authority" + from the "Team" dropdown, and check "Automatically manage signing" + (this prevents the build from failing for some reason). +1. Create an archive: + 1. In XCode, select Product > Scheme > Edit Scheme. + 1. Choose "Archive" from the list on the left. + 1. The build config should be "Release" unless you're making a debug build. +1. Product > Run for debug, but otherwise: +1. Product > Build + 1. Follow the proper steps to fix the code if the build fails. If the build passes, continue on. + ## Troubleshooting - You get an error related to whether this is an iOS project, try adding and removing the platform: From 733b376b9847c68f173b731858dd9cc1f99cc583 Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Tue, 9 Oct 2018 22:02:30 -0400 Subject: [PATCH 03/11] Flesh out resubmitting a build and troubleshooting section --- doc/deploy/ios.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index e84457ce6..357736317 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -45,10 +45,25 @@ macOS and reinstalling the latest version of XCode. 1. Product > Build 1. Follow the proper steps to fix the code if the build fails. If the build passes, continue on. +## Resubmitting a Build +1. In XCode, go to the project editor. In "TARGETS" > PVTrAck, look at the "Identity" section. + There is a field for "Build". This value is for App Store Connect + and it does _not_ affect the version number. However, there is a chance + that the build and version numbers are the same. +1. In order to submit a new build (due to any relevant issues below or not listed), +increment the build number. Then, rebuild. That's it! + ## Troubleshooting -- You get an error related to whether this is an iOS project, try adding and removing the platform: +- Error related to whether this is an iOS project, try adding and removing the platform: ``` $ ionic platform rm ios $ ionic platform add ios ``` +- Build "disappears" once uploaded and processing in App Store Connect + + Resubmit the build and try again. + +- Duplicate Error +- Legacy Build +- Not signed From c70f2e2b152bc248122f305a2679ddc6b529f7a7 Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Thu, 11 Oct 2018 10:33:21 -0400 Subject: [PATCH 04/11] Remove steps that are already in the ionic docs --- doc/deploy/ios.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index 357736317..25d5b0d8b 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -18,20 +18,16 @@ macOS and reinstalling the latest version of XCode. download it from [apple](https://developer.apple.com/download) ## Build the app +1. General instructions can be found in the [ionic docs](https://ionicframework.com/docs/intro/deploying/). I'll be referring to them. 1. In `config.xml`, replace the value of `ios-CFBundleVersion` with the new version number. 1. Run `ionic cordova build ios --prod --release`. -1. To open the project in XCode, let's use the terminal: - 1. cd into the project directory - 1. Then, `cd /pvta-multiplatform/platforms/ios/` - 1. From there, run `open -a Finder .`. - 1. The file `PVTrAck.xcodeproj` is the one that we want to open with XCode. -1. Sign into XCode: - 1. XCode > Preferences > Accounts > + > Apple ID - 1. Click "Continue" +1. Open the project in XCode, following the instructions for "Running your App". The file `PVTrAck.xcodeproj` is the one that we want to open with XCode. +1. Sign into XCode using steps from ionic docs. 1. Fill in apple ID with "pvtadeveloper@gmail.com" and password with the password from Karin, Adam, or Molly. 1. Click "Next". 1. Exit out of Preferences. -1. Cosign the app: +1. Code Sign the app (these steps are not on the ionic docs). + 1. Select "General". 1. Go into the project editor. Click "PVTrAck" under "TARGETS". 1. Go to the "Signing" section. 1. Uncheck "Automatically manage signing", select "Pioneer Valley Transit Authority" From c958caf20cb2690eb779273a084c970abbec1f98 Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Thu, 11 Oct 2018 13:01:09 -0400 Subject: [PATCH 05/11] Editing the doc and styles --- doc/deploy/ios.md | 48 ++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index 25d5b0d8b..8fd37fa69 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -5,51 +5,59 @@ _It is assumed that you are using a Mac._ ### General - Read the [general deploy doc information](README.md) first. -- Assure that you have access to [App Store Connect](https://appstoreconnect.apple.com/). +- Assure that you have access to [Itunes Connect](https://itunesconnect.apple.com/). Ask @sherson if you don't have it. ### XCode - Apple will most likely require the latest version of XCode. -That is, you maybe able to build the app in XCode x.x, +That is, you may be able to build the app in XCode x.x, but it can't be submitted to the app store. The latest version of XCode may involve updating to the latest -macOS and reinstalling the latest version of XCode. +macOS and reinstalling XCode. 1. XCode is probably already on your Mac. If not, or if you need the latest version, - download it from [apple](https://developer.apple.com/download) + you can download it from [apple](https://developer.apple.com/download) ## Build the app -1. General instructions can be found in the [ionic docs](https://ionicframework.com/docs/intro/deploying/). I'll be referring to them. +1. General instructions can be found in the [ionic docs](https://ionicframework.com/docs/intro/deploying/). I'll be referring to them periodically. 1. In `config.xml`, replace the value of `ios-CFBundleVersion` with the new version number. -1. Run `ionic cordova build ios --prod --release`. -1. Open the project in XCode, following the instructions for "Running your App". The file `PVTrAck.xcodeproj` is the one that we want to open with XCode. -1. Sign into XCode using steps from ionic docs. - 1. Fill in apple ID with "pvtadeveloper@gmail.com" and password with the password from Karin, Adam, or Molly. +1. Run `npm install`. +1. Then, run `ionic cordova build ios --prod --release`. +1. Open the project in XCode, following the ionic doc iOS instructions for "Running your App". + The file `PVTrAck.xcodeproj` is the one that we want to open with XCode. +1. Sign into XCode using steps from the ionic docs. + 1. Fill in apple ID with "pvtadeveloper@gmail.com" and password with the password from @anbranin, @sherson, or @mboneil10. 1. Click "Next". 1. Exit out of Preferences. -1. Code Sign the app (these steps are not on the ionic docs). +1. Code Sign the app (these steps are not on the ionic docs for XCode 9+). 1. Select "General". 1. Go into the project editor. Click "PVTrAck" under "TARGETS". 1. Go to the "Signing" section. - 1. Uncheck "Automatically manage signing", select "Pioneer Valley Transit Authority" - from the "Team" dropdown, and check "Automatically manage signing" - (this prevents the build from failing for some reason). + 1. Uncheck "Automatically manage signing", recheck it, and select "Pioneer Valley Transit Authority" + from the "Team" dropdown (this prevents the build from failing for some reason). +1. Set the Build to Legacy Build + 1. Our project was last on XCode 8, so we need to use the Legacy Build or else the build fails. + 1. To do so: File > Project Settings > Select "Legacy Build System" from "Build System" drop down. 1. Create an archive: 1. In XCode, select Product > Scheme > Edit Scheme. 1. Choose "Archive" from the list on the left. 1. The build config should be "Release" unless you're making a debug build. -1. Product > Run for debug, but otherwise: -1. Product > Build - 1. Follow the proper steps to fix the code if the build fails. If the build passes, continue on. +1. Select Product > Build (use Product > Run for debugging purposes.). + 1. Follow the proper steps to fix the code if the build fails. The XCode Organizer should pop up when the build succeeds. +1. Click the "Validate App" button on the right. All preselected options are okay. +1. If the build is valid, click "Distribute App". Again, accept with the preselected options to upload to the app store. +1. At the end of the process, XCode will confirm that the build was uploaded to apple. ## Resubmitting a Build -1. In XCode, go to the project editor. In "TARGETS" > PVTrAck, look at the "Identity" section. +1. In XCode, go to the project editor. In TARGETS > PVTrAck, look at the "Identity" section. There is a field for "Build". This value is for App Store Connect and it does _not_ affect the version number. However, there is a chance that the build and version numbers are the same. 1. In order to submit a new build (due to any relevant issues below or not listed), -increment the build number. Then, rebuild. That's it! + increment the build number. Then, rebuild. That's it! ## Troubleshooting +- Problems with `ionic cordova build ios --prod --release`. + Make sure all requirements are installed by running `ionic cordova requirements`. - Error related to whether this is an iOS project, try adding and removing the platform: ``` @@ -57,9 +65,7 @@ increment the build number. Then, rebuild. That's it! $ ionic platform add ios ``` - Build "disappears" once uploaded and processing in App Store Connect - Resubmit the build and try again. - Duplicate Error -- Legacy Build -- Not signed + Resubmit the build and try again. From 0a222cabc965be247ab334c360e61043632f053a Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Thu, 11 Oct 2018 13:07:06 -0400 Subject: [PATCH 06/11] Indent another level deep for numbered list --- doc/deploy/ios.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index 8fd37fa69..0ca2b2c56 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -25,24 +25,24 @@ macOS and reinstalling XCode. 1. Open the project in XCode, following the ionic doc iOS instructions for "Running your App". The file `PVTrAck.xcodeproj` is the one that we want to open with XCode. 1. Sign into XCode using steps from the ionic docs. - 1. Fill in apple ID with "pvtadeveloper@gmail.com" and password with the password from @anbranin, @sherson, or @mboneil10. - 1. Click "Next". - 1. Exit out of Preferences. + 1. Fill in apple ID with "pvtadeveloper@gmail.com" and password with the password from @anbranin, @sherson, or @mboneil10. + 1. Click "Next". + 1. Exit out of Preferences. 1. Code Sign the app (these steps are not on the ionic docs for XCode 9+). - 1. Select "General". - 1. Go into the project editor. Click "PVTrAck" under "TARGETS". - 1. Go to the "Signing" section. - 1. Uncheck "Automatically manage signing", recheck it, and select "Pioneer Valley Transit Authority" + 1. Select "General". + 1. Go into the project editor. Click "PVTrAck" under "TARGETS". + 1. Go to the "Signing" section. + 1. Uncheck "Automatically manage signing", recheck it, and select "Pioneer Valley Transit Authority" from the "Team" dropdown (this prevents the build from failing for some reason). 1. Set the Build to Legacy Build - 1. Our project was last on XCode 8, so we need to use the Legacy Build or else the build fails. - 1. To do so: File > Project Settings > Select "Legacy Build System" from "Build System" drop down. + 1. Our project was last on XCode 8, so we need to use the Legacy Build or else the build fails. + 1. To do so: File > Project Settings > Select "Legacy Build System" from "Build System" drop down. 1. Create an archive: - 1. In XCode, select Product > Scheme > Edit Scheme. - 1. Choose "Archive" from the list on the left. - 1. The build config should be "Release" unless you're making a debug build. + 1. In XCode, select Product > Scheme > Edit Scheme. + 1. Choose "Archive" from the list on the left. + 1. The build config should be "Release" unless you're making a debug build. 1. Select Product > Build (use Product > Run for debugging purposes.). - 1. Follow the proper steps to fix the code if the build fails. The XCode Organizer should pop up when the build succeeds. + 1. Follow the proper steps to fix the code if the build fails. The XCode Organizer should pop up when the build succeeds. 1. Click the "Validate App" button on the right. All preselected options are okay. 1. If the build is valid, click "Distribute App". Again, accept with the preselected options to upload to the app store. 1. At the end of the process, XCode will confirm that the build was uploaded to apple. From 2d24307ba52e70ed320e360ba77c555e55fe31e3 Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Thu, 11 Oct 2018 13:12:40 -0400 Subject: [PATCH 07/11] Make sure the styling is the same as Karin's --- doc/deploy/ios.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index 0ca2b2c56..f441f15a7 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -56,16 +56,17 @@ macOS and reinstalling XCode. increment the build number. Then, rebuild. That's it! ## Troubleshooting -- Problems with `ionic cordova build ios --prod --release`. - Make sure all requirements are installed by running `ionic cordova requirements`. +- **Problems with `ionic cordova build ios --prod --release`.** +Make sure all requirements are installed by running `ionic cordova requirements`. -- Error related to whether this is an iOS project, try adding and removing the platform: - ``` - $ ionic platform rm ios - $ ionic platform add ios - ``` -- Build "disappears" once uploaded and processing in App Store Connect - Resubmit the build and try again. +- **Error related to whether this is an iOS project** +Try adding and removing the platform: +``` + $ ionic platform rm ios + $ ionic platform add ios +``` +- **Build "disappears" once uploaded and processing in App Store Connect** +Resubmit the build and try again. -- Duplicate Error - Resubmit the build and try again. +- **Duplicate Error on Build** +Resubmit the build and try again. From 98e58ea2590cb07eed1126383775d90706e644e0 Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Thu, 11 Oct 2018 13:14:29 -0400 Subject: [PATCH 08/11] Embarassing use of numbers --- doc/deploy/ios.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index f441f15a7..88c4a6e6c 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -14,7 +14,7 @@ That is, you may be able to build the app in XCode x.x, but it can't be submitted to the app store. The latest version of XCode may involve updating to the latest macOS and reinstalling XCode. -1. XCode is probably already on your Mac. If not, or if you need the latest version, +- XCode is probably already on your Mac. If not, or if you need the latest version, you can download it from [apple](https://developer.apple.com/download) ## Build the app @@ -48,11 +48,11 @@ macOS and reinstalling XCode. 1. At the end of the process, XCode will confirm that the build was uploaded to apple. ## Resubmitting a Build -1. In XCode, go to the project editor. In TARGETS > PVTrAck, look at the "Identity" section. +- In XCode, go to the project editor. In TARGETS > PVTrAck, look at the "Identity" section. There is a field for "Build". This value is for App Store Connect and it does _not_ affect the version number. However, there is a chance that the build and version numbers are the same. -1. In order to submit a new build (due to any relevant issues below or not listed), +- In order to submit a new build (due to any relevant issues below or not listed), increment the build number. Then, rebuild. That's it! ## Troubleshooting From 5b11b7d3b2e3c0268c9cc8dd5317d708a28cb41f Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Wed, 17 Oct 2018 10:14:59 -0400 Subject: [PATCH 09/11] The requirements are to have a mac --- doc/deploy/ios.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index 88c4a6e6c..dd038c9c3 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -1,7 +1,7 @@ # Building an iOS app to Deploy in XCode. ## Requirements -_It is assumed that you are using a Mac._ +_Mac_ ### General - Read the [general deploy doc information](README.md) first. From 45da5f03f6689eabc53fbc0da1abb1b96fa94adc Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Wed, 17 Oct 2018 10:15:53 -0400 Subject: [PATCH 10/11] Forgot that the app store was a thing --- doc/deploy/ios.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index dd038c9c3..7c4b0e95f 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -15,7 +15,7 @@ but it can't be submitted to the app store. The latest version of XCode may involve updating to the latest macOS and reinstalling XCode. - XCode is probably already on your Mac. If not, or if you need the latest version, - you can download it from [apple](https://developer.apple.com/download) + you can download it from [apple](https://developer.apple.com/download) or the app store. ## Build the app 1. General instructions can be found in the [ionic docs](https://ionicframework.com/docs/intro/deploying/). I'll be referring to them periodically. From 0dbb51750e0dd7a7b318d8ba403bb587b60154ed Mon Sep 17 00:00:00 2001 From: Molly O'Neil Date: Wed, 17 Oct 2018 10:17:50 -0400 Subject: [PATCH 11/11] Actually what happened with the legacy build --- doc/deploy/ios.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/deploy/ios.md b/doc/deploy/ios.md index 7c4b0e95f..a30879ac8 100644 --- a/doc/deploy/ios.md +++ b/doc/deploy/ios.md @@ -35,7 +35,7 @@ macOS and reinstalling XCode. 1. Uncheck "Automatically manage signing", recheck it, and select "Pioneer Valley Transit Authority" from the "Team" dropdown (this prevents the build from failing for some reason). 1. Set the Build to Legacy Build - 1. Our project was last on XCode 8, so we need to use the Legacy Build or else the build fails. + 1. cordova-ios doesn't support the new build system yet and would result in failures. 1. To do so: File > Project Settings > Select "Legacy Build System" from "Build System" drop down. 1. Create an archive: 1. In XCode, select Product > Scheme > Edit Scheme.