Skip to content

Commit 2f041f3

Browse files
wrutkowski-tyroWojciech Rutkowski
andauthored
Adds support for Carthage by adding xcodeproj in the root directory. (#36)
* Adds support for Carthage by adding xcodeproj in the root directory. * Updates XcodeGen project.yml to create shared schemes for Carthage usage. * Documentation for Carthage and XcodeGen. Co-authored-by: Wojciech Rutkowski <[email protected]>
1 parent f0f2f88 commit 2f041f3

File tree

8 files changed

+1013
-0
lines changed

8 files changed

+1013
-0
lines changed

OHMySQL.xcodeproj/project.pbxproj

Lines changed: 742 additions & 0 deletions
Large diffs are not rendered by default.

OHMySQL.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1200"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES"
8+
runPostActionsOnFailure = "NO">
9+
<BuildActionEntries>
10+
<BuildActionEntry
11+
buildForTesting = "YES"
12+
buildForRunning = "YES"
13+
buildForProfiling = "YES"
14+
buildForArchiving = "YES"
15+
buildForAnalyzing = "YES">
16+
<BuildableReference
17+
BuildableIdentifier = "primary"
18+
BlueprintIdentifier = "C354047B80D26ABEAB3C259D"
19+
BuildableName = "OHMySQL-macOS.framework"
20+
BlueprintName = "OHMySQL-macOS"
21+
ReferencedContainer = "container:OHMySQL.xcodeproj">
22+
</BuildableReference>
23+
</BuildActionEntry>
24+
</BuildActionEntries>
25+
</BuildAction>
26+
<TestAction
27+
buildConfiguration = "Debug"
28+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
29+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
30+
onlyGenerateCoverageForSpecifiedTargets = "NO"
31+
shouldUseLaunchSchemeArgsEnv = "YES">
32+
<Testables>
33+
</Testables>
34+
<MacroExpansion>
35+
<BuildableReference
36+
BuildableIdentifier = "primary"
37+
BlueprintIdentifier = "C354047B80D26ABEAB3C259D"
38+
BuildableName = "OHMySQL-macOS.framework"
39+
BlueprintName = "OHMySQL-macOS"
40+
ReferencedContainer = "container:OHMySQL.xcodeproj">
41+
</BuildableReference>
42+
</MacroExpansion>
43+
<CommandLineArguments>
44+
</CommandLineArguments>
45+
</TestAction>
46+
<LaunchAction
47+
buildConfiguration = "Debug"
48+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
49+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
50+
launchStyle = "0"
51+
useCustomWorkingDirectory = "NO"
52+
ignoresPersistentStateOnLaunch = "NO"
53+
debugDocumentVersioning = "YES"
54+
debugServiceExtension = "internal"
55+
allowLocationSimulation = "YES">
56+
<MacroExpansion>
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "C354047B80D26ABEAB3C259D"
60+
BuildableName = "OHMySQL-macOS.framework"
61+
BlueprintName = "OHMySQL-macOS"
62+
ReferencedContainer = "container:OHMySQL.xcodeproj">
63+
</BuildableReference>
64+
</MacroExpansion>
65+
<CommandLineArguments>
66+
</CommandLineArguments>
67+
</LaunchAction>
68+
<ProfileAction
69+
buildConfiguration = "Release"
70+
shouldUseLaunchSchemeArgsEnv = "YES"
71+
savedToolIdentifier = ""
72+
useCustomWorkingDirectory = "NO"
73+
debugDocumentVersioning = "YES">
74+
<BuildableProductRunnable
75+
runnableDebuggingMode = "0">
76+
<BuildableReference
77+
BuildableIdentifier = "primary"
78+
BlueprintIdentifier = "C354047B80D26ABEAB3C259D"
79+
BuildableName = "OHMySQL-macOS.framework"
80+
BlueprintName = "OHMySQL-macOS"
81+
ReferencedContainer = "container:OHMySQL.xcodeproj">
82+
</BuildableReference>
83+
</BuildableProductRunnable>
84+
<CommandLineArguments>
85+
</CommandLineArguments>
86+
</ProfileAction>
87+
<AnalyzeAction
88+
buildConfiguration = "Debug">
89+
</AnalyzeAction>
90+
<ArchiveAction
91+
buildConfiguration = "Release"
92+
revealArchiveInOrganizer = "YES">
93+
</ArchiveAction>
94+
</Scheme>
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1200"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES"
8+
runPostActionsOnFailure = "NO">
9+
<BuildActionEntries>
10+
<BuildActionEntry
11+
buildForTesting = "YES"
12+
buildForRunning = "YES"
13+
buildForProfiling = "YES"
14+
buildForArchiving = "YES"
15+
buildForAnalyzing = "YES">
16+
<BuildableReference
17+
BuildableIdentifier = "primary"
18+
BlueprintIdentifier = "2C839554FDF97987FD9DB6E1"
19+
BuildableName = "OHMySQL.framework"
20+
BlueprintName = "OHMySQL"
21+
ReferencedContainer = "container:OHMySQL.xcodeproj">
22+
</BuildableReference>
23+
</BuildActionEntry>
24+
</BuildActionEntries>
25+
</BuildAction>
26+
<TestAction
27+
buildConfiguration = "Debug"
28+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
29+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
30+
onlyGenerateCoverageForSpecifiedTargets = "NO"
31+
shouldUseLaunchSchemeArgsEnv = "YES">
32+
<Testables>
33+
</Testables>
34+
<MacroExpansion>
35+
<BuildableReference
36+
BuildableIdentifier = "primary"
37+
BlueprintIdentifier = "2C839554FDF97987FD9DB6E1"
38+
BuildableName = "OHMySQL.framework"
39+
BlueprintName = "OHMySQL"
40+
ReferencedContainer = "container:OHMySQL.xcodeproj">
41+
</BuildableReference>
42+
</MacroExpansion>
43+
<CommandLineArguments>
44+
</CommandLineArguments>
45+
</TestAction>
46+
<LaunchAction
47+
buildConfiguration = "Debug"
48+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
49+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
50+
launchStyle = "0"
51+
useCustomWorkingDirectory = "NO"
52+
ignoresPersistentStateOnLaunch = "NO"
53+
debugDocumentVersioning = "YES"
54+
debugServiceExtension = "internal"
55+
allowLocationSimulation = "YES">
56+
<MacroExpansion>
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "2C839554FDF97987FD9DB6E1"
60+
BuildableName = "OHMySQL.framework"
61+
BlueprintName = "OHMySQL"
62+
ReferencedContainer = "container:OHMySQL.xcodeproj">
63+
</BuildableReference>
64+
</MacroExpansion>
65+
<CommandLineArguments>
66+
</CommandLineArguments>
67+
</LaunchAction>
68+
<ProfileAction
69+
buildConfiguration = "Release"
70+
shouldUseLaunchSchemeArgsEnv = "YES"
71+
savedToolIdentifier = ""
72+
useCustomWorkingDirectory = "NO"
73+
debugDocumentVersioning = "YES">
74+
<BuildableProductRunnable
75+
runnableDebuggingMode = "0">
76+
<BuildableReference
77+
BuildableIdentifier = "primary"
78+
BlueprintIdentifier = "2C839554FDF97987FD9DB6E1"
79+
BuildableName = "OHMySQL.framework"
80+
BlueprintName = "OHMySQL"
81+
ReferencedContainer = "container:OHMySQL.xcodeproj">
82+
</BuildableReference>
83+
</BuildableProductRunnable>
84+
<CommandLineArguments>
85+
</CommandLineArguments>
86+
</ProfileAction>
87+
<AnalyzeAction
88+
buildConfiguration = "Debug">
89+
</AnalyzeAction>
90+
<ArchiveAction
91+
buildConfiguration = "Release"
92+
revealArchiveInOrganizer = "YES">
93+
</ArchiveAction>
94+
</Scheme>

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ The library supports Objective-C and Swift, iOS and macOS. You can connect to yo
1313
- [Requirements](#requirements)
1414
- [How To Get Started](#how-to-get-started)
1515
- [Installation](#installation)
16+
- [CocoaPods](#cocoapods)
17+
- [Carthage](#carthage)
1618
- [Usage](#usage)
1719
- [Query Context](#query-context)
1820
- [Execute Query](#execute-query)
@@ -57,13 +59,29 @@ https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YCAKYM4XCT2
5759

5860
## Installation
5961

62+
### CocoaPods
63+
6064
You can use CocoaPods. Add the following line to your Podfile:
6165
```ruby
6266
pod 'OHMySQL' --repo-update
6367
```
6468

6569
If you are using Swift do not forget to add `use_frameworks!` at the top of Podfile. Add platform, example `platform :osx, '11.0'`.
6670

71+
### Carthage
72+
73+
You can also use Carthage.
74+
75+
Add the following to your Cartfile:
76+
77+
```
78+
github "oleghnidets/OHMySQL"
79+
```
80+
81+
Run your usual command for updating carthage dependencies, eg. `carthage update --use-xcframeworks OHMySQL`
82+
83+
In addition to manually adding xcframework of OHMySQL from `Carthage/Build` folder you will need to manually add `MySQL.xcframework` as well. `MySQL.xcframework` is a part of this repo (`OHMySQL/lib/MySQL.xcframework`).
84+
6785
## Usage
6886

6987
Connect to the database.

docs/Using XcodeGen.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Using XcodeGen to generate xcodeproj
2+
3+
When should you use it? If you are making changes to the structure of the files (adding or removing files) in the project make sure to run xcodegen to generate an updated Xcode Project (OHMySQL.xcodeproj) in the root directoy of the repo. This ensures that `Carthage` can fetch and use latests version.
4+
5+
1. Install [XcodeGen](https://github.com/yonaskolb/XcodeGen#installing)
6+
2. Run `xcodegen generate` in the root of the project.
7+
3. Commit updated `OHMySQL.xcodeproj`.
8+
9+
## More information
10+
11+
Check `project.yml` to see how XcodeGen generates the project.

project.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: OHMySQL
2+
options:
3+
bundleIdPrefix: com.github.oleghnidets
4+
targets:
5+
OHMySQL:
6+
type: framework
7+
platform: iOS
8+
deploymentTarget: "14.0"
9+
sources: [OHMySQL/Sources]
10+
scheme: {}
11+
settings:
12+
configs:
13+
debug:
14+
OTHER_SWIFT_FLAGS: -Wno-incomplete-umbrella
15+
GENERATE_INFOPLIST_FILE: YES
16+
release:
17+
OTHER_SWIFT_FLAGS: -Wno-incomplete-umbrella
18+
GENERATE_INFOPLIST_FILE: YES
19+
dependencies:
20+
- framework: OHMySQL/lib/MySQL.xcframework
21+
- sdk: Foundation.framework
22+
- sdk: libc++.tbd
23+
24+
OHMySQL-macOS:
25+
type: framework
26+
platform: macOS
27+
deploymentTarget: "10.13"
28+
sources: [OHMySQL/Sources]
29+
scheme: {}
30+
settings:
31+
configs:
32+
debug:
33+
OTHER_SWIFT_FLAGS: -Wno-incomplete-umbrella
34+
release:
35+
OTHER_SWIFT_FLAGS: -Wno-incomplete-umbrella
36+
dependencies:
37+
- framework: OHMySQL/lib/MySQL.xcframework
38+
- sdk: Foundation.framework
39+
- sdk: libc++.tbd

0 commit comments

Comments
 (0)