Comments (17)
Is it only on IOS 9 ? Haven't tested it on this version yet, there might have been some changes in Safari.
Can you try running the code in an earlier version in the simulator ?
from node-deeplink.
Getting the same error on iOS 8.4 as well
from node-deeplink.
deeplink already exposes a middleware, so there's no need to save it to a var before and execute it.
try doing
exports.deeplink = deeplink({
fallback: 'http://' + req.headers.host,
ios_store_link: 'https://itunes.apple.com/us/app/cups-unlimited-coffee/id556462755?mt=8&uo=4',
});
see example here
https://github.com/mderazon/node-deeplink/blob/master/example/app.js
from node-deeplink.
No luck with that either. Same error.
from node-deeplink.
Is there any way we can have a callback with the inline html and from the controller response, send the html to client?
from node-deeplink.
Can you show me the complete code of what you're trying to do ? I could try and reproduce it
Also you could try and debug it in the simulator, you'll have to hook Safari debugger to the simulator (done in Safari menu somewhere) and put a breakpoint on the js code that runs on that page
from node-deeplink.
I don't think the javascript is going to the mobile client. All I can see is standardError.html. in the Safari debugger.
I am using the mean js boilerplate code. After the reset password token validation, a function checks if the reset link was clicked by iPad or iPhone and redirects them to the mobile deeplink which makes a get request to the deeplinked URL in the core server route.
function(err, user) {
var userAgent = req.headers['user-agent'];
if (userAgent !== null && (userAgent.indexOf('iPhone') > -1 || userAgent.indexOf('iPad') > -1) {
res.redirect('/deeplink?url=myapp%3A%2F%2Freset');
} else {
if (!user) {
return res.redirect('/#!/password/reset/invalid');
}
res.redirect('/#!/password/reset/' + req.params.token);
}
In my core server routes, there is wildcard route for deeplinks.
// Deeplinking into apps
app.route('/deeplink*').get(core.deeplink);
In the core server controller -
exports.deeplink = deeplink({
fallback: 'http://localhost:3000',
ios_store_link: 'https://itunes.apple.com/us/app/cups-unlimited-coffee/id556462755?mt=8&uo=4',
});
};
from node-deeplink.
If the page doesn't load then my guess is that something is wrong in the routing configuration.
Try logging the request going right before the deeplink middleware
// Deeplinking into apps
app.route('/deeplink*').get(function(req, res, next) {
console.log('here')
next()
}, core.deeplink);
Also, your fallback is defined as
http://localhost:3000
Do you have a route that listens there ?
Try changing it to something that you know is up like
http://google.com
from node-deeplink.
I don't think its a routing issue since I an able debug via the node inspector and see that the flow actually goes to the deeplink library and the javascript data to be inlined is constructed. After the inline html piping with response, I don't see any response body being constructed.
from node-deeplink.
Can you post a complete sample code ?
from node-deeplink.
Just uploaded the repo. I am directly hitting the url from from iOS simulator after running the server.
https://github.com/codebreaker01/Deeplink
from node-deeplink.
the problem is the the MEAN server messes with the header type and sets it to text/plain
instead of text/html
from node-deeplink.
try updating to v0.2.2 and see how it goes
from node-deeplink.
I updated the version. Now I am getting a different error. Was it working on the repo that I posted earlier?
from node-deeplink.
Do you have an app that can open the deep link ? Or can you try and open it in a real device ?
I think that you can't open itunes on the simulator
from node-deeplink.
Deeplinking and fallback to itunes both are working on a real device but deeplinking is not on simulator(though I have the app installed). Any reason why deeplinking isn't happening on simulator?
Btw, thanks for the prompt responses and getting this resolved. 👍
from node-deeplink.
Hmm, weird. Not sure why it doesn't work in the simulator. The fallback to itunes probably can't work there but not sure why it's not opening the app
from node-deeplink.
Related Issues (20)
- No longer working on Android marshmallow devices HOT 4
- How implement same model with node http end point HOT 6
- Struggling to get simple case working HOT 1
- Can not make it work HOT 4
- Better Android Intent url HOT 1
- Why sending url in params is require ? HOT 1
- not working with chrome & how the smart link work ? HOT 2
- Don't open playstore if app is not installed. HOT 1
- Please Verify My Code HOT 2
- Firefox on Android endless redirects HOT 1
- it doesn't work for me HOT 5
- Incorrect behaviour on ios devices HOT 1
- How to send fallback in queryparams HOT 2
- could not open page alert pops for couple of milliseconds before app store is opened on IOS HOT 2
- Critical security vulnerability in html-inline
- Endless redirection for android and IOS
- Problem loading deeplink in Chrome on IOS HOT 2
- depplink fails on ios 9
- fallback link on ios 9 shows "cannot open page" alert before going to app store HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-deeplink.