whde / Version

iOS软件检查更新,一行代码搞定,每次启动检测Appstore是否有更新,每一次更新只提醒一次
MIT License
36 stars 13 forks source link

你好,感谢分享。为什么我的appID替换后没有返回相应的版本信息呢 #1

Open DarrenXman opened 8 years ago

DarrenXman commented 8 years ago

只把demo里的appID换成我自己的了,其他的代码没有改动,返回不到App Store上的版本号,没有更新提示

whde commented 8 years ago

本地版本号是不是太大了

DarrenXman commented 8 years ago

appstore上是1.0 我测试的时候用的0.0.1没有更新提示

whde commented 8 years ago

你ID是多少

DarrenXman commented 8 years ago

1035505672

DarrenXman commented 8 years ago

谢谢你回复!

DarrenXman commented 8 years ago

测试的时候把demo的version改成0.1了

whde commented 8 years ago

{ "resultCount":0, "results": [] }

你的id回来是这个数据

whde commented 8 years ago

你的ID不对把? 你把AppStore上的链接发我看看

DarrenXman commented 8 years ago

是啊 ,我也纳闷,返回的没数据 https://appsto.re/cn/iajU9.i

whde commented 8 years ago

你把这句话改一下就可以了
NSURL *URL = [NSURL URLWithString:[NSString stringWithFormat:@"http://itunes.apple.com/lookup?id=%@",AppStore_ID]];

改成: NSURL *URL = [NSURL URLWithString:[NSString stringWithFormat:@"http://itunes.apple.com/cn/lookup?id=%@",AppStore_ID]];

DarrenXman commented 8 years ago

哦,好的,我试试哈。先谢谢你啦,感激!

DarrenXman commented 8 years ago

是的,好了。加上cn,,,什么原理呢?你是怎么察觉到的?好想知道。。。

whde commented 8 years ago

你AppStore上是有的, ID也是对的, 苹果不应该做这么烂把, 可能原因是发布地区有限制, 顺手加上了/cn/, 浏览器打开, 果然是有的, 具体原因不明白

DarrenXman commented 8 years ago

好的,谢谢啦,你的demo我可以用在更新版本的app上?

whde commented 8 years ago

可以

mouse-lin commented 8 years ago

@whde 是不是说明也有可能存在这样的问题,那就比较麻烦

whde commented 8 years ago

什么问题

whde commented 8 years ago

今天更新了个版本, 根据APP的BundleID去检查更新, 新版本是直接调用[VersionManager checkVersion]就可以集成

mouse-lin commented 8 years ago

http://itunes.apple.com/lookup?id=% 与 "http://itunes.apple.com/cn/lookup?id=% 需要地区这样的链接的问题 @whde

whde commented 8 years ago

这个没有去查具体什么原因,这个,只要集成的时候注意一下就OK了, 觉得这个问题不大

mouse-lin commented 8 years ago

好的,感谢

whde commented 8 years ago

不客气