I have an application running fine with Meteor 1.2.1 / Cordova. Both iOS and Android devices and simulators work as expected. The application is leveraging the Braintree drop-in UI for payment processing.
From a security perspective, the application is using both App.accessRules and BrowserPolicy
I upgraded the application to Meteor 1.3-beta.11, did some testing, and ran into an issue with iOS. The Braintree drop-in UI was not working properly and I was receiving the following in the logs:
The above made sense given the changes to Cordova and the new version of Cordova-iOS / WKWebView. The Braintree drop-in UI uses iFrames and it was not able to access properly.
I was able to address the issue by adding the following to the Cordova config.xml.
BTW, is there anything related that would prevent a modal / iFrame from Filepicker.io ?
The have an option that shows their iFrame in a modal or opens a new window. This worked fine pre 1.3 so was thinking it may have something to do with WKWebView (BTW, the Filepicker modal opens perfectly on IOS Safari).
For that issue I see nothing in the console, unlike when I got an error when trying to open a URL related to the above issue.
Hmmm, I’ve never used filepicker.io, so without an error it is hard to diagnose what might be going on. When you say you don’t see anything in the console, do you mean the Safari remote debugging console?
I don’t see anything in the Safari remote debugging console or the Xcode console.
For example,I put a console.log before and after the call to Filepicker and they show in the remote debugging console. …nothing inbetween in the or the Xcode console.
When I try your project, I get these errors in the Xcode console:
2016-04-04 08:43:10.666 iOS-test-Filepicker-Debug[20623:1137666] ERROR Internal navigation rejected - <allow-navigation> not set for url='https://dialog.filepicker.io/dialog/comm_iframe/'
2016-04-04 08:43:10.666 iOS-test-Filepicker-Debug[20623:1137666] ERROR Internal navigation rejected - <allow-navigation> not set for url='https://www.filepicker.io/dialog/comm_iframe/'
Your mobile-config.js uses type: 'intent' for the App.accessRule settings for these URLs, but these should be type: 'navigation' to allow loading within an iframe. Making this change, the filepicker does show and things seem to work.
Awesome thanks!!!.. Weird as I thought I’d tried all the variants. That works!!!
Weird thing is I could not see that error in the Xcode console. Perhaps I am looking in the wrong place as I could see the message I logged with console.log but not those issues.
Yes, overriding config.xml is a bad idea in general, because it means you lose all the configuration set by the build process and by installed plugins. In this case, your error occurs because it is trying to load the default Cordova start page instead of loading from the Meteor local file server.
Buzzy[34678:11878782] ERROR Internal navigation rejected - <allow-navigation> not set for url='http://staticxx.facebook.com/connect/xd_arbiter.php?version=42#channel=feb08aadc&origin=http%3A%2F%2Flocalhost%3A12456'
2016-04-04 19:07:21.785 Buzzy[34678:11878782] ERROR Internal navigation rejected - <allow-navigation> not set for url='about:blank'
2016-04-04 19:07:21.844 Buzzy[34678:11878782] Error syncing to server time: Error: network
2016-04-04 19:07:21.844
That said the filepicker issue seems to be resolved. I think I had multiple App.accessRule's in my mobile-config as I was trying stuff and it seems like last one wins.
@martijnwalraven Not overriding config.xml fixed that issue, however when I actually run the app, it is stuck on the splash screen (no errors in xcode console), and the Safari inspector only registers an about:blank target, rather than the usual index.html. Any thoughts would be very much appreciated.
UPDATE: Just tested with brand new meteor create project, with the same result. Leads me to think the issue is potentially with XCode