Following the guide, I subscribe to “testchan” as follows:
backendless?.messaging.subscribe("testchan", subscriptionResponse: { (msgs) in
for msg in msgs! {
print("Received message - \(msg.data)")
}
}, subscriptionError: { (fault) in
print("fault on sub get: \(fault)")
}, response: { (subscription) in
print("subscribed \(subscription?.channelName)")
}, error: { (fault) in
print("fault on subscription signup \(fault)")
})
When running the app, it takes forever to load on the loading screen, and does not continue until the request times out (which is odd, because this is the async function, no?)
Eventually, the app loads after it times out as follows:
fault on subscription signup Optional(FAULT = '-1200' [NSURLErrorDomain] <An SSL error has occurred and a secure connection to the server cannot be made.> )
I also just updated to the latest iOS SDK from github to see if it would help, but it does not. (v.4.0.14)
Am I missing something in this process, or is this a bug?
Do you have the “Allow Arbitrary Loads” of “App Transport Security” set to YES in your Info.plist file?
If “Allow Arbitrary Loads” = YES and the error still occurs, please share with us the simple project which reproduce this issue so we could check it.
It looks like it has something to do with the SSL handshake failure between your device and our servers. The root cause might be somewhere in the SSL setup on your device. Do you have any other devices you could test it from?
Hmm, I set Arbitrary loads = NO and then added exception domains to satisfy my previous requirements, and it seems to not hang now. (It also seems to be related to ios 11).
I also seem to be getting a backendless error code (5008) now, which is a good sign & I think its safe to close this.