I am building a simple app with expo. While implementing linking for android and iOS, I was editing the app.JSON. When I went to rebuild the android build, the terminal gave an error message:
app.json must include a JSON object.
The terminal doesn't recognize the app.JSON.
I also notice that applinks:<librexapp.app.link> appears to not be recognized. What am I missing in my implementation of Universal Links? Code below:
{
"expo": {
"name": "Librex",
"slug": "Librex",
"privacy": "public",
"sdkVersion": "35.0.0",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"scheme": "librexapp",
"assetBundlePatterns": [
"**/*"
],
"android":{
"package": "com.librex.app",
"googleServicesFile": "./google-services.json",
"config":{
"branch":{
"apiKey": "Redacted"
}
}
},
"ios":{
"supportsTablet": true,
"associatedDomains":
[applinks:<librexapp.app.link>],
"config":{
"branch":{
"apiKey": "Redacted"
}
}
},
"extra": {
"firebaseConfig": {
"apiKey" : "Redacted",
"authDomain" : "Redacted",
"databaseURL" : "Redacted",
"storageBucket": "Redacted",
"serviceAccount" : "./firebase-private-key.json"
}
}
}
}
maybe you should quota the string like "applinks:\<librexapp.app.link\>". you can use [NSJSONSerialization isValidJSONObject:obj] to check the obj is a valid json object.
Related
This is my electron.manifest.json
{
"executable": "MyApplication.UI",
"splashscreen": {
"imageFile": "/wwwroot/assets/Animation.svg"
},
"author": "MyCompany",
"environment": "Production",
"singleInstance": false,
"build": {
"appId": "com.mycompany.myapplication",
"productName": "MyApplication",
"copyright": "Copyright # 2022",
"buildVersion": "2022.1.0",
"compression": "maximum",
"fileAssociations": [
{
"ext": "sdg",
"name": "MyApplication File",
"role": "Editor"
}
],
"publish": {
"provider": "generic",
"url": "https://mydomain.io/Installer/MyApplication/",
"channel": "latest"
},
"nsis": {
"allowToChangeInstallationDirectory": true,
"oneClick": false,
"perMachine": true,
"installerIcon": "bin/Assets/icon.ico",
"uninstallerIcon": "bin/Assets/icon.ico",
"installerHeaderIcon": "bin/Assets/icon.ico",
"menuCategory": true
},
"win": {
"target": [
"nsis"
],
"icon": "Assets/icon.ico"
},
"linux": {
"target": "deb",
"maintainer": "MyCompany",
"vendor": "MyCompany",
"synopsis": "MyApplication",
"executableName": "MyApplication",
"description": "Doing some magic.",
"category": "Development",
"icon": "./../../Assets/Icons/32x32.png"
},
"directories": {
"output": "../../../bin/Installer",
"buildResources": "Assets"
},
"extraResources": [
{
"from": "./bin",
"to": "bin",
"filter": [
"**/*"
]
}
],
"files": [
{
"from": "./ElectronHostHook/node_modules",
"to": "ElectronHostHook/node_modules",
"filter": [
"**/*"
]
},
"**/*"
]
}
}
The created .deb file when building for linux is called electron-net_{version}.deb. That wouldn't be a problem but when executed, the application name electron-net is shown.
How can I change that? I checked the documentation (here https://www.electron.build/configuration/linux) already but I dont see any more options in my config?
I am using ElectronNET.CLI Version 15.5.1 on Ubuntu 20.04.4, .NET Version 5.0.406
I think you're looking for the artifactName property under build for your file name and the name property under at root for the name that is displayed
{
"name" : "MyApplication",
"executable" : "MyApplication",
"build": {
"artifactName": "my-application.${ext}",
}
}
I try to migrate my manifest from v2 to v3 and fail with background scripts. I get an error unexpected token. I think my syntax is correct. What I'm doing wrong? How can I migrate this setup with multiple background scripts?
manifest v2
{
"description": "Tooltip Dictionary",
"manifest_version": 2,
"name": "Tooltip Dictionary",
"permissions": [ "https://www.example.com/*", "storage" ],
"version": "1.0.0",
"icons":{
"16":"icon16.png",
"32":"icon32.png",
"48":"icon48.png",
"128":"icon128.png"
},
"browser_action":{
"default_icon": "icon32.png"
},
"content_scripts":[{
"matches":["<all_urls>"],
"js":["jquery.min.js", "tooltip.css.js", "cs.js"]
}],
"background":{
"scripts":[ "jquery.min.js","bg.js" ]
},
"commands":{
"run-script": {
"suggested_key": {
"default": "Alt+1",
"windows": "Alt+1",
"mac": "Command+E"
},
"description": "Run"
}
}
}
manifest v3
{
"description": "Tooltip Dictionary",
"manifest_version": 3,
"name": "Tooltip Dictionary",
"host_permissions": ["https://www.example.com/*"],
"permissions": ["storage"],
"version": "1.0.0",
"icons":{
"16":"icon16.png",
"32":"icon32.png",
"48":"icon48.png",
"128":"icon128.png"
},
"action":{
"default_icon": "icon32.png"
},
"content_scripts":[{
"matches":["<all_urls>"],
"js":["jquery.min.js", "tooltip.css.js", "cs.js"]
}],
"background": {
"service_worker": ["jquery.min.js", "bg.js"]
},
"commands":{
"run-script": {
"suggested_key": {
"default": "Alt+1",
"windows": "Alt+1",
"mac": "Command+E"
},
"description": "Run"
}
}
}
If I try to use a single background file, it can't be registered too, like on screenshot:
I am trying to make a Flatpak for my little application “OpenSpeedTest-Server”
This is a simple network performance estimation tool. It is working fine on Windows, Mac and Linux (DEB).
1) When i Export the same in Flatpak, Application unable to get the client device ip address.
2) Also i am not able to put a custom icon for my Flatpak.
I used electronforge.
Here is my package.json
{
"name": "OpenSpeedTest-Server",
"productName": "OpenSpeedTest-Server",
"version": "2.1.0",
"description": "Network Speed Test Server - by OpenSpeedTest",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\""
},
"keywords": [],
"author": {
"name": "OpenSpeedTest",
"email": "support#openspeedtest.com"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {
"icon": "src/icon.png"
},
"makers": [
{
"name": "#electron-forge/maker-flatpak",
"config": {
"name": "OpenSpeedTest_Server",
"options": {
"categories": [
"Utility"
],
"icon": "src/icon.png"
}
}
},
{
"name": "#electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "#electron-forge/maker-deb",
"config": {}
},
{
"name": "#electron-forge/maker-rpm",
"config": {}
}
]
}
},
"dependencies": {
"cors": "^2.8.5",
"electron-squirrel-startup": "^1.0.0",
"express": "^4.17.1",
"internal-ip": "^6.2.0",
"tcp-port-used": "^1.0.2"
},
"devDependencies": {
"#davidwinter/electron-forge-maker-snap": "^2.0.4",
"#electron-forge/cli": "^6.0.0-beta.57",
"#electron-forge/maker-deb": "^6.0.0-beta.57",
"#electron-forge/maker-flatpak": "^6.0.0-beta.57",
"#electron-forge/maker-rpm": "^6.0.0-beta.57",
"#electron-forge/maker-squirrel": "^6.0.0-beta.57",
"#electron-forge/maker-zip": "^6.0.0-beta.57",
"electron": "13.1.2"
}
}
How can i solve this issue?
Solved the issue by adding iproute2 to source and specifying icon dimension. Max supported was 512x512 and i was using 1024x1024
{
"name": "#electron-forge/maker-flatpak",
"config": {
"name": "OpenSpeedTest_Server",
"options": {
"categories": [
"Utility"
],
"icon": {
"512x512": "src/android-chrome-512x512.png"
}
},
"modules": [
{
"name": "zypak",
"sources": [
{
"type": "git",
"url": "https://github.com/refi64/zypak",
"tag": "v2021.02"
}
]
},
{
"name": "iproute2",
"make-install-args": [
"PREFIX=/app",
"CONFDIR=/app/share/iproute2",
"SBINDIR=/app/bin"
],
"sources": [
{
"type": "archive",
"url": "https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.7.0.tar.xz",
"sha256": "725dc7ba94aae54c6f8d4223ca055d9fb4fe89d6994b1c03bfb4411c4dd10f21"
}
],
"cleanup": [
"/include",
"/share/bash-completion",
"/share/man"
]
}
]
}
},
I am working on an application which works really fine when I run it from expo-client, but whenever I upload it on App store and download it from testflight, it crashes after showing splash-screen.
Here is my App.json
{
"expo": {
"name": "AppName",
"description": "Something",
"slug": "AppName-app",
"scheme": "appName",
"privacy": "public",
"platforms": ["ios", "android", "web"],
"version": "1.0.0",
"orientation": "portrait",
"icon": ".images/icon.png",
"splash": {
"image": ".images/splash-Screen.jpg",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
}
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.myapp.myappru",
"buildNumber": "11",
"googleServicesFile": "",
"config": {
"googleMapsApiKey": "KEY"
},
"infoPlist": {
"NSLocationWhenInUseUsageDescription": "something"
"NSCalendarsUsageDescription": "something",
"NSCameraUsageDescription": "something",
"NSPhotoLibraryAddUsageDescription": "something",
"NSPhotoLibraryUsageDescription": "something",
"UIBackgroundModes": "something"
}
}
}
}
}
}
expo-version : 39.0.5
Any help will be highly appreciated.
I have a problem with my mobile app
The problems is with the facebook login, but only in IOS
It already works in android (even in production)
Instead in IOS does not work in production, it only works in the XCODE emulator
My app.json looks like this:
{
"expo": {
"name": "MyUniqueName",
"facebookScheme":"fbMyFbAppId",
"facebookAppId":"MyFbAppId",
"facebookDisplayName":"MyUniqueName",
"description": "This project is really great.",
"slug": "MyUniqueName",
"privacy": "public",
"sdkVersion": "30.0.0",
"platforms": ["ios", "android"],
"version": "1.0.1",
"orientation": "portrait",
"icon": "./assets/favicon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "cover",
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.myCompany.myCompany",
"infoPlist": {
"LSApplicationQueriesSchemes": [
"fbapi","fb-messenger-share-api","fbauth2","fbshareextension"
]
}
},
"android": {
"versionCode": 2,
"package": "com.myCompany.myCompany"
},
}
}
My facebook console:
console facebook
I printed the error but only I get this:
app screenshot
I hope you are using Facebook.logInWithReadPermissionsAsync. If so,
Add behavior: 'web' as below.
It worked for me in Expo client and production as well.
Facebook.logInWithReadPermissionsAsync(Config.loginSetup.facebookID,
{
permissions: ['public_profile','email'],
behavior: 'web'
})