Skip to content

Commit

Permalink
feat: Add the spm root project to the template (#6877)
Browse files Browse the repository at this point in the history
Co-authored-by: Mike Summerfeldt <[email protected]>
Co-authored-by: Mark Anderson <[email protected]>
  • Loading branch information
3 people authored Oct 19, 2023
1 parent 965ef06 commit 02c44c2
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 4 deletions.
25 changes: 21 additions & 4 deletions ios-template/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objectVersion = 60;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -141,6 +141,9 @@
Base,
);
mainGroup = 504EC2FB1FED79650016851F;
packageReferences = (
D4C12C0A2AAA248700AAC8A2 /* XCLocalSwiftPackageReference "CapApp-SPM" */,
);
productRefGroup = 504EC3051FED79650016851F /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -335,7 +338,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -349,7 +353,10 @@
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.App;
Expand All @@ -369,7 +376,10 @@
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.App;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -401,6 +411,13 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
D4C12C0A2AAA248700AAC8A2 /* XCLocalSwiftPackageReference "CapApp-SPM" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = "CapApp-SPM";
};
/* End XCLocalSwiftPackageReference section */
};
rootObject = 504EC2FC1FED79650016851F /* Project object */;
}
9 changes: 9 additions & 0 deletions ios-template/App/CapApp-SPM/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
23 changes: 23 additions & 0 deletions ios-template/App/CapApp-SPM/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// swift-tools-version: 5.9
import PackageDescription

// DO NOT MODIFY THIS FILE - managed by Capacitor CLI commands
let package = Package(
name: "CapApp-SPM",
platforms: [.iOS(.v13)],
products: [
.library(
name: "CapApp-SPM",
targets: ["CapApp-SPM"])
],
dependencies: [
],
targets: [
.target(
name: "CapApp-SPM",
dependencies: [

]
)
]
)
5 changes: 5 additions & 0 deletions ios-template/App/CapApp-SPM/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CapApp-SPM

This SPM is used to host SPM dependancies for you Capacitor project

Do not modifiy the contents of it or there may be unintended concquences.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public let isCapacitorApp = true

0 comments on commit 02c44c2

Please sign in to comment.