Commit ca79080a authored by Benoit Lavenier's avatar Benoit Lavenier

Merge branch 'feature/ios-support' into 'master'

iOS support: Fix "Missing attestations" message on AppStoreConnect. Added specific App ID for iOS. iOS 13 compatibility. Fix NPM install for minisodium.

See merge request clients/cesium-grp/cesium!590
parents eea1627b 2805be76
Pipeline #7110 passed with stages
in 6 minutes and 36 seconds
......@@ -6,12 +6,13 @@
/node_modules/
/platforms/ios/
/platforms/*
/resources/android/build/local.properties
/resources/android/build/Cesium.keystore
/resources/android/build/release-signing.properties
/plugins/
.idea/
.vscode/
.local/
/*.iml
......@@ -41,3 +42,4 @@
/env.sh
/npm-debug.log
/package-lock.json
/Cesium.keystore
\ No newline at end of file
......@@ -3,11 +3,11 @@ LABEL maintainer="benoit [dot] lavenier [at] e-is [dot] pro"
ENV DEBIAN_FRONTEND=noninteractive \
ANDROID_HOME=/opt/android-sdk-linux \
NODE_VERSION=5.12.0 \
NPM_VERSION=3.8.6 \
NODE_VERSION=6.17.1 \
NPM_VERSION=6.10.3 \
IONIC_VERSION=1.7.16 \
BOWER_VERSION=1.8.0 \
CORDOVA_VERSION=6.5.0 \
CORDOVA_VERSION=9.0.0 \
GRADLE_VERSION=4.1 \
NDK_VERSION=r10e
......
{
"android": {
"debug": {
"keystore": "./Cesium.keystore",
"storePassword": "Ces1um2020!",
"alias": "Cesium",
"password": "Ces1um2020!",
"keystoreType": "jks"
},
"release": {
"keystore": "./Cesium.keystore",
"storePassword": "Ces1um2020!",
"alias": "Cesium",
"password": "Ces1um2020!",
"keystoreType": "jks"
}
},
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"developmentTeam": "3TH8P5JJ9J",
"automaticProvisioning": true,
"packageType": "development"
},
"release": {
"codeSignIdentity": "iPhone Developer",
"developmentTeam": "3TH8P5JJ9J",
"automaticProvisioning": true,
"packageType": "app-store"
}
}
}
\ No newline at end of file
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="104006" id="fr.duniter.cesium" version="1.4.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-versionCode="104008" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.4.8" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Cesium</name>
<description>
An simple App for Duniter wallet
......@@ -25,6 +25,7 @@
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="4000" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
<preference name="KeyboardResizeMode" value="ionic" />
<preference name="xwalkVersion" value="19" />
<preference name="xwalkMultipleApk" value="false" />
<preference name="android-minSdkVersion" value="16" />
......@@ -64,6 +65,8 @@
</platform>
<platform name="ios">
<preference name="BackupWebStorage" value="local" />
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="KeyboardShrinksView" value="true" />
<icon height="20" src="resources/ios/icon/Icon-App-20x20@1x.png" width="20" />
<icon height="40" src="resources/ios/icon/Icon-App-20x20@2x.png" width="40" />
<icon height="60" src="resources/ios/icon/Icon-App-20x20@3x.png" width="60" />
......@@ -97,20 +100,25 @@
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
<string>To scan QRCode</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
<string>To choose a profile picture</string>
</edit-config>
<config-file mode="add" parent="ITSAppUsesNonExemptEncryption" target="*-Info.plist">
<false />
</config-file>
</platform>
<engine name="android" spec="^6.2.3" />
<engine name="ios" spec="^4.5.5" />
<engine name="android" spec="^6.4.0" />
<engine name="ios" spec="^5.1.0-dev" />
<plugin name="cordova-plugin-camera" spec="^2.4.1" />
<plugin name="cordova-plugin-console" spec="^1.0.7" />
<plugin name="cordova-plugin-device" spec="^1.1.6" />
<plugin name="cordova-plugin-dialogs" spec="^1.3.3" />
<plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
<plugin name="cordova-plugin-minisodium" spec="^1.0.1" />
<plugin name="cordova-plugin-secure-storage" spec="^2.6.8" />
<plugin name="cordova-plugin-splashscreen" spec="^3.2.2" />
......@@ -119,9 +127,9 @@
<plugin name="cordova-plugin-websocket" spec="^0.12.2" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="cordova-plugin-x-toast" spec="^2.6.0" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="cordova-plugin-minisodium" spec="git+https://github.com/E-IS/cordova-plugin-minisodium.git"/>
<plugin name="phonegap-plugin-barcodescanner" spec="git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git">
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
<plugin name="cordova-plugin-minisodium" spec="https://github.com/E-IS/cordova-plugin-minisodium.git" />
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/phonegap/phonegap-plugin-barcodescanner.git">
<variable name="CAMERA_USAGE_DESCRIPTION" value="Scan QRCode" />
</plugin>
</widget>
......@@ -16,14 +16,14 @@ To build Cesium, you will have to:
> Then reload your terminal, for instance by executing the commande `bash`
- Configure NodeJS to use a version 5: (**WARNING**: upper version will NOT work !)
- Configure NodeJS to use a version 6: (**WARNING**: upper version will NOT work !)
```
nvm install 5
nvm install 6
```
- Installing node.js build tools:
```
npm install -g gulp bower@1.8.0 cordova@6.5.0 ionic@1.7.16
npm install -g gulp bower@1.8.0 cordova@9.0.0 ionic@1.7.16
```
## Get the source code and dependencies
......
......@@ -37,50 +37,72 @@ if (rootdir) {
var htmlminOptions = {removeComments: true, collapseWhitespace: true};
// Removing unused code for device...
es.concat(
// Remove unused HTML tags
gulp.src(path.join(wwwPath, 'templates', '**', '*.html'))
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(removeHtml('.hidden-xs.hidden-sm'))
.pipe(removeHtml('.hidden-device'))
.pipe(removeHtml('[remove-if][remove-if="device"]'))
.pipe(htmlmin(htmlminOptions))
.pipe(gulp.dest(wwwPath + '/templates')),
gulp.src(path.join(pluginPath, '**', '*.html'))
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(removeHtml('.hidden-xs.hidden-sm'))
.pipe(removeHtml('.hidden-device'))
.pipe(removeHtml('[remove-if][remove-if="device"]'))
.pipe(htmlmin(htmlminOptions))
.pipe(gulp.dest(pluginPath)),
gulp.src(path.join(wwwPath, 'index.html'))
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(removeHtml('.hidden-xs.hidden-sm'))
.pipe(removeHtml('.hidden-device'))
.pipe(removeHtml('[remove-if][remove-if="device"]'))
.pipe(htmlmin(/*no options, to build comments*/))
.pipe(gulp.dest(wwwPath)),
// Remove unused JS code + add ng annotations
gulp.src(path.join(wwwPath, 'js', '**', '*.js'))
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(ngAnnotate({single_quotes: true}))
.pipe(gulp.dest(wwwPath + '/dist/dist_js/app')),
gulp.src([pluginPath + '/js/**/*.js'])
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(ngAnnotate({single_quotes: true}))
.pipe(gulp.dest(wwwPath + '/dist/dist_js/plugins'))
);
// Do not remove desktop code for iOS and macOS (support for tablets and desktop macs)
if (platform !== 'ios' && platform !== 'osx') {
// Removing unused code for device...
es.concat(
// Remove unused HTML tags
gulp.src(path.join(wwwPath, 'templates', '**', '*.html'))
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(removeHtml('.hidden-xs.hidden-sm'))
.pipe(removeHtml('.hidden-device'))
.pipe(removeHtml('[remove-if][remove-if="device"]'))
.pipe(htmlmin(htmlminOptions))
.pipe(gulp.dest(wwwPath + '/templates')),
gulp.src(path.join(pluginPath, '**', '*.html'))
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(removeHtml('.hidden-xs.hidden-sm'))
.pipe(removeHtml('.hidden-device'))
.pipe(removeHtml('[remove-if][remove-if="device"]'))
.pipe(htmlmin(htmlminOptions))
.pipe(gulp.dest(pluginPath)),
gulp.src(path.join(wwwPath, 'index.html'))
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(removeHtml('.hidden-xs.hidden-sm'))
.pipe(removeHtml('.hidden-device'))
.pipe(removeHtml('[remove-if][remove-if="device"]'))
.pipe(htmlmin(/*no options, to build comments*/))
.pipe(gulp.dest(wwwPath)),
// Remove unused JS code + add ng annotations
gulp.src(path.join(wwwPath, 'js', '**', '*.js'))
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(ngAnnotate({single_quotes: true}))
.pipe(gulp.dest(wwwPath + '/dist/dist_js/app')),
gulp.src([pluginPath + '/js/**/*.js'])
.pipe(removeCode({device: true}))
.pipe(removeCode(platformRemoveCodeOptions))
.pipe(ngAnnotate({single_quotes: true}))
.pipe(gulp.dest(wwwPath + '/dist/dist_js/plugins'))
);
} else {
es.concat(
gulp.src(path.join(wwwPath, 'templates', '**', '*.html'))
.pipe(htmlmin(htmlminOptions))
.pipe(gulp.dest(wwwPath + '/templates')),
gulp.src(path.join(pluginPath, '**', '*.html'))
.pipe(htmlmin(htmlminOptions))
.pipe(gulp.dest(pluginPath)),
gulp.src(path.join(wwwPath, 'index.html'))
.pipe(gulp.dest(wwwPath)),
gulp.src(path.join(wwwPath, 'js', '**', '*.js'))
.pipe(ngAnnotate({single_quotes: true}))
.pipe(gulp.dest(wwwPath + '/dist/dist_js/app')),
gulp.src([pluginPath + '/js/**/*.js'])
.pipe(gulp.dest(wwwPath + '/dist/dist_js/plugins'))
);
}
}
}
......@@ -15,7 +15,7 @@ if [ "_$CESIUM_DIR" = "_" ]; then
fi
latest_version() {
echo "v1.4.6" #lastest
echo "v1.4.8" #lastest
}
api_release_url() {
......
{}
\ No newline at end of file
{
"name": "cesium",
"version": "1.4.6",
"version": "1.4.8",
"description": "Cesium Wallet for G1 libre currency",
"repository": {
"type": "git",
......@@ -30,25 +30,27 @@
"new": "https://git.duniter.org/clients/cesium-grp/cesium/issues/new"
},
"dependencies": {
"cordova": "^7.1.0",
"cordova-android": "^6.2.3",
"cordova-ios": "^4.5.5",
"cordova": "^9.0.0",
"cordova-android": "6.4.0",
"cordova-clipboard": "^1.3.0",
"cordova-ios": "git+https://github.com/bpresles/cordova-ios.git#5.1.0",
"cordova-osx": "^5.0.0",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.1.0",
"cordova-plugin-console": "^1.0.7",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-crosswalk-webview": "^2.3.0",
"cordova-plugin-device": "^1.1.6",
"cordova-plugin-dialogs": "^1.3.3",
"cordova-plugin-inappbrowser": "^1.7.1",
"cordova-plugin-minisodium": "git+https://github.com/E-IS/cordova-plugin-minisodium.git",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-dialogs": "^1.3.4",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.2",
"cordova-plugin-minisodium": "git+https://github.com/bpresles/cordova-plugin-minisodium.git",
"cordova-plugin-secure-storage": "^2.6.8",
"cordova-plugin-splashscreen": "^3.2.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-vibration": "^2.1.5",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-vibration": "^2.1.6",
"cordova-plugin-websocket": "^0.12.2",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-plugin-x-toast": "^2.6.0",
"ionic-plugin-keyboard": "^2.2.1",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-plugin-x-toast": "^2.7.2",
"moment": "~2.19.3",
"numeral": "1.5.3",
"phonegap-plugin-barcodescanner": "git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git"
......@@ -59,7 +61,6 @@
"del": "^2.2.0",
"delete-empty": "^0.1.3",
"event-stream": "3.3.4",
"fs": "^0.0.2",
"glob": "^5.0.15",
"gulp": "^3.9.1",
"gulp-angular-templatecache": "^1.8.0",
......@@ -113,21 +114,30 @@
"cordova-plugin-vibration",
"cordova-plugin-dialogs",
"cordova-plugin-secure-storage",
"cordova-plugin-inappbrowser",
"cordova-plugin-x-toast",
"cordova-clipboard",
{
"id": "cordova-plugin-minisodium",
"locator": "https://github.com/E-IS/cordova-plugin-minisodium.git"
"locator": "https://github.com/bpresles/cordova-plugin-minisodium.git"
},
{
"id": "phonegap-plugin-barcodescanner",
"locator": "https://github.com/phonegap/phonegap-plugin-barcodescanner.git"
}
},
"cordova-plugin-ionic-keyboard",
"cordova-plugin-ionic-webview@4.1.2"
],
"cordovaPlatforms": [
"android",
"ios"
{
"platform": "ios",
"version": "5.1.0",
"locator": "https://github.com/bpresles/cordova-ios.git#5.1.0"
},
{
"platform": "android",
"version": "6.4.0",
"locator": "android@6.4.0"
}
],
"cordova": {
"plugins": {
......@@ -135,7 +145,6 @@
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-dialogs": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-minisodium": {},
"cordova-plugin-secure-storage": {},
"cordova-plugin-splashscreen": {},
......@@ -144,14 +153,20 @@
"cordova-plugin-websocket": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-x-toast": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-ionic-keyboard": {},
"phonegap-plugin-barcodescanner": {
"CAMERA_USAGE_DESCRIPTION": "Scan QRCode"
},
"ionic-plugin-keyboard": {},
"cordova-clipboard": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
}
},
"platforms": [
"ios",
"android",
"ios"
"osx"
]
}
}
}
\ No newline at end of file
{
"ios": "https://github.com/bpresles/cordova-ios.git#5.1.0",
"android": "6.4.0"
}
......@@ -74,10 +74,10 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then
echo "Java: $JAVA_VERSION"
# force nodejs version to 5
# force nodejs version to 6
if [[ -d "$NVM_DIR" ]]; then
. $NVM_DIR/nvm.sh
nvm use 5
nvm use 6
if [[ $? -ne 0 ]]; then
exit 1
fi
......@@ -167,9 +167,9 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then
echo "WARN: platform/desktop not found -> Skipping desktop build!"
fi;
# back to nodejs version 5
# back to nodejs version 6
cd $DIRNAME
nvm use 5
nvm use 6
echo "**********************************"
echo "* Build release succeed !"
......
resources/icon.png

59.4 KB | W: | H:

resources/icon.png

379 KB | W: | H:

resources/icon.png
resources/icon.png
resources/icon.png
resources/icon.png
  • 2-up
  • Swipe
  • Onion skin
resources/ios/splash/Default-667h.png

92.8 KB | W: | H:

resources/ios/splash/Default-667h.png

48.8 KB | W: | H:

resources/ios/splash/Default-667h.png
resources/ios/splash/Default-667h.png
resources/ios/splash/Default-667h.png
resources/ios/splash/Default-667h.png
  • 2-up
  • Swipe
  • Onion skin
resources/splash.png

60.8 KB | W: | H:

resources/splash.png

104 KB | W: | H:

resources/splash.png
resources/splash.png
resources/splash.png
resources/splash.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -422,6 +422,13 @@ $screen-menu: 845px;
/**********
Fix or extend generic CSS
**********/
html, body {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.item.item-icon-right.item-select,
.item.item-icon-right .item-select {
......@@ -455,6 +462,11 @@ $screen-menu: 845px;
}
}
// Fix for iOS 11+
.ios ion-content {
pointer-events: auto;
}
.popover-share {
height: 110px;
......@@ -1611,6 +1623,20 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0";
/*
Badge inside toolbar's button
*/
.platform-ipad {
.bar-title {
border-color: $button-dark-border;
background-color: $dark;
background-image: linear-gradient(0deg,$button-dark-border,$button-dark-border 50%,transparent 50%);
.title {
background-color: white;
margin-left: 0;
margin-right: 0;
height: 44px;
}
}
}
.bar {
.badge-button {
......@@ -1867,17 +1893,14 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0";
padding-right: 0px !important;
.platform-ios.platform-cordova & {
height: calc(env(safe-area-inset-top) + 160px);
height: calc(constant(safe-area-inset-top) + 150px);
height: calc(env(safe-area-inset-top) + 150px);
}
.hero {
height: 150px;
box-shadow: none; // not need (define in bar-header)
.platform-ios.platform-cordova & {
height: calc(env(safe-area-inset-top) + 160px);
}
.content {
bottom: 0px;
}
......@@ -1888,7 +1911,8 @@ $ionicon-var-badge-editable: $ionicon-var-edit + "\00a0";
top: 150px;
.platform-ios.platform-cordova & {
top: calc(env(safe-area-inset-top) + 160px);
top: calc(constant(safe-area-inset-top) + 150px);
top: calc(env(safe-area-inset-top) + 150px);
}
}
}
......
/// <reference path="../.vscode/typings/cordova/cordova.d.ts"/>
/// <reference path="../.vscode/typings/cordova-ionic/plugins/keyboard.d.ts"/>
/// <reference path="../.vscode/typings/ionic/ionic.d.ts"/>
/// <reference path="../.vscode/typings/angularjs/angular.d.ts"/>
/// <reference path="../.vscode/typings/jquery/jquery.d.ts"/>
/// <reference path="../.vscode/typings/cordova/plugins/Toast.d.ts"/>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -51,7 +51,7 @@
<!--endRemoveIf(device)-->
</head>
<body ng-app="cesium" id="cesium" ng-strict-di="true" window-exit-unauth="true"
<body id="cesium" ng-strict-di="true" window-exit-unauth="true"
ng-class="{'nobackdrop': $root.tour, 'expert-mode': $root.settings.expertMode}">
......
......@@ -138,5 +138,17 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht
// Start plugins eager services
PluginService.start();
ionicReady().then(function() {
if (ionic.Platform.isIOS()) {
if(window.StatusBar) {
// fix font color not white on iOS 11+
StatusBar.styleLightContent();
}
}
});
})
;