Software Archive
Read-only legacy content
17061 讨论

restrict apps to ipad only

Alon_I_
初学者
1,395 次查看

Hello,

 ive seen a post on the forums from 6 months ago staing it is in progress..

We made a game for ipad only on construct (cordova export) , it is not working well on phones as it was planned for ipad.

Is there a way to restrict it to work only on ipad ? otherwise we cant really publish it - a manual tweaking or a plugin are also a valid solution for us as long as we can make the game work only on ipad.

Thanks

0 项奖励
11 回复数
Alon_I_
初学者
1,395 次查看

i saw there is a way to override plist , but i dont understand how to do it

0 项奖励
John_H_Intel2
员工
1,395 次查看

With the current version of Cordova that we have in the build system, there is no way to restrict to just iphone or ipad, it is always both.

0 项奖励
Alon_I_
初学者
1,395 次查看
John hi Is there a way to update or override the plist file in whichbthe device definition is? Is there a way to open the buikd directory via xcode? Thanks Alon
0 项奖励
John_H_Intel2
员工
1,395 次查看

No. The build you get from the XDK is signed and once you open/edit it, Application Loader will no longer accept it.

No. This is a fundamental issue with Cordova and since we just build with Cordova, we inherit the same issue. 

 

0 项奖励
Alon_I_
初学者
1,395 次查看

Thanks John,

is there a way to open it and the use xcode (and not application uploader) to resbmit / build it ?

Alon

0 项奖励
John_H_Intel2
员工
1,395 次查看

No there is not.

0 项奖励
PaulF_IntelCorp
1,395 次查看

You'd need to switch to using Cordova CLI to do this yourself. Your app can be imported into a CLI system, at which point you are in charge of the build process. In essence, our build system is Cordova CLI, but since the build project files are in the cloud you cannot do anything to them before the build takes place. If you use Cordova CLI locally you can change files in the project that will affect the build before you build locally with CLI. But you won't be able to push those files to our build system.

0 项奖励
Alon_I_
初学者
1,395 次查看

Paul, many thanks for the help. I am exploring this issue and it seems a bit beyond my capabilities to build myself via a command line. Any chance you add this a s a feature ? I mean overriding some Cordova settings from the front end? The restriction is necessary when you want to create an app only for iPad or only to iPhone. They both have a different aspect ratio and the current solutions are not that good they give an awkward app either for the iPhone or the iPad , you will have to "sacrifice" the look and feel of one of them when building a universal platform.

 

based on my readings so far the plist file parametrs "device family" could be overridden on an external file that could be I ncluded to the build. I can provide a URL for such a solution if necessary. My thought was to edit the config.xml to exactly the same thing

 

Alon

 

0 项奖励
PaulF_IntelCorp
1,395 次查看

Hello Alon,

Please do provide the link to the solution you are describing.

I'm wondering if something like this could be done using a very simple Cordova plugin, that would effectively be used to just make the necessary changes to the underlying Xcode project settings that configures the build to be universal, iPad or iPhone. I cannot find such a solution out there, so maybe it cannot be done. Not sure.

Paul

0 项奖励
Alon_I_
初学者
1,395 次查看

Hi Paul,Thanks for helping me on this.

This is the post i am reffering to

https://forums.html5dev-software.intel.com/viewtopic.php?f=29&t=7496

 

and just got an answer from cocconJS team who are working on a cordova build as well but in the meanwhile they recommended me doing this

http://cordova.apache.org/docs/en/5.0.0/config_ref_index.md.html#The%20config.xml%20File

 

Thanks,

Alon

0 项奖励
PaulF_IntelCorp
1,395 次查看

@Alon -- I had looked through the Cordova config docs for iOS and I don't find anything that specifically restricts your app to iPhone or iPad devices. Maybe I'm missing what the cocoonJS folks are referring to...

0 项奖励
回复