MobiVM / robovm-robopods

55 stars 37 forks source link

Install firebase iOS messaging framework failed for gradle #44

Closed irina88 closed 7 years ago

irina88 commented 7 years ago

As per the readme instructions, I've added: compile "com.mobidevelop.robovm:robopods-google-mobile-ads-ios:$robopodsVersion" to my build.gradle but it yields this error: "Error:Failed to resolve: com.mobidevelop.robovm:robopods-firebase-ios-messaging:2.2.1"

Any ideas?

alex-dorokhov commented 7 years ago

I guess, the Firebase Robopod is not deployed to maven repo yet. For now you have to clone robopods github repo and install artifacts locally, like so:

cd robovm-robopods
mvn3 install -pl firebase/ios-messaging -am

Then you have to use version 2.2.2-SNAPSHOT for ios-messaging artifact in you project (instead of 2.2.1).

EDIT: or just try to use 2.2.2-SNAPSHOT right away without cloning the github repo locally (could be it works)

irina88 commented 7 years ago

Will do that, thank you!

irina88 commented 7 years ago

Tried using 2.2.2-SNAPSHOT and it's not working.

irina88 commented 7 years ago

Also setting a UNUserNotificationCenterDelegate for the currrentNotificationCenter yields a runtime error: "java.lang.ClassCastException: cannot be cast to org.robovm.objc.ObjCObject"

Update: I've created my own delegate extending NSObject and it works.

alex-dorokhov commented 7 years ago

That's right, you have to use NSObject as a base class for delegates. Sometimes (especially in robopods' bindings) there are *DelegateAdapter classes, which are inherited from NSObject for you.

So didn't you able to get rid of the original failure via installing the messaging robopod into the local maven repo (using the solution I had provided originally)?

irina88 commented 7 years ago

No, I've added the files manually to my project. And now I'm fighting the errors as they come. The current one is a failure to register for remote notifications: "didFailToRegisterForRemoteNotifications Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo={NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}"

irina88 commented 7 years ago

Managed to make it work. It just needed the entitlements.plist file with the push notifications capability enabled.

keesvandieren commented 7 years ago

Can this issue be closed now?

irina88 commented 7 years ago

Yes.

Sent from Yahoo Mail for iPhone

On Friday, September 22, 2017, 4:01 PM, Kees van Dieren notifications@github.com wrote:

Can this issue be closed now?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

keesvandieren commented 7 years ago

@piotrros, @Tom-Ski please close