onGetLiveRoomInfoDone returns NSString instead NSDictionary

+1 vote

-(void)onGetLiveRoomInfoDone:(LiveRoomInfoEvent*)event

{

NSLog(@"Joined Users= %@",event.joinedUsers);

NSLog(@"Room Properites = %@",event.properties);

}

I am using iOS sdk. In above method, event.properties type is NSDictionary but when i print the data it shows me String value. I also confirmed the data type which shows me NSString which causes the crash in this method when i transfer the properties to my local dictionary variable.

 

asked Mar 20, 2014 in AppWarp by nilesh (109 points)

1 Answer

+1 vote
Thanks for reporting - there was an issue in our event parsing code whose fix has been inciuded in our latest iOS SDK update. Please pick it up from our git repo.

https://github.com/shephertz/AppWarp_iOS_SDK_Framework/tree/master/V_1.5.2
answered Mar 20, 2014 by nitin.gupta (58 points)
i integrated this new updated sdk. still it returns the string instead of dictionary.
http://imgur.com/1gEJWEp
Hi Nilesh,

Looks like your xcode project still have the cached build of the previous framework.

We have tested framework based on your query. We found onGetLiveRoomInfoDone event.properties is working fine i.e its NSDictionary Class type.

Could you please try out following steps:

1.Choose Window/Organizer from the top menu.
2.Click "Projects" pseudo-tab-thing, along the top of organizer window (icon looks like an XCode project file".
3.Select the project from the list on the left.
4.Click "Delete" next to "Derived Data" in the area immediately below the project info header.

Hope this will fix the issue, Feel free for further assistance.

Moreover, we are going to introduce version logs in forthcoming framework that will print framework version detail with initialization.
I did clean build folder and delete derive data. Still it shows me the same thing :(
Looks like some calling flow related issues are there. No problem, Please try out new update sample code for your quick reference.(Link below)

https://github.com/shephertz/AppWarp_iOS_SDK_Framework/tree/master/Sample

Hope it will help you out.
hi nitin, its working in the sample. I am looking at my code and update you. BTW thanks for the sample and help so far. Keep up the good work :)
nitin, can you please look at the "createTurnRoomWithRoomName:" method. I am using this method to create room. Properties are returning as NSDictionary in your sample using "createRoomWithRoomName" but not in my case using "createTurnRoomWithRoomName:".
Hi Nilesh,

Apologies for late response, I have been test many time for createTurnRoomWithRoomName and every time i found properties have  NSDictionary return type.

The only thing we could do is, please do share you code snippet "createTurnRoomWithRoomName" call.

For your quick refer my debug area output is below:
     2014-03-22 23:08:26.327 AppWarp_iOS_Sample[6845:70b] room id = 1577312805
    2014-03-22 23:08:46.462 AppWarp_iOS_Sample[6845:70b] joined users array =           (
)
    2014-03-22 23:08:48.280 AppWarp_iOS_Sample[6845:70b] Got live info for room id 1577312805
    2014-03-22 23:08:49.921 AppWarp_iOS_Sample[6845:70b] joined users=(
)
    (lldb) po [event.properties class]
    __NSCFDictionary
    2014-03-22 23:09:50.881 AppWarp_iOS_Sample[6845:70b] properties = {
          HIey = Hey;
          HelloKey = Hello;
          Hi = Hi;
       }
      2014-03-22 23:09:57.166 AppWarp_iOS_Sample[6845:70b] lockPropeties = {
      }
Hi Nitin, Thanks for your efforts. Here is my code.

-(void) createTurnBaseRoom
{
    
    NSString game = @"Apple";
        NSDictionary *properties = @{                                 
                                 @"host":[self getUsername],                                 
                                 @"gamename":game,
                                 };
    

        [[WarpClient getInstance] createTurnRoomWithRoomName:@"testRoom1234567890"
                                               roomOwner:[self getUsername]
                                              properties:properties
                                                maxUsers:MAX_USERS
                                           turnExpiresIn:TURN_TIME];
}
-(void) onCreateRoomDone:(RoomEvent*)roomEvent
{
    [[WarpClient getInstance] getLiveRoomInfo:roomEvent.roomData.roomId];
}

// After Calling Get Live Room Info event...
-(void)onGetLiveRoomInfoDone:(LiveRoomInfoEvent*)event
{
    NSLog(@"Get Live Room Info Joined Users= %@",event.joinedUsers);
    NSLog(@"Get Live Room Info Room Properites = %@",event.properties);
}    
   
Here i am getting string type properties. BTW i have converted into NSDictionary for now. I tried cleaning xcode derived data and clean build but no luck.
Hi Nilesh,

As detailed above I have create a  new sample for your quick reference.Hope this will help you out. In case you have any query please do let me know with more detail.

Please do refer Link: https://github.com/NitinGShephertz/AppWarpiOSTests

However its working fine here. In case you are getting same issue please share some more detail to narrowing the issue.
Thanks Nitin. Its perfectly working in your demo. I will post  here if i found something.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...