[SOLVED] To-Do Tutorial - iPhone App is not communicating with the server

I am following the famous Meteor To-Do App Tutorial. In “Section-6 Running on Mobile”, after I make “meteor run ios-device” the app is opening on the iPhone successfully, but it opens without a data (an empty view). It seems the mobile app is not communicating with the server which runs on my Mac.
The Meteor version is the latest; with all packages up-to-date.
I have iOS 10.11 on the Mac, iOS 10.2 on the iPhone and Xcode 8.2.

What can be the reason? Or, What should I do to understand the root cause of the problem?

Thank you!

Sorry I can’t answer your specific question but I will say that my experience of Cordova (ios and android) in modern (1.4+) versions of Meteor is very disappointing, it mostly doesn’t work and while its not too hard to hack around, it doesn’t yield the same developer happiness that the Meteor/Cordova combo used too.

Obvious things to try are around networking, does/can you phone get to the IP address you specified in the mobile-server param when you started the app? Is xCode giving you any warnings or errors when you debug the app?

Thank you @floydprice for the quick reply!
I am running Meteor on my Mac and the iPhone is connected with the Mac via an USB cable. I assume there is not any IP config required here, right?
In Xcode, I don’t have any errors but only some warnings about deprecated methods used by Cordova.

Your assumption seems correct to me… or to put another way, your app is running so it must be connecting to the “server” (your mac).

I am attaching the runtime log below;

2017-05-24 13:45:24.953911 new-simple-todos[734:211957] Apache Cordova native platform version 4.3.0 is starting.
2017-05-24 13:45:24.954919 new-simple-todos[734:211957] Multi-tasking -> Device: YES, App: YES
2017-05-24 13:45:24.968152 new-simple-todos[734:211957]

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read “iOS Data Storage Guidelines” at:
To disable web storage backup to iCloud, set the BackupWebStorage preference to “local” in the Cordova config.xml file

2017-05-24 13:45:25.059835 new-simple-todos[734:211957] CDVWKWebViewEngine will reload WKWebView if required on resume
2017-05-24 13:45:25.059932 new-simple-todos[734:211957] Using WKWebView
2017-05-24 13:45:25.061030 new-simple-todos[734:211957] [CDVTimer][handleopenurl] 0.155985ms
2017-05-24 13:45:25.064366 new-simple-todos[734:211957] [CDVTimer][intentandnavigationfilter] 3.140032ms
2017-05-24 13:45:25.064572 new-simple-todos[734:211957] [CDVTimer][gesturehandler] 0.099957ms
2017-05-24 13:45:25.150542 new-simple-todos[734:211957] Serving asset bundle version: 0c8795ba8f3119843203decdfca7177100ddadfe
[INFO] GCDWebServer started on port 12536 and reachable at http://localhost:12536/
2017-05-24 13:45:25.155801 new-simple-todos[734:211957] [CDVTimer][webapplocalserver] 91.096997ms
2017-05-24 13:45:25.167965 new-simple-todos[734:211957] [CDVTimer][statusbar] 12.005985ms
2017-05-24 13:45:25.188704 new-simple-todos[734:211957] [CDVTimer][splashscreen] 20.606995ms
2017-05-24 13:45:25.188814 new-simple-todos[734:211957] [CDVTimer][TotalPluginStartup] 128.023982ms
2017-05-24 13:45:42.008211 new-simple-todos[734:211957] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-05-24 13:45:42.018891 new-simple-todos[734:211957] [MC] Reading from public effective user settings.
2017-05-24 13:45:42.194748 new-simple-todos[734:212176] 0x17014db50 Copy matching assets reply: XPC_TYPE_DICTIONARY <dictionary: 0x17014db50> { count = 1, transaction: 0, voucher = 0x0, contents =
“Result” => <int64: 0x170220700>: 29
2017-05-24 13:45:42.196590 new-simple-todos[734:212176] 0x17414ea70 Daemon configuration query reply: XPC_TYPE_DICTIONARY <dictionary: 0x17414ea70> { count = 2, transaction: 0, voucher = 0x0, contents =
“Dictionary” => <dictionary: 0x17414e020> { count = 1, transaction: 0, voucher = 0x0, contents =
“ServerURL” => <dictionary: 0x17414dc00> { count = 3, transaction: 0, voucher = 0x0, contents =
“com.apple.CFURL.magic” => <uuid: 0x17424f000> C3853DCC-9776-4114-B6C1-FD9F51944A6D
"com.apple.CFURL.string" => <string: 0x17424ef10> { length = 30, contents = “https://mesu.apple.com/assets/” }
“com.apple.CFURL.base” => <null: 0x1b0c6be80>: null-object
“Result” => <int64: 0x174220120>: 0
2017-05-24 13:45:42.197384 new-simple-todos[734:212176] [MobileAssetError:29] Unable to copy asset information from https://mesu.apple.com/assets/ for asset type com.apple.MobileAsset.TextInput.SpellChecker
[INFO] GCDWebServer stopped
2017-05-24 13:50:54.932894 new-simple-todos[734:211957] CDVWKWebViewEngine shouldReloadWebView::
2017-05-24 13:50:54.933009 new-simple-todos[734:211957] CDVWKWebViewEngine shouldReloadWebView title: Simple To-do Application
2017-05-24 13:50:54.933064 new-simple-todos[734:211957] CDVWKWebViewEngine shouldReloadWebView location: http://localhost:12536/?cdvToken=C875FD73-9549-4F10-8111-371CAB9A0E63-734-000000ADDB99F77C
2017-05-24 13:50:54.933097 new-simple-todos[734:211957] CDVWKWebViewEngine shouldReloadWebView reload: 0
[INFO] GCDWebServer started on port 12536 and reachable at http://localhost:12536/
2017-05-24 13:51:12.315192 new-simple-todos[734:211957] Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.

I found the reason why iPhone is not communicating with the server. They were in different WiFi NW having very similar names :frowning: The app starts working fine on both Mac and iPhone after I put them in the same WiFi NW.

1 Like

@floydprice I don’t share your resentment, I had great experience thus far. I managed to launch several app with this integration.

@gkaradag are you on the same local wifi network?

I answered too quickly, I think you found the issue.

1 Like

Thanks anyway @alawi

1 Like