Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Urgent: idoubs Presence issue on iOS 7.x #175

Open
GoogleCodeExporter opened this issue May 4, 2015 · 0 comments
Open

Urgent: idoubs Presence issue on iOS 7.x #175

GoogleCodeExporter opened this issue May 4, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hi, 

We have connected sip on App Delegate didFinishLaunchingWithOptions method
Sip has connected without any problem.
Audio/Video calls,Chat,Presence publish things are working fine.
Get the Presence is also working fine on iOS 6.x.
But get the Presence is not working on iOS 7.x
Call back method OnSubscriptionEvent is not calling properly on iOS 7.x.
Need help for resolve this issue.
We have to deliver our project as soon as possible.
Everything is ready Except this presence issue.
Please help us If anyone have this problem and overcome with this issue.

Really appreciate if someone can help me quickly.

I have used below code for get the Presence

I have added the below code on viewWillAppear method of ViewController
[[NSNotificationCenter defaultCenter]
     addObserver:self selector:@selector(OnSubscriptionEvent:) name:kNgnSubscriptionEventArgs_Name object:nil];

I have added subscribe call on viewWillAppear method of ViewController
[[NgnSubscriptionSession createOutgoingSessionWithStack:[NgnEngine 
sharedInstance].sipService.stack
                                                                                                    andToUri:strToUri
                                                                                                  andPackage:EventPackage_PresenceList]] subscribe];
I have added Call Back Method OnSubscriptionEvent on View Controller
-(void) OnSubscriptionEvent:(NSNotification*)notification
{
    @try {
        NgnSubscriptionEventArgs* eargs = [notification object];
        NSLog(@"************>OnSubscriptionEvent() on appDelegate");

        // only process the event if it's ours

        switch (eargs.eventType)
        {
            case INCOMING_NOTIFY:
            {
                NSLog(@"************>INCOMING_NOTIFY on appDelegate:%@",eargs.content);
                NSString *string = [[NSString alloc] initWithData:eargs.content encoding:NSUTF8StringEncoding];
                NSLog(@"************>string on appDelegate:%@",string);
                if(string.length == 0)
                {

                }else{
                    xmlParser = [[NSXMLParser alloc]initWithData:eargs.content];
                    xmlParser.delegate = self;
                    [xmlParser parse];
                }
                break;
            }

            case SUBSCRIPTION_OK:
            {
                NSLog(@"************>SUBSCRIPTION_OK on appDelegate");


                break;
            }
            case SUBSCRIPTION_NOK:
            {
                NSLog(@"************>SUBSCRIPTION_NOK on appDelegate");

                break;
            }

            case SUBSCRIPTION_INPROGRESS:
            {
                NSLog(@"************>SUBSCRIPTION_INPROGRESS on appDelegate");
                break;
            }
            default:
            case UNSUBSCRIPTION_OK:
            case UNSUBSCRIPTION_NOK:
            case UNSUBSCRIPTION_INPROGRESS:
            {
                NSLog(@"************>UNSUBSCRIPTION_OK on appDelegate");


                break;
            }
        }

    }
    @catch (NSException *exception) {
        [Controller displayAlert:[NSString stringWithFormat:@"Error:%@",exception]];
    }

}

Original issue reported on code.google.com by [email protected] on 29 Apr 2014 at 6:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant