Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0ad72bc0
由
cgx
编写于
2022-04-29 15:06:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
配置权限并打开微信登录
1 个父辈
c4697245
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
30 行增加
和
1 行删除
DreamSleep/DreamSleep/Basement/DSConfig/Info.plist
DreamSleep/DreamSleep/Basement/H5/DsWebController.m
DreamSleep/DreamSleep/Class/Start/Root/AppDelegate.m
DreamSleep/DreamSleep/Basement/DSConfig/Info.plist
查看文件 @
0ad72bc
...
@@ -2,6 +2,22 @@
...
@@ -2,6 +2,22 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<plist
version=
"1.0"
>
<dict>
<dict>
<key>
NSLocationUsageDescription
</key>
<string>
APP需要您的同意,才能访问位置信息
</string>
<key>
NSLocationAlwaysUsageDescription
</key>
<string>
App需要您的同意,才能始终访问位置信息
</string>
<key>
Privacy - Location Always and When In Use Usage Description
</key>
<string>
App需要您的同意,才能访问位置信息
</string>
<key>
NSLocationWhenInUseUsageDescription
</key>
<string>
APP需要您的同意,才能在使用时获取位置信息
</string>
<key>
NSFaceIDUsageDescription
</key>
<string>
APP需要您的同意,才能获取人脸识别权限
</string>
<key>
Privacy - Photo Library Additions Usage Description
</key>
<string>
APP需要您的同意,才能访问相册,以便于保存图片
</string>
<key>
Privacy - Photo Library Usage Description
</key>
<string>
APP需要您的同意,才能访问相册,以便于图片选取、上传
</string>
<key>
NSCameraUsageDescription
</key>
<string>
APP需要您的同意,才能使用摄像头,以便于相机拍摄,上传
</string>
<key>
CFBundleURLTypes
</key>
<key>
CFBundleURLTypes
</key>
<array>
<array>
<dict>
<dict>
...
...
DreamSleep/DreamSleep/Basement/H5/DsWebController.m
查看文件 @
0ad72bc
...
@@ -49,6 +49,11 @@
...
@@ -49,6 +49,11 @@
[
self
.
webView
removeObserver
:
self
forKeyPath
:
@"estimatedProgress"
];
[
self
.
webView
removeObserver
:
self
forKeyPath
:
@"estimatedProgress"
];
}
}
#pragma mark - 关闭侧滑
-
(
BOOL
)
enableInteractivePopGestureRecognizer
{
return
NO
;
}
#pragma mark - WKWebView的监听方法
#pragma mark - WKWebView的监听方法
-
(
void
)
observeValueForKeyPath
:
(
NSString
*
)
keyPath
ofObject
:
(
id
)
object
change
:
(
NSDictionary
<
NSKeyValueChangeKey
,
id
>
*
)
change
context
:
(
void
*
)
context
{
-
(
void
)
observeValueForKeyPath
:
(
NSString
*
)
keyPath
ofObject
:
(
id
)
object
change
:
(
NSDictionary
<
NSKeyValueChangeKey
,
id
>
*
)
change
context
:
(
void
*
)
context
{
if
([
keyPath
isEqualToString
:
@"estimatedProgress"
])
{
if
([
keyPath
isEqualToString
:
@"estimatedProgress"
])
{
...
...
DreamSleep/DreamSleep/Class/Start/Root/AppDelegate.m
查看文件 @
0ad72bc
...
@@ -90,10 +90,18 @@
...
@@ -90,10 +90,18 @@
}
}
// 微信和QQ完整版都需要开发者配置正确的Universal link和对应的Universal link系统回调,详情可以看文档
// 微信和QQ完整版都需要开发者配置正确的Universal link和对应的Universal link系统回调,详情可以看文档
// 实现改方法后,上面的application:openURL:options方法就不会执行
-
(
BOOL
)
application
:
(
UIApplication
*
)
application
continueUserActivity
:
(
NSUserActivity
*
)
userActivity
restorationHandler
:
(
void
(
^
)(
NSArray
<
id
<
UIUserActivityRestoring
>>
*
__nullable
restorableObjects
))
restorationHandler
{
-
(
BOOL
)
application
:
(
UIApplication
*
)
application
continueUserActivity
:
(
NSUserActivity
*
)
userActivity
restorationHandler
:
(
void
(
^
)(
NSArray
<
id
<
UIUserActivityRestoring
>>
*
__nullable
restorableObjects
))
restorationHandler
{
if
(
!
[[
UMSocialManager
defaultManager
]
handleUniversalLink
:
userActivity
options
:
nil
])
{
// 处理微信登录
if
([
userActivity
.
webpageURL
.
absoluteURL
.
absoluteString
containsString
:
@"login"
])
{
return
[
WXApi
handleOpenURL
:
userActivity
.
webpageURL
delegate
:
self
];
}
else
if
([[
UMSocialManager
defaultManager
]
handleUniversalLink
:
userActivity
options
:
nil
])
{
// 处理友盟分享
return
[[
UMSocialManager
defaultManager
]
handleOpenURL
:
userActivity
.
webpageURL
];
}
else
{
// 其他SDK的回调
// 其他SDK的回调
}
}
return
YES
;
return
YES
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论