Skip to content

Commit

Permalink
use cocoapods in demo project
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Rymarz committed Apr 24, 2018
1 parent 52adb8e commit 3f249e2
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ playground.xcworkspace
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
Pods/

# Carthage
#
Expand Down
134 changes: 59 additions & 75 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,7 @@
0BBBF5F52088A4DB001F0C00 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0BBBF5F32088A4DB001F0C00 /* Main.storyboard */; };
0BBBF5F72088A4DC001F0C00 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0BBBF5F62088A4DC001F0C00 /* Assets.xcassets */; };
0BBBF5FA2088A4DC001F0C00 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0BBBF5F82088A4DC001F0C00 /* LaunchScreen.storyboard */; };
0BCE8460208F3732004CDF2D /* SnowflakesAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BCE845F208F3732004CDF2D /* SnowflakesAnimation.swift */; };
0BCE8462208F3865004CDF2D /* particle.png in Resources */ = {isa = PBXBuildFile; fileRef = 0BCE8461208F3865004CDF2D /* particle.png */; };
0BCE8464208F399A004CDF2D /* snowflake.png in Resources */ = {isa = PBXBuildFile; fileRef = 0BCE8463208F399A004CDF2D /* snowflake.png */; };
0BCE8466208F4096004CDF2D /* SnowflakeSpeed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BCE8465208F4096004CDF2D /* SnowflakeSpeed.swift */; };
0BDA574F2089DFF40037BD2C /* GlassBreakAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BDA57492089DFF40037BD2C /* GlassBreakAnimation.swift */; };
0BDA57502089DFF40037BD2C /* GlassPiece.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BDA574B2089DFF40037BD2C /* GlassPiece.swift */; };
0BDA57512089DFF40037BD2C /* GridSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BDA574C2089DFF40037BD2C /* GridSize.swift */; };
0BDA57522089DFF40037BD2C /* UIViewExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BDA574D2089DFF40037BD2C /* UIViewExtensions.swift */; };
0BDA57532089DFF40037BD2C /* ClosedRangeExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BDA574E2089DFF40037BD2C /* ClosedRangeExtension.swift */; };
14A6616B208BE2BB0081091A /* ExplosionAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A6616A208BE2BB0081091A /* ExplosionAnimation.swift */; };
14A6616D208BE3160081091A /* ExplosionPiece.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A6616C208BE3160081091A /* ExplosionPiece.swift */; };
CB0C9AC217021EE753317DAA /* Pods_Demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5CDB0AFC4DA0FC14477F12D /* Pods_Demo.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -33,24 +23,17 @@
0BBBF5F62088A4DC001F0C00 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
0BBBF5F92088A4DC001F0C00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
0BBBF5FB2088A4DC001F0C00 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0BCE845F208F3732004CDF2D /* SnowflakesAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnowflakesAnimation.swift; sourceTree = "<group>"; };
0BCE8461208F3865004CDF2D /* particle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = particle.png; sourceTree = "<group>"; };
0BCE8463208F399A004CDF2D /* snowflake.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = snowflake.png; sourceTree = "<group>"; };
0BCE8465208F4096004CDF2D /* SnowflakeSpeed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnowflakeSpeed.swift; sourceTree = "<group>"; };
0BDA57492089DFF40037BD2C /* GlassBreakAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlassBreakAnimation.swift; sourceTree = "<group>"; };
0BDA574B2089DFF40037BD2C /* GlassPiece.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlassPiece.swift; sourceTree = "<group>"; };
0BDA574C2089DFF40037BD2C /* GridSize.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GridSize.swift; sourceTree = "<group>"; };
0BDA574D2089DFF40037BD2C /* UIViewExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIViewExtensions.swift; sourceTree = "<group>"; };
0BDA574E2089DFF40037BD2C /* ClosedRangeExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClosedRangeExtension.swift; sourceTree = "<group>"; };
14A6616A208BE2BB0081091A /* ExplosionAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExplosionAnimation.swift; sourceTree = "<group>"; };
14A6616C208BE3160081091A /* ExplosionPiece.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExplosionPiece.swift; sourceTree = "<group>"; };
501CA1BA74B650FC230ECBAA /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig"; sourceTree = "<group>"; };
759A5F52598B5105D57B2ADA /* Pods-Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig"; sourceTree = "<group>"; };
A5CDB0AFC4DA0FC14477F12D /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
0BBBF5E92088A4DA001F0C00 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CB0C9AC217021EE753317DAA /* Pods_Demo.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -60,9 +43,10 @@
0BBBF5E32088A4DA001F0C00 = {
isa = PBXGroup;
children = (
0BDA57482089DFF40037BD2C /* Source */,
0BBBF5EE2088A4DA001F0C00 /* Demo */,
0BBBF5ED2088A4DA001F0C00 /* Products */,
6ADDBEB1CA1013AAF4F6DE72 /* Pods */,
F7D9ABAED30CD8E0E240D5BF /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -78,8 +62,6 @@
isa = PBXGroup;
children = (
0BBBF5EF2088A4DB001F0C00 /* AppDelegate.swift */,
0BCE8461208F3865004CDF2D /* particle.png */,
0BCE8463208F399A004CDF2D /* snowflake.png */,
0BBBF5F12088A4DB001F0C00 /* ViewController.swift */,
0BBBF5F32088A4DB001F0C00 /* Main.storyboard */,
0BBBF5F62088A4DC001F0C00 /* Assets.xcassets */,
Expand All @@ -89,45 +71,21 @@
path = Demo;
sourceTree = "<group>";
};
0BCE845E208F3720004CDF2D /* Snowflakes */ = {
6ADDBEB1CA1013AAF4F6DE72 /* Pods */ = {
isa = PBXGroup;
children = (
0BCE845F208F3732004CDF2D /* SnowflakesAnimation.swift */,
0BCE8465208F4096004CDF2D /* SnowflakeSpeed.swift */,
501CA1BA74B650FC230ECBAA /* Pods-Demo.debug.xcconfig */,
759A5F52598B5105D57B2ADA /* Pods-Demo.release.xcconfig */,
);
path = Snowflakes;
name = Pods;
sourceTree = "<group>";
};
0BDA57482089DFF40037BD2C /* Source */ = {
F7D9ABAED30CD8E0E240D5BF /* Frameworks */ = {
isa = PBXGroup;
children = (
0BCE845E208F3720004CDF2D /* Snowflakes */,
14A66169208BE2AA0081091A /* Explosion */,
0BDA574A2089DFF40037BD2C /* GlassBreak */,
0BDA574C2089DFF40037BD2C /* GridSize.swift */,
0BDA574D2089DFF40037BD2C /* UIViewExtensions.swift */,
0BDA574E2089DFF40037BD2C /* ClosedRangeExtension.swift */,
A5CDB0AFC4DA0FC14477F12D /* Pods_Demo.framework */,
);
name = Source;
path = ../Source;
sourceTree = "<group>";
};
0BDA574A2089DFF40037BD2C /* GlassBreak */ = {
isa = PBXGroup;
children = (
0BDA57492089DFF40037BD2C /* GlassBreakAnimation.swift */,
0BDA574B2089DFF40037BD2C /* GlassPiece.swift */,
);
path = GlassBreak;
sourceTree = "<group>";
};
14A66169208BE2AA0081091A /* Explosion */ = {
isa = PBXGroup;
children = (
14A6616A208BE2BB0081091A /* ExplosionAnimation.swift */,
14A6616C208BE3160081091A /* ExplosionPiece.swift */,
);
path = Explosion;
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand All @@ -137,9 +95,11 @@
isa = PBXNativeTarget;
buildConfigurationList = 0BBBF5FE2088A4DC001F0C00 /* Build configuration list for PBXNativeTarget "Demo" */;
buildPhases = (
D2D08CE03BA69228149C5EC5 /* [CP] Check Pods Manifest.lock */,
0BBBF5E82088A4DA001F0C00 /* Sources */,
0BBBF5E92088A4DA001F0C00 /* Frameworks */,
0BBBF5EA2088A4DA001F0C00 /* Resources */,
5DF7A84C97E93F92BAF4C651 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -188,32 +148,60 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0BCE8464208F399A004CDF2D /* snowflake.png in Resources */,
0BBBF5FA2088A4DC001F0C00 /* LaunchScreen.storyboard in Resources */,
0BBBF5F72088A4DC001F0C00 /* Assets.xcassets in Resources */,
0BBBF5F52088A4DB001F0C00 /* Main.storyboard in Resources */,
0BCE8462208F3865004CDF2D /* particle.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
5DF7A84C97E93F92BAF4C651 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/../Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/VariousViewsEffects/VariousViewsEffects.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/VariousViewsEffects.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
D2D08CE03BA69228149C5EC5 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Demo-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
0BBBF5E82088A4DA001F0C00 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0BDA57532089DFF40037BD2C /* ClosedRangeExtension.swift in Sources */,
0BDA57512089DFF40037BD2C /* GridSize.swift in Sources */,
14A6616D208BE3160081091A /* ExplosionPiece.swift in Sources */,
0BCE8460208F3732004CDF2D /* SnowflakesAnimation.swift in Sources */,
0BDA57502089DFF40037BD2C /* GlassPiece.swift in Sources */,
0BBBF5F22088A4DB001F0C00 /* ViewController.swift in Sources */,
0BCE8466208F4096004CDF2D /* SnowflakeSpeed.swift in Sources */,
14A6616B208BE2BB0081091A /* ExplosionAnimation.swift in Sources */,
0BBBF5F02088A4DB001F0C00 /* AppDelegate.swift in Sources */,
0BDA57522089DFF40037BD2C /* UIViewExtensions.swift in Sources */,
0BDA574F2089DFF40037BD2C /* GlassBreakAnimation.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -357,14 +345,12 @@
};
0BBBF5FF2088A4DC001F0C00 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 501CA1BA74B650FC230ECBAA /* Pods-Demo.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.artrmz.vieweffects.demo;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -373,14 +359,12 @@
};
0BBBF6002088A4DC001F0C00 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 759A5F52598B5105D57B2ADA /* Pods-Demo.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = Demo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.artrmz.vieweffects.demo;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
10 changes: 10 additions & 0 deletions Demo/Demo.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Demo/Demo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
1 change: 1 addition & 0 deletions Demo/Demo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import UIKit
import VariousViewsEffects

class ViewController: UIViewController {
@IBOutlet weak var exampleView: UIView?
Expand Down
Binary file removed Demo/Demo/particle.png
Binary file not shown.
10 changes: 10 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
platform :ios, '9.0'
workspace 'Demo/Demo.xcworkspace'
project 'Demo/Demo.xcodeproj'

inhibit_all_warnings!
use_frameworks!

target 'Demo' do
pod 'VariousViewsEffects', :path => '.'
end
16 changes: 16 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PODS:
- VariousViewsEffects (1.1.0)

DEPENDENCIES:
- VariousViewsEffects (from `.`)

EXTERNAL SOURCES:
VariousViewsEffects:
:path: "."

SPEC CHECKSUMS:
VariousViewsEffects: 9e2c5c97a1843500fc155d64c0fd0f0ccaee6030

PODFILE CHECKSUM: cc09ef09ebb358acf12099035f28ac6ef33f5dc0

COCOAPODS: 1.5.0
File renamed without changes
11 changes: 11 additions & 0 deletions Source/Snowflakes/SnowflakesAnimation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,15 @@ public extension UIView {
cell.contents = UIImage(named: "snowflake")?.cgImage
return cell
}

func loadImageBundle(named imageName:String) -> UIImage? {
let podBundle = Bundle(for: self.classForCoder)
if let bundleURL = podBundle.url(forResource: "Resources", withExtension: "bundle")
{
let imageBundel = Bundle(url:bundleURL )
let image = UIImage(named: imageName, in: imageBundel, compatibleWith: nil)
return image
}
return nil
}
}
1 change: 1 addition & 0 deletions VariousViewsEffects.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Pod::Spec.new do |s|
s.swift_version = "4.1"
s.ios.deployment_target = '9.0'
s.source_files = 'Source/*.swift','Source/*/*.swift'
s.resources = 'Source/Resources/*.png'
end

0 comments on commit 3f249e2

Please sign in to comment.