Note that there are some explanatory texts on larger screens.

plurals
  1. POAccessing GTLPlusActivity properties
    primarykey
    data
    text
    <p>I have integrated the Google Plus iOS SDK v1.2.1 into my iOS app. After authentication I am trying to fetch the user's activity feed. My code is the following:</p> <pre><code> GTLServicePlus* plusService = [[GTLServicePlus alloc] init]; [plusService setAuthorizer:[GPPSignIn sharedInstance].authentication]; plusService.retryEnabled = YES; GTLQueryPlus *query = [GTLQueryPlus queryForActivitiesListWithUserId:@"me" collection:kGTLPlusCollectionPublic]; [plusService executeQuery:query completionHandler:^(GTLServiceTicket *ticket, GTLPlusActivityFeed *data, NSError *error) { for (GTLPlusActivity *activity in data.items) { // ITERATE THROUGH THE ACTIVITIES NSString *publishedDate = activity.published; &lt;---- ERROR // "PROPERTY 'published' CANNOT BE FOUND // IN FORWARD CLASS OBJECT "GTLPLusActivity"" // WHY ARE THE VARIABLES SUCH AS published, placeName, // title, actor etc NOT ACCESSIBLE } }]; </code></pre> <p>I am able to successfully retrieve the posts of the user. The GTLPlusActivity class has many properties as shown in the image:</p> <p><img src="https://i.stack.imgur.com/sbwzA.png" alt="enter image description here"></p> <p>Whenever I try to access the properties using the "." operator such as "activity.actor" in the for loop, it gives the error <code>"Property 'actor' cannot be found in forward class object 'GTLPlusActivity'"</code>. Why am I unable to access the properties? I need to display them in a UITableView.</p> <p><strong>EDIT:</strong> Code Snapshot. Error clearly displayed in Red.</p> <p><img src="https://i.stack.imgur.com/oXaNt.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload