Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elimate cocoapods usage in samples #1470

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ jobs:

- name: Build Counter iOS (UIKit)
run: |
cd samples/counter/ios-uikit
pod install
xcodebuild -workspace CounterApp.xcworkspace -scheme CounterApp -destination 'platform=iOS Simulator,name=iPhone 12,OS=latest'
xcodebuild -project samples/counter/ios-uikit/CounterApp.xcodeproj -scheme CounterApp -destination 'platform=iOS Simulator,name=iPhone 12,OS=latest'

sample-emoji:
runs-on: macos-latest
Expand All @@ -137,9 +135,7 @@ jobs:

- name: Build Emoji Search iOS (UIKit)
run: |
cd samples/emoji-search/ios-uikit
pod install
xcodebuild -workspace EmojiSearchApp.xcworkspace -scheme EmojiSearchApp -destination 'platform=iOS Simulator,name=iPhone 12,OS=latest'
xcodebuild -project samples/emoji-search/ios-uikit/EmojiSearchApp.xcodeproj -scheme EmojiSearchApp -destination 'platform=iOS Simulator,name=iPhone 12,OS=latest'

test-app:
runs-on: macos-latest
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ local.properties
*.xcworkspace
xcuserdata

# Cocoapods
Pods

# Paparazzi
redwood-layout-composeui/out/failures
redwood-layout-view/out/failures
4 changes: 1 addition & 3 deletions samples/counter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ Running Counter on iOS

Run this:
```
cd samples/counter/ios-uikit
pod install
open CounterApp.xcworkspace
open samples/counter/ios-uikit/CounterApp.xcodeproj
```

Then build and run the app. The shared Kotlin code will be built automatically as part of building the iOS app, and also rebuilt as needed.
Expand Down
45 changes: 0 additions & 45 deletions samples/counter/ios-shared/CounterKt.podspec

This file was deleted.

14 changes: 6 additions & 8 deletions samples/counter/ios-shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@
*/

apply plugin: 'org.jetbrains.kotlin.multiplatform'
apply plugin: 'org.jetbrains.kotlin.native.cocoapods'
apply plugin: 'app.cash.redwood'

kotlin {
iosArm64()
iosX64()
iosSimulatorArm64()

cocoapods {
noPodspec()
framework {
[
iosArm64(),
iosX64(),
iosSimulatorArm64(),
].each { iosTarget ->
veyndan marked this conversation as resolved.
Show resolved Hide resolved
iosTarget.binaries.framework {
baseName = 'CounterKt'
}
}
Expand Down
77 changes: 25 additions & 52 deletions samples/counter/ios-uikit/CounterApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
635661DC21F12B8000DD7240 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 635661DB21F12B8000DD7240 /* Assets.xcassets */; };
635661DF21F12B8000DD7240 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 635661DD21F12B8000DD7240 /* LaunchScreen.storyboard */; };
CB85C0B725AFE61A007A2CC7 /* CounterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB85C0B625AFE61A007A2CC7 /* CounterViewController.swift */; };
CB85EE5426648F6900A4B218 /* Pods_CounterApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00A9C28A8FE3CCC0B75F8DBE /* Pods_CounterApp.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
00A9C28A8FE3CCC0B75F8DBE /* Pods_CounterApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CounterApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4B9986777126F871E922EFF8 /* Pods-CounterApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CounterApp.release.xcconfig"; path = "Target Support Files/Pods-CounterApp/Pods-CounterApp.release.xcconfig"; sourceTree = "<group>"; };
00D5E68D2AAF3EBD00692213 /* ios-shared */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "ios-shared"; path = "../ios-shared"; sourceTree = "<group>"; };
635661D121F12B7E00DD7240 /* CounterApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CounterApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
635661D421F12B7E00DD7240 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
635661D921F12B7E00DD7240 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
Expand All @@ -26,29 +24,34 @@
635661E021F12B8000DD7240 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
63E90CF521FEBBB700449E04 /* main.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = main.framework; path = "../shared/build/xcode-frameworks/main.framework"; sourceTree = "<group>"; };
CB85C0B625AFE61A007A2CC7 /* CounterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CounterViewController.swift; sourceTree = "<group>"; };
FE5DC566933F8A25E4B4D71D /* Pods-CounterApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CounterApp.debug.xcconfig"; path = "Target Support Files/Pods-CounterApp/Pods-CounterApp.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
635661CE21F12B7E00DD7240 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CB85EE5426648F6900A4B218 /* Pods_CounterApp.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
00D5E68C2AAF3EBD00692213 /* Frameworks */ = {
isa = PBXGroup;
children = (
00D5E68D2AAF3EBD00692213 /* ios-shared */,
);
name = Frameworks;
sourceTree = "<group>";
};
635661C821F12B7D00DD7240 = {
isa = PBXGroup;
children = (
63E90CF521FEBBB700449E04 /* main.framework */,
635661D321F12B7E00DD7240 /* CounterApp */,
635661D221F12B7E00DD7240 /* Products */,
B5604532F7F0C4349EF67F9C /* Pods */,
C6AEA68F26E2A3BD052DEDBB /* Frameworks */,
00D5E68C2AAF3EBD00692213 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -73,35 +76,17 @@
path = CounterApp;
sourceTree = "<group>";
};
B5604532F7F0C4349EF67F9C /* Pods */ = {
isa = PBXGroup;
children = (
FE5DC566933F8A25E4B4D71D /* Pods-CounterApp.debug.xcconfig */,
4B9986777126F871E922EFF8 /* Pods-CounterApp.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
C6AEA68F26E2A3BD052DEDBB /* Frameworks */ = {
isa = PBXGroup;
children = (
00A9C28A8FE3CCC0B75F8DBE /* Pods_CounterApp.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
635661D021F12B7E00DD7240 /* CounterApp */ = {
isa = PBXNativeTarget;
buildConfigurationList = 635661E321F12B8000DD7240 /* Build configuration list for PBXNativeTarget "CounterApp" */;
buildPhases = (
C0A74553EE688F26124F6281 /* [CP] Check Pods Manifest.lock */,
00663F3E2AAF2F52006EA671 /* ShellScript */,
635661CD21F12B7E00DD7240 /* Sources */,
635661CE21F12B7E00DD7240 /* Frameworks */,
635661CF21F12B7E00DD7240 /* Resources */,
5F3CFDEBC3AA573649C00FA4 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -160,44 +145,22 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
5F3CFDEBC3AA573649C00FA4 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-CounterApp/Pods-CounterApp-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-CounterApp/Pods-CounterApp-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CounterApp/Pods-CounterApp-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
C0A74553EE688F26124F6281 /* [CP] Check Pods Manifest.lock */ = {
00663F3E2AAF2F52006EA671 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-CounterApp-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;
shellScript = "cd \"$SRCROOT/../../..\"\n./gradlew :samples:counter:ios-shared:embedAndSignAppleFrameworkForXcode\n\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -353,18 +316,23 @@
};
635661E421F12B8000DD7240 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FE5DC566933F8A25E4B4D71D /* Pods-CounterApp.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2UER9BPG44;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../ios-shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)";
INFOPLIST_FILE = CounterApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-framework",
CounterKt,
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.treehouse.sample.counter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -375,18 +343,23 @@
};
635661E521F12B8000DD7240 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4B9986777126F871E922EFF8 /* Pods-CounterApp.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2UER9BPG44;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../ios-shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)";
INFOPLIST_FILE = CounterApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-framework",
CounterKt,
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.treehouse.sample.counter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
6 changes: 0 additions & 6 deletions samples/counter/ios-uikit/Podfile

This file was deleted.

16 changes: 0 additions & 16 deletions samples/counter/ios-uikit/Podfile.lock

This file was deleted.

4 changes: 1 addition & 3 deletions samples/emoji-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ Running Emoji-Search on iOS

Run this:
```
cd samples/emoji-search/ios-uikit
pod install
open EmojiSearchApp.xcworkspace
open samples/emoji-search/ios-uikit/EmojiSearchApp.xcodeproj
```

Then build and run the app. The shared Kotlin code will be built automatically as part of building the iOS app, and also rebuilt as needed.
Expand Down
50 changes: 0 additions & 50 deletions samples/emoji-search/ios-shared/EmojiSearchKt.podspec

This file was deleted.

Loading