Skip to content

Commit

Permalink
Adds use_frameworks and updates build to compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcapps committed Jan 7, 2016
1 parent cdae103 commit 35a6c79
Show file tree
Hide file tree
Showing 93 changed files with 1,976 additions and 1,403 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,4 @@
// Use this file to import your target's public headers that you would like to expose to Swift.
//

#import <NYTPhotoViewer/NYTPhoto.h>
#import <NYTPhotoViewer/NYTPhotosViewController.h>

// For Unit Tests
#import <NYTPhotoViewer/NYTPhotoViewController.h>
#import <NYTPhotoViewer/NYTPhotosDataSource.h>
#import <NYTPhotoViewer/NYTScalingImageView.h>
#import <NYTPhotoViewer/NYTPhotoCaptionView.h>
#import <NYTPhotoViewer/NYTPhotosOverlayView.h>
#import <NYTPhotoViewer/NYTPhotoTransitionAnimator.h>
@import NYTPhotoViewer;
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ class NYTPhotosOverlayViewTests: XCTestCase {
let overlayView = NYTPhotosOverlayView()
let titleTextAttributes = [NSForegroundColorAttributeName: UIColor.orangeColor()]
overlayView.titleTextAttributes = titleTextAttributes
XCTAssertEqual(titleTextAttributes, overlayView.navigationBar.titleTextAttributes as? [String: UIColor])
XCTAssertEqual(titleTextAttributes, overlayView.navigationBar.titleTextAttributes as! [String: UIColor])
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ class NYTPhotosViewControllerTests: XCTestCase {
}

func testPageViewControllerDoesNotHaveAssociatedSuperviewBeforeViewLoads() {
XCTAssertNil(photosViewController?.pageViewController.view.superview)
XCTAssertNil(photosViewController?.pageViewController?.view.superview)
}

func testPageViewControllerHasAssociatedSuperviewAfterViewLoads() {
photosViewController?.view = photosViewController?.view // Referencing the view loads it.
XCTAssertNotNil(photosViewController?.pageViewController.view.superview)
XCTAssertNotNil(photosViewController?.pageViewController?.view.superview)
}

func testCurrentlyDisplayedPhotoIsFirstAfterConvenienceInitialization() {
Expand Down
23 changes: 1 addition & 22 deletions Example/NYTPhotoViewer-SwiftTests/NYTScalingImageViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,8 @@ import XCTest
class NYTScalingImageViewTests: XCTestCase {

func testInitializationAcceptsNil() {
let scalingImageView = NYTScalingImageView(image: nil, frame: CGRectZero)
let scalingImageView = NYTScalingImageView(image: UIImage(), frame: CGRectZero)
XCTAssertNotNil(scalingImageView)
}

func testImageViewExistsAfterInitialization() {
let scalingImageView = NYTScalingImageView(image: nil, frame: CGRectZero)
XCTAssertNotNil(scalingImageView.imageView);
}

func testInitializationSetsImage() {
let image = UIImage()
let scalingImageView = NYTScalingImageView(image: nil, frame: CGRectZero)
if let scalingImage = scalingImageView.imageView.image {
XCTAssertEqual(image, scalingImage)
}
}

func testUpdateImageUpdatesImage() {
let image2 = UIImage()

let scalingImageView = NYTScalingImageView(image: nil, frame: CGRectZero)
scalingImageView.updateImage(image2)

XCTAssertEqual(image2, scalingImageView.imageView.image!)
}
}
32 changes: 16 additions & 16 deletions Example/NYTPhotoViewer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
2F40CA9E9C3BF87C3A2E7371 /* libPods-Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0518CF94C70235B2A2B07D /* libPods-Tests.a */; };
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
Expand All @@ -22,6 +21,7 @@
6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
727A1DAD935B56DB6C8227AE /* Pods_NYTPhotoViewer_SwiftTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AF97CEAAC55890ECBBC5E10 /* Pods_NYTPhotoViewer_SwiftTests.framework */; };
8C2AB3F31ABDF266004A2BBA /* NYTPhotosDataSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C2AB3F21ABDF266004A2BBA /* NYTPhotosDataSourceTests.swift */; };
8C2AB3F51ABDF959004A2BBA /* NYTPhotosViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C2AB3F41ABDF959004A2BBA /* NYTPhotosViewControllerTests.swift */; };
8C4464E51ABCA3BA00BD79F1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C4464E41ABCA3BA00BD79F1 /* AppDelegate.swift */; };
Expand All @@ -40,8 +40,8 @@
8CD283E61ABE6F6600ADD109 /* NYTPhotoTransitionAnimatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CD283E51ABE6F6600ADD109 /* NYTPhotoTransitionAnimatorTests.swift */; };
934B3EA91BD54CE400953DC1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; };
934B3EAA1BD54CE400953DC1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; };
94195E1720FF535F0D8447E6 /* libPods-NYTPhotoViewer-SwiftTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03C738E753BE4DA373A7BC05 /* libPods-NYTPhotoViewer-SwiftTests.a */; };
955BE815A0B486203B80D541 /* libPods-NYTPhotoViewer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1477DE9B8584BD5335F644E1 /* libPods-NYTPhotoViewer.a */; };
ACEDE711B085DEB10C84FFD7 /* Pods_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3BADA35F1E8E10BF1DE64B1 /* Pods_Tests.framework */; };
B007EDFFE18E60A8A87B8DBB /* Pods_NYTPhotoViewer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0630CEA34C812DCFA09847E6 /* Pods_NYTPhotoViewer.framework */; };
B5B252E11A8BE10B00E9973E /* NYTExamplePhoto.m in Sources */ = {isa = PBXBuildFile; fileRef = B5B252E01A8BE10B00E9973E /* NYTExamplePhoto.m */; };
B5DC9D821A9D04D300F4F81F /* NYTPhotosViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B5DC9D811A9D04D300F4F81F /* NYTPhotosViewControllerTests.m */; };
B5DC9D831A9D062900F4F81F /* NYTExamplePhoto.m in Sources */ = {isa = PBXBuildFile; fileRef = B5B252E01A8BE10B00E9973E /* NYTExamplePhoto.m */; };
Expand All @@ -51,11 +51,11 @@
B5DC9D8F1A9F776100F4F81F /* NYTScalingImageViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B5DC9D8E1A9F776100F4F81F /* NYTScalingImageViewTests.m */; };
B5DC9D911A9F793200F4F81F /* NYTPhotoTransitionAnimatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B5DC9D901A9F793200F4F81F /* NYTPhotoTransitionAnimatorTests.m */; };
B5DC9D9A1A9FB0C000F4F81F /* NYTPhotosDataSourceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B5DC9D991A9FB0C000F4F81F /* NYTPhotosDataSourceTests.m */; };
C2764961179EFD3A4397B4F6 /* libPods-NYTPhotoViewer-Swift.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C25ACCAFE75703E4107C21D /* libPods-NYTPhotoViewer-Swift.a */; };
EC1B97111BA675DC00C9C9FD /* giphy.gif in Resources */ = {isa = PBXBuildFile; fileRef = EC1B97101BA675DC00C9C9FD /* giphy.gif */; };
EC1B97121BA675DC00C9C9FD /* giphy.gif in Resources */ = {isa = PBXBuildFile; fileRef = EC1B97101BA675DC00C9C9FD /* giphy.gif */; };
EC1B97131BA67E6700C9C9FD /* giphy.gif in Resources */ = {isa = PBXBuildFile; fileRef = EC1B97101BA675DC00C9C9FD /* giphy.gif */; };
EC1B97141BA67E6700C9C9FD /* giphy.gif in Resources */ = {isa = PBXBuildFile; fileRef = EC1B97101BA675DC00C9C9FD /* giphy.gif */; };
F2B65D2CC4E61DBAB5914F6F /* Pods_NYTPhotoViewer_Swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6700A096229CD4DE2556A2AD /* Pods_NYTPhotoViewer_Swift.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -76,12 +76,10 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
03C738E753BE4DA373A7BC05 /* libPods-NYTPhotoViewer-SwiftTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NYTPhotoViewer-SwiftTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
0A0518CF94C70235B2A2B07D /* libPods-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
1477DE9B8584BD5335F644E1 /* libPods-NYTPhotoViewer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NYTPhotoViewer.a"; sourceTree = BUILT_PRODUCTS_DIR; };
0630CEA34C812DCFA09847E6 /* Pods_NYTPhotoViewer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NYTPhotoViewer.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1AF97CEAAC55890ECBBC5E10 /* Pods_NYTPhotoViewer_SwiftTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NYTPhotoViewer_SwiftTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2B5A126E4259A8AC43ECFF00 /* Pods-NYTPhotoViewer-Swift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NYTPhotoViewer-Swift.release.xcconfig"; path = "Pods/Target Support Files/Pods-NYTPhotoViewer-Swift/Pods-NYTPhotoViewer-Swift.release.xcconfig"; sourceTree = "<group>"; };
2CCEE123A4D8E6E9FA6992C0 /* Pods-NYTPhotoViewer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NYTPhotoViewer.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NYTPhotoViewer/Pods-NYTPhotoViewer.debug.xcconfig"; sourceTree = "<group>"; };
3C25ACCAFE75703E4107C21D /* libPods-NYTPhotoViewer-Swift.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NYTPhotoViewer-Swift.a"; sourceTree = BUILT_PRODUCTS_DIR; };
407458AAE4E06FB3C4F19653 /* Pods-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig"; sourceTree = "<group>"; };
434C752B69682345577D1401 /* Pods-NYTPhotoViewer-Swift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NYTPhotoViewer-Swift.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NYTPhotoViewer-Swift/Pods-NYTPhotoViewer-Swift.debug.xcconfig"; sourceTree = "<group>"; };
49CD4B2FD524DCA01A37028A /* Pods-NYTPhotoViewer-SwiftTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NYTPhotoViewer-SwiftTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-NYTPhotoViewer-SwiftTests/Pods-NYTPhotoViewer-SwiftTests.release.xcconfig"; sourceTree = "<group>"; };
Expand All @@ -105,6 +103,7 @@
6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
6700A096229CD4DE2556A2AD /* Pods_NYTPhotoViewer_Swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NYTPhotoViewer_Swift.framework; sourceTree = BUILT_PRODUCTS_DIR; };
72DCB731DCC658F46D0B619E /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = "<group>"; };
8C2AB3F21ABDF266004A2BBA /* NYTPhotosDataSourceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NYTPhotosDataSourceTests.swift; sourceTree = "<group>"; };
8C2AB3F41ABDF959004A2BBA /* NYTPhotosViewControllerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NYTPhotosViewControllerTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -136,6 +135,7 @@
B5DC9D991A9FB0C000F4F81F /* NYTPhotosDataSourceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NYTPhotosDataSourceTests.m; sourceTree = "<group>"; };
C260A188D0E255B25171088B /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
C3A795E41A9CE3AA00A5AF55 /* NYTPhotoViewer.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = NYTPhotoViewer.podspec; path = ../NYTPhotoViewer.podspec; sourceTree = "<group>"; };
D3BADA35F1E8E10BF1DE64B1 /* Pods_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EC1B97101BA675DC00C9C9FD /* giphy.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = giphy.gif; sourceTree = "<group>"; };
FA400B174395C59C5DF305C6 /* Pods-NYTPhotoViewer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NYTPhotoViewer.release.xcconfig"; path = "Pods/Target Support Files/Pods-NYTPhotoViewer/Pods-NYTPhotoViewer.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand All @@ -148,7 +148,7 @@
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
955BE815A0B486203B80D541 /* libPods-NYTPhotoViewer.a in Frameworks */,
B007EDFFE18E60A8A87B8DBB /* Pods_NYTPhotoViewer.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -159,23 +159,23 @@
6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
2F40CA9E9C3BF87C3A2E7371 /* libPods-Tests.a in Frameworks */,
ACEDE711B085DEB10C84FFD7 /* Pods_Tests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8C4464DD1ABCA3BA00BD79F1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C2764961179EFD3A4397B4F6 /* libPods-NYTPhotoViewer-Swift.a in Frameworks */,
F2B65D2CC4E61DBAB5914F6F /* Pods_NYTPhotoViewer_Swift.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8C4464F11ABCA3BA00BD79F1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
94195E1720FF535F0D8447E6 /* libPods-NYTPhotoViewer-SwiftTests.a in Frameworks */,
727A1DAD935B56DB6C8227AE /* Pods_NYTPhotoViewer_SwiftTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -215,10 +215,10 @@
6003F58F195388D20070C39A /* CoreGraphics.framework */,
6003F591195388D20070C39A /* UIKit.framework */,
6003F5AF195388D20070C39A /* XCTest.framework */,
0A0518CF94C70235B2A2B07D /* libPods-Tests.a */,
1477DE9B8584BD5335F644E1 /* libPods-NYTPhotoViewer.a */,
3C25ACCAFE75703E4107C21D /* libPods-NYTPhotoViewer-Swift.a */,
03C738E753BE4DA373A7BC05 /* libPods-NYTPhotoViewer-SwiftTests.a */,
0630CEA34C812DCFA09847E6 /* Pods_NYTPhotoViewer.framework */,
6700A096229CD4DE2556A2AD /* Pods_NYTPhotoViewer_Swift.framework */,
1AF97CEAAC55890ECBBC5E10 /* Pods_NYTPhotoViewer_SwiftTests.framework */,
D3BADA35F1E8E10BF1DE64B1 /* Pods_Tests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down
2 changes: 2 additions & 0 deletions Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!

target 'NYTPhotoViewer', :exclusive => true do
pod "NYTPhotoViewer/AnimatedGifSupport", :path => "../"
end
Expand Down
10 changes: 5 additions & 5 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- FLAnimatedImage (1.0.8)
- FLAnimatedImage (1.0.10)
- NYTPhotoViewer/AnimatedGifSupport (0.1.2):
- FLAnimatedImage (= 1.0.8)
- FLAnimatedImage (~> 1.0.8)
- NYTPhotoViewer/Core
- NYTPhotoViewer/Core (0.1.2)
- OCMock (3.2)
Expand All @@ -12,11 +12,11 @@ DEPENDENCIES:

EXTERNAL SOURCES:
NYTPhotoViewer:
:path: "../"
:path: ../

SPEC CHECKSUMS:
FLAnimatedImage: f9422f796135aff80d8c00b2afc48015bb746e24
NYTPhotoViewer: e348bfa437398deb67a88b7928e85168ac38b5df
FLAnimatedImage: e16a1e1cef08e4c509b47e4acbe3923f65c16135
NYTPhotoViewer: 06876beb4c9bc6f10a59eb8b898c480fd89f7c51
OCMock: 28def049ef47f996b515a8eeea958be7ccab2dbb

COCOAPODS: 0.39.0
Loading

0 comments on commit 35a6c79

Please sign in to comment.