Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Build settings question, help.
Started by dodi_games Jul 08 2018 08:28 AM

4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

dodi_games

[GLOBAL: userInfoPane.html]
dodi_games
  • Contributor

  • 188 posts
  • Corona SDK

I need help to clarify some doubts with the "build settings".

 

This is my "build.settings"

--
-- For more information on build.settings, see the Project Build Settings guide at:
-- https://docs.coronalabs.com/guide/distribution/buildSettings
--

settings =
{
	orientation =
	{
		-- Supported values for orientation:
		-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight

		default = "portrait",
		supported = { "portrait", "portraitUpsideDown" },
	},

	--
	-- Android section
	--
	android =
	{
		usesPermissions =
		{
			"android.permission.INTERNET",
			"android.permission.CAMERA",
			"android.permission.WRITE_EXTERNAL_STORAGE",
		},
		
	},

	--
	-- iOS section
	--
	iphone =
	{
	  xcassets = "Images.xcassets",
		plist =
		{
			UIStatusBarHidden = false,
			UILaunchStoryboardName = "LaunchScreen",
                        NSCameraUsageDescription = "This app would like to access the camera.",
			NSPhotoLibraryUsageDescription = "This app would like to access the photo library.",
		},
	},

	--
	-- Plugins section
	--
	plugins =
	{

	},

	--
	-- Project section
	--
	excludeFiles =
	{
		-- Exclude unnecessary files for each platform
		all = { "Icon.png", "Icon-*dpi.png", "Images.xcassets", },
		android = { "LaunchScreen.storyboardc", },
	},
}

Now, in the guide of "Signing and Building", which I do not know if it is updated, it specifies that I have to add "versionCode" and also I must add "usesFeatures". My question is whether it is necessary and mandatory?

 

* My app only uses the internet to access a url by pressing a button and also uses a button to go to the user's

default email application and be able to communicate with technical support. In the documents of "system.openURL ()" it does not specify that you have to add anything in the "build.settings" unless it is to make a call.

 

* My app uses the camera to take a photo and also accesses the photo library to be able to select an image via media.capturePhoto() and media.selectPhoto() respectively. In the documents it says that I must add  "android.permission.CAMERA" and "android.permission.WRITE_EXTERNAL_STORAGE" to the "usesPermissions" table of the "build.settings" as shown in the above code. 

 

Should I also add the "versionCode" and "usesFeatures" table to the "build.settings"?

 

Thanks in advance

DoDi



[TOPIC: post.html]
#2

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Contributor

  • 676 posts
  • Corona SDK

I never bother with versionCode.

 

Now since your app uses the camera you might want to decide if that is a feature that is required for your app to work. I don't know how many devices out there do not have a camera. The old Nooks are still around and of course all the FireTV devices.

 

So if you can still use your app without a camera (maybe they have pictures saved up) then add the camera feature and if you are planning to target TV devices then also add the touch feature:

usesFeatures =
        {
            { name="android.hardware.touchscreen", required=false },
{ name="android.hardware.camera", required=false }
        },


[TOPIC: post.html]
#3

dodi_games

[GLOBAL: userInfoPane.html]
dodi_games
  • Contributor

  • 188 posts
  • Corona SDK

My target is only new mobile devices (2015-2018) and the main functionality is the media.capturePhoto(). In this case I need to add the "name="android.hardware.camera", required=false"?

[TOPIC: post.html]
#4

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Contributor

  • 676 posts
  • Corona SDK

I would make it required=true. That would make it not available for devices that do not have cameras.


  • dodi_games likes this

[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,119 posts
  • Corona Staff

For your sanity, please specify the version code as part of the build dialog box that comes up when you build for Android and do not put it in build.settings. You have to increment that number each time you upload a new version to Google Play and if you put it in build.settings, it's too easy to forget that you put it there and it will cause you problems. Let Corona do the work it can for you.

 

Rob


  • dodi_games likes this


[topic_controls]
[/topic_controls]