Page tree
Skip to end of metadata
Go to start of metadata

This guide explains some information about project.json .

project.json is a file that includes your application and workspace configuration.

project.json file is located under config folder of your workspace.



Info

Info part allows you to change your application’s meta information.

"info": {
		"name": "Smartface Demo",
		"company": "Smartface User",
		"webSite": "http://www.smartface.io",
		"version": "1.0.0",
		"runtimeVersion": "1059",
		"description": ""
	}

Config

You can set project configuration in terms of;

  • Cache Size
  • Orientation
  • Debug Loggin
"config": {
		"cache": {
			"size": 50
		},
		"debug": {
			"logs": false
		},
		"orientation": {
			"portrait": true,
			"upsideDown": false,
			"landScapeLeft": false,
			"landScapeRight": false
		}
	}

API

You can set API keys for Facebook, Twitter, and Google services.

"api": {
		"facebook": {
			"appUID": "",
			"appSecret": ""
		},
		"twitter": {
			"consumerKey": "",
			"consumerSecret": ""
		},
		"googleMaps": {
			"androidKey": "01u81e3cP5lidl1HRJ55hoBH0N5_Kmlvku4EIYg",
			"iosKey": ""
		},
		"adMob": {
			"publisherId": ""
		},
		"googleCloudMessaging": {
			"senderID": ""
		},
		"googlePlayServices": {
			"inAppPurchaseProductKey": ""
		}
	}

Build

In this part you can:

  • Set project paths for scripts, images, and assets
  • Enable/disable plugins 
    • Note: "Only plugins developed by Smartface will be delivered in Device-Emulators. Custom made plugins will not work during the test with the Device Emulator. They will only work only in published Apps."
  • Set output file directories
"build": {
		"input": {
			"ios": {
				"scripts": "scripts",
				"images": "images/iOS",
				"assets": "assets",
				"infoPlist": "config/iOS/Info.plist",
				"urlIdentifier": "",
				"urlSchemes": "",
				"plugins": {
					"facebookios": {
						"url": "https://smartfacecdn.blob.core.windows.net/smartface-bin/plugins/Facebook/iOS/1.0.0/FacebookiOS.zip",
						"path": "plugins/iOS/FacebookiOS.zip",
						"active": false
					},
					"googleanalyticsplugin-ios": {
						"url": "https://smartfacecdn.blob.core.windows.net/smartface-bin/plugins/GoogleAnalytics/iOS/1.0.0/GoogleAnalyticsiOS.zip",
						"path": "plugins/iOS/GoogleAnalyticsiOS.zip",
						"active": false
					},
					"admob-ios": {
						"url": "https://smartfacecdn.blob.core.windows.net/smartface-bin/plugins/AdMob/iOS/1.0.0/AdmobiOS.zip",
						"path": "plugins/iOS/AdmobiOS.zip",
						"active": true
					},
					"codereaderios": {
						"url": "https://smartfacecdn.blob.core.windows.net/smartface-bin/plugins/CodeReader/iOS/1.0.0/CodeReaderiOS.zip",
						"path": "plugins/iOS/CodeReaderiOS.zip",
						"active": false
					}
				}
			},
			"android": {
				"scripts": "scripts",
				"images": "images/Android",
				"assets": "assets",
				"manifest": "config/Android/AndroidManifest.xml",
				"packageProfiles": "config/Android/PackageProfiles.xml",
				"sign": {
					"keystoreFile": "config/Android/smfdefault.keystore",
					"keystorePass": "smartface",
					"aliasName": "smartface",
					"keyPass": "smartface"
				},
				"plugins": {
					"facebook": {
						"url": "https://smartfacecdn.blob.core.windows.net/smartface-bin/plugins/Facebook/Android/1.0.0/FacebookAndroid.zip",
						"path": "plugins/Android/FacebookAndroid.zip",
						"active": false
					},
					"googleanalytics": {
						"url": "https://smartfacecdn.blob.core.windows.net/smartface-bin/plugins/GoogleAnalytics/Android/1.0.0/GoogleAnalyticsAndroid.zip",
						"path": "plugins/Android/GoogleAnalyticsAndroid.zip",
						"active": false
					},
					"smfimagecode": {
						"url": "https://smartfacecdn.blob.core.windows.net/smartface-bin/plugins/CodeReader/Android/1.0.0/CodeReaderAndroid.zip",
						"path": "plugins/Android/CodeReaderAndroid.zip",
						"active": false
					},
					"smfparse": {
						"url": "https://smartfacecdn.blob.core.windows.net/smartface-bin/plugins/Parse/Android/1.0.0/ParseAndroid.zip",
						"path": "plugins/Android/ParseAndroid.zip",
						"active": false
					}
				}
			},
			"keys": {
				"project3DesKey": "",
				"projectEncryptedKey": ""
			}
		},
		"output": {
			"ios": {
				"outputFolder": "output/iOS",
				"bundleIdentifier": "io.smartface.demo"
			},
			"android": {
				"outputFolder": "output/Android",
				"packageName": "io.smartface.demo"
			}
		},
		"tempFolder": "output/.tmp"
	}

playerPath

When you go into "project.json" folder, you see ' "playerPath" : null ' expression both iOS and Android part. You need to get your player path to prevent any possible problem, when doing remote app update. If you assign it to 'null', it means your player is assigned with new release player. It might cause conflict with "remote app update", if new release changes your player.

 

So, all you need is follow the steps explaining below;

  • Open your workspace and create a new folder called "players" under config folder.
  • Secondly, write the below code into the console.
playerPath
cd /home/ubuntu/.nvm/versions/node/v4.4.7/lib/node_modules/smartface/bin/
cp iOS_Player.zip ~/workspace/config/players/						
cp SmartfacePlayer.zip  ~/workspace/config/players/
  • Then you will see ".zip" files coming under your players folder. Now, you have your player path. There is just one thing left to do. Add those paths as "config/players/iOS_Player.zip" and "config/players/SmartfacePlayer.zip" into your project.json where we mentioned at the beginning.