mirror of
https://github.com/apache/cordova-plugin-splashscreen.git
synced 2026-04-14 00:01:34 +08:00
Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9f0faa499 | ||
|
|
c3a5867c81 | ||
|
|
e86a9cc7a4 | ||
|
|
ddec7008cb | ||
|
|
e320e2504a | ||
|
|
e593fe3f53 | ||
|
|
50e4887aa1 | ||
|
|
f67216d64a | ||
|
|
67e8b9f01d | ||
|
|
29ac24ff9d | ||
|
|
3947f8570a | ||
|
|
d2e62a551c | ||
|
|
c67622f1b9 | ||
|
|
2f37eed184 | ||
|
|
887f0f6c81 | ||
|
|
8804977c84 | ||
|
|
b46cdca795 | ||
|
|
1009019372 | ||
|
|
129830a76c | ||
|
|
24e6f2e0dd | ||
|
|
21f372acc9 | ||
|
|
4d548e67c2 | ||
|
|
55722de1c4 | ||
|
|
0ffe1c2d46 | ||
|
|
95f407ea0d | ||
|
|
99803ba7c6 | ||
|
|
6b87577801 | ||
|
|
d0614c532b | ||
|
|
483182f33a | ||
|
|
d85c6a9359 | ||
|
|
fcd628ffc9 | ||
|
|
e1f17d6665 | ||
|
|
ec7c6aac30 | ||
|
|
0b001fb209 | ||
|
|
e4d8b77027 | ||
|
|
0f63861e88 | ||
|
|
e364377d4f | ||
|
|
395302ee16 | ||
|
|
333b0e7f90 | ||
|
|
3b58cd69b3 | ||
|
|
be8d340f31 | ||
|
|
f833c39ed3 | ||
|
|
8eb2533e78 | ||
|
|
5d25cf0250 | ||
|
|
cd61952efc | ||
|
|
6f23d8e828 | ||
|
|
cf5c5beafb | ||
|
|
1f50d90d9e | ||
|
|
c56bb9efec | ||
|
|
1943a88c8c | ||
|
|
ac1422f49f | ||
|
|
b109c7f234 | ||
|
|
829dbcc819 | ||
|
|
ae7daf48e3 | ||
|
|
4fda49b771 | ||
|
|
2c68427a8a | ||
|
|
0498d90517 | ||
|
|
5c245c2bc8 | ||
|
|
ec5bbc51e7 |
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,4 +1,4 @@
|
|||||||
#If ignorance is bliss, then somebody knock the smile off my face
|
#If ignorance is bliss, then somebody knock the smile off my face
|
||||||
|
|
||||||
*.csproj.user
|
*.csproj.user
|
||||||
*.suo
|
*.suo
|
||||||
@@ -20,4 +20,9 @@ Thumbs.db
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcuserdata/
|
||||||
|
|
||||||
|
/tests/ios/CDVSplashScreenTest.xcworkspace/xcuserdata/
|
||||||
|
|||||||
@@ -71,3 +71,35 @@
|
|||||||
* CB-6483 Use splash screen image from manifest on Windows8
|
* CB-6483 Use splash screen image from manifest on Windows8
|
||||||
* CB-6491 add CONTRIBUTING.md
|
* CB-6491 add CONTRIBUTING.md
|
||||||
* Revert "Merge branch 'tizen' of http://github.com/siovene/cordova-plugin-splashscreen"
|
* Revert "Merge branch 'tizen' of http://github.com/siovene/cordova-plugin-splashscreen"
|
||||||
|
|
||||||
|
### 0.3.2 (Aug 06, 2014)
|
||||||
|
* CB-6127 Updated translations for docs
|
||||||
|
* CB-7041 ios: Fix image filename logic when setting the iPad splash screen
|
||||||
|
* fixes Splashscreen crash on WP8
|
||||||
|
* Remove outdated doc
|
||||||
|
|
||||||
|
### 0.3.3 (Sep 17, 2014)
|
||||||
|
* CB-7249 cordova-plugin-splashscreen documentation translation
|
||||||
|
* Renamed test dir, added nested plugin.xml
|
||||||
|
* added documentation for manual tests
|
||||||
|
* CB-7196 port splashscreen tests to framework
|
||||||
|
|
||||||
|
### 0.3.4 (Oct 03, 2014)
|
||||||
|
* Finalized iOS splash screen (image name) tests. 176 tests in all, 44 for each type of device (iPad, iPhone, iPhone5, iPhone6, iPhone 6 Plus).
|
||||||
|
* CB-7633 - (Re-fix based on updated unit tests) iPhone 6 Plus support
|
||||||
|
* Updated iOS tests for locked orientations
|
||||||
|
* Added more iOS splash screen tests.
|
||||||
|
* CB-7633 - Add support for iPhone 6/6+
|
||||||
|
* Added failing iPhone 6/6 Plus tests.
|
||||||
|
* Added 'npm test'
|
||||||
|
* CB-7663 - iOS unit tests for splash screen
|
||||||
|
* Properly formatted splashscreen preference docs.
|
||||||
|
|
||||||
|
### 0.3.5 (Dec 02, 2014)
|
||||||
|
* CB-7204 - Race condition when hiding and showing spinner (closes #21)
|
||||||
|
* CB-7700 cordova-plugin-splashscreen documentation translation: cordova-plugin-splashscreen
|
||||||
|
|
||||||
|
### 1.0.0 (Feb 04, 2015)
|
||||||
|
* CB-8351 ios: Stop using deprecated IsIpad macro
|
||||||
|
* CB-3679 Add engine tag for Android >= 3.6.0 due to use of `preferences`
|
||||||
|
* CB-3679 Make SplashScreen plugin compatible with cordova-android@4.0.x
|
||||||
|
|||||||
@@ -40,35 +40,28 @@ Dieses Plugin zeigt und verbirgt einen Splash-Screen beim Start der Anwendung.
|
|||||||
* SplashScreen.Show
|
* SplashScreen.Show
|
||||||
* SplashScreen.Hide
|
* SplashScreen.Hide
|
||||||
|
|
||||||
### Android Macken
|
### Android Eigenarten
|
||||||
|
|
||||||
In Ihrem "config.xml" müssen Sie die folgende Einstellung hinzufügen
|
Sie müssen in der config.xml folgende Einstellungen vornehmen:
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
Wo Foo ist der Name der Datei Splashscreen. Vorzugsweise eine 9-Patch-Datei. Stellen Sie sicher, Splashcreen Dateien zu Ihrem Res/Xml-Verzeichnis unter den entsprechenden Ordnern hinzuzufügen.
|
Wo Foo ist der Name der Datei Splashscreen, vorzugsweise eine 9-Patch-Datei. Stellen Sie sicher, Splashcreen Dateien zu Ihrem Res/Xml-Verzeichnis unter den entsprechenden Ordnern hinzuzufügen. Der zweite Parameter stellt dar, wie lange das Splashscreen in Millisekunden angezeigt werden. Es wird standardmäßig auf 3000 ms. Weitere Informationen finden Sie unter [Symbole und Splash-Screens][1] .
|
||||||
|
|
||||||
Für Android müssen Sie auch Ihre wichtigsten Java-Projekte-Datei bearbeiten. Sie müssen hinzufügen, einen zweiten Parameter, die eine zeitliche Verzögerung zu Ihren super.loadUrl darstellt.
|
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## SplashScreen.Hide
|
## SplashScreen.Hide
|
||||||
|
|
||||||
Schließen Sie den Splash-Screen.
|
Schließen Sie den Splash-Screen.
|
||||||
|
|
||||||
navigator.splashscreen.hide();
|
Navigator.SplashScreen.Hide();
|
||||||
|
|
||||||
|
|
||||||
### BlackBerry 10 Quirk
|
### BlackBerry 10, WP8, iOS Eigenarten
|
||||||
|
|
||||||
Die `config.xml` der Datei `AutoHideSplashScreen` muss`false`.
|
Die `config.xml` der Datei `AutoHideSplashScreen` muss `false` . Verstecken des Begrüßungsbildschirms für zwei Sekunden Verzögerung, fügen Sie einen Timer wie die folgende in der `deviceready` -Ereignishandler:
|
||||||
|
|
||||||
### iOS Quirk
|
setTimeout(function() {navigator.splashscreen.hide();
|
||||||
|
|
||||||
Die `config.xml` Datei `AutoHideSplashScreen` muss `false` . Verstecken den Splash-Screen für zwei Sekunden Verzögerung, fügen Sie einen Timer wie die folgende in der `deviceready` -Ereignishandler:
|
|
||||||
|
|
||||||
setTimeout(function() {
|
|
||||||
navigator.splashscreen.hide();
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
@@ -76,9 +69,7 @@ Die `config.xml` Datei `AutoHideSplashScreen` muss `false` . Verstecken den Spla
|
|||||||
|
|
||||||
Zeigt den Begrüßungsbildschirm.
|
Zeigt den Begrüßungsbildschirm.
|
||||||
|
|
||||||
navigator.splashscreen.show();
|
Navigator.SplashScreen.Show();
|
||||||
|
|
||||||
|
|
||||||
Ihre Anwendung kann nicht aufgerufen werden `navigator.splashscreen.show()` bis die app gestartet hat und das `deviceready` -Ereignis ausgelöst hat. Aber da in der Regel der Splash-Screen soll sichtbar sein, bevor die Anwendung gestartet wurde, scheint die Niederlage der Zweck des Begrüßungsbildschirms. Somit einige Konfiguration in `config.xml` wird automatisch `show` den Splash-Screen unmittelbar nach Ihrer app starten und bevor es voll gestartet und hat das `deviceready` Ereignis. Weitere Informationen zu dieser Konfiguration finden Sie unter [Symbole und Splash-Screens][1] . Aus diesem Grund ist es unwahrscheinlich, dass Sie aufrufen müssen `navigator.splashscreen.show()` den Splash-Screen beim Starten der app sichtbar zu machen.
|
Ihre Anwendung kann nicht aufgerufen werden `navigator.splashscreen.show()` bis die app gestartet hat und das `deviceready` -Ereignis ausgelöst hat. Aber da in der Regel der Splash-Screen soll sichtbar sein, bevor die Anwendung gestartet wurde, scheint die Niederlage der Zweck des Begrüßungsbildschirms. Somit einige Konfiguration in `config.xml` wird automatisch `show` den Splash-Screen unmittelbar nach Ihrer app starten und bevor es voll gestartet und hat das `deviceready` Ereignis. Weitere Informationen zu dieser Konfiguration finden Sie unter [Symbole und Splash-Screens][1] . Aus diesem Grund ist es unwahrscheinlich, dass Sie aufrufen müssen `navigator.splashscreen.show()` den Splash-Screen beim Starten der app sichtbar zu machen.
|
||||||
|
|
||||||
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
|
||||||
@@ -28,7 +28,7 @@ Este plugin muestra y esconde una pantalla de bienvenida durante el inicio de la
|
|||||||
|
|
||||||
## Plataformas soportadas
|
## Plataformas soportadas
|
||||||
|
|
||||||
* Amazon fuego OS
|
* Amazon fire OS
|
||||||
* Android
|
* Android
|
||||||
* BlackBerry 10
|
* BlackBerry 10
|
||||||
* iOS
|
* iOS
|
||||||
@@ -42,33 +42,26 @@ Este plugin muestra y esconde una pantalla de bienvenida durante el inicio de la
|
|||||||
|
|
||||||
### Rarezas Android
|
### Rarezas Android
|
||||||
|
|
||||||
En el archivo config.xml, tienes que añadir la siguiente preferencia
|
En el archivo config.xml, tienes que añadir las siguientes preferencias:
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
Donde foo es el nombre del archivo splashscreen. Preferiblemente un archivo de 9 parche. Asegúrese de agregar tus archivos splashcreen en tu directorio res/xml bajo las carpetas apropiadas.
|
Donde foo es el nombre del archivo splashscreen, preferiblemente un archivo de 9 parche. Asegúrese de agregar tus archivos splashcreen en tu directorio res/xml bajo las carpetas apropiadas. El segundo parámetro representa cuánto aparecerán el splashscreen en milisegundos. Valor predeterminado es ms 3000. Ver [los iconos y salpicadura pantallas][1] para obtener más información.
|
||||||
|
|
||||||
Para Android, también tienes que editar el archivo java principales proyectos. Debe agregar un segundo parámetro que representa un intervalo de tiempo para su super.loadUrl.
|
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## splashscreen.hide
|
## splashscreen.hide
|
||||||
|
|
||||||
Despedir a la pantalla de bienvenida.
|
Despedir a la pantalla de bienvenida.
|
||||||
|
|
||||||
navigator.splashscreen.hide();
|
Navigator.SplashScreen.Hide();
|
||||||
|
|
||||||
|
|
||||||
### BlackBerry 10 chanfle
|
### BlackBerry 10, WP8, iOS Quirk
|
||||||
|
|
||||||
El `config.xml` del archivo `AutoHideSplashScreen` ajuste debe ser`false`.
|
|
||||||
|
|
||||||
### iOS Quirk
|
|
||||||
|
|
||||||
El `config.xml` del archivo `AutoHideSplashScreen` la configuración debe ser `false` . Para retrasar oculta la pantalla splash durante dos segundos, agregue un temporizador como la siguiente en el `deviceready` controlador de eventos:
|
El `config.xml` del archivo `AutoHideSplashScreen` la configuración debe ser `false` . Para retrasar oculta la pantalla splash durante dos segundos, agregue un temporizador como la siguiente en el `deviceready` controlador de eventos:
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {navigator.splashscreen.hide();
|
||||||
navigator.splashscreen.hide();
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
@@ -76,9 +69,7 @@ El `config.xml` del archivo `AutoHideSplashScreen` la configuración debe ser `f
|
|||||||
|
|
||||||
Muestra la pantalla de bienvenida.
|
Muestra la pantalla de bienvenida.
|
||||||
|
|
||||||
navigator.splashscreen.show();
|
Navigator.SplashScreen.Show();
|
||||||
|
|
||||||
|
|
||||||
La aplicación no se puede llamar `navigator.splashscreen.show()` hasta que haya iniciado la aplicación y el `deviceready` evento ha despedido. Pero puesto que normalmente la pantalla está destinada a ser visible antes de que comience su aplicación, que parecería que el propósito de la pantalla de bienvenida. Proporcionar cierta configuración en `config.xml` automáticamente `show` la pantalla de presentación inmediatamente después de su lanzamiento de la aplicación y antes de ser completamente ha iniciado y recibió el `deviceready` evento. Ver [los iconos y salpicadura pantallas][1] para obtener más información sobre haciendo esta configuración. Por esta razón, es poco probable que necesitas llamar a `navigator.splashscreen.show()` para hacer la pantalla visible para el inicio de la aplicación.
|
La aplicación no se puede llamar `navigator.splashscreen.show()` hasta que haya iniciado la aplicación y el `deviceready` evento ha despedido. Pero puesto que normalmente la pantalla está destinada a ser visible antes de que comience su aplicación, que parecería que el propósito de la pantalla de bienvenida. Proporcionar cierta configuración en `config.xml` automáticamente `show` la pantalla de presentación inmediatamente después de su lanzamiento de la aplicación y antes de ser completamente ha iniciado y recibió el `deviceready` evento. Ver [los iconos y salpicadura pantallas][1] para obtener más información sobre haciendo esta configuración. Por esta razón, es poco probable que necesitas llamar a `navigator.splashscreen.show()` para hacer la pantalla visible para el inicio de la aplicación.
|
||||||
|
|
||||||
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
|
||||||
@@ -42,43 +42,34 @@ Ce plugin affiche et masque un écran de démarrage lors du lancement de l'appli
|
|||||||
|
|
||||||
### Quirks Android
|
### Quirks Android
|
||||||
|
|
||||||
Dans votre fichier config.xml, vous devez ajouter la préférence suivante
|
Dans votre fichier config.xml, vous devez ajouter les préférences suivantes :
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
Où foo est le nom du fichier splashscreen. Préférence un fichier de 9 correctif. Assurez-vous d'ajouter vos fichiers splashcreen dans votre répertoire res/xml dans les dossiers appropriés.
|
Où foo est le nom du fichier splashscreen, préférablement un fichier de 9 correctif. Assurez-vous d'ajouter vos fichiers splashcreen dans votre répertoire res/xml dans les dossiers appropriés. Le deuxième paramètre représente combien de temps le splashscreen apparaîtra en millisecondes. Il est par défaut à 3000 ms. Pour plus d'informations, consultez [icônes et écrans de démarrage][1] .
|
||||||
|
|
||||||
Pour Android, vous devez également modifier votre fichier java principal de projets. Vous devez ajouter un deuxième paramètre, ce qui représente un temps de retard à votre super.loadUrl.
|
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## splashscreen.Hide
|
## splashscreen.Hide
|
||||||
|
|
||||||
Fait disparaître l'écran de démarrage.
|
Faire disparaître de l'écran de démarrage.
|
||||||
|
|
||||||
navigator.splashscreen.hide();
|
Navigator.SplashScreen.Hide() ;
|
||||||
|
|
||||||
|
|
||||||
### BlackBerry 10 Quirk
|
### BlackBerry 10, WP8, iOS Quirk
|
||||||
|
|
||||||
La `config.xml` du fichier `AutoHideSplashScreen` doit être`false`.
|
La `config.xml` du fichier `AutoHideSplashScreen` doit être `false` . Pour retarder la cacher l'écran de démarrage pendant deux secondes, ajouter un minuteur comme suit dans la `deviceready` gestionnaire d'événements :
|
||||||
|
|
||||||
### iOS Quirk
|
setTimeout(function() {navigator.splashscreen.hide() ;
|
||||||
|
}, 2000) ;
|
||||||
Le paramètre `AutoHideSplashScreen</code du fichier <code>config.xml` doit être réglé à `false` . Pour retarder la disparition de l'écran de démarrage de deux secondes, ajoute un minuteur comme ci-dessous dans le gestionnaire d'événements `deviceready` :
|
|
||||||
|
|
||||||
setTimeout(function() {
|
|
||||||
navigator.splashscreen.hide();
|
|
||||||
}, 2000);
|
|
||||||
|
|
||||||
|
|
||||||
## splashscreen.Show
|
## splashscreen.Show
|
||||||
|
|
||||||
Affiche l'écran de démarrage.
|
Affiche l'écran de démarrage.
|
||||||
|
|
||||||
navigator.splashscreen.show();
|
Navigator.SplashScreen.Show() ;
|
||||||
|
|
||||||
|
|
||||||
Votre application ne peut pas appeler `navigator.splashscreen.show()` jusqu'à ce que l'application a commencé et le `deviceready` événement a été déclenché. Mais puisqu'en général, l'écran de démarrage est destiné à être visible avant que votre application a commencé, qui semblerait à l'encontre des objectifs de l'écran de démarrage. Fournir une configuration en `config.xml` sera automatiquement `show` l'écran de démarrage immédiatement après votre lancement de l'app et avant qu'il a complètement démarré et a reçu le `deviceready` événement. Voir les [icônes et les écrans de démarrage][1] pour plus d'informations sur la conduite de cette configuration. Pour cette raison, il est peu probable que vous devez appeler `navigator.splashscreen.show()` pour rendre l'écran de démarrage visible pour le démarrage de l'application.
|
Votre application ne peut pas appeler `navigator.splashscreen.show()` jusqu'à ce que l'application a commencé et le `deviceready` événement a été déclenché. Mais puisqu'en général, l'écran de démarrage est destiné à être visible avant que votre application a commencé, qui semblerait à l'encontre des objectifs de l'écran de démarrage. Fournir une configuration en `config.xml` sera automatiquement `show` l'écran de démarrage immédiatement après votre lancement de l'app et avant qu'il a complètement démarré et a reçu le `deviceready` événement. Voir les [icônes et les écrans de démarrage][1] pour plus d'informations sur la conduite de cette configuration. Pour cette raison, il est peu probable que vous devez appeler `navigator.splashscreen.show()` pour rendre l'écran de démarrage visible pour le démarrage de l'application.
|
||||||
|
|
||||||
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
|
||||||
12
doc/index.md
12
doc/index.md
@@ -43,15 +43,13 @@ This plugin displays and hides a splash screen during application launch.
|
|||||||
|
|
||||||
### Android Quirks
|
### Android Quirks
|
||||||
|
|
||||||
In your config.xml, you need to add the following preference
|
In your config.xml, you need to add the following preferences:
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
<preference name="SplashScreen" value="foo" />
|
||||||
|
<preference name="SplashScreenDelay" value="10000" />
|
||||||
|
|
||||||
Where foo is the name of the splashscreen file. Preferably a 9 patch file. Make sure to add your splashcreen files to your res/xml directory under the appropriate folders.
|
Where foo is the name of the splashscreen file, preferably a 9 patch file. Make sure to add your splashcreen files to your res/xml directory under the appropriate folders. The second parameter represents how long the splashscreen will appear in milliseconds. It defaults to 3000 ms. See [Icons and Splash Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html)
|
||||||
|
for more information.
|
||||||
For Android, you also have to edit your projects main java file. You must add a second parameter representing a time delay to your super.loadUrl.
|
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## splashscreen.hide
|
## splashscreen.hide
|
||||||
|
|
||||||
|
|||||||
@@ -42,33 +42,26 @@ Questo plugin Visualizza e nasconde una schermata iniziale durante l'avvio dell'
|
|||||||
|
|
||||||
### Stranezze Android
|
### Stranezze Android
|
||||||
|
|
||||||
Nel vostro config. xml, è necessario aggiungere la seguente preferenza
|
Nel vostro config. xml, è necessario aggiungere le seguenti preferenze:
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
Dove foo è il nome del file splashscreen. Preferibilmente un file di 9 patch. Assicurati di aggiungere i tuoi file splashcreen res/xml nella directory sotto cartelle appropriate.
|
Dove foo è il nome del file splashscreen, preferibilmente un file 9 patch. Assicurati di aggiungere i tuoi file splashcreen res/xml nella directory sotto cartelle appropriate. Il secondo parametro rappresenta quanto tempo lo splashscreen apparirà in millisecondi. Il valore predefinito è 3000 ms. Per ulteriori informazioni, vedere [icone e schermate iniziali][1] .
|
||||||
|
|
||||||
Per Android, devi anche modificare il file di progetti java principale. È necessario aggiungere un secondo parametro che rappresenta un tempo di ritardo alla tua super.loadUrl.
|
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## splashscreen.Hide
|
## splashscreen.Hide
|
||||||
|
|
||||||
Respingere la schermata iniziale.
|
Respingere la schermata iniziale.
|
||||||
|
|
||||||
navigator.splashscreen.hide();
|
Navigator.SplashScreen.Hide();
|
||||||
|
|
||||||
|
|
||||||
### BlackBerry 10 Quirk
|
### BlackBerry 10, WP8, iOS Quirk
|
||||||
|
|
||||||
Il `config.xml` di file `AutoHideSplashScreen` impostazione deve essere`false`.
|
|
||||||
|
|
||||||
### iOS Quirk
|
|
||||||
|
|
||||||
Il `config.xml` di file `AutoHideSplashScreen` impostazione deve essere `false` . Per ritardare nascondendo la schermata iniziale per due secondi, aggiungere un timer ad esempio nel `deviceready` gestore di evento:
|
Il `config.xml` di file `AutoHideSplashScreen` impostazione deve essere `false` . Per ritardare nascondendo la schermata iniziale per due secondi, aggiungere un timer ad esempio nel `deviceready` gestore di evento:
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {navigator.splashscreen.hide();
|
||||||
navigator.splashscreen.hide();
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
@@ -76,9 +69,7 @@ Il `config.xml` di file `AutoHideSplashScreen` impostazione deve essere `false`
|
|||||||
|
|
||||||
Visualizza la schermata iniziale.
|
Visualizza la schermata iniziale.
|
||||||
|
|
||||||
navigator.splashscreen.show();
|
Navigator.SplashScreen.Show();
|
||||||
|
|
||||||
|
|
||||||
L'applicazione non può chiamare `navigator.splashscreen.show()` fino a quando ha iniziato l'app e il `deviceready` ha generato l'evento. Ma poiché in genere la schermata iniziale è destinata ad essere visibile prima app ha iniziato, che sembrerebbe per sconfiggere lo scopo della schermata iniziale. Fornendo qualche configurazione in `config.xml` verrà automaticamente `show` la schermata iniziale subito dopo il lancio dell'app e prima che completamente ha iniziato e ha ricevuto il `deviceready` evento. Per ulteriori informazioni su facendo questa configurazione, vedere [icone e schermate iniziali][1] . Per questo motivo, è improbabile che dovete chiamare `navigator.splashscreen.show()` per rendere la schermata visibile per avvio di app.
|
L'applicazione non può chiamare `navigator.splashscreen.show()` fino a quando ha iniziato l'app e il `deviceready` ha generato l'evento. Ma poiché in genere la schermata iniziale è destinata ad essere visibile prima app ha iniziato, che sembrerebbe per sconfiggere lo scopo della schermata iniziale. Fornendo qualche configurazione in `config.xml` verrà automaticamente `show` la schermata iniziale subito dopo il lancio dell'app e prima che completamente ha iniziato e ha ricevuto il `deviceready` evento. Per ulteriori informazioni su facendo questa configurazione, vedere [icone e schermate iniziali][1] . Per questo motivo, è improbabile che dovete chiamare `navigator.splashscreen.show()` per rendere la schermata visibile per avvio di app.
|
||||||
|
|
||||||
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
|
||||||
@@ -42,15 +42,13 @@
|
|||||||
|
|
||||||
### Android の癖
|
### Android の癖
|
||||||
|
|
||||||
あなた config.xml で、以下の設定を追加する必要があります。
|
あなたの config.xml を以下の設定を追加する必要があります。
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
Foo は splashscreen ファイルの名前です。できれば 9 パッチ ファイルです。解像度/xml ディレクトリの適切なフォルダーの下に splashcreen ファイルを追加することを確認します。
|
Foo ができれば 9 パッチファイル splashscreen ファイルの名前です。 解像度/xml ディレクトリの適切なフォルダーの下に splashcreen ファイルを追加することを確認します。 2 番目のパラメーターは、スプラッシュ ・ スクリーンがの表示時間 (ミリ秒単位) を表します。 デフォルトでは 3000 ミリ秒です。 詳細については、[アイコンとスプラッシュ画面][1]を参照してください。
|
||||||
|
|
||||||
アンドロイドのためまた、プロジェクトの主要な java ファイルを編集する必要があります。あなたの super.loadUrl への遅延時間を表す 2 番目のパラメーターを追加する必要があります。
|
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## splashscreen.hide
|
## splashscreen.hide
|
||||||
|
|
||||||
@@ -59,17 +57,11 @@ Foo は splashscreen ファイルの名前です。できれば 9 パッチ フ
|
|||||||
navigator.splashscreen.hide();
|
navigator.splashscreen.hide();
|
||||||
|
|
||||||
|
|
||||||
### ブラックベリー 10 気まぐれ
|
### ブラックベリー 10、WP8、iOS の気まぐれ
|
||||||
|
|
||||||
`config.xml`ファイルの `AutoHideSplashScreen` 設定する必要があります`false`.
|
`config.xml`ファイルの `AutoHideSplashScreen` 設定する必要があります `false` 。 遅延を 2 秒間スプラッシュ スクリーンを非表示、タイマーを追加しますで次のように `deviceready` イベント ハンドラー。
|
||||||
|
|
||||||
### iOS の気まぐれ
|
setTimeout(function() {navigator.splashscreen.hide();}, 2000年);
|
||||||
|
|
||||||
`config.xml`ファイルの `AutoHideSplashScreen` 設定する必要があります `false` 。 遅延を 2 秒間スプラッシュ スクリーンを非表示、する、タイマーを追加しますで次のように `deviceready` イベント ハンドラー。
|
|
||||||
|
|
||||||
setTimeout(function() {
|
|
||||||
navigator.splashscreen.hide();
|
|
||||||
}, 2000);
|
|
||||||
|
|
||||||
|
|
||||||
## splashscreen.show
|
## splashscreen.show
|
||||||
@@ -79,6 +71,4 @@ Foo は splashscreen ファイルの名前です。できれば 9 パッチ フ
|
|||||||
navigator.splashscreen.show();
|
navigator.splashscreen.show();
|
||||||
|
|
||||||
|
|
||||||
アプリケーションを呼び出すことはできません `navigator.splashscreen.show()` 、アプリが開始されるまで、 `deviceready` イベントが発生します。 しかし、以来、通常スプラッシュ画面アプリ開始前に表示するものですと思われる、スプラッシュ スクリーンの目的の敗北します。 いくつかの構成を提供する `config.xml` は自動的に `show` スプラッシュ画面、アプリを起動後すぐに、それが完全に起動し、受信する前に、 `deviceready` イベント。 詳細についてはこの構成を行うには、[アイコンとスプラッシュ画面][1]を参照してください。 このような理由から、それは可能性を呼び出す必要があります `navigator.splashscreen.show()` アプリ起動時のスプラッシュ画面を見やすくします。
|
アプリケーションを呼び出すことはできません `navigator.splashscreen.show()` 、アプリが開始されるまで、 `deviceready` イベントが発生します。 しかし、以来、通常スプラッシュ画面アプリ開始前に表示するものですと思われる、スプラッシュ スクリーンの目的の敗北します。 いくつかの構成を提供する `config.xml` は自動的に `show` スプラッシュ画面、アプリを起動後すぐに、それが完全に起動し、受信する前に、 `deviceready` イベント。 詳細についてはこの構成を行うには、[アイコンとスプラッシュ画面][1]を参照してください。 このような理由から、それは可能性を呼び出す必要があります `navigator.splashscreen.show()` アプリ起動時のスプラッシュ画面を見やすくします。
|
||||||
|
|
||||||
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
|
||||||
@@ -42,15 +42,13 @@
|
|||||||
|
|
||||||
### 안 드 로이드 단점
|
### 안 드 로이드 단점
|
||||||
|
|
||||||
당신의 config.xml에 다음 기본 설정 추가 해야
|
당신의 config.xml에 다음 환경 설정에 추가 해야 합니다.
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
여기서 foo splashscreen 파일의 이름입니다. 가급적 이면 9 패치 파일입니다. 적절 한 폴더 아래 res/xml 디렉토리에 splashcreen 파일을 추가 해야 합니다.
|
여기서 foo splashscreen 파일, 선호 9 패치 파일의 이름입니다. 적절 한 폴더 아래 res/xml 디렉토리에 splashcreen 파일을 추가 해야 합니다. 두 번째 매개 변수는 splashscreen 얼마나 밀리초 단위로 표시 됩니다 나타냅니다. 3000 ms 기본값으로 사용 됩니다. 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오.
|
||||||
|
|
||||||
안 드 로이드, 또한 프로젝트 주요 자바 파일을 편집 해야 합니다. 당신의 super.loadUrl 시간 지연을 나타내는 두 번째 매개 변수를 추가 해야 합니다.
|
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## splashscreen.hide
|
## splashscreen.hide
|
||||||
|
|
||||||
@@ -59,16 +57,11 @@
|
|||||||
navigator.splashscreen.hide();
|
navigator.splashscreen.hide();
|
||||||
|
|
||||||
|
|
||||||
### 블랙베리 10 특질
|
### 블랙베리 10, WP8, iOS 특질
|
||||||
|
|
||||||
`config.xml`파일의 `AutoHideSplashScreen` 설정을 해야 합니다`false`.
|
|
||||||
|
|
||||||
### iOS 특질
|
|
||||||
|
|
||||||
`config.xml`파일의 `AutoHideSplashScreen` 설정을 해야 합니다 `false` . 2 초 동안 시작 화면을 숨기고 지연에 다음과 같이 타이머 추가 `deviceready` 이벤트 처리기:
|
`config.xml`파일의 `AutoHideSplashScreen` 설정을 해야 합니다 `false` . 2 초 동안 시작 화면을 숨기고 지연에 다음과 같이 타이머 추가 `deviceready` 이벤트 처리기:
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {navigator.splashscreen.hide();
|
||||||
navigator.splashscreen.hide();
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
@@ -79,6 +72,4 @@
|
|||||||
navigator.splashscreen.show();
|
navigator.splashscreen.show();
|
||||||
|
|
||||||
|
|
||||||
응용 프로그램 호출할 수 없습니다 `navigator.splashscreen.show()` 응용 프로그램은 시작 될 때까지 및 `deviceready` 이벤트를 해 고 했다. 하지만 그 스플래시 스크린의 목적 것 같다 일반적으로 시작 화면이 당신의 애플 리 케이 션 시작 하기 전에 표시 될 운명이 다, 이후. 몇 가지 구성을 제공 `config.xml` 자동으로 `show` 시작 화면 응용 프로그램 실행 후 즉시 및 그것은 완벽 하 게 시작 하 고 받은 전에 `deviceready` 이벤트. 이 구성 하 고 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오. 이러한 이유로, 그것은 가능성이 호출 해야 `navigator.splashscreen.show()` 시작 화면은 응용 프로그램 시작에 대 한 표시 되도록 합니다.
|
응용 프로그램 호출할 수 없습니다 `navigator.splashscreen.show()` 응용 프로그램은 시작 될 때까지 및 `deviceready` 이벤트를 해 고 했다. 하지만 그 스플래시 스크린의 목적 것 같다 일반적으로 시작 화면이 당신의 애플 리 케이 션 시작 하기 전에 표시 될 운명이 다, 이후. 몇 가지 구성을 제공 `config.xml` 자동으로 `show` 시작 화면 응용 프로그램 실행 후 즉시 및 그것은 완벽 하 게 시작 하 고 받은 전에 `deviceready` 이벤트. 이 구성 하 고 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오. 이러한 이유로, 그것은 가능성이 호출 해야 `navigator.splashscreen.show()` 시작 화면은 응용 프로그램 시작에 대 한 표시 되도록 합니다.
|
||||||
|
|
||||||
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
|
||||||
@@ -21,16 +21,16 @@
|
|||||||
|
|
||||||
Ten plugin wyświetla i ukrywa ekran powitalny podczas uruchamiania aplikacji.
|
Ten plugin wyświetla i ukrywa ekran powitalny podczas uruchamiania aplikacji.
|
||||||
|
|
||||||
## Instalacji
|
## Instalacja
|
||||||
|
|
||||||
cordova plugin add org.apache.cordova.splashscreen
|
cordova plugin add org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
|
||||||
## Obsługiwane platformy
|
## Obsługiwane platformy
|
||||||
|
|
||||||
* Amazon ogień OS
|
* Amazon Fire OS
|
||||||
* Android
|
* Android
|
||||||
* Jeżyna 10
|
* BlackBerry 10
|
||||||
* iOS
|
* iOS
|
||||||
* Windows Phone 7 i 8
|
* Windows Phone 7 i 8
|
||||||
* Windows 8
|
* Windows 8
|
||||||
@@ -40,35 +40,28 @@ Ten plugin wyświetla i ukrywa ekran powitalny podczas uruchamiania aplikacji.
|
|||||||
* splashscreen.show
|
* splashscreen.show
|
||||||
* splashscreen.Hide
|
* splashscreen.Hide
|
||||||
|
|
||||||
### Android dziwactwa
|
### Dziwactwa Androida
|
||||||
|
|
||||||
W pliku config.xml musisz dodać następujące preferencje
|
W pliku config.xml musisz dodać następujące preferencje:
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
Gdzie foo jest nazwą pliku ekranu powitalnego. Najlepiej plik poprawki 9. Upewnij się dodać pliki splashcreen do katalogu res/xml w odpowiednich folderach.
|
Gdzie foo jest nazwą pliku ekranu powitalnego, najlepiej 9 łatce. Upewnij się dodać pliki splashcreen do katalogu res/xml w odpowiednich folderach. Drugi parametr reprezentuje, jak długo ekranu powitalnego pojawi się w milisekundach. Domyślnie 3000 ms. Aby uzyskać więcej informacji, zobacz [ikony i ekrany powitalne w aplikacjach][1] .
|
||||||
|
|
||||||
Dla Androida należy edytować plik java głównych projektów. Należy dodać drugi parametr reprezentujących opóźnienie do Twojej super.loadUrl.
|
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## splashscreen.Hide
|
## splashscreen.Hide
|
||||||
|
|
||||||
Odrzucić ten opryskaæ têcza.
|
Odrzucić ten opryskaæ têcza.
|
||||||
|
|
||||||
navigator.splashscreen.hide();
|
Navigator.splashscreen.Hide();
|
||||||
|
|
||||||
|
|
||||||
### Zrządzenie blackBerry 10
|
### Jeżyna 10, WP8, iOS dziwactwo
|
||||||
|
|
||||||
`config.xml`Pliku `AutoHideSplashScreen` ustawienie musi być`false`.
|
|
||||||
|
|
||||||
### iOS dziwactwo
|
|
||||||
|
|
||||||
`config.xml`Pliku `AutoHideSplashScreen` ustawienie musi być `false` . Opóźnienia, ukrywanie ekranu powitalnego przez dwie sekundy, dodać timer następujących w `deviceready` obsługa zdarzeń:
|
`config.xml`Pliku `AutoHideSplashScreen` ustawienie musi być `false` . Opóźnienia, ukrywanie ekranu powitalnego przez dwie sekundy, dodać timer następujących w `deviceready` obsługa zdarzeń:
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {navigator.splashscreen.hide();
|
||||||
navigator.splashscreen.hide();
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
@@ -76,9 +69,7 @@ Odrzucić ten opryskaæ têcza.
|
|||||||
|
|
||||||
Wyświetla ekran powitalny.
|
Wyświetla ekran powitalny.
|
||||||
|
|
||||||
navigator.splashscreen.show();
|
Navigator.splashscreen.show();
|
||||||
|
|
||||||
|
|
||||||
Aplikacja nie może wywołać `navigator.splashscreen.show()` aż aplikacja została uruchomiona i `deviceready` imprezy został zwolniony. Ale ponieważ zazwyczaj opryskać tęcza ma być widoczne przed rozpoczęciem aplikacji, wydaje się sprzeczne z celem ekranu powitalnego. Dostarczanie niektórych konfiguracji w `config.xml` będzie automatycznie `show` ekran powitalny, natychmiast po uruchomienie aplikacji i przed pełni rozpoczął i otrzymał `deviceready` zdarzenie. Aby uzyskać więcej informacji na robienie tej konfiguracji, zobacz [ikony i ekrany powitalne w aplikacjach][1] . Z tego powodu, jest mało prawdopodobne, należy zadzwonić `navigator.splashscreen.show()` Aby wyświetlić ekran powitalny dla uruchamiania aplikacji.
|
Aplikacja nie może wywołać `navigator.splashscreen.show()` aż aplikacja została uruchomiona i `deviceready` imprezy został zwolniony. Ale ponieważ zazwyczaj opryskać tęcza ma być widoczne przed rozpoczęciem aplikacji, wydaje się sprzeczne z celem ekranu powitalnego. Dostarczanie niektórych konfiguracji w `config.xml` będzie automatycznie `show` ekran powitalny, natychmiast po uruchomienie aplikacji i przed pełni rozpoczął i otrzymał `deviceready` zdarzenie. Aby uzyskać więcej informacji na robienie tej konfiguracji, zobacz [ikony i ekrany powitalne w aplikacjach][1] . Z tego powodu, jest mało prawdopodobne, należy zadzwonić `navigator.splashscreen.show()` Aby wyświetlić ekran powitalny dla uruchamiania aplikacji.
|
||||||
|
|
||||||
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
|
||||||
75
doc/ru/index.md
Normal file
75
doc/ru/index.md
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<!---
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
Этот плагин отображает и скрывает экран-заставку при запуске приложения.
|
||||||
|
|
||||||
|
## Установка
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
|
||||||
|
## Поддерживаемые платформы
|
||||||
|
|
||||||
|
* Amazon Fire OS
|
||||||
|
* Android
|
||||||
|
* BlackBerry 10
|
||||||
|
* iOS
|
||||||
|
* Windows Phone 7 и 8
|
||||||
|
* Windows 8
|
||||||
|
|
||||||
|
## Методы
|
||||||
|
|
||||||
|
* splashscreen.show
|
||||||
|
* splashscreen.hide
|
||||||
|
|
||||||
|
### Особенности Android
|
||||||
|
|
||||||
|
В вашем файле config.xml необходимо добавить следующие настройки:
|
||||||
|
|
||||||
|
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
|
Где foo это имя файла splashscreen, желательно 9 заплатку. Убедитесь в том добавить ваши splashcreen файлы в папку res/xml в соответствующие папки. Второй параметр представляет, как долго splashscreen появится в миллисекундах. По умолчанию он 3000 МС. Увидеть [иконки и заставки][1] для получения дополнительной информации.
|
||||||
|
|
||||||
|
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
||||||
|
|
||||||
|
## splashscreen.hide
|
||||||
|
|
||||||
|
Закройте экран-заставка.
|
||||||
|
|
||||||
|
Navigator.SplashScreen.Hide();
|
||||||
|
|
||||||
|
|
||||||
|
### Особенности BlackBerry 10, WP8, iOS
|
||||||
|
|
||||||
|
`config.xml`Файла `AutoHideSplashScreen` должен быть `false` . Для задержки скрытия заставки на две секунды, добавить таймер, например в `deviceready` обработчик событий:
|
||||||
|
|
||||||
|
setTimeout(function() {navigator.splashscreen.hide();
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
|
## splashscreen.show
|
||||||
|
|
||||||
|
Отображает экран-заставку.
|
||||||
|
|
||||||
|
Navigator.SplashScreen.Show();
|
||||||
|
|
||||||
|
|
||||||
|
Ваше приложение не может вызвать `navigator.splashscreen.show()` до тех пор, пока приложение началась и `deviceready` событие инициировано. Но поскольку обычно экран-заставка должен быть видимым до начала вашего приложения, что казалось бы поражение цели экрана-заставки. Предоставление некоторых конфигурации в `config.xml` будет автоматически `show` экран-заставку сразу же после запуска вашего приложения и перед его полностью запущен и получил `deviceready` событие. Увидеть [иконки и заставки][1] для получения дополнительной информации на делать этой конфигурации. По этой причине маловероятно, вам нужно вызвать `navigator.splashscreen.show()` для отображения экрана-заставки для запуска приложения.
|
||||||
@@ -42,43 +42,33 @@
|
|||||||
|
|
||||||
### Android 的怪癖
|
### Android 的怪癖
|
||||||
|
|
||||||
您需要在您的 config.xml 中添加下列優先選項
|
在你的 config.xml,您需要添加以下優惠:
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
美孚在哪裡的閃屏檔的名稱。最好是 9 修補程式檔。請確保您的 splashcreen 檔添加到相應的資料夾下的 res/xml 目錄。
|
美孚在哪裡閃屏檔,最好是 9 修補程式檔的名稱。 請確保您的 splashcreen 檔添加到 res/xml 目錄下相應的資料夾。 第二個參數表示多久閃屏會顯示以毫秒為單位。 它將預設為 3000 毫秒。 有關更多資訊,請參見[圖示和啟動畫面][1]。
|
||||||
|
|
||||||
Android 系統,也可以編輯您的專案主要的 java 檔。您必須添加第二個參數表示一個時間延遲到你 super.loadUrl。
|
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## splashscreen.hide
|
## splashscreen.hide
|
||||||
|
|
||||||
解雇的初始螢幕。
|
解雇的閃屏。
|
||||||
|
|
||||||
navigator.splashscreen.hide();
|
navigator.splashscreen.hide() ;
|
||||||
|
|
||||||
|
|
||||||
### 黑莓 10 怪癖
|
### 黑莓 10,WP8,iOS 怪癖
|
||||||
|
|
||||||
`config.xml`檔的 `AutoHideSplashScreen` 設置必須為`false`.
|
|
||||||
|
|
||||||
### iOS 怪癖
|
|
||||||
|
|
||||||
`config.xml`檔的 `AutoHideSplashScreen` 設置必須為 `false` 。 若要延遲兩秒鐘隱藏的閃屏,添加如下所示在計時器 `deviceready` 事件處理常式:
|
`config.xml`檔的 `AutoHideSplashScreen` 設置必須為 `false` 。 若要延遲兩秒鐘隱藏的閃屏,添加如下所示在計時器 `deviceready` 事件處理常式:
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {navigator.splashscreen.hide() ;},2000年) ;
|
||||||
navigator.splashscreen.hide();
|
|
||||||
}, 2000);
|
|
||||||
|
|
||||||
|
|
||||||
## splashscreen.show
|
## splashscreen.show
|
||||||
|
|
||||||
顯示初始螢幕。
|
顯示初始螢幕。
|
||||||
|
|
||||||
navigator.splashscreen.show();
|
navigator.splashscreen.show() ;
|
||||||
|
|
||||||
|
|
||||||
您的應用程式不能調用 `navigator.splashscreen.show()` 直到應用程式已啟動和 `deviceready` 觸發了事件。 但因為通常的閃屏為了是可見的在您的應用程式啟動之前,似乎要打敗閃屏的目的。 提供一些配置在 `config.xml` 自動將 `show` 的初始螢幕,您的應用程式啟動後立即和它在之前已完全開始收到 `deviceready` 事件。 做這種配置的詳細資訊,請參閱[圖示和閃屏][1]。 出於此原因,它是不太可能你需要調用 `navigator.splashscreen.show()` ,使初始螢幕可見為應用程式啟動。
|
您的應用程式無法調用 `navigator.splashscreen.show()` 直到應用程式已經開始, `deviceready` 觸發了事件。 但是,由於通常的閃屏為了是可見的在您的應用程式啟動之前,這似乎會打敗閃屏的目的。 提供一些配置在 `config.xml` 將自動 `show` 閃屏您的應用程式啟動後立即和之前它已經完全起步並收到 `deviceready` 事件。 做這種配置的詳細資訊,請參閱[圖示和啟動畫面][1]。 出於這個原因,它不太可能您需要調用 `navigator.splashscreen.show()` ,使初始螢幕可見為應用程式啟動。
|
||||||
|
|
||||||
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||||
id="org.apache.cordova.splashscreen"
|
id="org.apache.cordova.splashscreen"
|
||||||
version="0.3.1">
|
version="1.0.0">
|
||||||
<name>Splashscreen</name>
|
<name>Splashscreen</name>
|
||||||
<description>Cordova Splashscreen Plugin</description>
|
<description>Cordova Splashscreen Plugin</description>
|
||||||
<license>Apache 2.0</license>
|
<license>Apache 2.0</license>
|
||||||
@@ -28,6 +28,9 @@
|
|||||||
<repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</repo>
|
<repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</repo>
|
||||||
<issue>https://issues.apache.org/jira/browse/CB/component/12320653</issue>
|
<issue>https://issues.apache.org/jira/browse/CB/component/12320653</issue>
|
||||||
|
|
||||||
|
<engines>
|
||||||
|
<engine name="cordova-android" version=">=3.6.0" /><!-- Requires CordovaPlugin.preferences -->
|
||||||
|
</engines>
|
||||||
|
|
||||||
<js-module src="www/splashscreen.js" name="SplashScreen">
|
<js-module src="www/splashscreen.js" name="SplashScreen">
|
||||||
<clobbers target="navigator.splashscreen" />
|
<clobbers target="navigator.splashscreen" />
|
||||||
@@ -37,7 +40,8 @@
|
|||||||
<platform name="android">
|
<platform name="android">
|
||||||
<config-file target="res/xml/config.xml" parent="/*">
|
<config-file target="res/xml/config.xml" parent="/*">
|
||||||
<feature name="SplashScreen">
|
<feature name="SplashScreen">
|
||||||
<param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen"/>
|
<param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen"/>
|
||||||
|
<param name="onload" value="true"/>
|
||||||
</feature>
|
</feature>
|
||||||
</config-file>
|
</config-file>
|
||||||
|
|
||||||
|
|||||||
@@ -19,20 +19,110 @@
|
|||||||
|
|
||||||
package org.apache.cordova.splashscreen;
|
package org.apache.cordova.splashscreen;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.view.Display;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import org.apache.cordova.CallbackContext;
|
import org.apache.cordova.CallbackContext;
|
||||||
import org.apache.cordova.CordovaPlugin;
|
import org.apache.cordova.CordovaPlugin;
|
||||||
|
import org.apache.cordova.CordovaWebView;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
|
|
||||||
public class SplashScreen extends CordovaPlugin {
|
public class SplashScreen extends CordovaPlugin {
|
||||||
|
private static final String LOG_TAG = "SplashScreen";
|
||||||
|
// Cordova 3.x.x has a copy of this plugin bundled with it (SplashScreenInternal.java).
|
||||||
|
// Enable functionality only if running on 4.x.x.
|
||||||
|
private static final boolean HAS_BUILT_IN_SPLASH_SCREEN = Integer.valueOf(CordovaWebView.CORDOVA_VERSION.split("\\.")[0]) < 4;
|
||||||
|
private static Dialog splashDialog;
|
||||||
|
private static ProgressDialog spinnerDialog;
|
||||||
|
private static boolean firstShow = true;
|
||||||
|
|
||||||
|
// Helper to be compile-time compatable with both Cordova 3.x and 4.x.
|
||||||
|
private View getView() {
|
||||||
|
try {
|
||||||
|
return (View)webView.getClass().getMethod("getView").invoke(webView);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return (View)webView;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
|
protected void pluginInitialize() {
|
||||||
if (action.equals("hide")) {
|
if (HAS_BUILT_IN_SPLASH_SCREEN || !firstShow) {
|
||||||
this.webView.postMessage("splashscreen", "hide");
|
return;
|
||||||
} else if (action.equals("show")){
|
|
||||||
this.webView.postMessage("splashscreen", "show");
|
|
||||||
}
|
}
|
||||||
else {
|
// Make WebView invisible while loading URL
|
||||||
|
getView().setVisibility(View.INVISIBLE);
|
||||||
|
int drawableId = preferences.getInteger("SplashDrawableId", 0);
|
||||||
|
if (drawableId == 0) {
|
||||||
|
String splashResource = preferences.getString("SplashScreen", null);
|
||||||
|
if (splashResource != null) {
|
||||||
|
drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getClass().getPackage().getName());
|
||||||
|
if (drawableId == 0) {
|
||||||
|
drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getPackageName());
|
||||||
|
}
|
||||||
|
preferences.set("SplashDrawableId", drawableId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
firstShow = false;
|
||||||
|
loadSpinner();
|
||||||
|
showSplashScreen(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause(boolean multitasking) {
|
||||||
|
if (HAS_BUILT_IN_SPLASH_SCREEN) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// hide the splash screen to avoid leaking a window
|
||||||
|
this.removeSplashScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
if (HAS_BUILT_IN_SPLASH_SCREEN) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// hide the splash screen to avoid leaking a window
|
||||||
|
this.removeSplashScreen();
|
||||||
|
firstShow = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
||||||
|
if (action.equals("hide")) {
|
||||||
|
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
webView.postMessage("splashscreen", "hide");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (action.equals("show")) {
|
||||||
|
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
webView.postMessage("splashscreen", "show");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (action.equals("spinnerStart")) {
|
||||||
|
if (!HAS_BUILT_IN_SPLASH_SCREEN) {
|
||||||
|
final String title = args.getString(0);
|
||||||
|
final String message = args.getString(1);
|
||||||
|
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
spinnerStart(title, message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,4 +130,152 @@ public class SplashScreen extends CordovaPlugin {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object onMessage(String id, Object data) {
|
||||||
|
if (HAS_BUILT_IN_SPLASH_SCREEN) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if ("splashscreen".equals(id)) {
|
||||||
|
if ("hide".equals(data.toString())) {
|
||||||
|
this.removeSplashScreen();
|
||||||
|
} else {
|
||||||
|
this.showSplashScreen(false);
|
||||||
|
}
|
||||||
|
} else if ("spinner".equals(id)) {
|
||||||
|
if ("stop".equals(data.toString())) {
|
||||||
|
this.spinnerStop();
|
||||||
|
getView().setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
} else if ("onReceivedError".equals(id)) {
|
||||||
|
spinnerStop();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void removeSplashScreen() {
|
||||||
|
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
if (splashDialog != null && splashDialog.isShowing()) {
|
||||||
|
splashDialog.dismiss();
|
||||||
|
splashDialog = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows the splash screen over the full Activity
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
private void showSplashScreen(final boolean hideAfterDelay) {
|
||||||
|
final int splashscreenTime = preferences.getInteger("SplashScreenDelay", 3000);
|
||||||
|
final int drawableId = preferences.getInteger("SplashDrawableId", 0);
|
||||||
|
|
||||||
|
// If the splash dialog is showing don't try to show it again
|
||||||
|
if (this.splashDialog != null && splashDialog.isShowing()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (drawableId == 0 || (splashscreenTime <= 0 && hideAfterDelay)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
// Get reference to display
|
||||||
|
Display display = cordova.getActivity().getWindowManager().getDefaultDisplay();
|
||||||
|
Context context = webView.getContext();
|
||||||
|
|
||||||
|
// Create the layout for the dialog
|
||||||
|
LinearLayout root = new LinearLayout(context);
|
||||||
|
root.setMinimumHeight(display.getHeight());
|
||||||
|
root.setMinimumWidth(display.getWidth());
|
||||||
|
root.setOrientation(LinearLayout.VERTICAL);
|
||||||
|
|
||||||
|
// TODO: Use the background color of the webview's parent instead of using the
|
||||||
|
// preference.
|
||||||
|
root.setBackgroundColor(preferences.getInteger("backgroundColor", Color.BLACK));
|
||||||
|
root.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT, 0.0F));
|
||||||
|
root.setBackgroundResource(drawableId);
|
||||||
|
|
||||||
|
// Create and show the dialog
|
||||||
|
splashDialog = new Dialog(context, android.R.style.Theme_Translucent_NoTitleBar);
|
||||||
|
// check to see if the splash screen should be full screen
|
||||||
|
if ((cordova.getActivity().getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN)
|
||||||
|
== WindowManager.LayoutParams.FLAG_FULLSCREEN) {
|
||||||
|
splashDialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||||
|
WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
|
}
|
||||||
|
splashDialog.setContentView(root);
|
||||||
|
splashDialog.setCancelable(false);
|
||||||
|
splashDialog.show();
|
||||||
|
|
||||||
|
// Set Runnable to remove splash screen just in case
|
||||||
|
if (hideAfterDelay) {
|
||||||
|
final Handler handler = new Handler();
|
||||||
|
handler.postDelayed(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
removeSplashScreen();
|
||||||
|
}
|
||||||
|
}, splashscreenTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Load the spinner
|
||||||
|
*/
|
||||||
|
private void loadSpinner() {
|
||||||
|
// If loadingDialog property, then show the App loading dialog for first page of app
|
||||||
|
String loading = null;
|
||||||
|
if (webView.canGoBack()) {
|
||||||
|
loading = preferences.getString("LoadingDialog", null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
loading = preferences.getString("LoadingPageDialog", null);
|
||||||
|
}
|
||||||
|
if (loading != null) {
|
||||||
|
String title = "";
|
||||||
|
String message = "Loading Application...";
|
||||||
|
|
||||||
|
if (loading.length() > 0) {
|
||||||
|
int comma = loading.indexOf(',');
|
||||||
|
if (comma > 0) {
|
||||||
|
title = loading.substring(0, comma);
|
||||||
|
message = loading.substring(comma + 1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
title = "";
|
||||||
|
message = loading;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spinnerStart(title, message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void spinnerStart(final String title, final String message) {
|
||||||
|
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
spinnerStop();
|
||||||
|
spinnerDialog = ProgressDialog.show(webView.getContext(), title, message, true, true,
|
||||||
|
new DialogInterface.OnCancelListener() {
|
||||||
|
public void onCancel(DialogInterface dialog) {
|
||||||
|
spinnerDialog = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void spinnerStop() {
|
||||||
|
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
if (spinnerDialog != null && spinnerDialog.isShowing()) {
|
||||||
|
spinnerDialog.dismiss();
|
||||||
|
spinnerDialog = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,16 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <Cordova/CDVPlugin.h>
|
#import <Cordova/CDVPlugin.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
BOOL iPhone;
|
||||||
|
BOOL iPad;
|
||||||
|
BOOL iPhone5;
|
||||||
|
BOOL iPhone6;
|
||||||
|
BOOL iPhone6Plus;
|
||||||
|
BOOL retina;
|
||||||
|
|
||||||
|
} CDV_iOSDevice;
|
||||||
|
|
||||||
@interface CDVSplashScreen : CDVPlugin {
|
@interface CDVSplashScreen : CDVPlugin {
|
||||||
UIActivityIndicatorView* _activityView;
|
UIActivityIndicatorView* _activityView;
|
||||||
UIImageView* _imageView;
|
UIImageView* _imageView;
|
||||||
|
|||||||
@@ -19,9 +19,11 @@
|
|||||||
|
|
||||||
#import "CDVSplashScreen.h"
|
#import "CDVSplashScreen.h"
|
||||||
#import <Cordova/CDVViewController.h>
|
#import <Cordova/CDVViewController.h>
|
||||||
|
#import <Cordova/CDVScreenOrientationDelegate.h>
|
||||||
|
|
||||||
#define kSplashScreenDurationDefault 0.25f
|
#define kSplashScreenDurationDefault 0.25f
|
||||||
|
|
||||||
|
|
||||||
@implementation CDVSplashScreen
|
@implementation CDVSplashScreen
|
||||||
|
|
||||||
- (void)pluginInitialize
|
- (void)pluginInitialize
|
||||||
@@ -116,42 +118,93 @@
|
|||||||
[self.viewController.view removeObserver:self forKeyPath:@"bounds"];
|
[self.viewController.view removeObserver:self forKeyPath:@"bounds"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the view's frame and image.
|
- (CDV_iOSDevice) getCurrentDevice
|
||||||
- (void)updateImage
|
|
||||||
{
|
{
|
||||||
UIInterfaceOrientation orientation = self.viewController.interfaceOrientation;
|
CDV_iOSDevice device;
|
||||||
|
|
||||||
|
UIScreen* mainScreen = [UIScreen mainScreen];
|
||||||
|
CGFloat mainScreenHeight = mainScreen.bounds.size.height;
|
||||||
|
CGFloat mainScreenWidth = mainScreen.bounds.size.width;
|
||||||
|
|
||||||
|
int limit = MAX(mainScreenHeight,mainScreenWidth);
|
||||||
|
|
||||||
|
device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
|
||||||
|
device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone);
|
||||||
|
device.retina = ([mainScreen scale] == 2.0);
|
||||||
|
device.iPhone5 = (device.iPhone && limit == 568.0);
|
||||||
|
// note these below is not a true device detect, for example if you are on an
|
||||||
|
// iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but
|
||||||
|
// this is appropriate for detecting the runtime screen environment
|
||||||
|
device.iPhone6 = (device.iPhone && limit == 667.0);
|
||||||
|
device.iPhone6Plus = (device.iPhone && limit == 736.0);
|
||||||
|
|
||||||
|
return device;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device
|
||||||
|
{
|
||||||
// Use UILaunchImageFile if specified in plist. Otherwise, use Default.
|
// Use UILaunchImageFile if specified in plist. Otherwise, use Default.
|
||||||
NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
|
NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
|
||||||
|
|
||||||
|
NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations];
|
||||||
|
|
||||||
// Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape
|
// Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape
|
||||||
CDVViewController* vc = (CDVViewController*)self.viewController;
|
BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape);
|
||||||
BOOL supportsLandscape = [vc supportsOrientation:UIInterfaceOrientationLandscapeLeft] || [vc supportsOrientation:UIInterfaceOrientationLandscapeRight];
|
BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown);
|
||||||
BOOL supportsPortrait = [vc supportsOrientation:UIInterfaceOrientationPortrait] || [vc supportsOrientation:UIInterfaceOrientationPortraitUpsideDown];
|
// this means there are no mixed orientations in there
|
||||||
BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape);
|
BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape);
|
||||||
|
|
||||||
if (imageName) {
|
if (imageName) {
|
||||||
imageName = [imageName stringByDeletingPathExtension];
|
imageName = [imageName stringByDeletingPathExtension];
|
||||||
} else {
|
} else {
|
||||||
imageName = @"Default";
|
imageName = @"Default";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CDV_IsIPhone5()) {
|
if (device.iPhone5) { // does not support landscape
|
||||||
imageName = [imageName stringByAppendingString:@"-568h"];
|
imageName = [imageName stringByAppendingString:@"-568h"];
|
||||||
} else if (CDV_IsIPad() && isOrientationLocked) {
|
} else if (device.iPhone6) { // does not support landscape
|
||||||
switch (orientation) {
|
imageName = [imageName stringByAppendingString:@"-667h"];
|
||||||
case UIInterfaceOrientationLandscapeLeft:
|
} else if (device.iPhone6Plus) { // supports landscape
|
||||||
case UIInterfaceOrientationLandscapeRight:
|
if (isOrientationLocked) {
|
||||||
imageName = [imageName stringByAppendingString:@"-Landscape"];
|
imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"")];
|
||||||
break;
|
} else {
|
||||||
|
switch (currentOrientation) {
|
||||||
|
case UIInterfaceOrientationLandscapeLeft:
|
||||||
|
case UIInterfaceOrientationLandscapeRight:
|
||||||
|
imageName = [imageName stringByAppendingString:@"-Landscape"];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
imageName = [imageName stringByAppendingString:@"-736h"];
|
||||||
|
|
||||||
case UIInterfaceOrientationPortrait:
|
} else if (device.iPad) { // supports landscape
|
||||||
case UIInterfaceOrientationPortraitUpsideDown:
|
if (isOrientationLocked) {
|
||||||
default:
|
imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")];
|
||||||
imageName = [imageName stringByAppendingString:@"-Portrait"];
|
} else {
|
||||||
break;
|
switch (currentOrientation) {
|
||||||
|
case UIInterfaceOrientationLandscapeLeft:
|
||||||
|
case UIInterfaceOrientationLandscapeRight:
|
||||||
|
imageName = [imageName stringByAppendingString:@"-Landscape"];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case UIInterfaceOrientationPortrait:
|
||||||
|
case UIInterfaceOrientationPortraitUpsideDown:
|
||||||
|
default:
|
||||||
|
imageName = [imageName stringByAppendingString:@"-Portrait"];
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return imageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the view's frame and image.
|
||||||
|
- (void)updateImage
|
||||||
|
{
|
||||||
|
NSString* imageName = [self getImageName:self.viewController.interfaceOrientation delegate:(id<CDVScreenOrientationDelegate>)self.viewController device:[self getCurrentDevice]];
|
||||||
|
|
||||||
if (![imageName isEqualToString:_curImageName]) {
|
if (![imageName isEqualToString:_curImageName]) {
|
||||||
UIImage* img = [UIImage imageNamed:imageName];
|
UIImage* img = [UIImage imageNamed:imageName];
|
||||||
@@ -181,7 +234,8 @@
|
|||||||
* landscape. In this case the image must be rotated in order to appear
|
* landscape. In this case the image must be rotated in order to appear
|
||||||
* correctly.
|
* correctly.
|
||||||
*/
|
*/
|
||||||
if (UIInterfaceOrientationIsLandscape(orientation) && !CDV_IsIPad()) {
|
BOOL isIPad = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad;
|
||||||
|
if (UIInterfaceOrientationIsLandscape(orientation) && !isIPad) {
|
||||||
imgTransform = CGAffineTransformMakeRotation(M_PI / 2);
|
imgTransform = CGAffineTransformMakeRotation(M_PI / 2);
|
||||||
imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width);
|
imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width);
|
||||||
}
|
}
|
||||||
@@ -239,13 +293,15 @@
|
|||||||
duration:fadeDuration
|
duration:fadeDuration
|
||||||
options:UIViewAnimationOptionTransitionNone
|
options:UIViewAnimationOptionTransitionNone
|
||||||
animations:^(void) {
|
animations:^(void) {
|
||||||
[_imageView setAlpha:0];
|
[_imageView setAlpha:0];
|
||||||
[_activityView setAlpha:0];
|
[_activityView setAlpha:0];
|
||||||
}
|
}
|
||||||
|
|
||||||
completion:^(BOOL finished) {
|
completion:^(BOOL finished) {
|
||||||
[self destroyViews];
|
if (finished) {
|
||||||
}];
|
[self destroyViews];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,13 +95,13 @@ namespace WPCordovaClassLib.Cordova.Commands
|
|||||||
|
|
||||||
public void show(string options = null)
|
public void show(string options = null)
|
||||||
{
|
{
|
||||||
if (popup.IsOpen)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||||
{
|
{
|
||||||
|
if (popup.IsOpen)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
popup.Child.Opacity = 0;
|
popup.Child.Opacity = 0;
|
||||||
|
|
||||||
Storyboard story = new Storyboard();
|
Storyboard story = new Storyboard();
|
||||||
@@ -137,13 +137,13 @@ namespace WPCordovaClassLib.Cordova.Commands
|
|||||||
|
|
||||||
public void hide(string options = null)
|
public void hide(string options = null)
|
||||||
{
|
{
|
||||||
if (!popup.IsOpen)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||||
{
|
{
|
||||||
|
if (!popup.IsOpen)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
popup.Child.Opacity = 1.0;
|
popup.Child.Opacity = 1.0;
|
||||||
|
|
||||||
Storyboard story = new Storyboard();
|
Storyboard story = new Storyboard();
|
||||||
|
|||||||
7
tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "container:CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||||
|
<false/>
|
||||||
|
<key>IDESourceControlProjectIdentifier</key>
|
||||||
|
<string>6BE9AD73-1B9F-4362-98D7-DC631BEC6185</string>
|
||||||
|
<key>IDESourceControlProjectName</key>
|
||||||
|
<string>CDVSplashScreenTest</string>
|
||||||
|
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||||
|
<dict>
|
||||||
|
<key>BEF5A5D0FF64801E558286389440357A9233D7DB</key>
|
||||||
|
<string>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</string>
|
||||||
|
</dict>
|
||||||
|
<key>IDESourceControlProjectPath</key>
|
||||||
|
<string>tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj</string>
|
||||||
|
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||||
|
<dict>
|
||||||
|
<key>BEF5A5D0FF64801E558286389440357A9233D7DB</key>
|
||||||
|
<string>../../../../..</string>
|
||||||
|
</dict>
|
||||||
|
<key>IDESourceControlProjectURL</key>
|
||||||
|
<string>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</string>
|
||||||
|
<key>IDESourceControlProjectVersion</key>
|
||||||
|
<integer>111</integer>
|
||||||
|
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||||
|
<string>BEF5A5D0FF64801E558286389440357A9233D7DB</string>
|
||||||
|
<key>IDESourceControlProjectWCConfigurations</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||||
|
<string>public.vcs.git</string>
|
||||||
|
<key>IDESourceControlWCCIdentifierKey</key>
|
||||||
|
<string>BEF5A5D0FF64801E558286389440357A9233D7DB</string>
|
||||||
|
<key>IDESourceControlWCCName</key>
|
||||||
|
<string>cordova-plugin-splashscreen</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0600"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
|
||||||
|
BuildableName = "libCordova.a"
|
||||||
|
BlueprintName = "CordovaLib"
|
||||||
|
ReferencedContainer = "container:node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
|
||||||
|
BuildableName = "libCordova.a"
|
||||||
|
BlueprintName = "CordovaLib"
|
||||||
|
ReferencedContainer = "container:node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
|
||||||
|
BuildableName = "libCordova.a"
|
||||||
|
BlueprintName = "CordovaLib"
|
||||||
|
ReferencedContainer = "container:node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -0,0 +1,702 @@
|
|||||||
|
/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <XCTest/XCTest.h>
|
||||||
|
#import <Cordova/CDVScreenOrientationDelegate.h>
|
||||||
|
#import "CDVSplashScreen.h"
|
||||||
|
#import "ImageNameTestDelegates.h"
|
||||||
|
|
||||||
|
const CDV_iOSDevice CDV_iOSDeviceZero = { 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
|
@interface ImageNameTest : XCTestCase
|
||||||
|
|
||||||
|
@property (nonatomic, strong) CDVSplashScreen* plugin;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface CDVSplashScreen ()
|
||||||
|
|
||||||
|
// expose private interface
|
||||||
|
- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation ImageNameTest
|
||||||
|
|
||||||
|
- (void)setUp {
|
||||||
|
[super setUp];
|
||||||
|
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||||
|
|
||||||
|
self.plugin = [[CDVSplashScreen alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)tearDown {
|
||||||
|
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||||
|
[super tearDown];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) orientationHelper:(id<CDVScreenOrientationDelegate>)delegate expectedImageNameDictionary:(NSDictionary*)expectedImageNameDictionary device:(CDV_iOSDevice)device{
|
||||||
|
|
||||||
|
NSString* name = nil;
|
||||||
|
NSString* expectedImageName = nil;
|
||||||
|
UIInterfaceOrientation currentOrientation;
|
||||||
|
NSString* deviceName = device.iPad? @"iPad" : device.iPhone6Plus? @"iPhone6Plus": device.iPhone6? @"iPhone6": device.iPhone5? @"iPhone5" : @"iPhone";
|
||||||
|
|
||||||
|
// LandscapeLeft, should always return expectedImageName
|
||||||
|
currentOrientation = UIInterfaceOrientationLandscapeLeft;
|
||||||
|
name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
|
||||||
|
expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeLeft"];
|
||||||
|
XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name);
|
||||||
|
|
||||||
|
// LandscapeRight - should always return expectedImageName
|
||||||
|
currentOrientation = UIInterfaceOrientationLandscapeRight;
|
||||||
|
name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
|
||||||
|
expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeRight"];
|
||||||
|
XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name);
|
||||||
|
|
||||||
|
// Portrait - should always return expectedImageName
|
||||||
|
currentOrientation = UIInterfaceOrientationPortrait;
|
||||||
|
name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
|
||||||
|
expectedImageName = [expectedImageNameDictionary objectForKey:@"portrait"];
|
||||||
|
XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name);
|
||||||
|
|
||||||
|
// PortraitUpsideDown - should always return expectedImageName
|
||||||
|
currentOrientation = UIInterfaceOrientationPortraitUpsideDown;
|
||||||
|
name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
|
||||||
|
expectedImageName = [expectedImageNameDictionary objectForKey:@"portraitUpsideDown"];
|
||||||
|
XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)testiPadOrientation {
|
||||||
|
|
||||||
|
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||||
|
device.iPad = YES;
|
||||||
|
|
||||||
|
// One orientation
|
||||||
|
|
||||||
|
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Portrait",
|
||||||
|
@"landscapeRight" : @"Default-Portrait",
|
||||||
|
@"portrait" : @"Default-Portrait",
|
||||||
|
@"portraitUpsideDown" : @"Default-Portrait"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Portrait",
|
||||||
|
@"landscapeRight" : @"Default-Portrait",
|
||||||
|
@"portrait" : @"Default-Portrait",
|
||||||
|
@"portraitUpsideDown" : @"Default-Portrait"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape",
|
||||||
|
@"landscapeRight" : @"Default-Landscape",
|
||||||
|
@"portrait" : @"Default-Landscape",
|
||||||
|
@"portraitUpsideDown" : @"Default-Landscape"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape",
|
||||||
|
@"landscapeRight" : @"Default-Landscape",
|
||||||
|
@"portrait" : @"Default-Landscape",
|
||||||
|
@"portraitUpsideDown" : @"Default-Landscape"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Portrait
|
||||||
|
|
||||||
|
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Portrait",
|
||||||
|
@"landscapeRight" : @"Default-Portrait",
|
||||||
|
@"portrait" : @"Default-Portrait",
|
||||||
|
@"portraitUpsideDown" : @"Default-Portrait"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Landscape
|
||||||
|
|
||||||
|
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape",
|
||||||
|
@"landscapeRight" : @"Default-Landscape",
|
||||||
|
@"portrait" : @"Default-Landscape",
|
||||||
|
@"portraitUpsideDown" : @"Default-Landscape"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
|
||||||
|
// All orientations
|
||||||
|
|
||||||
|
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||||
|
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape",
|
||||||
|
@"landscapeRight" : @"Default-Landscape",
|
||||||
|
@"portrait" : @"Default-Portrait",
|
||||||
|
@"portraitUpsideDown" : @"Default-Portrait"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Left
|
||||||
|
|
||||||
|
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape",
|
||||||
|
@"landscapeRight" : @"Default-Landscape",
|
||||||
|
@"portrait" : @"Default-Portrait",
|
||||||
|
@"portraitUpsideDown" : @"Default-Portrait"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Right
|
||||||
|
|
||||||
|
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape",
|
||||||
|
@"landscapeRight" : @"Default-Landscape",
|
||||||
|
@"portrait" : @"Default-Portrait",
|
||||||
|
@"portraitUpsideDown" : @"Default-Portrait"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Left
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape",
|
||||||
|
@"landscapeRight" : @"Default-Landscape",
|
||||||
|
@"portrait" : @"Default-Portrait",
|
||||||
|
@"portraitUpsideDown" : @"Default-Portrait"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Right
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape",
|
||||||
|
@"landscapeRight" : @"Default-Landscape",
|
||||||
|
@"portrait" : @"Default-Portrait",
|
||||||
|
@"portraitUpsideDown" : @"Default-Portrait"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)testiPhoneOrientation {
|
||||||
|
|
||||||
|
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||||
|
device.iPhone = YES;
|
||||||
|
|
||||||
|
// One orientation
|
||||||
|
|
||||||
|
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Portrait
|
||||||
|
|
||||||
|
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Landscape
|
||||||
|
|
||||||
|
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
|
||||||
|
// All orientations
|
||||||
|
|
||||||
|
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||||
|
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Left
|
||||||
|
|
||||||
|
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Right
|
||||||
|
|
||||||
|
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Left
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Right
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default",
|
||||||
|
@"landscapeRight" : @"Default",
|
||||||
|
@"portrait" : @"Default",
|
||||||
|
@"portraitUpsideDown" : @"Default"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)testiPhone5Orientation {
|
||||||
|
|
||||||
|
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||||
|
device.iPhone = YES;
|
||||||
|
device.iPhone5 = YES;
|
||||||
|
|
||||||
|
// One orientation
|
||||||
|
|
||||||
|
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Portrait
|
||||||
|
|
||||||
|
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Landscape
|
||||||
|
|
||||||
|
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
|
||||||
|
// All orientations
|
||||||
|
|
||||||
|
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||||
|
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Left
|
||||||
|
|
||||||
|
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Right
|
||||||
|
|
||||||
|
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Left
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Right
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-568h",
|
||||||
|
@"landscapeRight" : @"Default-568h",
|
||||||
|
@"portrait" : @"Default-568h",
|
||||||
|
@"portraitUpsideDown" : @"Default-568h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)testiPhone6Orientation {
|
||||||
|
|
||||||
|
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||||
|
device.iPhone = YES;
|
||||||
|
device.iPhone6 = YES;
|
||||||
|
|
||||||
|
// One orientation
|
||||||
|
|
||||||
|
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Portrait
|
||||||
|
|
||||||
|
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Landscape
|
||||||
|
|
||||||
|
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
|
||||||
|
// All orientations
|
||||||
|
|
||||||
|
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||||
|
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Left
|
||||||
|
|
||||||
|
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Right
|
||||||
|
|
||||||
|
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Left
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Right
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-667h",
|
||||||
|
@"landscapeRight" : @"Default-667h",
|
||||||
|
@"portrait" : @"Default-667h",
|
||||||
|
@"portraitUpsideDown" : @"Default-667h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)testiPhone6PlusOrientation {
|
||||||
|
|
||||||
|
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||||
|
device.iPhone = YES;
|
||||||
|
device.iPhone6Plus = YES;
|
||||||
|
|
||||||
|
// One orientation
|
||||||
|
|
||||||
|
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-736h",
|
||||||
|
@"landscapeRight" : @"Default-736h",
|
||||||
|
@"portrait" : @"Default-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-736h",
|
||||||
|
@"landscapeRight" : @"Default-736h",
|
||||||
|
@"portrait" : @"Default-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||||
|
@"landscapeRight" : @"Default-Landscape-736h",
|
||||||
|
@"portrait" : @"Default-Landscape-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-Landscape-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||||
|
@"landscapeRight" : @"Default-Landscape-736h",
|
||||||
|
@"portrait" : @"Default-Landscape-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-Landscape-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Portrait
|
||||||
|
|
||||||
|
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-736h",
|
||||||
|
@"landscapeRight" : @"Default-736h",
|
||||||
|
@"portrait" : @"Default-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// All Landscape
|
||||||
|
|
||||||
|
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||||
|
@"landscapeRight" : @"Default-Landscape-736h",
|
||||||
|
@"portrait" : @"Default-Landscape-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-Landscape-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
|
||||||
|
// All orientations
|
||||||
|
|
||||||
|
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||||
|
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||||
|
@"landscapeRight" : @"Default-Landscape-736h",
|
||||||
|
@"portrait" : @"Default-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Left
|
||||||
|
|
||||||
|
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||||
|
@"landscapeRight" : @"Default-Landscape-736h",
|
||||||
|
@"portrait" : @"Default-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// Portrait and Landscape Right
|
||||||
|
|
||||||
|
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||||
|
@"landscapeRight" : @"Default-Landscape-736h",
|
||||||
|
@"portrait" : @"Default-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Left
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||||
|
@"landscapeRight" : @"Default-Landscape-736h",
|
||||||
|
@"portrait" : @"Default-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
|
||||||
|
// PortraitUpsideDown and Landscape Right
|
||||||
|
|
||||||
|
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||||
|
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||||
|
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||||
|
@"landscapeRight" : @"Default-Landscape-736h",
|
||||||
|
@"portrait" : @"Default-736h",
|
||||||
|
@"portraitUpsideDown" : @"Default-736h"
|
||||||
|
}
|
||||||
|
device:device];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <Cordova/CDVScreenOrientationDelegate.h>
|
||||||
|
|
||||||
|
@interface PortraitOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface PortraitUpsideDownOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface AllPortraitOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface LandscapeLeftOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface LandscapeRightOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface AllLandscapeOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface AllOrientations : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface PortraitAndLandscapeLeftOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface PortraitAndLandscapeRightOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface PortraitUpsideDownAndLandscapeLeftOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface PortraitUpsideDownAndLandscapeRightOnly : NSObject <CDVScreenOrientationDelegate>
|
||||||
|
@end
|
||||||
|
|
||||||
@@ -0,0 +1,200 @@
|
|||||||
|
/*
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import "ImageNameTestDelegates.h"
|
||||||
|
|
||||||
|
@implementation PortraitOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskPortrait;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation PortraitUpsideDownOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskPortraitUpsideDown;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation AllPortraitOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation LandscapeLeftOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskLandscapeLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation LandscapeRightOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskLandscapeRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation AllLandscapeOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation AllOrientations
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskAll;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation PortraitAndLandscapeLeftOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation PortraitAndLandscapeRightOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation PortraitUpsideDownAndLandscapeLeftOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation PortraitUpsideDownAndLandscapeRightOnly
|
||||||
|
|
||||||
|
- (NSUInteger)supportedInterfaceOrientations {
|
||||||
|
return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||||
|
return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldAutorotate {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.apache.cordova.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>BNDL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,505 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 46;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */; };
|
||||||
|
7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B019DA114400DA31AC /* ImageNameTest.m */; };
|
||||||
|
7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B219DA116500DA31AC /* Foundation.framework */; };
|
||||||
|
7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B419DA127E00DA31AC /* UIKit.framework */; };
|
||||||
|
7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */; };
|
||||||
|
7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */; };
|
||||||
|
7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519019DA0F8300DA31AC /* libCordova.a */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 68A32D7114102E1C006B237C;
|
||||||
|
remoteInfo = CordovaLib;
|
||||||
|
};
|
||||||
|
7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 7E9F517219DA09CE00DA31AC /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 7E9F519419DA102000DA31AC;
|
||||||
|
remoteInfo = CDVSplashScreenLib;
|
||||||
|
};
|
||||||
|
7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = D2AAC07D0554694100DB518D;
|
||||||
|
remoteInfo = CordovaLib;
|
||||||
|
};
|
||||||
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
7E9F519319DA102000DA31AC /* CopyFiles */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "include/$(PRODUCT_NAME)";
|
||||||
|
dstSubfolderSpec = 16;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = "../node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj"; sourceTree = "<group>"; };
|
||||||
|
7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCDVSplashScreenLib.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CDVSplashScreenLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
7E9F51A219DA102000DA31AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = ../../../src/ios/CDVSplashScreen.m; sourceTree = SOURCE_ROOT; };
|
||||||
|
7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = ../../../src/ios/CDVSplashScreen.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
7E9F51B019DA114400DA31AC /* ImageNameTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTest.m; sourceTree = "<group>"; };
|
||||||
|
7E9F51B219DA116500DA31AC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
|
7E9F51B419DA127E00DA31AC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
|
7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageNameTestDelegates.h; sourceTree = "<group>"; };
|
||||||
|
7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTestDelegates.m; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
7E9F519219DA102000DA31AC /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
7E9F519C19DA102000DA31AC /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */,
|
||||||
|
7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */,
|
||||||
|
7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */,
|
||||||
|
7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
7E9F517119DA09CE00DA31AC = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
7E9F51B419DA127E00DA31AC /* UIKit.framework */,
|
||||||
|
7E9F51B219DA116500DA31AC /* Foundation.framework */,
|
||||||
|
7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */,
|
||||||
|
7E9F519619DA102000DA31AC /* CDVSplashScreenLib */,
|
||||||
|
7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */,
|
||||||
|
7E9F517D19DA0A0A00DA31AC /* Products */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
7E9F517D19DA0A0A00DA31AC /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */,
|
||||||
|
7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
7E9F518C19DA0F8300DA31AC /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
7E9F519019DA0F8300DA31AC /* libCordova.a */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
7E9F519619DA102000DA31AC /* CDVSplashScreenLib */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */,
|
||||||
|
7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */,
|
||||||
|
);
|
||||||
|
path = CDVSplashScreenLib;
|
||||||
|
sourceTree = SOURCE_ROOT;
|
||||||
|
};
|
||||||
|
7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
7E9F51A119DA102000DA31AC /* Supporting Files */,
|
||||||
|
7E9F51B019DA114400DA31AC /* ImageNameTest.m */,
|
||||||
|
7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */,
|
||||||
|
7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */,
|
||||||
|
);
|
||||||
|
path = CDVSplashScreenLibTests;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
7E9F51A119DA102000DA31AC /* Supporting Files */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
7E9F51A219DA102000DA31AC /* Info.plist */,
|
||||||
|
);
|
||||||
|
name = "Supporting Files";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
7E9F519419DA102000DA31AC /* CDVSplashScreenLib */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */;
|
||||||
|
buildPhases = (
|
||||||
|
7E9F519119DA102000DA31AC /* Sources */,
|
||||||
|
7E9F519219DA102000DA31AC /* Frameworks */,
|
||||||
|
7E9F519319DA102000DA31AC /* CopyFiles */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = CDVSplashScreenLib;
|
||||||
|
productName = CDVSplashScreenLib;
|
||||||
|
productReference = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */;
|
||||||
|
productType = "com.apple.product-type.library.static";
|
||||||
|
};
|
||||||
|
7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */;
|
||||||
|
buildPhases = (
|
||||||
|
7E9F519B19DA102000DA31AC /* Sources */,
|
||||||
|
7E9F519C19DA102000DA31AC /* Frameworks */,
|
||||||
|
7E9F519D19DA102000DA31AC /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */,
|
||||||
|
7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = CDVSplashScreenLibTests;
|
||||||
|
productName = CDVSplashScreenLibTests;
|
||||||
|
productReference = 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */;
|
||||||
|
productType = "com.apple.product-type.bundle.unit-test";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
7E9F517219DA09CE00DA31AC /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
LastUpgradeCheck = 0600;
|
||||||
|
TargetAttributes = {
|
||||||
|
7E9F519419DA102000DA31AC = {
|
||||||
|
CreatedOnToolsVersion = 6.0;
|
||||||
|
};
|
||||||
|
7E9F519E19DA102000DA31AC = {
|
||||||
|
CreatedOnToolsVersion = 6.0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */;
|
||||||
|
compatibilityVersion = "Xcode 3.2";
|
||||||
|
developmentRegion = English;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
);
|
||||||
|
mainGroup = 7E9F517119DA09CE00DA31AC;
|
||||||
|
productRefGroup = 7E9F517D19DA0A0A00DA31AC /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectReferences = (
|
||||||
|
{
|
||||||
|
ProductGroup = 7E9F518C19DA0F8300DA31AC /* Products */;
|
||||||
|
ProjectRef = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
7E9F519419DA102000DA31AC /* CDVSplashScreenLib */,
|
||||||
|
7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXReferenceProxy section */
|
||||||
|
7E9F519019DA0F8300DA31AC /* libCordova.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = libCordova.a;
|
||||||
|
remoteRef = 7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
|
/* End PBXReferenceProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
7E9F519D19DA102000DA31AC /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
7E9F519119DA102000DA31AC /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
7E9F519B19DA102000DA31AC /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */,
|
||||||
|
7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXTargetDependency section */
|
||||||
|
7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */;
|
||||||
|
targetProxy = 7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
name = CordovaLib;
|
||||||
|
targetProxy = 7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
7E9F517619DA09CE00DA31AC /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
7E9F517719DA09CE00DA31AC /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
7E9F51A419DA102000DA31AC /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
|
||||||
|
"\"$(OBJROOT)/UninstalledProducts/include\"",
|
||||||
|
"\"$(BUILT_PRODUCTS_DIR)\"",
|
||||||
|
);
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
7E9F51A519DA102000DA31AC /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
|
||||||
|
"\n\"$(OBJROOT)/UninstalledProducts/include\"\n\"$(BUILT_PRODUCTS_DIR)\"",
|
||||||
|
);
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
7E9F51A719DA102000DA31AC /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
7E9F51A819DA102000DA31AC /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
7E9F517619DA09CE00DA31AC /* Debug */,
|
||||||
|
7E9F517719DA09CE00DA31AC /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
7E9F51A419DA102000DA31AC /* Debug */,
|
||||||
|
7E9F51A519DA102000DA31AC /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
7E9F51A719DA102000DA31AC /* Debug */,
|
||||||
|
7E9F51A819DA102000DA31AC /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 7E9F517219DA09CE00DA31AC /* Project object */;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:CDVSplashScreenTest.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||||
|
<false/>
|
||||||
|
<key>IDESourceControlProjectIdentifier</key>
|
||||||
|
<string>6BE9AD73-1B9F-4362-98D7-DC631BEC6185</string>
|
||||||
|
<key>IDESourceControlProjectName</key>
|
||||||
|
<string>CDVSplashScreenTest</string>
|
||||||
|
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||||
|
<dict>
|
||||||
|
<key>BEF5A5D0FF64801E558286389440357A9233D7DB</key>
|
||||||
|
<string>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</string>
|
||||||
|
</dict>
|
||||||
|
<key>IDESourceControlProjectPath</key>
|
||||||
|
<string>tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj</string>
|
||||||
|
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||||
|
<dict>
|
||||||
|
<key>BEF5A5D0FF64801E558286389440357A9233D7DB</key>
|
||||||
|
<string>../../../../..</string>
|
||||||
|
</dict>
|
||||||
|
<key>IDESourceControlProjectURL</key>
|
||||||
|
<string>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</string>
|
||||||
|
<key>IDESourceControlProjectVersion</key>
|
||||||
|
<integer>111</integer>
|
||||||
|
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||||
|
<string>BEF5A5D0FF64801E558286389440357A9233D7DB</string>
|
||||||
|
<key>IDESourceControlProjectWCConfigurations</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||||
|
<string>public.vcs.git</string>
|
||||||
|
<key>IDESourceControlWCCIdentifierKey</key>
|
||||||
|
<string>BEF5A5D0FF64801E558286389440357A9233D7DB</string>
|
||||||
|
<key>IDESourceControlWCCName</key>
|
||||||
|
<string>cordova-plugin-splashscreen</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0600"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7E9F519419DA102000DA31AC"
|
||||||
|
BuildableName = "libCDVSplashScreenLib.a"
|
||||||
|
BlueprintName = "CDVSplashScreenLib"
|
||||||
|
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7E9F519419DA102000DA31AC"
|
||||||
|
BuildableName = "libCDVSplashScreenLib.a"
|
||||||
|
BlueprintName = "CDVSplashScreenLib"
|
||||||
|
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7E9F519419DA102000DA31AC"
|
||||||
|
BuildableName = "libCDVSplashScreenLib.a"
|
||||||
|
BlueprintName = "CDVSplashScreenLib"
|
||||||
|
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0600"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "NO"
|
||||||
|
buildForArchiving = "NO"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||||
|
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||||
|
BlueprintName = "CDVSplashScreenLibTests"
|
||||||
|
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||||
|
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||||
|
BlueprintName = "CDVSplashScreenLibTests"
|
||||||
|
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||||
|
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||||
|
BlueprintName = "CDVSplashScreenLibTests"
|
||||||
|
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||||
|
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||||
|
BlueprintName = "CDVSplashScreenLibTests"
|
||||||
|
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||||
|
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||||
|
BlueprintName = "CDVSplashScreenLibTests"
|
||||||
|
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
21
tests/ios/README.md
Normal file
21
tests/ios/README.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# iOS Tests for CDVSplashScreen
|
||||||
|
|
||||||
|
You need to install `node.js` to pull in `cordova-ios`.
|
||||||
|
|
||||||
|
First install cordova-ios:
|
||||||
|
|
||||||
|
npm install
|
||||||
|
|
||||||
|
... in the current folder.
|
||||||
|
|
||||||
|
|
||||||
|
# Testing from Xcode
|
||||||
|
|
||||||
|
1. Launch the `CDVSplashScreenTest.xcworkspace` file.
|
||||||
|
2. Choose "CDVSplashScreenLibTests" from the scheme drop-down menu
|
||||||
|
3. Click and hold on the `Play` button, and choose the `Wrench` icon to run the tests
|
||||||
|
|
||||||
|
|
||||||
|
# Testing from the command line
|
||||||
|
|
||||||
|
npm test
|
||||||
13
tests/ios/package.json
Normal file
13
tests/ios/package.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "cordova-plugin-splashscreen-test-ios",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "iOS Unit Tests for Splashscreen Plugin",
|
||||||
|
"author": "Apache Software Foundation",
|
||||||
|
"license": "Apache Version 2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"cordova-ios": "^3.6.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "xcodebuild -scheme CordovaLib && xcodebuild test -scheme CDVSplashScreenLibTests -destination 'platform=iOS Simulator,name=iPhone 5'"
|
||||||
|
}
|
||||||
|
}
|
||||||
29
tests/plugin.xml
Normal file
29
tests/plugin.xml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||||
|
id="org.apache.cordova.splashscreen.tests"
|
||||||
|
version="0.4.0">
|
||||||
|
<name>Cordova Splashscreen Plugin Tests</name>
|
||||||
|
<license>Apache 2.0</license>
|
||||||
|
|
||||||
|
<js-module src="tests.js" name="tests">
|
||||||
|
</js-module>
|
||||||
|
</plugin>
|
||||||
62
tests/tests.js
Normal file
62
tests/tests.js
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
exports.defineAutoTest = function () {
|
||||||
|
describe('Splashscreen (cordova)', function () {
|
||||||
|
it("splashscreen.spec.1 should exist", function () {
|
||||||
|
expect(navigator.splashscreen).toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("splashscreen.spec.2 exec method should exist", function () {
|
||||||
|
expect(navigator.splashscreen.show).toBeDefined();
|
||||||
|
expect(typeof navigator.splashscreen.show).toBe('function');
|
||||||
|
});
|
||||||
|
|
||||||
|
it("splashscreen.spec.3 exec method should exist", function () {
|
||||||
|
expect(navigator.splashscreen.hide).toBeDefined();
|
||||||
|
expect(typeof navigator.splashscreen.hide).toBe('function');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.defineManualTests = function (contentEl, createActionButton) {
|
||||||
|
function showFor(duration) {
|
||||||
|
navigator.splashscreen.show();
|
||||||
|
window.setTimeout(function () {
|
||||||
|
navigator.splashscreen.hide();
|
||||||
|
}, 1000 * duration);
|
||||||
|
}
|
||||||
|
|
||||||
|
contentEl.innerHTML = '<h1>Splashscreen Tests</h1>' +
|
||||||
|
'<h3>Note for WP: AutoHideSplashScreen must be set to false in config.xml</h3>' +
|
||||||
|
'<div id="show1"></div>' +
|
||||||
|
'Expected result: Will show the Cordova splashscreen for 1 second' +
|
||||||
|
'</p> <div id="show5"></div>' +
|
||||||
|
'Expected result: Will show the Cordova splashscreen for 5 seconds';
|
||||||
|
|
||||||
|
createActionButton('Show for 1 second', function () {
|
||||||
|
showFor(1);
|
||||||
|
}, 'show1');
|
||||||
|
|
||||||
|
createActionButton('Show for 5 seconds', function () {
|
||||||
|
showFor(5);
|
||||||
|
}, 'show5');
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user