Unable to connect deploiement to iOS application


#1

hello
I’ve installed an ushahidi platform on connect-citoyen.fr. I have no problem to connect it to the android app but I have the error on IOS : Problem Adding deployment.
Does anybody knows if there something particuler to add to set IOS application ?
Thanks.


#2

Does it also happen with other deployments hosted elsewhere? i.e. https://quakemap.ushahidi.io


#3

I’ve the same problem with another deployment installed on anonymap.fr
Both of my deployments are on a VPS hosted by OVH.
No problem with deployement hosted by ushahidi.


#4

There used to be a bit of an esoteric requirement in how the client is served . In terms of nginx configuration, it looked like this:

### THIS IS ONLY REQUIRED FOR OLD VERSIONS (until year 2019) OF THE ANDROID APP ###    
    location /config.json {
        if ($request_method = 'OPTIONS') {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
            add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
            add_header 'Access-Control-Max-Age' 1728000;
            add_header 'Content-Type' 'text/plain charset=UTF-8';
            add_header 'Content-Length' 0;
            return 204;
        }

        if ($request_method = 'GET') {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
            add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
            add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
        }
    }
    ### END OF OLD MOBILE APP SUPPORT ###

I remember hearing that this was no longer necessary with the latest versions of the app… but it may be a good idea to give it a try.