Skip to content

Commit

Permalink
XCode 8 updates. All BVSDK Examples are using Swift 2.3, so adjust co…
Browse files Browse the repository at this point in the history
…mpiler options accordingly in Podfile.
  • Loading branch information
Tim Kelly committed Sep 13, 2016
1 parent 364ab71 commit b6443e0
Show file tree
Hide file tree
Showing 20 changed files with 97 additions and 48 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
language: objective-c
osx_image: xcode7.3
osx_image: xcode8
podfile: ./Tests/Podfile

git:
depth: 1

before_install:
# - gem update cocoapods --no-ri --no-rdoc
- gem install cocoapods -v '1.0.1'
- gem install xcpretty --no-ri --no-rdoc
- SIMULATOR_ID=$(xcrun instruments -s | grep -o "iPhone 6 (9.3) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$/\1/")
- SIMULATOR_ID=$(xcrun instruments -s | grep -o "iPhone 6 (10.0) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$/\1/")


script:
Expand Down
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 = '4.2.0'
s.version = '4.2.1'
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
6 changes: 3 additions & 3 deletions Examples/Advertising/Swift/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- BVSDK/BVAdvertising (4.1.0):
- BVSDK/BVAdvertising (4.2.1):
- BVSDK/Core
- BVSDK/Core (4.1.0)
- BVSDK/Core (4.2.1)
- FontAwesomeKit/Core (2.2.0)
- FontAwesomeKit/FontAwesome (2.2.0):
- FontAwesomeKit/Core
Expand All @@ -19,7 +19,7 @@ EXTERNAL SOURCES:
:path: ../../../

SPEC CHECKSUMS:
BVSDK: 5619fd07fac1705c309529783bde5f349d662449
BVSDK: fb8d0e2ed1646f3a1c14a09f8a00eb553ebc88fb
FontAwesomeKit: 025fd4dd1017fe4e3f8d47b03e024deedbb33cd4
Google-Mobile-Ads-SDK: 3c2a6656117989469bfe7645640aa1de024a4c6c
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.TargetedAdsDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
Expand All @@ -384,6 +385,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.TargetedAdsDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class NativeContentAdDemoViewController: UIViewController, GADNativeContentAdLoa

// configure our native content ad view with the given values, and display!

let contentAdView = NSBundle.mainBundle().loadNibNamed("NativeContentAdView", owner: nil, options: nil)[0] as! GADNativeContentAdView
let contentAdView = NSBundle.mainBundle().loadNibNamed("NativeContentAdView", owner: nil, options: nil)![0] as! GADNativeContentAdView

// Associate the app install ad view with the app install ad object.
// This is required to make the ad clickable.
Expand Down
8 changes: 8 additions & 0 deletions Examples/BVSDKDemo/BVSDKDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "BVSDKDemo/BVSDKDemo-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 2.3;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand Down Expand Up @@ -1562,6 +1563,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.BVSDKDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "BVSDKDemo/BVSDKDemo-Bridging-Header.h";
SWIFT_VERSION = 2.3;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand All @@ -1575,6 +1577,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.BVSDKDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BVSDKDemo.app/BVSDKDemo";
};
name = Debug;
Expand All @@ -1588,6 +1591,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.BVSDKDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BVSDKDemo.app/BVSDKDemo";
};
name = Release;
Expand All @@ -1600,6 +1604,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.BVSDKDemoUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_TARGET_NAME = BVSDKDemo;
};
name = Debug;
Expand All @@ -1612,6 +1617,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.BVSDKDemoUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_TARGET_NAME = BVSDKDemo;
};
name = Release;
Expand All @@ -1638,6 +1644,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.bazaarvoice.BVSDKDemo.BVSDK-Custom-Post-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -1664,6 +1671,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.bazaarvoice.BVSDKDemo.BVSDK-Custom-Post-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand Down
9 changes: 5 additions & 4 deletions Examples/BVSDKDemo/BVSDKDemo/BVSDKDemoActionController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,11 @@ public class BVSDKDemoActionController: ActionController<BVSDKDemoActionCell, St
path.addQuadCurveToPoint(CGPoint(x: 0, y: topSpace), controlPoint: CGPoint(x: frame.width/2, y: topSpace - diff))
path.closePath()

let context = UIGraphicsGetCurrentContext()
CGContextAddPath(context, path.CGPath)
UIColor.bazaarvoiceNavy().set()
CGContextFillPath(context)
if let context = UIGraphicsGetCurrentContext(){
CGContextAddPath(context, path.CGPath)
UIColor.bazaarvoiceNavy().set()
CGContextFillPath(context)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class BaseDemoComposeServiceViewController: SLComposeServiceViewController {
// sizing here is a little vodoo...cough...hacky
img.drawInRect(CGRectMake((size.width-size.height)/2, 0, size.height+20, size.height))
}
let image: UIImage = UIGraphicsGetImageFromCurrentImageContext()
let image: UIImage = UIGraphicsGetImageFromCurrentImageContext()!
UIGraphicsEndImageContext()
return image
}
Expand All @@ -98,10 +98,19 @@ class BaseDemoComposeServiceViewController: SLComposeServiceViewController {
func imageWithImage(image:UIImage, scaledToSize newSize:CGSize) -> UIImage{
UIGraphicsBeginImageContextWithOptions(newSize, false, 0.0);
image.drawInRect(CGRectMake(0, 0, newSize.width, newSize.height))
let newImage:UIImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return newImage

if let newImage:UIImage = UIGraphicsGetImageFromCurrentImageContext(){
UIGraphicsEndImageContext()
return newImage
} else {
// wasn't able to get graphics context to scale image
print("Error getting graphics context.")
UIGraphicsEndImageContext()
return image
}


}


}
}
12 changes: 12 additions & 0 deletions Examples/BVSDKDemo/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,15 @@ target 'BVSDKDemoUITests' do

end


post_install do |installer|
installer.pods_project.targets.each do |target|

target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3'
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
end

end
end

22 changes: 11 additions & 11 deletions Examples/BVSDKDemo/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ PODS:
- Bolts/AppLinks (1.8.4):
- Bolts/Tasks
- Bolts/Tasks (1.8.4)
- BVSDK (4.2.0):
- BVSDK/Core (= 4.2.0)
- BVSDK/BVAdvertising (4.2.0):
- BVSDK (4.2.1):
- BVSDK/Core (= 4.2.1)
- BVSDK/BVAdvertising (4.2.1):
- BVSDK/Core
- BVSDK/BVConversations (4.2.0):
- BVSDK/BVConversations (4.2.1):
- BVSDK/Core
- BVSDK/BVCurations (4.2.0):
- BVSDK/BVCurations (4.2.1):
- BVSDK/Core
- BVSDK/BVLocation (4.2.0):
- BVSDK/BVLocation (4.2.1):
- BVSDK/Core
- BVSDK/BVRecommendations (4.2.0):
- BVSDK/BVRecommendations (4.2.1):
- BVSDK/Core
- BVSDK/Core (4.2.0)
- BVSDK/Core (4.2.1)
- Crashlytics (3.7.2):
- Fabric (~> 1.6.3)
- Fabric (1.6.7)
Expand Down Expand Up @@ -82,7 +82,7 @@ DEPENDENCIES:

EXTERNAL SOURCES:
BVSDK:
:path: "../../"
:path: ../../
SDForms:
:branch: master
:git: https://github.com/austimkelly/SDForms.git
Expand All @@ -94,7 +94,7 @@ CHECKOUT OPTIONS:

SPEC CHECKSUMS:
Bolts: 8a7995239dbe724f9cba2248b766d48b7ebdd322
BVSDK: 01a40e535a958ecbc49d2fceebc0619c992d1f7e
BVSDK: fb8d0e2ed1646f3a1c14a09f8a00eb553ebc88fb
Crashlytics: 130ab943f8c78cda7a814b434f270b2e2c8a3cba
Fabric: caf7580c725e64db144f610ac65cd60956911dc7
FBSDKCoreKit: 6e020b5db0b5bd1e01f5fb0902131befd129a502
Expand All @@ -111,6 +111,6 @@ SPEC CHECKSUMS:
XLActionController: 97ed31237413db4d9401c6a559270f4d2b4de136
youtube-ios-player-helper: 21ab92db027c7ff86cb17a3843a3f6eafc8158d2

PODFILE CHECKSUM: 51f8c99171ed988ecd91fddd0a030ccc115e1dc1
PODFILE CHECKSUM: 14074dd889cd7492556f3c69a3f324d6897e95b0

COCOAPODS: 1.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.ConversationsExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
};
name = Debug;
};
Expand All @@ -421,6 +422,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.ConversationsExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
};
name = Release;
};
Expand Down
6 changes: 3 additions & 3 deletions Examples/Conversations/Swift/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- BVSDK/BVConversations (4.1.0):
- BVSDK/BVConversations (4.2.1):
- BVSDK/Core
- BVSDK/Core (4.1.0)
- BVSDK/Core (4.2.1)

DEPENDENCIES:
- BVSDK/BVConversations (from `../../../`)
Expand All @@ -11,7 +11,7 @@ EXTERNAL SOURCES:
:path: ../../../

SPEC CHECKSUMS:
BVSDK: 5619fd07fac1705c309529783bde5f349d662449
BVSDK: fb8d0e2ed1646f3a1c14a09f8a00eb553ebc88fb

PODFILE CHECKSUM: ff51a28f7873cf9d401e0c25277fa303397c7510

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.CurationsExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
};
name = Debug;
};
Expand All @@ -353,6 +354,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.CurationsExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
};
name = Release;
};
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.1.0):
- BVSDK/BVCurations (4.2.1):
- BVSDK/Core
- BVSDK/Core (4.1.0)
- BVSDK/Core (4.2.1)
- 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: 5619fd07fac1705c309529783bde5f349d662449
BVSDK: fb8d0e2ed1646f3a1c14a09f8a00eb553ebc88fb
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9

PODFILE CHECKSUM: 0e2a5addcaf7b532e1957c0c4fd55a1aaa08ebb8
Expand Down
6 changes: 3 additions & 3 deletions Examples/ProductRecommendations/Swift/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- BVSDK/BVRecommendations (4.1.0):
- BVSDK/BVRecommendations (4.2.1):
- BVSDK/Core
- BVSDK/Core (4.1.0)
- BVSDK/Core (4.2.1)
- HCSStarRatingView (1.4.5)
- SDWebImage (3.7.6):
- SDWebImage/Core (= 3.7.6)
Expand All @@ -17,7 +17,7 @@ EXTERNAL SOURCES:
:path: ../../../

SPEC CHECKSUMS:
BVSDK: 5619fd07fac1705c309529783bde5f349d662449
BVSDK: fb8d0e2ed1646f3a1c14a09f8a00eb553ebc88fb
HCSStarRatingView: bff3f89314d3b5013ce826ea11897d3129ff6b8c
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.RecommendationsExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
};
name = Debug;
};
Expand All @@ -353,6 +354,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bazaarvoice.RecommendationsExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
};
name = Release;
};
Expand Down
4 changes: 2 additions & 2 deletions Pod/BVCommon/BVCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#include "BVErrorCodeConstants.h"

/// Provides the master version of the SDK.
#define BV_SDK_VERSION @"4.2.0"
#define BV_SDK_VERSION @"4.2.1"

/// Conversation SDK Version
#define SDK_HEADER_NAME @"X-UA-BV-SDK"
#define SDK_HEADER_VALUE @"IOS_SDK_V420"
#define SDK_HEADER_VALUE @"IOS_SDK_V421"

/// Error domain for NSError results, when present.
#define BVErrDomain @"com.bvsdk.bazaarvoice"
Expand Down
2 changes: 2 additions & 0 deletions Tests/BVSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
Expand All @@ -679,6 +680,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
Expand Down
Loading

0 comments on commit b6443e0

Please sign in to comment.