menu

Clever Beagle

Chat with other product developers and get help with Clever Beagle's tools and resources.

Channels
Team

Cordova iOS deployment

December 16, 2019 at 7:55pm

Cordova iOS deployment

December 16, 2019 at 7:55pm
Has anybody had any success deploying Pup to iOS with Cordova? I've deployed locally and can signup/login but anything beyond that (i.e. requiring the Apollo/GraphQL layer) doesn't work. I see errors like these:
2019-12-16 19:44:17.017494+0000 app-client[16363:1243567] {"name":"ServerParseError","response":{},"statusCode":501,"bodyText":"","line":170598,"column":30,"sourceURL":"http://localhost:12960/__cordova/packages/modules.js?hash=5dce6e113c3025d0a7c648aed10996bbe0f1b0eb"} [object Object]
2019-12-16 19:44:20.516570+0000 app-client[16363:1243567] [Network error]: ServerParseError: JSON Parse error: Unexpected EOF
It appears to relate back to an issue in the apollo-link-http-common module. However, I haven't managed to figure out what exactly the issue is.

December 17, 2019 at 1:28am
Hey , haven't used Cordova with Meteor in a bit so don't have any immediate ideas. In your settings, can you confirm what your httpUri is when you deploy to iOS?
  • reply
  • like
I have "httpUri": "/graphql" in my settings.
  • reply
  • like

December 17, 2019 at 2:23pm
Same problem on Android although I get a bit more detail in the logs. For example, this snippet:
12-17 14:20:59.415 5902 6036 W MeteorWebApp: Asset /graphql not found in bundle 8ca005e127d67d87f65c450a539121d5743eefc3:file:///android_asset/www/application, no parent bundle
  • reply
  • like
After updating httpUri to an absolute value //localhost:3000/graphql I get a different error:
"[Network error]: TypeError: Failed to fetch", source: http://localhost:12960/__cordova/app/app.js?hash=d13b43f19b8cbcf52462985eca0ceae6638ef754 (27872)
It works in the browser, just not in Cordova.
  • reply
  • like

December 17, 2019 at 11:25pm
Once I updated httpUri to include my local machine's location on the network (e.g. //192.168.178.20:3000/graphql) it worked... Doh.
  • reply
  • like

December 23, 2019 at 4:05pm
Sounds good :)
  • reply
  • like
The good news is I have this running happily on iOS TestFlight. However, Android is proving more of a nuisance!
  • reply
  • like