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

Configure Xcode Cloud continuous integration #215

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4064a9b
Restore distinct sub-project Sources/Demo.xcodeproj
aokj4ck Mar 12, 2024
8410858
Add ci_scripts/ci_post_clone.sh for Xcode Cloud with Sources/Demo.xco…
aokj4ck Mar 12, 2024
c783089
Add ~/.mapbox set up for Xcode cloud
aokj4ck Mar 12, 2024
98661f8
Add ~/.netrc set up for Xcode cloud
aokj4ck Mar 12, 2024
c13c01a
Relocate ci_scripts to triage Xcode Cloud for Sources/Demo.xcodeproj …
aokj4ck Mar 12, 2024
1f76d7c
Fix hashbang
aokj4ck Mar 12, 2024
e32301e
Exit script if token is not found
aokj4ck Mar 12, 2024
99f6306
Run brew bundle install to provide build dependencies
aokj4ck Mar 12, 2024
b47098f
Tryfix: clear carthage caches
aokj4ck Mar 12, 2024
430d53a
Merge branch 'main' of github.com:mapbox/mapbox-search-ios into 187-x…
aokj4ck Apr 9, 2024
3b4c32f
Change Xcode Cloud netrc to use secret token
aokj4ck Apr 9, 2024
a7107c2
Remove debug extension on search core type
aokj4ck Apr 9, 2024
3d51dd4
move ci_scripts to top level
aokj4ck Apr 9, 2024
fc2a3c9
Fix post-clone script cd directory
aokj4ck Apr 9, 2024
377d858
Build with Xcode 15.3
aokj4ck Apr 9, 2024
db80813
Set up Demo project for Xcode Cloud, move to xcode_cloud/
aokj4ck Apr 15, 2024
54fb0d1
Move DiscoverViewController from MapboxSearch target to Demo target
aokj4ck Apr 15, 2024
cf37940
Pin mapbox common to 24.2.0
aokj4ck Apr 15, 2024
3e3c015
Change Demo XcodeCloud project to use mapbox-search-ios branch: main
aokj4ck Apr 15, 2024
7dc5502
Evaluate SSDK-736 fix for Xcode Cloud
aokj4ck Apr 17, 2024
621abf3
Merge branch 'main' into 187-xcode-cloud-support-for-version-200+
aokj4ck Apr 19, 2024
d2967e5
Merge branch 'main' into 187-xcode-cloud-support-for-version-200+
aokj4ck Apr 19, 2024
13fdfa4
Merge branch 'main' into 187-xcode-cloud-support-for-version-200+
aokj4ck Apr 26, 2024
0cec5d3
Fix xcode_cloud/Demo project
aokj4ck Apr 26, 2024
cdef9cc
Merge branch 'main' of github.com:mapbox/mapbox-search-ios into 187-x…
aokj4ck Apr 30, 2024
0fdf41a
Apply xcprivacy fix to Xcode Cloud Demo project
aokj4ck Apr 30, 2024
f695e32
Update Xcode Cloud Demo app to version "2.0.0" to reflect v2 SDK usage
aokj4ck Apr 30, 2024
98ea27a
Build with Xcode 15.2 workflow
aokj4ck Apr 30, 2024
00bd0f9
Build with Xcode 15.2 workflow
aokj4ck Apr 30, 2024
82ea96f
Update MapboxSearch in Xcode Cloud Demo project
aokj4ck Apr 30, 2024
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
54 changes: 54 additions & 0 deletions Sources/Demo/en.lproj/Main.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

/* Class = "UILabel"; text = "Adjusting address location, then press 'Done' button"; ObjectID = "5vH-kY-TAX"; */
"5vH-kY-TAX.text" = "Adjusting address location, then press 'Done' button";

/* Class = "UIViewController"; title = "Address Autofill"; ObjectID = "7bM-3D-K0g"; */
"7bM-3D-K0g.title" = "Address Autofill";

/* Class = "UITabBarItem"; title = "Discover"; ObjectID = "FHv-mk-0xk"; */
"FHv-mk-0xk.title" = "Discover";

/* Class = "UIButton"; configuration.title = "Search in this area"; ObjectID = "GC2-d5-Go6"; */
"GC2-d5-Go6.configuration.title" = "Search in this area";

/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "GC2-d5-Go6"; */
"GC2-d5-Go6.normalTitle" = "Button";

/* Class = "UIViewController"; title = "Place Autocomplete"; ObjectID = "MF8-kt-2CX"; */
"MF8-kt-2CX.title" = "Place Autocomplete";

/* Class = "UINavigationItem"; title = "Address Autofill"; ObjectID = "fik-rE-EC5"; */
"fik-rE-EC5.title" = "Address Autofill";

/* Class = "UITabBarItem"; title = "Autofill"; ObjectID = "fkh-Aj-TqY"; */
"fkh-Aj-TqY.title" = "Autofill";

/* Class = "UIViewController"; title = "Discover"; ObjectID = "ggU-4h-Z4i"; */
"ggU-4h-Z4i.title" = "Discover";

/* Class = "UINavigationItem"; title = "Search SDK"; ObjectID = "gxo-hE-Mx4"; */
"gxo-hE-Mx4.title" = "Search SDK";

/* Class = "UILabel"; text = "Type your query in order to get Address Autofill suggestions"; ObjectID = "hS5-wN-tVM"; */
"hS5-wN-tVM.text" = "Type your query in order to get Address Autofill suggestions";

/* Class = "UILabel"; text = "Type your query in order to get Address Autofill suggestions"; ObjectID = "iKd-b0-QXa"; */
"iKd-b0-QXa.text" = "Type your query in order to get Address Autofill suggestions";

/* Class = "UISegmentedControl"; jyc-Lb-8Kz.segmentTitles[0] = "Parking"; ObjectID = "jyc-Lb-8Kz"; */
"jyc-Lb-8Kz.segmentTitles[0]" = "Parking";

/* Class = "UISegmentedControl"; jyc-Lb-8Kz.segmentTitles[1] = "Restaurants"; ObjectID = "jyc-Lb-8Kz"; */
"jyc-Lb-8Kz.segmentTitles[1]" = "Restaurants";

/* Class = "UISegmentedControl"; jyc-Lb-8Kz.segmentTitles[2] = "Museum"; ObjectID = "jyc-Lb-8Kz"; */
"jyc-Lb-8Kz.segmentTitles[2]" = "Museum";

/* Class = "UITabBarItem"; title = "SearchUI"; ObjectID = "lTB-qi-YMg"; */
"lTB-qi-YMg.title" = "SearchUI";

/* Class = "UITabBarItem"; title = "Autocomplete"; ObjectID = "ofb-Lf-pQ3"; */
"ofb-Lf-pQ3.title" = "Autocomplete";

/* Class = "UINavigationItem"; title = "Place Autocomplete"; ObjectID = "u0i-jl-zwO"; */
"u0i-jl-zwO.title" = "Place Autocomplete";
508 changes: 508 additions & 0 deletions xcode_cloud/Demo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

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
@@ -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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"pins" : [
{
"identity" : "cwlcatchexception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlCatchException.git",
"state" : {
"revision" : "3ef6999c73b6938cc0da422f2c912d0158abb0a0",
"version" : "2.2.0"
}
},
{
"identity" : "cwlpreconditiontesting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state" : {
"revision" : "2ef56b2caf25f55fa7eef8784c30d5a767550f54",
"version" : "2.2.1"
}
},
{
"identity" : "mapbox-common-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/mapbox-common-ios.git",
"state" : {
"revision" : "e36d6ec3c399e9f55c4deb96cea70bcd095a5203",
"version" : "24.4.0-beta.2"
}
},
{
"identity" : "mapbox-search-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/mapbox-search-ios/",
"state" : {
"branch" : "xcprivacy-searchcore_beta17",
"revision" : "d9515aebf1780a42c553d4a1eaea317b1f0b1f54"
}
}
],
"version" : 2
}
84 changes: 84 additions & 0 deletions xcode_cloud/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E6E85A072640199800C0EF0F"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E6E85A072640199800C0EF0F"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "--offline"
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E6E85A072640199800C0EF0F"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
13 changes: 13 additions & 0 deletions xcode_cloud/ci_scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ci_scripts

Used for Xcode Cloud.

Documentation: https://developer.apple.com/documentation/xcode/making-dependencies-available-to-xcode-cloud#Use-a-custom-build-script-to-install-a-third-party-dependency-or-tool

### Directory structure

Xcode Cloud requires that the project files be co-located with the Xcode project. We are using a Demo.xcodeproj to triage Xcode Cloud. This Demo project mimics the Demo target within the top-level MapboxSearch.xcodeproj with the key difference that this project imports mapbox-search-ios through SPM.

From their documentaion:

> Create a directory next to your Xcode project or workspace and name it ci_scripts
31 changes: 31 additions & 0 deletions xcode_cloud/ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env sh

# Support Xcode Cloud for Sources/Demo.xcodeproj

if [[ -z $MAPBOX_API_TOKEN ]];then
echo "Please provide an API token environment variable in Xcode Cloud"
exit 1
fi

# Propagate environment secrets
echo $MAPBOX_API_TOKEN > ~/.mapbox

# Set up netrc for packages
echo "machine api.mapbox.com" >> ~/.netrc
echo "login mapbox" >> ~/.netrc
echo "password $MAPBOX_SECRET_TOKEN" >> ~/.netrc
chmod 0600 ~/.netrc

# Relocate to the top level directory
cd ../../

# Set up build dependencies
brew update
brew bundle install

# Clear caches
rm -rf ~/Library/Caches/carthage/
rm -rf ~/Library/Caches/org.carthage.CarthageKit

# Fetch Carthage package dependencies
make dependencies