Software Archive
Read-only legacy content
17061 Discussions

Cordova iOS - 3 Issues

Flemming_P_
Beginner
556 Views

I got 3 Issues : .................... with my iOS xdk build (Cordova Construct2 > Export)

 

On my iPad

- There is no audio
- Test ads not showing ( Does fine in android >cranberrygame ) 
- And its not locked in portrait mode

/Flemming

0 Kudos
2 Replies
Anusha_M_Intel1
Employee
556 Views

Hi Flemming,

What kind of audio file are you using and where are you testing? There is a limitation to the emulator. It can play WAV files but not MP3 files. In either case, I believe once you run your application on device either through App Preview or by building your app you should be able to get it to work regardless of the file type. You might also want to double check that your audio file name doesn't contain any invalid characters.  

I am going to have to look into test ads but regarding the portrait mode problem, there has been a bug in Cordova where orientation does not lock in ipad. The recommended solution is:

[iPad] Create a plugin (directory with one file) that only has a config xml that includes the following: 

<config-file target="*-Info.plist" parent="UISupportedInterfaceOrientations~ipad" overwrite="true">

        <string></string>

</config-file>        

<config-file target="*-Info.plist" parent="UISupportedInterfaceOrientations~ipad" overwrite="true">

            <array>

                <string>UIInterfaceOrientationPortrait</string>

            </array>

</config-file> 

Add the plugin on the build settings page. 

Alternatively, you can use this plugin: https://github.com/yoik/cordova-yoik-screenorientation. You can import it as a third-party Cordova* plugin using the Cordova* registry notation:

·          net.yoik.cordova.plugins.screenorientation (includes latest version at the time of the build)

·          net.yoik.cordova.plugins.screenorientation@1.3.2 (specifies a version)

Or, you can reference it directly from the GitHub repo: 

·          github.com/yoik/cordova-yoik-screenorientation.git

·          github.com/yoik/cordova-yoik-screenorientation.git#06b93e6

The second reference provides the git commit referenced here (we do not support pulling from the PhoneGap registry).

Please take a look at this forum post for more information: https://forums.html5dev-software.intel.com/viewtopic.php?f=29&t=7830

0 Kudos
Flemming_P_
Beginner
556 Views

THANKS ... very helpful

Will try out your workaround

The Audio problem is on my iPad, havent registred a adhoc iphone yet to test
BUT see that there are more user in Construct forum having the same issue

 

Thanks again
 

 

 

0 Kudos
Reply