infoPlist Property is not working with EXPO project for iTunes connect - location

I had submitted my app twice to apple store and it's being rejected due to privacy getting the user information like location
I built my project with EXPO and after adding infoPlist property as a child to ios object as mentioned in EXPO documentations
https://docs.expo.io/distribution/app-stores/#system-permissions-dialogs-on-ios
and rebuilt a new binary as mentioned in this issue page
https://github.com/expo/expo/issues/1570
still the app having the same behavior and the permission request is not being changes
Kindly help with that
{
"expo": {
"name": "xxx",
"slug": "xxx",
"privacy": "public",
"sdkVersion": "36.0.0",
"platforms": [
"ios",
"android",
"web"
],
"version": "3.0.1",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"bundleIdentifier": "xxx",
"supportsTablet": true,
"infoPlist" : {
"NSLocationAlwaysAndWhenInUseUsageDescription" :
"APP uses your location to get you accurate data about Prayer Times and Qibla Direction",
"NSLocationWhenInUseUsageDescription" :
"App uses your location to get you accurate data about Prayer Times and Qibla Direction",
"NSLocationAlwaysUsageDescription":
"App uses your location to get you accurate data about Prayer Times and Qibla Direction",
"NSLocationUsageDescription" :
"App uses your location to get you accurate data about Prayer Times and Qibla Direction",
"buildNumber" : "2.0.2",
"CFBundleVersion" : "2.0.2",
"CFBundleShortVersionString" : "2.0.1"
}
},
"android": {
"versionCode" : 5,
"package": "xxx"
}
}
}

Related

Manifest parsing error when trying to test app in Teams

From https://dev.teams.microsoft.com/, whenever I click "Preview in Teams", it shows an error in Teams with these details copied to the clipboard: "Error while reading manifest.json". If I download the app package and "upload a custom app" I get the same error. What can I do to resolve this? If I remove the messaging extension configuration, it works but I configured that part in their app and that's what I want to build.
This is my manifest file:
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.11/MicrosoftTeams.schema.json",
"version": "1.0.0",
"manifestVersion": "1.11",
"id": "3fXXXX",
"packageName": "com.package.name",
"name": {
"short": "Domo Integration",
"full": ""
},
"developer": {
"name": "Domo Inc.",
"mpnId": "",
"websiteUrl": "https://www.domo.com",
"privacyUrl": "https://www.domo.com/company/privacy-policy",
"termsOfUseUrl": "https://www.domo.com/company/service-terms"
},
"description": {
"short": "short",
"full": "full"
},
"icons": {
"outline": "outline.png",
"color": "color.png"
},
"accentColor": "#FFFFFF",
"composeExtensions": [
{
"botId": "deXXXXXXXX",
"commands": [],
"canUpdateConfiguration": true,
"messageHandlers": [
{
"type": "link",
"value": {
"domains": [
"*.domo.com"
]
}
}
]
}
],
"validDomains": [
"*.domo.com"
]
}
#ccnokes In order to use messaging extension in your bot, you need to provide at least one command. commands is required property in composeExtension - see doc.
I was also getting the same error when tried with your manifest but after adding commands it worked totally fine.

web app works locally and on app engine, but not on cloud run

So I've run into this issue with a web app I've made:
it gets a file path as input
if the file exists on a bucket, it uses a python client api to create a compute engine instance
it passes the file path to the instance in the startup script
When I ran it locally, I created a python virtual environment and then ran the app. When I make the input on the web browser, the virtual machine is created by the api call. I assumed it used my personal account. I changed to the service account in the command line with this command 'gcloud config set account', it ran fine once more.
When I simply go to the source code directory deploy it as is, the application can create the virtual machine instances as well.
When I use Google cloud build and deploy to cloud run, it doesn't create the vm instance.
the web app itself is not throwing any errors, but when I check compute engine's logs, there is an error in the logs:
`{
"protoPayload": {
"#type": "type.googleapis.com/google.cloud.audit.AuditLog",
"status": {
"code": 3,
"message": "INVALID_PARAMETER"
},
"authenticationInfo": {
"principalEmail": "####"
},
"requestMetadata": {
"callerIp": "#####",
"callerSuppliedUserAgent": "(gzip),gzip(gfe)"
},
"serviceName": "compute.googleapis.com",
"methodName": "v1.compute.instances.insert",
"resourceName": "projects/someproject/zones/somezone/instances/nameofinstance",
"request": {
"#type": "type.googleapis.com/compute.instances.insert"
}
},
"insertId": "######",
"resource": {
"type": "gce_instance",
"labels": {
"instance_id": "#####",
"project_id": "someproject",
"zone": "somezone"
}
},
"timestamp": "2021-06-16T12:18:21.253551Z",
"severity": "ERROR",
"logName": "projects/someproject/logs/cloudaudit.googleapis.com%2Factivity",
"operation": {
"id": "operation-#####",
"producer": "compute.googleapis.com",
"last": true
},
"receiveTimestamp": "2021-06-16T12:18:21.253551Z"
}`
In theory, it is the same exact code that worked from my laptop and on app engine. I'm baffled why it only does this for cloud run.
App engines default service account was stripped of all its roles and given a custom role tailored to the web apps function.
The cloud run is using a different service account, but was given that exact same custom role.
Here is the method I use to call the api.
def create_instance(path):
compute = googleapiclient.discovery.build('compute', 'v1')
vmname = "piinnuclei" + date.today().strftime("%Y%m%d%H%M%S")
startup_script = "#! /bin/bash\napt update\npip3 install pg8000\nexport BUCKET_PATH=my-bucket/{}\ngsutil -m cp -r gs://$BUCKET_PATH /home/connor\ncd /home/connor\n./cloud_sql_proxy -dir=cloudsql -instances=sql-connection-name=unix:sql-connection-name &\npython3 run_analysis_upload.py\nexport ZONE=$(curl -X GET http://metadata.google.internal/computeMetadata/v1/instance/zone -H 'Metadata-Flavor: Google')\nexport NAME=$(curl -X GET http://metadata.google.internal/computeMetadata/v1/instance/name -H 'Metadata-Flavor: Google')\ngcloud --quiet compute instances delete $NAME --zone=$ZONE".format(path)
config = {
"kind": "compute#instance",
"name": vmname,
"zone": "projects/my-project/zones/northamerica-northeast1-a",
"machineType": "projects/my-project/zones/northamerica-northeast1-a/machineTypes/e2-standard-4",
"displayDevice": {
"enableDisplay": False
},
"metadata": {
"kind": "compute#metadata",
"items": [
{
"key": "startup-script",
"value": startup_script
}
]
},
"tags": {
"items": []
},
"disks": [
{
"kind": "compute#attachedDisk",
"type": "PERSISTENT",
"boot": True,
"mode": "READ_WRITE",
"autoDelete": True,
"deviceName": vmname,
"initializeParams": {
"sourceImage": "projects/my-project/global/images/my-image",
"diskType": "projects/my-project/zones/northamerica-northeast1-a/diskTypes/pd-balanced",
"diskSizeGb": "100"
},
"diskEncryptionKey": {}
}
],
"canIpForward": False,
"networkInterfaces": [
{
"kind": "compute#networkInterface",
"subnetwork": "projects/my-project/regions/northamerica-northeast1/subnetworks/default",
"accessConfigs": [
{
"kind": "compute#accessConfig",
"name": "External NAT",
"type": "ONE_TO_ONE_NAT",
"networkTier": "PREMIUM"
}
],
"aliasIpRanges": []
}
],
"description": "",
"labels": {},
"scheduling": {
"preemptible": False,
"onHostMaintenance": "MIGRATE",
"automaticRestart": True,
"nodeAffinities": []
},
"deletionProtection": False,
"reservationAffinity": {
"consumeReservationType": "ANY_RESERVATION"
},
"serviceAccounts": [
{
"email": "batch-service-accountg#my-project.iam.gserviceaccount.com",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
],
"shieldedInstanceConfig": {
"enableSecureBoot": False,
"enableVtpm": True,
"enableIntegrityMonitoring": True
},
"confidentialInstanceConfig": {
"enableConfidentialCompute": False
}
}
return compute.instances().insert(
project="my-project",
zone="northamerica-northeast1",
body=config).execute()
The issue was with the zone. For some reason, when it was ran on cloud run, the code below was the culprit.
return compute.instances().insert(
project="my-project",
zone="northamerica-northeast1",
body=config).execute()
"northamerica-northeast1" should have been "northamerica-northeast1-a"
EDIT:
I made a new virtual machine image and quickly ran into the same problem, it would work locally and break down in the cloud run environment. After letting it sit for some time, it began to work again. This is leading me to the conclusion that there is also some sort of delay before it can be called by cloud run.

Attempt to install new bot apps for Teams yields generic error "Manifest Parsing has Failed"

Working with a new Microsoft Teams App (a Bot, built with the MS Bot Framework, and deployed to Azure). Whether using the soon-to-be-deprecated App Studio, or the soon-to-replace-it Preview of the Developer Portal, attempting to install directly or to download the manifest and sideload to teams, in every case the following image is displayed:
The message "Manifest parsing has failed" is quite unhelpful. I am mystified that Microsoft is not supplying some additional information about WHAT failed. Is there a log file somewhere that I can find the actual problem?
UPDATE RESPONDING TO COMMENTS:
One kind commenter pointed me to a similar SO question, but the suggested solution (setting manfestVersion from that currently generated at 1.9 to 1.7) did not work. Behavior was identical.
Another commenter asked me to provide the manifest scrubbed of identifying information. Here it is:
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json",
"version": "1.0.0",
"manifestVersion": "1.9",
"id": "VALID-GUID",
"packageName": "com.package.name",
"name": {
"short": "Stephan Trial App",
"full": ""
},
"developer": {
"name": "Valid Company",
"mpnId": "Correct mpnId",
"websiteUrl": "https://www.thiscompany.com",
"privacyUrl": "https://www.thiscompany.com/legal/privacy-policy/",
"termsOfUseUrl": "https://www.thiscompany.com/legal/terms-of-use/"
},
"description": {
"short": "Stephan's App's Short Description",
"full": "Stephan's App's Longer Description"
},
"icons": {
"outline": "outline.png",
"color": "color.png"
},
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "VALID-CORRECT-GUID",
"scopes": [
"team",
"personal"
],
"isNotificationOnly": false,
"supportsFiles": false
}
],
"composeExtensions": [
{
"botId": "SAME-VALID-CORRECT-GUID-AS-BOT-ABOVE",
"commands": [
{
"id": "CmdID",
"type": "query",
"title": "Command Title",
"description": "Command Description",
"initialRun": true,
"fetchTask": false,
"context": [
"commandBox",
"compose",
"message"
],
"parameters": [
{
"name": "ParmID",
"title": "Parameter Title",
"description": "Parameter Description",
"inputType": "Text",
"choices": []
}
]
}
],
"canUpdateConfiguration": true,
"messageHandlers": []
}
],
"validDomains": [],
"devicePermissions": [
"geolocation"
]
}
I think I found the problem. Within composeExtensions > commands > parameters you have inputType but it's set to 'Text' (capital T) which is invalid - it needs to be 'text' (small 't'). Try that and it should be fine.

MS Teams Bot - task/fetch URL not loading in web/desktop app but loading in android app

I'm trying to display an URL upon invoke (task/fetch) via MS Teams bot. The URL is loading and working perfectly fine on android/ios app. But it is not loading at all in web/desktop app. The app has been in production for some time now and I recently updated the app manifest with valid domains for making the URLs load in Teams.
Also I tried the same manifest/backend with another test app and URLs are loading fine in web/mobile app. Not sure what am I missing here.
Please find below my task/fetch response and manifest details.
task/fetch response
{
"task": {
"type": "continue",
"value": {
"title": "Task Module Test",
"height": 1200,
"width": 1000,
"url": "https://www.contoso.com/msteams/taskmodules/newcustomer",
"fallbackUrl": "https://www.contoso.com/msteams/taskmodules/newcustomer"
}
}
}
My App Manifest (have edited some sensitive info but the structure of the manifest is intact)
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.8/MicrosoftTeams.schema.json",
"manifestVersion": "1.8",
"version": "1.0.0",
"showLoadingIndicator": true,
"id": "some-id",
"packageName": "com.example.bots.msteams",
"developer": {
"name": "Test",
"websiteUrl": "https://www.example.com",
"privacyUrl": "https://www.example.com/policy",
"termsOfUseUrl": "https://www.example.com/terms"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Test Short",
"full": "Test Long"
},
"description": {
"short": "Short desc",
"full": "Long desc"
},
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "some-id",
"scopes": [
"personal"
],
"supportsFiles": true,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"www.contoso.com"
]
}
URL successfully loading on Phone app
URL not loading on web/desktop app
Happy to provide any other info if needed!
Ok, found the fix (but I have no clue why it works). I removed showLoadingIndicator property from the manifest and the URLs are loading fine now.
I couldn't find much help on what that property does from MS docs.
Glad that you found the solution and thanks for posting it back to help other community members.
When you set showLoadingIndicator to true, as a mandatory step you need to call microsoftTeams.appInitialization.notifySuccess() to notify Teams that your app has successfully loaded.
The behavior on mobile clients is not configurable through the native loading indicator property. Mobile clients show this indicator by default across content pages and iframe-based task modules.
Here is documentation on Show Loading Indicator.

Can't add work file to a Company-owned devices for work and personal use

I've created a token with this policy:
{
"name": "enterprises/LC0261d9zr/policies/CompanyOwnedWorkProfilePolicy1",
"version": "1",
"applications": [
{
"packageName": "com.google.android.gm",
"installType": "FORCE_INSTALLED",
"defaultPermissionPolicy": "GRANT"
},
{
"packageName": "com.google.android.apps.docs",
"installType": "AVAILABLE"
}
],
"passwordRequirements": {
"passwordMinimumLength": 6,
"passwordQuality": "ALPHABETIC"
},
"usbFileTransferDisabled": true,
"bluetoothDisabled": true,
"personalUsagePolicies": {
"cameraDisabled": true,
"screenCaptureDisabled": true,
"maxDaysWithWorkOff": 3,
"personalPlayStoreMode": "BLACKLIST"
}
},
and set "allowPersonalUsage": "PERSONAL_USAGE_ALLOWED",
I got enrollment token successfully, and use DPC indentifier to register a device.
But at last, the device shows :
Can't add work profile : A work profile can't be added to this device.If you have questions,contact your admin.
Can someone tell me what's the problem?
Thanks in advance.
PS: I've successfully set the device as Company-owned devices for work use only.
After factory-reset, and I wanna set the device to Company-owned devices for work and personal use,I met this problem.
My phone's system is 8.0
I've also tried to use another enrollment token with policy below to set the device as Personally-owned devices,get the same result.
{
"name": "enterprises/LC0261d9zr/policies/PersonalyOwnedProfilePolicy1",
"version": "1",
"applications": [
{
"packageName": "com.google.android.gm",
"installType": "FORCE_INSTALLED",
"defaultPermissionPolicy": "GRANT"
},
{
"packageName": "com.google.android.apps.docs",
"installType": "AVAILABLE"
}
],
"passwordRequirements": {
"passwordMinimumLength": 6,
"passwordQuality": "ALPHABETIC"
}
}

Resources