Skip to content

Commit

Permalink
- Curations Photo Uplaod: Add in lat/long params for geo-tagging photos
Browse files Browse the repository at this point in the history
- Bump BVSDK version to 5.1.0
  • Loading branch information
Tim Kelly committed Nov 4, 2016
1 parent b110f43 commit 3f74c65
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 48 deletions.
2 changes: 1 addition & 1 deletion BVSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = "BVSDK"
s.version = '5.0.1'
s.version = '5.1.0'
s.homepage = 'https://developer.bazaarvoice.com'
s.license = { :type => 'Commercial', :text => 'See https://developer.bazaarvoice.com/API_Terms_of_Use' }
s.author = { 'Bazaarvoice' => '[email protected]' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -15,11 +16,10 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Zyd-9F-J6Z" customClass="BVCurationsCollectionView">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="fEl-xe-vYt">
<size key="itemSize" width="50" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
Expand All @@ -33,13 +33,12 @@
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</collectionViewCell>
</cells>
</collectionView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="Zyd-9F-J6Z" secondAttribute="trailing" constant="-20" id="Dog-y7-8uM"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="Zyd-9F-J6Z" secondAttribute="bottom" id="Giv-tg-iDM"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
Expand All @@ -14,11 +15,8 @@
<rect key="frame" x="0.0" y="0.0" width="250" height="200"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="WKq-gh-Tce">
<rect key="frame" x="0.0" y="0.0" width="250" height="200"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="WKq-gh-Tce"/>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<constraints>
<constraint firstAttribute="bottom" secondItem="WKq-gh-Tce" secondAttribute="bottom" id="2Kh-p0-8Fy"/>
Expand Down
6 changes: 3 additions & 3 deletions Examples/Curations/Obj-C/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- BVSDK/BVCurations (4.2.2):
- BVSDK/BVCurations (5.1.0):
- BVSDK/Core
- BVSDK/Core (4.2.2)
- BVSDK/Core (5.1.0)
- SDWebImage (3.7.6):
- SDWebImage/Core (= 3.7.6)
- SDWebImage/Core (3.7.6)
Expand All @@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:path: ../../../

SPEC CHECKSUMS:
BVSDK: 78e5a89a469cd87ffab6e63da5ed7358796a00f2
BVSDK: deb3f6dfd6842d57e2f2fe78365feaea5b69acaf
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9

PODFILE CHECKSUM: 861490fad65c8c2b6f41ebe6e5e30e85b782a193
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -15,12 +16,11 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="DN6-Jh-TXr" customClass="BVCurationsCollectionView">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="hfk-ih-xun">
<size key="itemSize" width="50" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
Expand All @@ -30,7 +30,7 @@
<cells/>
</collectionView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="DN6-Jh-TXr" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="topMargin" id="1Sc-bc-EPX"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="DN6-Jh-TXr" secondAttribute="bottom" id="6ne-6D-1Rl"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
Expand All @@ -14,11 +15,11 @@
<rect key="frame" x="0.0" y="0.0" width="250" height="200"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dRu-zm-7Hc">
<rect key="frame" x="0.0" y="0.0" width="250" height="200"/>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dRu-zm-7Hc">
<frame key="frameInset" width="250" height="200"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<connections>
<outlet property="feedImageView" destination="dRu-zm-7Hc" id="cdC-8h-C5W"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
super.viewWillLayoutSubviews()

let layout = (curationsCollectionView.collectionViewLayout) as! UICollectionViewFlowLayout
layout.itemSize = CGSizeMake(curationsCollectionView.bounds.height, curationsCollectionView.bounds.height)

layout.scrollDirection = UICollectionViewScrollDirection.Vertical
layout.itemSize = CGSizeMake(curationsCollectionView.bounds.width / 2, curationsCollectionView.bounds.width / 2)
layout.itemSize = CGSizeMake(curationsCollectionView.bounds.size.width / 2, curationsCollectionView.bounds.size.width / 2)

layout.minimumInteritemSpacing = 0
layout.minimumLineSpacing = 0
Expand Down
6 changes: 3 additions & 3 deletions Examples/Curations/Swift/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- BVSDK/BVCurations (4.2.2):
- BVSDK/BVCurations (5.1.0):
- BVSDK/Core
- BVSDK/Core (4.2.2)
- BVSDK/Core (5.1.0)
- SDWebImage (3.8.2):
- SDWebImage/Core (= 3.8.2)
- SDWebImage/Core (3.8.2)
Expand All @@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:path: ../../../

SPEC CHECKSUMS:
BVSDK: 78e5a89a469cd87ffab6e63da5ed7358796a00f2
BVSDK: deb3f6dfd6842d57e2f2fe78365feaea5b69acaf
SDWebImage: 098e97e6176540799c27e804c96653ee0833d13c

PODFILE CHECKSUM: 0e2a5addcaf7b532e1957c0c4fd55a1aaa08ebb8
Expand Down
4 changes: 2 additions & 2 deletions Pod/BVCommon/BVCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

/// Provides the master version of the SDK.

#define BV_SDK_VERSION @"5.0.1"
#define BV_SDK_VERSION @"5.1.0"

/// Conversation SDK Version
#define SDK_HEADER_NAME @"X-UA-BV-SDK"
#define SDK_HEADER_VALUE @"IOS_SDK_V501"
#define SDK_HEADER_VALUE @"IOS_SDK_V510"

/// Error domain for NSError results, when present.
#define BVErrDomain @"com.bvsdk.bazaarvoice"
Expand Down
6 changes: 3 additions & 3 deletions Pod/BVCurations/BVCurationsAddPostRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ NS_ASSUME_NONNULL_BEGIN
@property double unixTimeStamp;

/*! The longitude attributed to the post. */
//@property double longitude;
@property double longitude;

/*! The latitude attributed to the post. */
//@property double latitude;
@property double latitude;

/*! The UIImage asset to be uploaded to Curations */
@property UIImage *image;
Expand All @@ -114,4 +114,4 @@ NS_ASSUME_NONNULL_BEGIN

@end

NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
22 changes: 11 additions & 11 deletions Pod/BVCurations/BVCurationsAddPostRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ - (id)initWithGroups:(NSArray<NSString *>*)groups withAuthorAlias:(NSString *)al
_token = token;
_text = text;
_unixTimeStamp = 0;
// _latitude = 0;
// _longitude = 0;
_latitude = 0;
_longitude = 0;

_photos = [NSArray array];
_links = [NSArray array];
Expand Down Expand Up @@ -79,15 +79,15 @@ - (NSDictionary *)toDictionary {
[params setObject:[NSNumber numberWithDouble:self.unixTimeStamp]forKey:@"timestamp"];
}

// if (self.longitude != 0 && self.latitude != 0){
//
// NSNumber *longNum = [NSNumber numberWithDouble:self.longitude];
// NSNumber *latNum = [NSNumber numberWithDouble:self.latitude];
//
// NSDictionary *coordinatesDict = [NSDictionary dictionaryWithObjectsAndKeys:latNum, @"x", longNum, @"y", nil];
//
// [params setObject:coordinatesDict forKey:@"coordinates"];
// }
if (self.longitude != 0 && self.latitude != 0){

NSNumber *longNum = [NSNumber numberWithDouble:self.longitude];
NSNumber *latNum = [NSNumber numberWithDouble:self.latitude];

NSDictionary *coordinatesDict = [NSDictionary dictionaryWithObjectsAndKeys:latNum, @"x", longNum, @"y", nil];

[params setObject:coordinatesDict forKey:@"coordinates"];
}

if (self.links.count > 0){
NSMutableArray *linksArray = [NSMutableArray array];
Expand Down

0 comments on commit 3f74c65

Please sign in to comment.