做一個(gè)簡(jiǎn)單介紹,App Extensions Today是App的擴(kuò)展,應(yīng)用場(chǎng)景:改變消息推送view。
Today
Your apps can now display widgets in the Today view of Notification Center, providing quick updates or enabling brief tasks — for example, posting updates on package deliveries, the latest surf reports, or breaking news stories.
- 創(chuàng)建Today
*配置證書(shū)
添加App Group
點(diǎn)擊App IDs-->需要改變選項(xiàng)-->Eidt --> 選擇App Group
當(dāng)改變了App IDs時(shí) provisioning Profiles 的文件隨之也要改變
PS:記得下載更新
- 配置Xcode環(huán)境
到這一步,證書(shū)配置部分已經(jīng)完成,開(kāi)始Xcode配置
這里要配置兩個(gè)targets,一個(gè)是工程本身的target,另外一個(gè)則是添加進(jìn)來(lái)的today。
工程target如下圖所示:首先要找到項(xiàng)目中AppGroup的開(kāi)關(guān),將其打開(kāi)。會(huì)顯示你的上一步配置好的證書(shū),點(diǎn)擊勾選。
如果有報(bào)錯(cuò),說(shuō)明證書(shū)配置不正確。
Today target配置:與工程target配置是一樣的。區(qū)別在bundle ID上。要在原有的bundle ID后再添加一段后綴,如:com.xxx.yyy是bundle ID,那Today的bundle ID為com.xxx.yyy.zzz。.zzz為bundle ID的后綴,常用命名字母或數(shù)字或字母數(shù)字組合。
- 生產(chǎn)證書(shū)配置
已經(jīng)完成工程項(xiàng)目Group證書(shū)的配置,配置生產(chǎn)證書(shū)時(shí),要配置兩套。項(xiàng)目中有兩套bundle ID,故此我們要配置兩套生產(chǎn)證書(shū),有后綴bundle ID的證書(shū),另一套則是沒(méi)有后綴bundle ID的證書(shū)。
后續(xù)補(bǔ)上實(shí)現(xiàn)過(guò)程 O(∩_∩)O!