@@ -249,19 +249,59 @@ - (IBAction)oldShareLinkButtonTouchUpInside:(id)sender {
249249- (IBAction )shareLinkButtonTouchUpInside : (id )sender {
250250 // The new hotness.
251251
252+ BranchUniversalObject *buo = [BranchUniversalObject new ];
253+
254+ buo.contentMetadata .contentSchema = BranchContentSchemaCommerceProduct;
255+ buo.contentMetadata .quantity = 2 ;
256+ buo.contentMetadata .price = [NSDecimalNumber decimalNumberWithString: @" 23.20" ];
257+ buo.contentMetadata .currency = BNCCurrencyUSD;
258+ buo.contentMetadata .sku = @" 1994320302" ;
259+ buo.contentMetadata .productName = @" my_product_name1" ;
260+ buo.contentMetadata .productBrand = @" my_prod_Brand1" ;
261+ buo.contentMetadata .productCategory = BNCProductCategoryBabyToddler;
262+ buo.contentMetadata .productVariant = @" 3T" ;
263+ buo.contentMetadata .condition = BranchConditionFair;
264+
265+ buo.contentMetadata .ratingAverage = 5 ;
266+ buo.contentMetadata .ratingCount = 5 ;
267+ buo.contentMetadata .ratingMax = 7 ;
268+ buo.contentMetadata .addressStreet = @" Street_name1" ;
269+ buo.contentMetadata .addressCity = @" city1" ;
270+ buo.contentMetadata .addressRegion = @" Region1" ;
271+ buo.contentMetadata .addressCountry = @" Country1" ;
272+ buo.contentMetadata .addressPostalCode = @" postal_code" ;
273+ buo.contentMetadata .latitude = 12.07 ;
274+ buo.contentMetadata .longitude = -97.5 ;
275+ buo.contentMetadata .imageCaptions = (id ) @[@" my_img_caption1" , @" my_img_caption_2" ];
276+ buo.contentMetadata .customMetadata = (id ) @{
277+ @" Custom_Content_metadata_key1" : @" Custom_Content_metadata_val1" ,
278+ @" Custom_Content_metadata_key2" : @" Custom_Content_metadata_val2" ,
279+ @" ~campaign" : @" Parul's campaign"
280+ };
281+ buo.title = @" Parul Title" ;
282+ buo.canonicalIdentifier = @" item/12345" ;
283+ buo.canonicalUrl = @" https://branch.io/deepviews" ;
284+ buo.keywords = @[@" My_Keyword1" , @" My_Keyword2" ];
285+ buo.contentDescription = @" my_product_description1" ;
286+ buo.imageUrl = @" https://test_img_url" ;
287+ buo.expirationDate = [NSDate dateWithTimeIntervalSinceNow: 24 *60 *60 ];
288+ buo.publiclyIndex = NO ;
289+ buo.locallyIndex = YES ;
290+ buo.creationDate = [NSDate date ];
291+
252292 BranchLinkProperties *linkProperties = [[BranchLinkProperties alloc ] init ];
253293 linkProperties.feature = feature;
254294 linkProperties.campaign = @" sharing campaign" ;
255295
256296 BranchShareLink *shareLink =
257297 [[BranchShareLink alloc ]
258- initWithUniversalObject: self .branchUniversalObject
298+ initWithUniversalObject: buo
259299 linkProperties: linkProperties];
260300
261301 shareLink.title = @" Share your test link!" ;
262302 shareLink.delegate = self;
263303 shareLink.shareText = [NSString stringWithFormat:
264- @" Shared from Branch's Branch -TestBed at %@ ." ,
304+ @" Shared from Branch-TestBed at %@ ." ,
265305 [self .dateFormatter stringFromDate: [NSDate date ]]];
266306
267307 [shareLink presentActivityViewControllerFromViewController: self anchor: sender];
@@ -425,6 +465,7 @@ - (void) sendV2EventWithName:(NSString*)eventName {
425465 buo.contentMetadata .imageCaptions = (id ) @[@" my_img_caption1" , @" my_img_caption_2" ];
426466 buo.contentMetadata .customMetadata = (id ) @{
427467 @" Custom_Content_metadata_key1" : @" Custom_Content_metadata_val1" ,
468+ @" Custom_Content_metadata_key2" : @" Custom_Content_metadata_val2" ,
428469 @" ~campaign" : @" Parul's campaign"
429470 };
430471 buo.title = @" Parul Title" ;
@@ -433,10 +474,10 @@ - (void) sendV2EventWithName:(NSString*)eventName {
433474 buo.keywords = @[@" My_Keyword1" , @" My_Keyword2" ];
434475 buo.contentDescription = @" my_product_description1" ;
435476 buo.imageUrl = @" https://test_img_url" ;
436- buo.expirationDate = [NSDate dateWithTimeIntervalSince1970: ( double ) 212123232544.0 / 1000.0 ];
477+ buo.expirationDate = [NSDate dateWithTimeIntervalSinceNow: 24 * 60 * 60 ];
437478 buo.publiclyIndex = NO ;
438479 buo.locallyIndex = YES ;
439- buo.creationDate = [NSDate dateWithTimeIntervalSince1970: ( double ) 1501869445321.0 / 1000.0 ];
480+ buo.creationDate = [NSDate date ];
440481
441482 BranchEvent *event = [BranchEvent customEventWithName: eventName];
442483 event.transactionID = @" 12344555" ;
0 commit comments