Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return to the original app, not our "wechat share" app #3

Open
callzhang opened this issue Jan 13, 2016 · 9 comments
Open

Return to the original app, not our "wechat share" app #3

callzhang opened this issue Jan 13, 2016 · 9 comments
Assignees

Comments

@callzhang
Copy link
Owner

不知道你有什么好的办法,让“返回”的时候返回到原来的app,而不是我们的app
我的办法是记住当前app,当跳转回来的时候,再次进行二次跳转。

@magic-geng
Copy link
Collaborator

好的,今天我修改

@magic-geng magic-geng assigned callzhang and unassigned magic-geng Jan 14, 2016
@magic-geng
Copy link
Collaborator

二次跳转 也无法实现,因为分享完成之后是从微信跳转过来的,所以wechat share 拿到的是微信的openurl,无法获取用户app的openurl。

@callzhang
Copy link
Owner Author

需要在跳转前就拿到当前app的openurl,然后再跳回来的时候用。

@magic-geng
Copy link
Collaborator

鉴于很多同仁一再问起“ShareExtension 如何调起 Containing App?”这个问题,这里统一做个小结。
只有 Today Extension 才支持通过调用 -[NSExtensionContext openURL:completionHandler:] 访问 URL Scheme 链接打开 Containing App。
在 iOS 8.3 之前,Share/Action Extension 要想实现 URL Scheme,可通过创建一个 Sink UIWebVew (所谓“Sink”是指隐而不显,例如frame=CGRectZero)对 URL 进行 loadRequest 实现曲线救国。但是在 iOS 8.3 之后苹果在系统层面和评审阶段都枪毙了这种违规的做法。
根据苹果官方对 Share Extension 的原教旨,其被建议用于 Facebook/WeiBo 那种社交分享(social sharing websites)或 WeChat/WunderList 那种上传会话服务(upload services)场景,被设定(限定)在 Host App 弹出的模态窗口中轻量交互完成分享,不建议(禁止)调起 Containing App 这种大动作来完成分享任务!
答案:
1. 通过 ShareExtension 调起 Containing App 有违苹果官方规范,即使你调起了也通过不了评审,更何况它们已经在系统层面和技术层面屏蔽了这种行为!
2. ShareExtension 无法调起 Containing App
补充:ShareExtension无法调起Containing App 也就无法拿到 openurl 所以2次跳转无法实现

@callzhang
Copy link
Owner Author

你这篇文章想要说的和我们没有关系。container app就是wechat share的app。另外,建议以后多看英文资料,中文的资料很乱,前后矛盾,而且过时。看英文会节省查资料的时间。

@callzhang callzhang assigned magic-geng and unassigned callzhang Jan 20, 2016
@magic-geng
Copy link
Collaborator

ok 我再研究下

@caoer
Copy link
Collaborator

caoer commented Jan 21, 2016

@Geng5017034 引用的文字加引用,还有出处的链接。这点很重要, 比如这样:

鉴于很多同仁一再问起“ShareExtension 如何调起 Containing App?”这个问题,这里统一做个小结。
只有 Today Extension 才支持通过调用 -[NSExtensionContext openURL:completionHandler:] 访问 URL Scheme 链接打开 Containing App。
在 iOS 8.3 之前,Share/Action Extension 要想实现 URL Scheme,可通过创建一个 Sink UIWebVew (所谓“Sink”是指隐而不显,例如frame=CGRectZero)对 URL 进行 loadRequest 实现曲线救国。但是在 iOS 8.3 之后苹果在系统层面和评审阶段都枪毙了这种违规的做法。
根据苹果官方对 Share Extension 的原教旨,其被建议用于 Facebook/WeiBo 那种社交分享(social sharing websites)或 WeChat/WunderList 那种上传会话服务(upload services)场景,被设定(限定)在 Host App 弹出的模态窗口中轻量交互完成分享,不建议(禁止)调起 Containing App 这种大动作来完成分享任务!
答案:

  1. 通过 ShareExtension 调起 Containing App 有违苹果官方规范,即使你调起了也通过不了评审,更何况它们已经在系统层面和技术层面屏蔽了这种行为!
  2. ShareExtension 无法调起 Containing App

Ref: [1]

然后可以加上你的理解,研究,诠释等。 这样读的人可以更快和你建立相同或者不同的认识。

@magic-geng
Copy link
Collaborator

好的,以后注意

@caoer
Copy link
Collaborator

caoer commented Jan 21, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants