0.0.0 • Published 4 years ago

bestbet55 v0.0.0

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

Dependencies

  • Node.js and yarn. On OSX, you can install both of these dependencies in one command with brew
    brew install yarn
  • The Expo app, which can be installed from the app store
  • Xcode if you want to run the app from an iPhone emulator on your Mac machine

Setup

Clone this repo, cd into the directory, and run yarn to install the project's dependencies. Then run yarn start to start a dev version of the app. This will do two things:

  1. Log a QR code in your terminal, which you can scan on your phone to prompt it to open the app in Expo
  2. Open up a webpage in your broser of the local dev environment's console. In the sidebar of this webpage, you can use "Run on iOS simulator" to start the app in an iPhone emulator

TODO

make Dockerfile

Deploying to App Store Connect

  • In Xcode, open (⌘ + O) the ios/bestbet55.xcworkspace directory: Open Xcode
  • Make sure the Signing & Capabilities tab looks like this: Signing & Capabilities
  • Update the Build (and eventually the Version) since every single binary uploaded to the App Store Connect must be uniquely identified: Update Version and Build
  • Archive the project to produce the binary that gets uploaded to App Store Connect (this will take a couple minutes): Archive
  • Distribute App -> App Store Connect -> Upload -> Automatically manage signing -> Upload (You may also decide to use the Validate App feature for some basic checks before using Distribute App) Validate and Distribute Upload success


The following content has been DEPRECATED ever since the migration from the Managed to Bare Workflow and is being kept for only for reference

The migration from the Managed to Bare Workflow was required in order to use expo-in-app-purchases which, as far as I can tell, is the most officially supported In-App Purchases (a functionality that requires a native implementation on both Android and iOS) library available for React Native projects

Deploy

  1. first update the version in the file app.json @ expo.version
  2. requires apple id with admin credentials to https://appstoreconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/1459052610
  3. requires expo account (https://expo.io/@bestbet55)
  4. make sure you are logged into the expo-cli with the expo account
npx expo login
  1. make sure app.json is using the correct bundle id: com.bestbet55.app
  2. compile the project into an .ipa file using the expo pipeline
yarn build:ios

# try this if you need to reset expo or apple developer credential configs
npx expo build:ios -c

for this step, you will be prompted to authenticate your (apple developer program > enrolled) apple id if you haven't done so yet. log in to the bestbet55app@gmail.com apple id and provide the paths to the required apple developer files (ask a maintainer of this project for these files)

? How would you like to upload your credentials? (Use arrow keys)
  Expo handles all credentials, you can still provide overrides
❯ I will provide all the credentials and files needed, Expo does limited validation
  1. you also have the option to let expo handle uploading the .ipa to appstoreconnect.apple.com
yarn upload:ios

if you get a prompt like

Multiple App Store Connect teams found, please enter the number of the team you want to use:
Note: to automatically choose the team, provide either the App Store Connect Team ID, or the Team Name in your fastlane/Appfile:
Alternatively you can pass the team name or team ID using the `FASTLANE_ITC_TEAM_ID` or `FASTLANE_ITC_TEAM_NAME` environment variable

use Shantanu's account: "Shantanu Alam" (120242752)

if you get a prompt like

-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
-------------------------------------------------------------------------------------

use the bestbet55 apple id's app-specific password

⚠️⚠️⚠️

As of Xcode 11, "Application Loader is no longer included with Xcode", per the Xcode 11 Release Notes:

Xcode supports uploading apps from the Organizer window or from the command line > with xcodebuild or xcrun altool. Application Loader is no longer included with > Xcode. (29008875)

We are using xcrun altool with the apiKey x apiIssuer method for authentication. From xcrun altool --help:

--apiKey <api_key>        apiKey. Required for JWT authentication while using validation, upload, and notarization.
                            This option will search the following directories in sequence for a private key file
                            with the name of 'AuthKey_<api_key>.p8':  './private_keys', '~/private_keys', '~/.private_keys',
                            and '~/.appstoreconnect/private_keys'.
--apiIssuer <issuer_id>   Issuer ID. Required if --apiKey is specified.

Get the Issuier ID and download the api key file from here. Move the api key file to ./private_keys, ~/private_keys, ~/.private_keys, or ~/.appstoreconnect/private_keys

Then, with the .ipa downloaded from yarn build:ios, run

xcrun altool --upload-app --type ios --file "/path/to/ipa/file" --apiKey "<API_KEY>" --apiIssuer "<API_ISSUER>"

And finally, bite thy thumb at Apple