6

手把手制作mobileconfig文件,在iphone上创建h5网页桌面图标

 3 years ago
source link: https://segmentfault.com/a/1190000038977316
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

1,下载mobileconfig文件制作工具

  • 下载地址: 点击关注公众号 ,回复 appicon , 获取工具的下载地址
  • 新建 配置描述文件,填写 通用 信息

iuAZ32u.png!mobile

  • 填写 Web Clip 信息

nyuqQvB.png!mobile

  • 点击菜单栏的导出,注意这里一定要选择 , 导出文件命名为 unsigned.mobileconfig

e63aQrZ.png!mobile

2,用免费域名的证书给mobieconfig文件签名

  • 签名需要3个文件

server.crt 服务器端用于签名的证书

server.key 服务器端用于签名的证书的秘钥

ca.crt 其他机构为服务器颁发的CA证书

  • 免费域名的证书申请成功之后会有两个文件(一个 .key , 一个 .pem ), 打开 .pem 文件, 提取信息:

前面的为 server.crt

-----BEGIN CERTIFICATE-----
server
-----END CERTIFICATE-----

后面的为 ca.crt

-----BEGIN CERTIFICATE-----
ca
-----END CERTIFICATE-----
  • 利用openssl签名
openssl smime -sign -in unsigned.mobileconfig -out signed.mobileconfig -signer server.crt -inkey server.key  -certfile ca.crt -outform der -nodetach
  • 签名成功之后将 signed.mobileconfig 文件制作成一个下载连接,用safari浏览器打开并允许,安装这个描述文件就可以了,再看桌面就会有一个图标

2Af26ju.png!mobile

觉得有用 ?喜欢就收藏,顺便点个赞吧,你的支持是我最大的鼓励!微信搜公众号 [ DX前端框架知识库 ],发现更多Vue, React, Flutter, Uniapp, Nodejs, Html/Css等前端知识和实战.

DX前端,分享前端框架知识库,文章详见: DX前端

RRjuuum.jpg!mobile


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK