Native App Install Banner not working on iOS - ios

This manifest.json is placed per Google instructions. Android works as intended but iOS does nothing.
{
"name":"FooApp",
"short_name":"FooApp",
"icons":[
{
"src":"foo_app_icon.png",
"type":"image/png",
"sizes":"144x144"
}
],
"prefer_related_applications":true,
"related_applications":[
{
"platform":"play",
"url":"https://play.google.com/store/apps/details?id=com.es0329.fooapp",
"id":"com.es0329.fooapp"
},
{
"platform":"itunes",
"url":"https://itunes.apple.com/us/app/fooapp/id123456789"
}
],
"start_url":"https://www.es0329.com/fooapp",
"display":"standalone"
}

Related

Not able to retrieve the spreadsheet id from workspace add-on

I'm developing a workspace add-on with alternate runtime; I configured the add-on to work with spreadsheets and I need to retrieve the spreadsheet id when the user opens the add-on. For test purposes I created a cloud function that contains the business logic.
My deployment.json file is the following:
{
"oauthScopes": ["https://www.googleapis.com/auth/spreadsheets.currentonly", "https://www.googleapis.com/auth/drive.file"],
"addOns": {
"common": {
"name": "My Spreadsheet Add-on",
"logoUrl": "https://cdn.icon-icons.com/icons2/2070/PNG/512/penguin_icon_126624.png"
},
"sheets": {
"homepageTrigger": {
"runFunction": "cloudFunctionUrl"
}
}
}
}
However, the request I receive seems to be empty and without the id of the spreadsheet in which I am, while I was expecting to have the spreadsheet id as per documentation
Is there anything else I need to configure?
The relevant code is quite easy, I'm just printing the request:
exports.getSpreadsheetId = function addonsHomePage (req, res) { console.log('called', req.method); console.log('body', req.body); res.send(createAction()); };
the information showed in the log is:
sheets: {}
Thank you
UPDATE It's a known issue of the engineering team, here you can find the ticket
The information around Workspace Add-ons is pretty new and the documentation is pretty sparse.
In case anyone else comes across this issue ... I solved it in python using CloudRun by creating a button that checks for for the object then if there is no object it requests access to the sheet in question.
from flask import Flask
from flask import request
app = Flask(__name__)
#app.route('/', methods=['POST'])
def test_addon_homepage():
req_body = request.get_json()
sheet_info = req_body.get('sheets')
card = {
"action": {
"navigations": [
{
"pushCard": {
"sections": [
{
"widgets": [
{
"textParagraph": {
"text": f"Hello {sheet_info.get('title','Auth Needed')}!"
}
}
]
}
]
}
}
]
}
}
if not sheet_info:
card = create_file_auth_button(card)
return card
def create_file_auth_button(self, card):
card['action']['navigations'][0]['pushCard']['fixedFooter'] = {
'primaryButton': {
'text': 'Authorize file access',
'onClick': {
'action': {
'function': 'https://example-cloudrun.a.run.app/authorize_sheet'
}
}
}
}
return card
#app.route('/authorize_sheet', methods=['POST'])
def authorize_sheet():
payload = {
'renderActions': {
'hostAppAction': {
'editorAction': {
'requestFileScopeForActiveDocument': {}
}
}
}
}
return payload

Can't re-log (autorelog) user to Nativescript Firebase App on iOS

I'm having problems re-logging the user previously logged in with Facebook or Google Sign In on my Nativescript iOS App. It works good with an email/password re-authentication on iOS.
It seems that the function
firebase.init({
persist:true,
onAuthStateChanged: (data: any) => {
console.log(JSON.stringify(data))
if (data.loggedIn) {
AuthService.tokenUid = data.user.uid;
// this.routerExtensions.navigate(["/splash"])
}
else {
AuthService.tokenUid = ''
}
},
iOSEmulatorFlush: true
}).then(
() => {
console.log("firebase.init done");
},
error => {
console.log(`firebase.init error: ${error}`);
}
);
return {"loggedIn":false,"user":null} when the user re-launch the app after closing it. It seems that the plugin nativescript/firebase (EddyVerbruggen
/
nativescript-plugin-firebase) might have a problem with the authentication on iOS. There is no problem with Android.

install plugin for Open Distro

Amazon Elasticsearch Service offers k-Nearest Neighbor (k-NN) search which can enhance search by similarity use cases.
https://aws.amazon.com/about-aws/whats-new/2020/03/build-k-nearest-neighbor-similarity-search-engine-with-amazon-elasticsearch-service/
I tried this official code that I found here...
https://github.com/opendistro-for-elasticsearch/k-NN
PUT /myindex
{
"settings" : {
"index": {
"knn": true
}
},
"mappings": {
"properties": {
"my_vector1": {
"type": "knn_vector",
"dimension": 2
},
"my_vector2": {
"type": "knn_vector",
"dimension": 4
},
"my_vector3": {
"type": "knn_vector",
"dimension": 8
}
}
}
}
Getting this error:
"unknown setting [index.knn] please check that any required plugins
are installed, or check the breaking changes documentation for removed
settings"
How do I check if my Elastic installation supports this feature?
t2.small and t2.medium instance types are not supported. (It is not mentioned anywhere in the documentation.) It worked as expected when r5.large instance type was selected.

NetInfo addeventListener has a weird behaviour on ios

Importing NetInfo from 'react-native' works very well on iOS and android. Although, now trying to import it from #react-native-community/netinfo (version 3.2.1) working on android with no problems but on iOS launching in a repetitive way the addEventListener. But #react-native-community/netinfo (version 4.. works on iOS without repetitive loop).
Here is my simple code with a console :
import NetInfo from '#react-native-community/netinfo'
onChangeConnexion() {
NetInfo.isConnected.fetch().then(isConnected => {
console.log("hello world!")
if(isConnected) {
this.setState({ netIsConnected: true, netMessage: "" }, () => {
})
} else {
this.setState({ netIsConnected: false, netMessage:
NO_CONNECTION_TRAD[_this.props.lang] })
}
});
}
componentWillUnmount() {
NetInfo.isConnected.removeEventListener('connectionChange',
this.onChangeConnexion)
}
componentDidMount() {
NetInfo.isConnected.addEventListener('connectionChange',
this.onChangeConnexion) // ON CHANGE
}
hello world ! is written in a loop way when launching app. That means that the addEventListener is called without stop. Is it because i am using the old api of netInfo ?

How do you add an app's icon (app made with Trigger.io) to the iOS content sharing menu

I'm creating an iOS application using trigger IO, and I would like to add my application's shortcut icon to the list of available editors for certain file types. Like in this article, can this be done using trigger io?
My app inside iMessage UIActivityViewController
I've added the build_steps.json to the ios custom module. I can't get the correct syntax. I get an error from the forge build procress.
[ ERROR] 2013-11-29 22:29:56,654 -- set_in_info_plist() got an unexpected keyword argument 'UTImportedTypeDeclarations'
Here is my build_steps.json:
[
{
"do": {
"set_in_info_plist": {
"UTImportedTypeDeclarations":
[
{
"UTTypeConformsTo":
[
"public.image"
],
"UTTypeIdentifier": "public.png",
"UTTypeTagSpecification":
{
"com.apple.ostype": "PNG",
"public.filename-extension":
[
"png"
],
"public.mime-type": "image/png"
}
},
{
"UTTypeConformsTo":
[
"public.image"
],
"UTTypeIdentifier": "public.jpeg",
"UTTypeTagSpecification":
{
"com.apple.ostype": "JPEG",
"public.filename-extension":
[
"jpg"
],
"public.mime-type": "image/jpeg"
}
}
]
}
}
}
]
Can anyone tell me what is wrong with this file?
This isn't possible with Trigger's built in functionality, but should be possible by writing your own native module.
See https://trigger.io/docs/current/api/native_modules/index.html and in particular https://trigger.io/docs/current/api/native_modules/native_build_steps.html#set_in_info_plist for updating the Info.plist for an app.

Resources