Skip to content

Commit

Permalink
updated FB permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBacon committed Jul 20, 2018
1 parent 4dd0efd commit 91f8572
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 30 deletions.
Empty file added client/Analytics.js
Empty file.
6 changes: 3 additions & 3 deletions client/Assets.js
Expand Up @@ -4,14 +4,14 @@ export default {
"button_out.wav": require(`./assets/audio/button_out.wav`),
"song.mp3": require(`./assets/audio/song.mp3`)
},
"fonts": {
"GothamNarrow-Book.ttf": require(`./assets/fonts/GothamNarrow-Book.ttf`)
},
"icons": {
"expo.png": require(`./assets/icons/expo.png`),
"ios.png": require(`./assets/icons/ios.png`),
"splash.png": require(`./assets/icons/splash.png`)
},
"fonts": {
"GothamNarrow-Book.ttf": require(`./assets/fonts/GothamNarrow-Book.ttf`)
},
"images": {
"BEGIN.png": require(`./assets/images/BEGIN.png`),
"PILLAR.png": require(`./assets/images/PILLAR.png`),
Expand Down
51 changes: 30 additions & 21 deletions client/Game/Game.js
Expand Up @@ -60,7 +60,7 @@ class Game extends GameObject {

_subscribe = () => {
this._subscription = DeviceMotion.addListener(
({ accelerationIncludingGravity }) => {
({ accelerationIncludingGravity = {} }) => {
const _index = -4;

this.offset = {
Expand Down Expand Up @@ -98,20 +98,25 @@ class Game extends GameObject {
async reset() {
super.reset();

this.gameGroup.z = 0;
this.gameGroup.x = 0;

if (this.gameGroup) {
this.gameGroup.z = 0;
this.gameGroup.x = 0;
}
this.cachedRotationVelocity = Settings.rotationSpeed;
this.steps = 0;
this.direction = Math.round(randomRange(0, 1));

this.rotationAngle = 0;
this.mainBall = 1;

this.balls[0].x = 0;
this.balls[0].z = Settings.ballDistance;
this.balls[1].x = 0;
this.balls[1].z = 0;
if (this.balls[0]) {
this.balls[0].x = 0;
this.balls[0].z = Settings.ballDistance;
}
if (this.balls[1]) {
this.balls[1].x = 0;
this.balls[1].z = 0;
}
this.alpha = 1;
this.balls[1 - this.mainBall].scale.set(1, 1, 1);
this.balls[this.mainBall].scale.set(1, 1, 1);
Expand All @@ -121,10 +126,11 @@ class Game extends GameObject {
}
this.targets = [];
const target = await this.targetGroup.add(new Platform());
target.x = 0;
target.z = this.balls[0].z;
this.targets.push(target);

if (target) {
target.x = 0;
target.z = this.balls[0].z;
this.targets.push(target);
}
for (let i = 0; i < this.getVisibleTargetsCount(); i++) {
await this.addTarget();
}
Expand Down Expand Up @@ -204,15 +210,16 @@ class Game extends GameObject {
const pillarB = await makePillar(Assets.images['VALLEY.png']);
titleGroup.add(pillarB);

pillarB.position.y = -1100;
pillarB.position.x = 55;
pillarB.position.z = 55;
TweenMax.to(pillarB.position, 1.0, {
y: -530,
ease: Back.easeOut,
delay: 0.1,
});

if (pillarB.position) {
pillarB.position.y = -1100;
pillarB.position.x = 55;
pillarB.position.z = 55;
TweenMax.to(pillarB.position, 1.0, {
y: -530,
ease: Back.easeOut,
delay: 0.1,
});
}
const pillarC = await makePillar(Assets.images['BEGIN.png'], 0xedcbbf);
titleGroup.add(pillarC);

Expand Down Expand Up @@ -352,13 +359,15 @@ class Game extends GameObject {
dispatch.game.play();
dispatch.score.increment();
this.score += 1;
if (Settings.isIos) {
if (perfection < 0.3) {
Haptic.impact(Haptic.ImpactStyles.Light);
} else if (perfection < 0.6) {
Haptic.impact(Haptic.ImpactStyles.Medium);
} else {
Haptic.impact(Haptic.ImpactStyles.Heavy);
}
}

if (this.particles) {
this.particles.impulse();
Expand Down
6 changes: 3 additions & 3 deletions client/components/Footer.js
Expand Up @@ -22,11 +22,11 @@ class Footer extends React.Component {
const easing = 'ease-out';

const views = [
// <Button.Rate />,
// <Button.Leaderboard onPress={onLeaderboardPress} />,
<Button.Rate />,
<Button.Leaderboard onPress={onLeaderboardPress} />,
<Button.Sound />,
<Button.Share />,
// <Button.Licenses onPress={onLicensesPress} />,
<Button.Licenses onPress={onLicensesPress} />,
];
return (
<View style={[styles.container, style]}>
Expand Down
9 changes: 7 additions & 2 deletions client/constants/Settings.js
@@ -1,13 +1,18 @@
import { Constants } from 'expo';
import { Dimensions } from 'react-native';
import { Dimensions, Platform } from 'react-native';
import sizeInfo from '../utils/whatAmI';

const debug = __DEV__;
const Settings = {
facebookLoginProps: {
permissions: ['public_profile', 'email', 'user_friends'],
permissions: [
'public_profile',
'email',
// 'user_friends'
],
behavior: sizeInfo.loginBehavior,
},
isIos: Platform.OS === "ios",
osVersion: sizeInfo.osVersion,
loginBehavior: sizeInfo.loginBehavior,
isRunningInExpo: sizeInfo.isRunningInExpo,
Expand Down
1 change: 1 addition & 0 deletions client/package.json
Expand Up @@ -26,6 +26,7 @@
"react": "16.4.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz",
"react-native-animatable": "^1.2.4",
"react-native-google-analytics": "^1.3.2",
"react-navigation": "^2.5.2",
"react-navigation-material-bottom-tabs": "^0.3.0",
"react-redux": "^5.0.6",
Expand Down
2 changes: 1 addition & 1 deletion client/utils/whatAmI.js
Expand Up @@ -108,7 +108,7 @@ function getFBloginBehavior() {
*/
let behavior = 'system';

if (Platform.OS === 'ios' && osVersion >= 11) {
if (Platform.OS === 'ios' && osVersion < 11) {
/*
* Attempts to log in through the native Facebook app, but the Facebook SDK may use Safari or Chrome instead.
* This is only supported for standalone apps.
Expand Down
8 changes: 8 additions & 0 deletions client/yarn.lock
Expand Up @@ -2036,6 +2036,10 @@ expand-range@^1.8.1:
dependencies:
fill-range "^2.1.0"

expo-analytics@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/expo-analytics/-/expo-analytics-1.0.7.tgz#d78b4b9090ba359b2ec233fce35512b90ef392db"

expo-asset-utils@^0.0.4-alpha.2:
version "0.0.4-alpha.2"
resolved "https://registry.yarnpkg.com/expo-asset-utils/-/expo-asset-utils-0.0.4-alpha.2.tgz#c559a490c326cb35fcfa1362e2dc1cc1b8284b35"
Expand Down Expand Up @@ -3793,6 +3797,10 @@ react-native-gesture-handler@1.0.4:
invariant "^2.2.2"
prop-types "^15.5.10"

react-native-google-analytics@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/react-native-google-analytics/-/react-native-google-analytics-1.3.2.tgz#6bc21ed938e9866eb1e4584fe8468b1543a81dd5"

react-native-maps@0.21.0:
version "0.21.0"
resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.21.0.tgz#005f58e93d7623ad59667e8002101970ddf235c2"
Expand Down
Binary file added ios/fastlane/raw_screenshots/IMG_0494.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 ios/fastlane/raw_screenshots/IMG_0496.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 ios/fastlane/raw_screenshots/IMG_0497.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 ios/fastlane/raw_screenshots/IMG_0498.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 91f8572

Please sign in to comment.