Hello!
We are developing iOS mobile app that uses Ricoh Theta API v.2.1. Some of our customers complains that they can’t take photos using our app though it works fine when they use Theta mobile app.
We can’t reproduce it, but maybe there is a chance you can advice to us something.
We have added logs and see that for our customer the request POST http://192.168.1.1/osc/state fails with the following NSURLErrorDomain error .
Additional info from customer:
Camera: Ricoh Theta SC2 for business
Camera’s serial #YP40133479
Camera’s firmware version: 6.52
Devices: Iphone 14 and iPad 9th Gen 10.2-inch
iOS version: 17.0.1
Steps we have tried to fix it:
Everything is up to date
Reset network settings
Reset camera
Granted permissions “connect to devices on your local network” permission
Uninstalled/reinstalled the our app app and enabled permission again
Checked local network settings for our app and it’s enabled
According to our logs we got this in response of the request POST http://192.168.1.1/osc/state. I am not sure that this is from the camera, maybe it’s some iOS restrictions and iOS doesn’t allow to connect to Ricoh server
The camera endpoint is a http, not https, right?
Right, we use http, not https.
I’ve read the thread you mentioned and I am wondering maybe we should specify some values inside NSAppTransportSecurity dictionary in info.plist?
Please see all possible keys for this dictionary:
I can ask our contacts at RICOH to see if they’ve seen this behavior before or have any advice. I suspect that unless it is a common problem, it will be tough to get proper advice as it will be difficult to replicate the problem.
There are many errors of this type on the apple developer forums. This one below indicates that a problem was occurring when switching between https and http. Although there is no solution posted, it may provide a clue as to how to replicate the problem.
Are you pushing the images up to the cloud using mobile data while the SC2B is connected to the iPhone with WiFi?
No, we don’t do it.
We just tried to add NSAllowsArbitraryLoads = true and NSAllowsLocalNetworking = true in our info.plist and sent the new build to our customer who has this problem. I will keep you posted if it helps.
I can ask our contacts at RICOH to see if they’ve seen this behavior before or have any advice.
I believe it can be really helpful if they could provide what they specify for NSAppTransportSecurity in their info.plist for the Theta app. Thank you in advance!
Hello! Just want to update you that setting NSAllowsArbitraryLoads = true and NSAllowsLocalNetworking = true in info.plist didn’t resolve the problem for our customer.
Sorry, missed your post. Yes we set Content-Type to application/json;charset=utf-8.
Everything woks fine for 99% of our customers and for all our devices in development team. But 1% of customers complains because of this error
@jcasman , I’m rather puzzled by the error below. I don’t know why it would show "https://192.168.1.1/osc/login.html"
We can try Google searches on this type of behavior for iOS development in general. If that is coming from the THETA SC2B, it may provide a clue as to the source of the problem.
Hello Craig! We set the same options in info.plist as in Ricoh Demo app and it fixed the customer issue. We will observe the other customers and let you you know if it happens again. Thank you very much for your assistance!
Hi @craig ! One of our customers again experiences this issue. According to his words he has started to get this errors after updating to iOS 17.4. Do you maybe know if there are some changes that’s need to be done (though can see no changes in this repo theta-client/demos/demo-ios/SdkSample/Info.plist at main · ricohapi/theta-client · GitHub )
Please also see logs that we were able to collect from the customer:
@Anjali_Nirmale I will include a summary of your issue and the error messages you provided in the agenda in our weekly call with RICOH this week. I do not know if RICOH will provide an exact response. But I will report back here any information that I find out.
Confirming: You said that connecting to your X and using the RICOH THETA mobile app works fine, correct?
At the same time, you can create an issue on the RICOH repo for theta-client. You may get a response there.