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

Add optional page_type parameter to ParselyMetadata class in iOS SDK #90

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

MartinAkram
Copy link
Member

@MartinAkram MartinAkram commented Jan 17, 2024

⁉️ What ⁉️

This PR adds a new optional parameter, page_type, to the ParselyMetadata class in the iOS SDK. This is being done in response to a client question/request (see linked issue below).

Companion Android SDK PR: Parsely/parsely-android#102

Screenshot 2024-01-18 at 10 59 02 AM

🤔 Why 🤔

Resolves https://github.com/Parsely/web/issues/13450

✔️ TODOs ✔️

  • Attend Chris' office hours to figure out how to test this change
  • Get an understanding of how our iOS SDK releases are handled before getting this PR merged

@MartinAkram MartinAkram changed the title Add optional page_type parameter to ParselyMetadata for iOS SDK Add optional page_type parameter to ParselyMetadata class in iOS SDK Jan 17, 2024
@MartinAkram MartinAkram requested review from HelioMesquita and cwisecarver and removed request for HelioMesquita January 18, 2024 16:00
@MartinAkram
Copy link
Member Author

@cwisecarver I updated the Demo App and built the simulator for iPhone 15 and confirmed ParselyMetadata has the new field as expected (screenshot attached). Do you recommend I do any further testing here? Thanks so much for your help

Copy link
Contributor

@cwisecarver cwisecarver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I'd be very tempted, if I were the one doing this, to include all the fields supported by the ParselyUtils metadata class just to get ahead of future requests like this, but if you want to merge this and create a new issue to add the rest of them to both SDKs that's fine too. I just figured getting to grips with the tooling of both SDKs for the time would make adding N fields about the same amount of work as adding one field.

@MartinAkram
Copy link
Member Author

@cwisecarver I added the remaining metadata types. Do you mind re-reviewing? I'm pretty sure I got the types right, but a second set of eyes would be great. Thanks so much!

@@ -3,42 +3,123 @@ import Foundation
public class ParselyMetadata {
var canonical_url: String?
var pub_date: Date?
var save_date: Date?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, @MartinAkram, my suggestion here was terribly unspecific. Let's drop save_date, custom_metadata, save_date_tmsp, pub_date_tmsp, urls, full_content_word_count, data_source, canonical_hash, canonical_hash64, video_platform, full_content, full_content_sha512, network_id_str, and content_enrichments. Those are all either internal fields that we generate ourselves or they're impractical to send in a pixel like full_content. Sorry for the wasted effort because of my lack of specificity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get more information about expected types here where the code lives for parsing in-px metadata.

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

Successfully merging this pull request may close these issues.

3 participants