Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

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

Open
GoogleCodeExporter opened this issue Apr 13, 2015 · 0 comments
Open

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

GoogleCodeExporter opened this issue Apr 13, 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 jo.koth...@gmail.com on 29 Apr 2014 at 6:25

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

No branches or pull requests

1 participant