Skip to content

Commit

Permalink
Update example projects
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlokhorst committed Nov 9, 2022
1 parent cdbf684 commit 96012a7
Show file tree
Hide file tree
Showing 31 changed files with 345 additions and 556 deletions.
50 changes: 0 additions & 50 deletions Examples/Podfile

This file was deleted.

28 changes: 0 additions & 28 deletions Examples/Podfile.lock

This file was deleted.

10 changes: 10 additions & 0 deletions Examples/ResourceApp/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use_frameworks!
workspace 'RswiftExamples'

target 'ResourceApp' do
platform :ios, '9.0'
project 'ResourceApp'

pod 'SWRevealViewController'
end

16 changes: 16 additions & 0 deletions Examples/ResourceApp/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PODS:
- SWRevealViewController (2.3.0)

DEPENDENCIES:
- SWRevealViewController

SPEC REPOS:
trunk:
- SWRevealViewController

SPEC CHECKSUMS:
SWRevealViewController: 6d3fd97f70112fd7cef9de14df4260eacce4c63a

PODFILE CHECKSUM: 27410262010bf4c42f88c5bc0b837eef52e8d919

COCOAPODS: 1.11.3
58 changes: 3 additions & 55 deletions Examples/ResourceApp/ResourceApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
E2CD68671D7CADEA00BEBE59 /* hello.txt in Resources */ = {isa = PBXBuildFile; fileRef = E2CD68641D7CACC100BEBE59 /* hello.txt */; };
E2DB0EB02334DCC100815AAF /* InfoPlistTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2DB0EAF2334DCC100815AAF /* InfoPlistTests.swift */; };
E2F768FC244D92A200761E14 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2F768FB244D92A200761E14 /* SceneDelegate.swift */; };
E9AC5C6AD09E1F44053BD761 /* Pods_ResourceAppTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8FBDF096D9D6AD6FDFA06C34 /* Pods_ResourceAppTests.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -130,19 +129,16 @@
1867ABA7936CAD2320B248E1 /* Pods_ResourceApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ResourceApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
22ACD120062243785169391F /* Pods-Shared-ResourceApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp/Pods-Shared-ResourceApp.debug.xcconfig"; sourceTree = "<group>"; };
3677277BC1C4F3F77310381B /* Pods-Shared-ResourceApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp/Pods-Shared-ResourceApp.release.xcconfig"; sourceTree = "<group>"; };
3B3FAD8309D5672ABACA9274 /* Pods-ResourceAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceAppTests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests.release.xcconfig"; sourceTree = "<group>"; };
41D4DA51D96C4F7DDF13157E /* Pods-ResourceApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.release.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.release.xcconfig"; sourceTree = "<group>"; };
41D4DA51D96C4F7DDF13157E /* Pods-ResourceApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.release.xcconfig"; path = "Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.release.xcconfig"; sourceTree = "<group>"; };
5D1AFAB01C858637003FE7AB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
5D1AFAB21C858647003FE7AB /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
5D1AFAB31C85864F003FE7AB /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
5D9E41331C96918E002172D3 /* StringsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringsTests.swift; sourceTree = "<group>"; };
70B4C9EF7848D510D018EB8E /* Pods-Shared-ResourceApp-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp-tvOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp-tvOS/Pods-Shared-ResourceApp-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
834EBD01FDB33C84073DF3C0 /* Pods-ResourceAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceAppTests.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests.debug.xcconfig"; sourceTree = "<group>"; };
8FBDF096D9D6AD6FDFA06C34 /* Pods_ResourceAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ResourceAppTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9C2D4D874D7A6B1F02578293 /* Pods-Shared-ResourceAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceAppTests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceAppTests/Pods-Shared-ResourceAppTests.release.xcconfig"; sourceTree = "<group>"; };
A3D0897320CF6FDA007ED462 /* Keep.dont.ignoreme.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Keep.dont.ignoreme.png; sourceTree = "<group>"; };
A3D0897520CF6FE4007ED462 /* ExplicitInclude.ignoreme.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ExplicitInclude.ignoreme.png; sourceTree = "<group>"; };
BCFE901EE74D3A3CF9909E5D /* Pods-ResourceApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.debug.xcconfig"; sourceTree = "<group>"; };
BCFE901EE74D3A3CF9909E5D /* Pods-ResourceApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.debug.xcconfig"; sourceTree = "<group>"; };
C378DD791C68C2BF003598B8 /* SupplementaryElement.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SupplementaryElement.xib; sourceTree = "<group>"; };
CCBC9CB81EC4809D002F3D0E /* Images2.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images2.xcassets; sourceTree = "<group>"; };
D41BDD927A1804A5D763C750 /* Pods-Shared-ResourceApp-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp-tvOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp-tvOS/Pods-Shared-ResourceApp-tvOS.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -244,7 +240,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E9AC5C6AD09E1F44053BD761 /* Pods_ResourceAppTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -256,7 +251,6 @@
children = (
D5B799881C1B8F0C009EA901 /* AVKit.framework */,
1867ABA7936CAD2320B248E1 /* Pods_ResourceApp.framework */,
8FBDF096D9D6AD6FDFA06C34 /* Pods_ResourceAppTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -287,8 +281,6 @@
9C2D4D874D7A6B1F02578293 /* Pods-Shared-ResourceAppTests.release.xcconfig */,
BCFE901EE74D3A3CF9909E5D /* Pods-ResourceApp.debug.xcconfig */,
41D4DA51D96C4F7DDF13157E /* Pods-ResourceApp.release.xcconfig */,
834EBD01FDB33C84073DF3C0 /* Pods-ResourceAppTests.debug.xcconfig */,
3B3FAD8309D5672ABACA9274 /* Pods-ResourceAppTests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
Expand Down Expand Up @@ -508,11 +500,9 @@
isa = PBXNativeTarget;
buildConfigurationList = D55C6CDC1B5D757300301B0D /* Build configuration list for PBXNativeTarget "ResourceAppTests" */;
buildPhases = (
ED8FCF67313DC003391627B7 /* [CP] Check Pods Manifest.lock */,
D55C6CCB1B5D757300301B0D /* Sources */,
D55C6CCC1B5D757300301B0D /* Frameworks */,
D55C6CCD1B5D757300301B0D /* Resources */,
45EF1C0CF8F1496731872E16 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -674,39 +664,17 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
45EF1C0CF8F1496731872E16 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/R.swift.Library-iOS/Rswift.framework",
"${BUILT_PRODUCTS_DIR}/SWRevealViewController/SWRevealViewController.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rswift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SWRevealViewController.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
89BF8D4EC08D38DB6564C369 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ResourceApp/Pods-ResourceApp-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/R.swift.Library-iOS/Rswift.framework",
"${BUILT_PRODUCTS_DIR}/SWRevealViewController/SWRevealViewController.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rswift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SWRevealViewController.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -747,25 +715,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# \"$SRCROOT/../../build/rswift\" generate --generateUITestFile \"$SRCROOT/R.UITest.generated.swift\" --import SWRevealViewController \"$SRCROOT/R.generated.swift\" > \"$SRCROOT/rswift.log\"\n/Users/tom/Projects/R.swift/.build/debug/rswift generate --imports SWRevealViewController \"$SRCROOT/R.generated.swift\" > \"$SRCROOT/rswift.log\"\n/Users/tom/Projects/R.swift/.build/debug/rswift generate \"$SRCROOT/R.UITest.generated.swift\" --generators id\n";
showEnvVarsInLog = 0;
};
ED8FCF67313DC003391627B7 /* [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-ResourceAppTests-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";
shellScript = "../../.build/debug/rswift generate --imports SWRevealViewController \"$SRCROOT/R.generated.swift\" > \"$SRCROOT/rswift.log\"\n../../.build/debug/rswift generate \"$SRCROOT/R.UITest.generated.swift\" --generators id\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -1030,7 +980,6 @@
};
D55C6CDD1B5D757300301B0D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 834EBD01FDB33C84073DF3C0 /* Pods-ResourceAppTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
Expand All @@ -1054,7 +1003,6 @@
};
D55C6CDE1B5D757300301B0D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3B3FAD8309D5672ABACA9274 /* Pods-ResourceAppTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
Expand Down
2 changes: 1 addition & 1 deletion Examples/ResourceApp/ResourceAppTests/IgnoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation
import XCTest
import Rswift
import RswiftResources
@testable import ResourceApp

class IgnoreTests: XCTestCase {
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "9f39744e025c7d377987f30b03770805dcb0bcd1",
"version" : "1.1.4"
"revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d",
"version" : "1.2.0"
}
},
{
"identity" : "xcodeedit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tomlokhorst/XcodeEdit",
"state" : {
"revision" : "99547c5af5850155b52c43b716ba1b094b02a3b2",
"version" : "2.8.0"
"revision" : "cd466d6e8c5ffd2f2b61165d37b0646f09068e1e",
"version" : "2.9.0"
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion Examples/RswiftAppWithStaticFrameworks/Bar/Sources/Bar.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import UIKit

let bundle = Bundle.main.path(forResource: "Bar", ofType: "bundle").flatMap(Bundle.init(path:))!

public final class BarClass {
public init() {}
public func bar() {
print("bar")
}

public func sampleImage() -> UIImage {
R.image.colorsJpg()!
R.image(bundle: bundle).colorsJpg()!
}
}
4 changes: 3 additions & 1 deletion Examples/RswiftAppWithStaticFrameworks/Foo/Sources/Foo.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import UIKit

let bundle = Bundle.main.path(forResource: "Foo", ofType: "bundle").flatMap(Bundle.init(path:))!

public final class FooClass {
public init() {}
public func foo() {
print("foo")
}

public func sampleImage() -> UIImage {
R.image.user()!
R.image(bundle: bundle).user()!
}
}
4 changes: 4 additions & 0 deletions Examples/RswiftAppWithStaticFrameworks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Manually run "RswiftGenerateResourcesCommand" from within Xcode

Select target "BarBundle", pass argument "Bar/Sources/R.generated.swift"
Select target "FooBundle", pass argument "Foo/Sources/R.generated.swift"
Loading

0 comments on commit 96012a7

Please sign in to comment.