iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
txx
V2EX  ›  iDev

微信的自启动

  •  
  •   txx ·
    rpplusplus · Dec 9, 2012 · 9500 views
    This topic created in 4929 days ago, the information mentioned may be changed or developed.
    今天发现用第三方的软件扫微信二维码后 弹出一个链接
    然后打开链接之后 微信就自动启动了。

    这是怎么做到的?

    于是好奇的去抓了一下包
    request:http://weixin.qq.com/r/Zfvm6bzEeYIGh62Kn65B (我的微信)

    response:
    <!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=gb2312"/></head><body><script>
    window.location = "weixin://qr/Zfvm6bzEeYIGh62Kn65B";

    setTimeout( function(){ window.location="http://weixin.qq.com/cgi-bin/readtemplate?check=false&t=weixin_getdownurl_sms&s=download&from=100&stype=10037102"; } , 1500);
    </script></body></html>


    虽说意思看懂了 但是还是不知道这是怎么实现的?
    难道是iOS6的新功能?
    谁能来解释下么?
    13 replies    1970-01-01 08:00:00 +08:00
    RelativeLayout
        2
    RelativeLayout  
       Dec 9, 2012
    weixin://qr/Zfvm6bzEeYIGh62Kn65B 这个链接很重要~
    txx
        3
    txx  
    OP
       Dec 9, 2012
    @RelativeLayout 那岂不是要抢注字符串了? 苹果对这个的审核是不是有要求啊。。
    RelativeLayout
        4
    RelativeLayout  
       Dec 9, 2012
    @txx 没必要抢注啊~ 目测没啥要求~
    txx
        5
    txx  
    OP
       Dec 9, 2012
    @RelativeLayout 那我也弄了个叫做weixin的怎么办..... 感觉这个略奇葩呢。。
    anyforever
        6
    anyforever  
       Dec 9, 2012
    @txx 迅雷下载之类的,不都有过这种形式的链接么?
    txx
        7
    txx  
    OP
       Dec 9, 2012
    @anyforever 迅雷有iphone版本么?不说pc 说的是iOS啊
    anyforever
        8
    anyforever  
       Dec 9, 2012
    @txx 原理不知道是不是雷同,形式上是一样的
    Mutoo
        9
    Mutoo  
       Dec 9, 2012
    @txx 在 Android 上,如果两个APP能关注同一种协议比如:weixin:// 那么会弹出一个列表,让你选一个应用打开它,也可以将这个应用设置成默认应用。
    txx
        10
    txx  
    OP
       Dec 9, 2012
    @Mutoo 苹果没这个选项吧
    loveminds
        11
    loveminds  
       Dec 10, 2012
    weixin:// 靠的是这个类似tencent://或者msnim:
    chyiz
        12
    chyiz  
       Dec 10, 2012
    @txx 没必要抢注吧,这个地址一般又不需要暴露给用户。随便取成什么都无所谓啊。
    txx
        13
    txx  
    OP
       Dec 10, 2012   ❤️ 1
    @chyiz 但是开发者们....例如大伙儿都用了calendar:// 怎么办?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1128 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 18:06 · PVG 02:06 · LAX 11:06 · JFK 14:06
    ♥ Do have faith in what you're doing.