首先获取.p8
https://developer.apple.com/account
进入 Certificates, Identifiers & Profiles (左侧选择「Keys」)
右上角点「+」创建新 Key
选择这个Apple Push Notifications service (APNs)
然后就下载.p8 Key
在 Xcode 中:
File > Add Packages...
输入 URL: https://github.com/OneSignal/OneSignal-iOS-SDK
选择版本并添加到项目