Skip to content

Commit

Permalink
init, happy hacking!
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyschmidt committed May 15, 2019
0 parents commit b8670a5
Show file tree
Hide file tree
Showing 186 changed files with 6,498 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
@@ -0,0 +1,7 @@
node_modules/**/*
.expo/*
npm-debug.*
*.jks
*.p12
*.key
*.mobileprovision
1 change: 1 addition & 0 deletions .watchmanconfig
@@ -0,0 +1 @@
{}
65 changes: 65 additions & 0 deletions README.md
@@ -0,0 +1,65 @@
## "From React Native to the App Store"

### Daily Tarot for iPhone

Daily Tarot: One Card Draw is a simple app I designed and built over the weekend in React Native as a personal exploration in releasing and distributing iOS apps with Expo. In short, Expo provides a great developer experience that makes launching apps really easy.

This project can serve as a reference for developers who are working with Expo & React Native for the first time, or even as a foundation for someone who might be creating their own card game for iPhone. You are free to use and build upon this code however you want 👍

#### Built with React Native

<div style="display: flex">
<div style="flex: 1">
<img src="screenshot0.png" width="320" height="697" />
</div>
<div style="flex: 1">
<img src="screenshot3.png" width="320" height="697" />
</div>
</div>

<div style="display: flex">
<div style="flex: 1">
<img src="screenshot4.png" width="320" height="697" />
</div>
<div style="flex: 1">
<img src="screenshot1.png" width="320" height="697" />
</div>
</div>

### Development

#### 1. Run the app locally with Expo

```
yarn install && yarn start
```

#### 2. Scan the QR code

A QR code will appear in your terminal. Scan it using iOS Camera and your device will prompt you to open the app in Expo. Note: Install Expo on your device first.

### Distribution

#### 1. Build for iOS

```
expo build:ios
```

Building starts a [wizard-like build process](https://docs.expo.io/versions/latest/distribution/building-standalone-apps/#if-you-choose-to-build-for-ios) command line flow that requires you to authenticate your Expo account as well as your Apple Developer account (which is $99/year) – so make sure you have those. Expo automates a lot of the tedious work to prepare your app for distribution, which is nice.


#### 2. Upload your build

After completing the steps, you'll end up with an [Expo project](https://expo.io/@bennyschmidt/daily-tarot) that people can share around, and an iOS build uploaded to [App Store Connect](https://appstoreconnect.apple.com). When you login to App Store Connect, notice the "Submit For Review" button in the top-right.

#### 3. Submit for Approval

Before clicking that button, you can easily integrate TestFlight within App Store Connect if you want to invite users to a closed test to ensure everything works. When you're satisfied with the app and ready to launch to the masses, click the "Submit for Review" button and it's off to Apple for consideration on the App Store. Apple tends to be pretty strict in their review process about apps that aren't very unique or useful. With tarot being a rather saturated market, the app you actually submit might require more functionality than the one in this guide in order to get approved.

Happy hacking and good luck!

#### License

Code files are MIT.
Some creative assets have restrictions (see [src/assets/License.md](src/assets/License.md)).
29 changes: 29 additions & 0 deletions app.json
@@ -0,0 +1,29 @@
{
"expo": {
"name": "Daily Tarot",
"slug": "daily-tarot",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [
"ios"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./src/assets/img/icon.png",
"splash": {
"image": "./src/assets/img/splash.png",
"resizeMode": "contain",
"backgroundColor": "#000000"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"bundleIdentifier": "com.bennyschmidt.dailytarot",
"supportsTablet": false
}
}
}
6 changes: 6 additions & 0 deletions babel.config.js
@@ -0,0 +1,6 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
28 changes: 28 additions & 0 deletions package.json
@@ -0,0 +1,28 @@
{
"name": "daily-tarot",
"version": "1.0.1",
"private": true,
"main": "src/index.js",
"dependencies": {
"expo": "^32.0.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-card-stack-swiper": "^1.1.0",
"react-native-iphone-x-helper": "^1.2.0",
"react-native-prompt": "^1.0.0",
"styled-components": "^4.1.3"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0"
},
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"author": {
"name": "Benny Schmidt",
"url": "https://github.com/exactchange"
}
}
5 changes: 5 additions & 0 deletions rn-cli.config.js
@@ -0,0 +1,5 @@
module.exports = {
resolver: {
sourceExts: ['jsx', 'js']
}
};
Binary file added screenshot0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/License.md
@@ -0,0 +1,10 @@
#### License

Some images and icons in this directory were sourced from pixabay.com and freepik.com. Their licenses are linked below:

- Pixabay: https://pixabay.com/service/license/
- Freepik: https://www.freepik.com/standard-license

The Medula One font was sourced from Google Fonts. Its license is linked below:

- SIL Open Font License: http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
Binary file added src/assets/font/MedulaOne-Regular.ttf
Binary file not shown.
Binary file added src/assets/img/_0000_The-Magician.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0000_The-Magician.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0001_The-High-Priestess.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0001_The-High-Priestess.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0002_The-Empress.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0002_The-Empress.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0003_The-Emperor.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0003_The-Emperor.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0004_The-Hierophant.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0004_The-Hierophant.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0005_The-Lovers.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0005_The-Lovers.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0006_The-Chariot.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0006_The-Chariot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0007_Strength.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0007_Strength.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0008_The-Hermit.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0008_The-Hermit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0009_Wheel-of-Fortune.orig.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0009_Wheel-of-Fortune.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/_0010_Justice.orig.png
Binary file added src/assets/img/_0010_Justice.png
Binary file added src/assets/img/_0011_The-Hanged-Man.orig.png
Binary file added src/assets/img/_0011_The-Hanged-Man.png
Binary file added src/assets/img/_0012_Death.orig.png
Binary file added src/assets/img/_0012_Death.png
Binary file added src/assets/img/_0013_Temperance.orig.png
Binary file added src/assets/img/_0013_Temperance.png
Binary file added src/assets/img/_0014_The-Devil.orig.png
Binary file added src/assets/img/_0014_The-Devil.png
Binary file added src/assets/img/_0015_The-Tower.orig.png
Binary file added src/assets/img/_0015_The-Tower.png
Binary file added src/assets/img/_0016_The-Star.orig.png
Binary file added src/assets/img/_0016_The-Star.png
Binary file added src/assets/img/_0017_The-Moon.orig.png
Binary file added src/assets/img/_0017_The-Moon.png
Binary file added src/assets/img/_0018_The-Sun.orig.png
Binary file added src/assets/img/_0018_The-Sun.png
Binary file added src/assets/img/_0019_Judgment.orig.png
Binary file added src/assets/img/_0019_Judgment.png
Binary file added src/assets/img/_0020_The-World.orig.png
Binary file added src/assets/img/_0020_The-World.png
Binary file added src/assets/img/_0021_The-Fool.orig.png
Binary file added src/assets/img/_0021_The-Fool.png
Binary file added src/assets/img/_0022_King-of-Cups.orig.png
Binary file added src/assets/img/_0022_King-of-Cups.png
Binary file added src/assets/img/_0023_Queen-of-Cups.orig.png
Binary file added src/assets/img/_0023_Queen-of-Cups.png
Binary file added src/assets/img/_0024_Knight-of-Cups.orig.png
Binary file added src/assets/img/_0024_Knight-of-Cups.png
Binary file added src/assets/img/_0025_Page-of-Cups.orig.png
Binary file added src/assets/img/_0025_Page-of-Cups.png
Binary file added src/assets/img/_0026_Ten-of-Cups.orig.png
Binary file added src/assets/img/_0026_Ten-of-Cups.png
Binary file added src/assets/img/_0027_Nine-of-Cups.orig.png
Binary file added src/assets/img/_0027_Nine-of-Cups.png
Binary file added src/assets/img/_0028_Eight-of-Cups.orig.png
Binary file added src/assets/img/_0028_Eight-of-Cups.png
Binary file added src/assets/img/_0029_Seven-of-Cups.orig.png
Binary file added src/assets/img/_0029_Seven-of-Cups.png
Binary file added src/assets/img/_0030_Six-of-Cups.orig.png
Binary file added src/assets/img/_0030_Six-of-Cups.png
Binary file added src/assets/img/_0031_Five-of-Cups.orig.png
Binary file added src/assets/img/_0031_Five-of-Cups.png
Binary file added src/assets/img/_0032_Four-of-Cups.orig.png
Binary file added src/assets/img/_0032_Four-of-Cups.png
Binary file added src/assets/img/_0033_Three-of-Cups.orig.png
Binary file added src/assets/img/_0033_Three-of-Cups.png
Binary file added src/assets/img/_0034_Two-of-Cups.orig.png
Binary file added src/assets/img/_0034_Two-of-Cups.png
Binary file added src/assets/img/_0035_Ace-of-Cups.orig.png
Binary file added src/assets/img/_0035_Ace-of-Cups.png
Binary file added src/assets/img/_0036_King-of-Coins.orig.png
Binary file added src/assets/img/_0036_King-of-Coins.png
Binary file added src/assets/img/_0037_Queen-of-Coins.orig.png
Binary file added src/assets/img/_0037_Queen-of-Coins.png
Binary file added src/assets/img/_0038_Knight-of-Coins.orig.png
Binary file added src/assets/img/_0038_Knight-of-Coins.png
Binary file added src/assets/img/_0039_Page-of-Coins.orig.png
Binary file added src/assets/img/_0039_Page-of-Coins.png
Binary file added src/assets/img/_0040_Ten-of-Coins.orig.png
Binary file added src/assets/img/_0040_Ten-of-Coins.png
Binary file added src/assets/img/_0041_Nine-of-Coins.orig.png
Binary file added src/assets/img/_0041_Nine-of-Coins.png
Binary file added src/assets/img/_0042_Eight-of-Coins.orig.png
Binary file added src/assets/img/_0042_Eight-of-Coins.png
Binary file added src/assets/img/_0043_Seven-of-Coins.orig.png
Binary file added src/assets/img/_0043_Seven-of-Coins.png
Binary file added src/assets/img/_0044_Six-of-Coins.orig.png
Binary file added src/assets/img/_0044_Six-of-Coins.png
Binary file added src/assets/img/_0045_Five-of-Coins.orig.png
Binary file added src/assets/img/_0045_Five-of-Coins.png
Binary file added src/assets/img/_0046_Four-of-Coins.orig.png
Binary file added src/assets/img/_0046_Four-of-Coins.png
Binary file added src/assets/img/_0047_Three-of-Coins.orig.png
Binary file added src/assets/img/_0047_Three-of-Coins.png
Binary file added src/assets/img/_0048_Two-of-Coins.orig.png
Binary file added src/assets/img/_0048_Two-of-Coins.png
Binary file added src/assets/img/_0049_Ace-of-Coins.orig.png
Binary file added src/assets/img/_0049_Ace-of-Coins.png
Binary file added src/assets/img/_0050_King-of-Wands.orig.png
Binary file added src/assets/img/_0050_King-of-Wands.png
Binary file added src/assets/img/_0051_Queen-of-Wands.orig.png
Binary file added src/assets/img/_0051_Queen-of-Wands.png
Binary file added src/assets/img/_0052_Knight-of-Wands.orig.png
Binary file added src/assets/img/_0052_Knight-of-Wands.png
Binary file added src/assets/img/_0053_Page-of-Wands.orig.png
Binary file added src/assets/img/_0053_Page-of-Wands.png
Binary file added src/assets/img/_0054_Ten-of-Wands.orig.png
Binary file added src/assets/img/_0054_Ten-of-Wands.png
Binary file added src/assets/img/_0055_Nine-of-Wands.orig.png
Binary file added src/assets/img/_0055_Nine-of-Wands.png
Binary file added src/assets/img/_0056_Eight-of-Wands.orig.png
Binary file added src/assets/img/_0056_Eight-of-Wands.png
Binary file added src/assets/img/_0057_Seven-of-Wands.orig.png
Binary file added src/assets/img/_0057_Seven-of-Wands.png
Binary file added src/assets/img/_0058_Six-of-Wands.orig.png
Binary file added src/assets/img/_0058_Six-of-Wands.png
Binary file added src/assets/img/_0059_Five-of-Wands.orig.png
Binary file added src/assets/img/_0059_Five-of-Wands.png
Binary file added src/assets/img/_0060_Four-of-Wands.orig.png
Binary file added src/assets/img/_0060_Four-of-Wands.png
Binary file added src/assets/img/_0061_Three-of-Wands.orig.png
Binary file added src/assets/img/_0061_Three-of-Wands.png
Binary file added src/assets/img/_0062_Two-of-Wands.orig.png
Binary file added src/assets/img/_0062_Two-of-Wands.png
Binary file added src/assets/img/_0063_Ace-of-Wands.orig.png
Binary file added src/assets/img/_0063_Ace-of-Wands.png
Binary file added src/assets/img/_0064_King-of-Swords.orig.png
Binary file added src/assets/img/_0064_King-of-Swords.png
Binary file added src/assets/img/_0065_Queen-of-Swords.orig.png
Binary file added src/assets/img/_0065_Queen-of-Swords.png
Binary file added src/assets/img/_0066_Knight-of-Swords.orig.png
Binary file added src/assets/img/_0066_Knight-of-Swords.png
Binary file added src/assets/img/_0067_Page-of-Swords.orig.png
Binary file added src/assets/img/_0067_Page-of-Swords.png
Binary file added src/assets/img/_0068_Ten-of-Swords.orig.png
Binary file added src/assets/img/_0068_Ten-of-Swords.png
Binary file added src/assets/img/_0069_Nine-of-Swords.orig.png
Binary file added src/assets/img/_0069_Nine-of-Swords.png
Binary file added src/assets/img/_0070_Eight-of-Swords.orig.png
Binary file added src/assets/img/_0070_Eight-of-Swords.png
Binary file added src/assets/img/_0071_Seven-of-Swords.orig.png
Binary file added src/assets/img/_0071_Seven-of-Swords.png
Binary file added src/assets/img/_0072_Six-of-Swords.orig.png
Binary file added src/assets/img/_0072_Six-of-Swords.png
Binary file added src/assets/img/_0073_Five-of-Swords.orig.png
Binary file added src/assets/img/_0073_Five-of-Swords.png
Binary file added src/assets/img/_0074_Four-of-Swords.orig.png
Binary file added src/assets/img/_0074_Four-of-Swords.png
Binary file added src/assets/img/_0075_Three-of-Swords.orig.png
Binary file added src/assets/img/_0075_Three-of-Swords.png
Binary file added src/assets/img/_0076_Two-of-Swords.orig.png
Binary file added src/assets/img/_0076_Two-of-Swords.png
Binary file added src/assets/img/_0077_Ace-of-Swords.orig.png
Binary file added src/assets/img/_0077_Ace-of-Swords.png
Binary file added src/assets/img/_XXXX_CardBack.orig.png
Binary file added src/assets/img/_XXXX_CardBack.png
Binary file added src/assets/img/_XXXX_CardStack.orig.png
Binary file added src/assets/img/_XXXX_CardStack.png
Binary file added src/assets/img/icon.png
Binary file added src/assets/img/splash.orig.png
Binary file added src/assets/img/splash.png
6 changes: 6 additions & 0 deletions src/assets/index.js
@@ -0,0 +1,6 @@
/*
* Daily Tarot
* Authored by Benny Schmidt
*/

export * from './styles';
159 changes: 159 additions & 0 deletions src/assets/styles/index.js
@@ -0,0 +1,159 @@
/*
* Daily Tarot
* Authored by Benny Schmidt
*/

import { Dimensions } from 'react-native';
import { isIphoneX } from 'react-native-iphone-x-helper';
import styled from 'styled-components';

export const BackgroundImage = styled.Image`
width: 100%;
height: 100%;
`;

export const CardAnimation = styled.View`
position: absolute;
width: ${Dimensions.get('screen').width};
height: ${Dimensions.get('screen').height};
top: 20%;
left: ${Dimensions.get('screen').width * .075};
margin-left: auto;
margin-right: auto;
z-index: 1000;
`;

export const CardFace = styled.View`
border: 1px solid black;
border-radius: 10px;
width: ${Dimensions.get('screen').width * .85};
height: ${Dimensions.get('screen').width * .85 * 1.6};
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
overflow: hidden;
`;

export const CardImage = styled.Image`
position: absolute;
width: 100%;
height: 100%;
`;

export const CardStackWrapper = styled.View`
position: absolute;
width: 100%;
height: 100%;
`;

export const Notification = styled.View`
position: absolute;
z-index: 1010;
width: ${Dimensions.get('screen').width * .9};
height: 60;
background-color: #111;
border-color: #d7bc85;
border-width: .5px;
border-style: solid;
border-radius: 1;
left: ${Dimensions.get('screen').width * .05};
top: 36;
`;

export const NotificationText = styled.Text`
position: absolute;
z-index: 1011;
color: white;
font-size: 22;
text-align: center;
text-shadow: 0 2px 0 black;
width: 100%;
height: 60;
left: 0;
top: 0;
line-height: 60;
padding-left: 10;
padding-right: 10;
`;

export const Overlay = styled.View`
position: absolute;
z-index: 2000;
background-color: #111;
border-color: #d7bc85;
border-width: .5px;
border-style: solid;
border-radius: 1;
width: ${Dimensions.get('screen').width * .85};
height: ${Dimensions.get('screen').width * .425 * 1.75};
top: ${Dimensions.get('screen').width * .85 / 2};
padding: 20px;
box-shadow: 0 0 50px rgba(0, 0, 0, 1);
`;

export const OverlayText = styled.Text`
width: 100%;
height: 100%;
font-size: 22;
color: white;
text-align: center;
line-height: ${Dimensions.get('screen').width * .425 * 1.75 - 60};
`;

export const Screen = styled.View`
flex: 1;
background-color: black;
align-items: center;
justify-content: flex-start;
padding-top: ${isIphoneX() ? '20%' : '10%'};
`;

export const Title = styled.Text`
text-align: center;
font-size: 30;
color: rgba(255, 255, 255, 0.25);
margin-top: 50;
`;

export const TouchableCard = styled.TouchableOpacity`
width: 100%;
height: 100%;
`;

export const TouchableClose = styled.TouchableOpacity`
position: absolute;
bottom: ${Dimensions.get('screen').width * .05};
width: ${Dimensions.get('screen').width * .85 * .9};
height: 40;
left: ${Dimensions.get('screen').width * .05};
margin: 0 auto;
background-color: white;
`;

export const TouchableCloseText = styled.Text`
color: black;
text-align: center;
font-weight: 600;
text-transform: uppercase;
line-height: 40;
`;

export const TouchableInfo = styled.TouchableOpacity`
position: absolute;
z-index: 1002;
width: 50;
height: 50;
bottom: 50;
border-color: #d7bc85;
border-width: .5px;
border-style: solid;
border-radius: 1;
transform: rotate(45deg);
`;

export const TouchableInfoText = styled.Text`
text-align: center;
transform: rotate(-45deg);
font-size: 24;
font-weight: 200;
color: #d7bc85;
line-height: 50;
`;
35 changes: 35 additions & 0 deletions src/consts.js
@@ -0,0 +1,35 @@
/*
* Daily Tarot
* Authored by Benny Schmidt
*/

import { Dimensions } from 'react-native';

export const screen = Dimensions.get(`screen`);

export const screenHeight = screen.height;

export const screenWidth = screen.width;

export const cardStackStyle = {
position: `absolute`,
left: screenWidth * .075,
top: `25%`
};

export const font = {
src: require(`./assets/font/MedulaOne-Regular.ttf`),
style: {
fontFamily: `Medula One`
}
};

export const text = {
close: `Close`,
draw: `Draw`,
drawn: `You have drawn the`,
getMeaning: '?',
errorRetrieving: 'Error retrieving data.',
errorSaving: 'Error saving data.',
title: `Swipe to Draw`
};

0 comments on commit b8670a5

Please sign in to comment.