質問

I want to set my iOS app to send PushNotification.

I tried UrbanAirship, but this one is not compatible with ARC.

So i tried to find one in GitHub to install in my host. But i didn't find.

Does anyone meet a Push Notification Provider?

役に立ちましたか?

解決

Just because the UA library isn't ARC compatible doesn't mean you cannot use it in your project.

Did you follow the instructions here

It doesn't look like there is anything special to do to use this static library they provide.

Update

If you download and include the latest library UA provides and drop that into your project, ARC complains about the samle UI stuff they include. Just delete those if you are not using them. Then it compiles just fine.

他のヒント

I am not familiar with UA so much but, you can do one of the two things in order to solve the issue:

  • Add the UA Classes and make them unARC, put in the settings->Build Phases->Compile sources, the flag: -fno-objc-arc
  • create a provider with a web service. You can follow the article how to create a web service in Ray Articles
 [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
 [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

this code implement in appdelegate first method.

Use this code for get pushnotification

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top