Skip to content

Commit

Permalink
Use self-signed provisioning profile
Browse files Browse the repository at this point in the history
  • Loading branch information
louwers committed Oct 4, 2024
1 parent 38bc81b commit 4cfcaa0
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ jobs:
${{ runner.os }}-bazel-
path: ~/.cache/bazel

- name: Import self-signed certificate
run: security import codesign/MapLibre.cer

- name: Build Example (Swift) App
run: bazel build //platform/ios/app-swift:MapLibreApp --//:renderer=metal --//platform/ios:use_provisioning_profile=False

Expand All @@ -102,12 +105,18 @@ jobs:
- name: Running iOS UI tests (Address+UB Sanitizer)
run: bazel test //platform/ios/iosapp-UITests:uitest --test_output=errors --//:renderer=metal --features=include_clang_rt --copt=-fsanitize=undefined --linkopt=-fsanitize=undefined --copt=-fsanitize-recover=null --linkopt=-fsanitize-recover=null --//platform/ios:use_provisioning_profile=False

- name: Create Bazel config
working-directory: platform/darwin
run: |
grep -v APPLE_MOBILE_PROVISIONING_PROFILE_NAME bazel/example_config.bzl > bazel/config.bzl
echo 'APPLE_MOBILE_PROVISIONING_PROFILE_NAME = "Fake iOS Provisioning Profile"' >> bazel/config.bzl
# render test

- name: Build RenderTest .ipa and .xctest for AWS Device Farm
run: |
set -e
bazel run //platform/ios:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal --//platform/ios:use_provisioning_profile=False"
bazel run //platform/ios:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal
build_dir="$(mktemp -d)"
xcodebuild build-for-testing -scheme RenderTest -project MapLibre.xcodeproj -derivedDataPath "$build_dir" CODE_SIGNING_ALLOWED=NO
render_test_app_dir="$(dirname "$(find "$build_dir" -name RenderTestApp.app)")"
Expand All @@ -134,7 +143,7 @@ jobs:
- name: Build CppUnitTests .ipa and .xctest for AWS Device Farm
run: |
set -e
bazel run //platform/ios:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal --//platform/ios:use_provisioning_profile=False"
bazel run //platform/ios:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal
build_dir="$(mktemp -d)"
xcodebuild build-for-testing -scheme CppUnitTests -project MapLibre.xcodeproj -derivedDataPath "$build_dir" CODE_SIGNING_ALLOWED=NO
ios_cpp_test_app_dir="$(dirname "$(find "$build_dir" -name CppUnitTestsApp.app)")"
Expand Down
4 changes: 3 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
use_repo(pnpm, "pnpm")

provisioning_profile_repository = use_extension("@build_bazel_rules_apple//apple:apple.bzl", "provisioning_profile_repository_extension")
provisioning_profile_repository.setup()
provisioning_profile_repository.setup(
fallback_profiles = "//platform/ios/codesign:profiles"
)

http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

Expand Down
5 changes: 5 additions & 0 deletions platform/ios/codesign/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
filegroup(
name = "profiles",
srcs = ["MapLibre.mobileprovision"],
visibility = ["//visibility:public"],
)
Binary file added platform/ios/codesign/MapLibre.cer
Binary file not shown.
Binary file added platform/ios/codesign/MapLibre.mobileprovision
Binary file not shown.
78 changes: 78 additions & 0 deletions platform/ios/codesign/MapLibre.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?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>AppIDName</key>
<string>selfsigned: any app</string>
<key>ApplicationIdentifierPrefix</key>
<array>
<string>QMC7N4BDVZ</string>
</array>
<key>CreationDate</key>
<date>2024-10-03T15:19:16Z</date>
<key>Platform</key>
<array>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NOeKGu8OMDTLkPbnzPsnIwsIZvp
qAbFbKFhyrcbm9cuDaG9+x3v0K3XiJerhmJiR4OLBffNUs+Bku0fvUsaAxChW1nf
TWm2W+AXbIGvkhS0j9b8631wTJKS9ak33WS1ugxZ8XL2udftwt2bzyVomY/fU08H
27jdSnu98zs+32nukqRbtddrArZrPeNx4ed2Ad9CJDCourNDNQVZacEPZjVz1u7z
xKgeSHYwMrNQN9OVSWp3fxEkQMc5nESuh8grhg==
</data>
</array>
<key>Entitlements</key>
<dict>
<key>keychain-access-groups</key>
<array>
<string>MapLibre.*</string>
</array>
<key>get-task-allow</key>
<true/>
<key>application-identifier</key>
<string>QMC7N4BDVZ.*</string>
<key>com.apple.developer.team-identifier</key>
<string>MapLibre</string>
</dict>
<key>ExpirationDate</key>
<date>2034-10-04T09:54:14Z</date>
<key>Name</key>
<string>Fake iOS Provisioning Profile</string>
<key>ProvisionedDevices</key>
<array>
</array>
<key>LocalProvision</key>
<true/>
<key>TeamIdentifier</key>
<array>
<string>QMC7N4BDVZ</string>
</array>
<key>TeamName</key>
<string>MapLibre</string>
<key>TimeToLive</key>
<integer>3652</integer>
<key>UUID</key>
<string>CEC20DD6-95A4-40E4-B0D6-48108994172A</string>
<key>Version</key>
<integer>1</integer>
</dict>
</plist>
8 changes: 8 additions & 0 deletions platform/ios/codesign/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Self-Signed Provisioning Profile

This directory contains a self-signed provisioning profile.

```
security import MapLibre.cer
security cms -S -N 'iOS Team Provisioning Profile: *' -i MapLibre.plist -o MapLibre.mobileprovision
```

0 comments on commit 4cfcaa0

Please sign in to comment.