Skip to content

Commit

Permalink
Fix: detect correctly iPad & RWD improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldanielecki committed Jul 18, 2024
1 parent 63823f1 commit b5aa7c7
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion cordova/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.doyban.flyingplane" version="1.2.3" xmlns="http://www.w3.org/ns/widgets"
<widget id="com.doyban.flyingplane" version="1.2.4" xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>FlyingPlane</name>
Expand Down
4 changes: 2 additions & 2 deletions cordova/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cordova/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.doyban.flyingplane",
"displayName": "FlyingPlane",
"version": "1.2.3",
"version": "1.2.4",
"description": "Tap Plane Game",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -79,4 +79,4 @@
"cordova-plugin-inappbrowser": "5.0.0",
"cordova-universal-links-plugin-fix": "1.2.1"
}
}
}
2 changes: 1 addition & 1 deletion cordova/platforms/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="10203" android:versionName="1.2.3" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:hardwareAccelerated="true" android:versionCode="10204" android:versionName="1.2.4" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.vending.BILLING" />
Expand Down
6 changes: 3 additions & 3 deletions cordova/platforms/android/app/src/main/assets/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width viewport-fit=cover">
<link rel="stylesheet" href="">
<style>
#content {
#content-game {
width: 100%;
height: 100%;
float: left;
Expand All @@ -34,12 +34,12 @@
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

<div id="content">
<div id="content-game">
<!-- <img src="assets/images/background.png" /> -->
</div>
<script src="" defer></script>
<div id="content"></div>
<script src="cordova.js"></script>
<script type="text/javascript" src="app.2d3cc6690c591f00a685.js?2d3cc6690c591f00a685"></script><script type="text/javascript" src="vendor.2d3cc6690c591f00a685.js?2d3cc6690c591f00a685"></script></body>
<script type="text/javascript" src="app.4cc834a08fbdac646ff9.js?4cc834a08fbdac646ff9"></script><script type="text/javascript" src="vendor.4cc834a08fbdac646ff9.js?4cc834a08fbdac646ff9"></script></body>

</html>
2 changes: 1 addition & 1 deletion cordova/platforms/android/app/src/main/res/xml/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.doyban.flyingplane" version="1.2.3" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.doyban.flyingplane" version="1.2.4" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<feature name="FacebookConnectPlugin">
<param name="android-package" value="org.apache.cordova.facebook.ConnectPlugin" />
<param name="onload" value="true" />
Expand Down
4 changes: 2 additions & 2 deletions cordova/platforms/ios/FlyingPlane.xcarchive/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<key>CFBundleIdentifier</key>
<string>com.doyban.flyingplane</string>
<key>CFBundleShortVersionString</key>
<string>1.2.3</string>
<string>1.2.4</string>
<key>CFBundleVersion</key>
<string>1.2.3</string>
<string>1.2.4</string>
<key>SigningIdentity</key>
<string>Apple Development: Daniel Danielecki (9H98636TF9)</string>
<key>Team</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.doyban.flyingplane" version="1.2.3" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.doyban.flyingplane" version="1.2.4" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<feature name="CDVWebViewEngine">
<param name="ios-package" value="CDVWebViewEngine" />
</feature>
Expand Down
2 changes: 2 additions & 0 deletions cordova/platforms/ios/FlyingPlane.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 9D3QHQ7CMS;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
Expand Down Expand Up @@ -629,6 +630,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 9D3QHQ7CMS;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "FlyingPlane/FlyingPlane-Prefix.pch";
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions cordova/platforms/ios/FlyingPlane/FlyingPlane-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.3</string>
<string>1.2.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down Expand Up @@ -114,7 +114,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.2.3</string>
<string>1.2.4</string>
<key>FacebookAdvertiserIDCollectionEnabled</key>
<true/>
<key>FacebookAppID</key>
Expand Down
2 changes: 1 addition & 1 deletion cordova/platforms/ios/FlyingPlane/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.doyban.flyingplane" version="1.2.3" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.doyban.flyingplane" version="1.2.4" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<feature name="CDVWebViewEngine">
<param name="ios-package" value="CDVWebViewEngine" />
</feature>
Expand Down
6 changes: 3 additions & 3 deletions cordova/platforms/ios/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width viewport-fit=cover">
<link rel="stylesheet" href="">
<style>
#content {
#content-game {
width: 100%;
height: 100%;
float: left;
Expand All @@ -34,12 +34,12 @@
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

<div id="content">
<div id="content-game">
<!-- <img src="assets/images/background.png" /> -->
</div>
<script src="" defer></script>
<div id="content"></div>
<script src="cordova.js"></script>
<script type="text/javascript" src="app.2d3cc6690c591f00a685.js?2d3cc6690c591f00a685"></script><script type="text/javascript" src="vendor.2d3cc6690c591f00a685.js?2d3cc6690c591f00a685"></script></body>
<script type="text/javascript" src="app.4cc834a08fbdac646ff9.js?4cc834a08fbdac646ff9"></script><script type="text/javascript" src="vendor.4cc834a08fbdac646ff9.js?4cc834a08fbdac646ff9"></script></body>

</html>
6 changes: 3 additions & 3 deletions cordova/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width viewport-fit=cover">
<link rel="stylesheet" href="">
<style>
#content {
#content-game {
width: 100%;
height: 100%;
float: left;
Expand All @@ -34,12 +34,12 @@
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

<div id="content">
<div id="content-game">
<!-- <img src="assets/images/background.png" /> -->
</div>
<script src="" defer></script>
<div id="content"></div>
<script src="cordova.js"></script>
<script type="text/javascript" src="app.2d3cc6690c591f00a685.js?2d3cc6690c591f00a685"></script><script type="text/javascript" src="vendor.2d3cc6690c591f00a685.js?2d3cc6690c591f00a685"></script></body>
<script type="text/javascript" src="app.4cc834a08fbdac646ff9.js?4cc834a08fbdac646ff9"></script><script type="text/javascript" src="vendor.4cc834a08fbdac646ff9.js?4cc834a08fbdac646ff9"></script></body>

</html>
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width viewport-fit=cover">
<link rel="stylesheet" href="">
<style>
#content {
#content-game {
width: 100%;
height: 100%;
float: left;
Expand All @@ -34,7 +34,7 @@
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

<div id="content">
<div id="content-game">
<!-- <img src="assets/images/background.png" /> -->
</div>
<script src="" defer></script>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.doyban.flyingplane",
"displayName": "FlyingPlane",
"version": "1.2.3",
"version": "1.2.4",
"description": "Tap Plane Game",
"main": "index.ts",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class Game extends Phaser.Game {
type: Phaser.WEBGL, // Use Renderer WebGL.
width: 800,
height: 480,
parent: "content", // Use custom div element as parent.
parent: "content-game", // Use custom div element as parent.
scene: [SplashScreen, GamePlay, Shop], // Scenes.
// Add ScaleManager for responsiveness.
scale: {
mode: Phaser.Scale.ScaleModes.FIT,
mode: Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT,
},
// Add matter physics.
physics: {
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/scenes/gameplay/Gui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export class Gui extends Phaser.GameObjects.Group {
this.createShareButton();
this.createShopButton();

// Hide the close button on iOS in main menu.
if (!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)) {
// Hide the close button on iOS (incl. iPad iOS 13+, see "maxTouchPoints" part) in main menu.
if (!/(iPad|iPhone|iPod)/g.test(navigator.userAgent) && !navigator.maxTouchPoints) {
this.createCloseButton();
}

Expand Down

0 comments on commit b5aa7c7

Please # to comment.