Notification plugin ios problem

I added next code to delegate file in xcode:
 

- (void)application:(UIApplication \*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData\*)deviceToken { NSLog(@"My token is: %@", deviceToken); }

 
When I tap on circle in console I see
 

My token is: \<fdc49bc4 0f5cc67b ...\>

It means that device is got token. However, onNotification event in Runtime:addEventListener(‘notification’, onNotification) doesn’t work.

You’re kind of getting over my expertise level with this.  Engineering will need to see your project so the best thing to do is to make a simple project that is focused on the problem at hand.  CTRL-Click on the folder and choose Compress this will produce a .zip file.  Use the “Report a Bug” link at the top of the page.  Provide clear language as to what the problem is and what the desired result it.   Also make sure the project you submit is one they can double click on the project file and hit run and see the problem  Include all necessary resources including config.lua.

When you file the bug report you will get an email with a Case ID # in it.  Please post that number back here for reference.  When I have that number, I’ll ask the engineers to look at it.

Thanks

Rob

Case 40448

Thanks

Anton

Engineering is wanting to know a bit more about your app and the things you’ve tried.  They want a fuller picture of whats going on.

What are you using for an push provider?  Are you using something like PushWoosh?  Have you set the Lua side up like listed in our guide:  http://docs.coronalabs.com/guide/events/appNotification/index.html ??

Can we see your actual, working Lua code?  You say you have it working, but the code you posted appears to be from the Enterprise sample.  The sample in the repo is for testing the repo, not for production use.  The code in the guide is a better representation of what should be happening on the Lua side.

Rob

Maybe Notification event doesn’t work because I use it in development mode? Maybe should use it in Ad Hoc mode?

Now I try to build my app & I get next error in xcode: Lipo error: can’t open input file: …

Also I have error:

... /Users/komkov/Documents/Applications/myApp/ios/CoronaEnterprise/Corona/ios/lib/libplayer.a(Rtt\_CameraPaint.o) ld: 210 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

If I remove libnotifications.a library from my project build is successful.

Any ideas?

I have the same problem…

I resolved problem with libplayer.a library. You need remove this from Linked Frameworks and Libraries and add again from Applications/CoronaEnterprise/Corona/ios/lib/

But Notifications event doesn’t work in Ad Hoc mode too.

Any ideas?

Thanks, Anton. I did that as you said, the “duplicate symbols” error no longer occur.

and this problem has occured in v2015.2618 or later. I don’t have any other choice so I’m using v2015.2617 :frowning:

It should work in AdHoc mode.  Personally I’ve never had much luck using the sandbox test platform.  I just use the production servers, it’s not like you’re going to generate a ton of test messages or annoy users… at least not until you go live.

Rob

So, I downloaded the documentation and found something. The documentation I have downloaded contains one key point — build.settings file should contain:
[lua]settings =
{
    iphone =
    {
        plist =
        {
            CoronaDelegates = { “CoronaNotificationsDelegate” }
        },
    },
} [/lua]
 
I added these lines and Notifications event has earned for iOS. For Android Notifications event still does not working.

Why is it?
 
 
 
However, the latest version of the Corona Enterprise does not build iOS application with architecture arm64. On the advice of nappa I downloaded version 2015.2617 and building successful.