This repository was archived by the owner on Aug 31, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
iOS deploy docs #481
Open
mboneil10
wants to merge
13
commits into
master
Choose a base branch
from
ios-deploy-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
iOS deploy docs #481
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
959b5f6
Not too much to work with anyway
0a40654
From the notes I had about deploying ios
733b376
Flesh out resubmitting a build and troubleshooting section
c70f2e2
Remove steps that are already in the ionic docs
c958caf
Editing the doc and styles
0a222ca
Indent another level deep for numbered list
2d24307
Make sure the styling is the same as Karin's
98e58ea
Embarassing use of numbers
9b6962e
Merge branch 'master' into ios-deploy-docs
5b11b7d
The requirements are to have a mac
45da5f0
Forgot that the app store was a thing
0dbb517
Actually what happened with the legacy build
6ce8dff
Merge branch 'master' of github.com:umts/pvta-multiplatform into ios-…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,73 @@ | ||
| ## 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 | ||
| _Mac_ | ||
|
|
||
| ##### 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 | ||
| - Read the [general deploy doc information](README.md) first. | ||
| - Assure that you have access to [Itunes Connect](https://itunesconnect.apple.com/). | ||
| Ask @sherson if you don't have it. | ||
|
|
||
| ##### Steps | ||
| ### XCode | ||
| - Apple will most likely require the latest version of XCode. | ||
| 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. | ||
| - 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) or the app store. | ||
|
|
||
| 1. `npm install` | ||
| ## 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. | ||
| 1. In `config.xml`, replace the value of `ios-CFBundleVersion` with the new version number. | ||
| 1. Update the iOS version number: `rake version:ios` | ||
| 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 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" | ||
| from the "Team" dropdown (this prevents the build from failing for some reason). | ||
| 1. Set the Build to Legacy Build | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some clarification:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! |
||
| 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. | ||
| 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. 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. | ||
|
|
||
| 2. Update the iOS version number: `rake version:ios` | ||
| ## Resubmitting a Build | ||
| - 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. | ||
| - 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! | ||
|
|
||
| 3. (PVTrAck 2+) `ionic cordova build ios --prod --release` | ||
| ## Troubleshooting | ||
| - **Problems with `ionic cordova build ios --prod --release`.** | ||
| Make sure all requirements are installed by running `ionic cordova requirements`. | ||
|
|
||
| Troubleshooting: if you get an error related to whether this is an iOS project, try the following: | ||
| - **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. | ||
|
|
||
| ``` | ||
| $ 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. | ||
| - **Duplicate Error on Build** | ||
| Resubmit the build and try again. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wat?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. The build fails if "Pioneer Valley Transit Authority" is selected without changing the check box. No idea why.