package main import ( "fmt" "github.com/aliyun/alibaba-cloud-sdk-go/services/push" ) func main() { // 推送app消息 client, err := push.NewClientWithAccessKey("cn-hangzhou", "LTAI4FdQeNMQXRU6u5J3EFQc", "PwvyF5rRNBWLDya41WrCpvENevYZGi") request := push.CreatePushNoticeToiOSRequest() request.ApnsEnv = "DEV" request.AppKey = "28332889" request.Scheme = "https" request.Target = "DEVICE" request.TargetValue = "30076ed6fdb740e49d882433931bc34a" request.Title = "消息测试1" request.Body = "消息测试2" response, err := client.PushNoticeToiOS(request) if err != nil { fmt.Print(err.Error()) } fmt.Printf("response is %#v\n", response) }