Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/workflows/add_identifiers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
run: bundle exec fastlane identifiers
env:
TEAMID: ${{ secrets.TEAMID }}
TEAMID_SUFFIX: ${{ vars.TEAMID_SUFFIX }}
GH_PAT: ${{ secrets.GH_PAT }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
FASTLANE_KEY_ID: ${{ secrets.FASTLANE_KEY_ID }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_loop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ jobs:
run: bundle exec fastlane build_loop
env:
TEAMID: ${{ secrets.TEAMID }}
TEAMID_SUFFIX: ${{ vars.TEAMID_SUFFIX }}
GH_PAT: ${{ secrets.GH_PAT }}
FASTLANE_KEY_ID: ${{ secrets.FASTLANE_KEY_ID }}
FASTLANE_ISSUER_ID: ${{ secrets.FASTLANE_ISSUER_ID }}
Expand All @@ -246,6 +247,7 @@ jobs:
run: bundle exec fastlane release
env:
TEAMID: ${{ secrets.TEAMID }}
TEAMID_SUFFIX: ${{ vars.TEAMID_SUFFIX }}
GH_PAT: ${{ secrets.GH_PAT }}
FASTLANE_KEY_ID: ${{ secrets.FASTLANE_KEY_ID }}
FASTLANE_ISSUER_ID: ${{ secrets.FASTLANE_ISSUER_ID }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/create_certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [workflow_call, workflow_dispatch]

env:
TEAMID: ${{ secrets.TEAMID }}
TEAMID_SUFFIX: ${{ vars.TEAMID_SUFFIX }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_TOKEN: ${{ secrets.GH_PAT }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/validate_secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jobs:
FASTLANE_KEY: ${{ secrets.FASTLANE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
TEAMID: ${{ secrets.TEAMID }}
TEAMID_SUFFIX: ${{ vars.TEAMID_SUFFIX }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion LoopConfigOverride.xcconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include? "../../LoopConfigOverride.xcconfig"

// Override this if you don't want the default com.${DEVELOPMENT_TEAM}.loopkit that loop uses
// MAIN_APP_BUNDLE_IDENTIFIER = com.myname.loop
//MAIN_APP_BUNDLE_IDENTIFIER = com.${TEAMID}.${TEAMID_SUFFIX}.loopkit

// Customize this to change the app name displayed
//MAIN_APP_DISPLAY_NAME = Loop
Expand Down
56 changes: 29 additions & 27 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ FASTLANE_KEY = ENV["FASTLANE_KEY"]
DEVICE_NAME = ENV["DEVICE_NAME"]
DEVICE_ID = ENV["DEVICE_ID"]
ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120"
TEAMID_SUFFIX = ENV["TEAMID_SUFFIX"].to_s.empty? ? "" : ".#{ENV["TEAMID_SUFFIX"]}"


platform :ios do
desc "Build Loop"
Expand All @@ -40,7 +42,7 @@ platform :ios do
)

previous_build_number = latest_testflight_build_number(
app_identifier: "com.#{TEAMID}.loopkit.Loop",
app_identifier: "com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop",
api_key: api_key,
)

Expand All @@ -55,12 +57,12 @@ platform :ios do
type: "appstore",
git_basic_authorization: Base64.strict_encode64("#{GITHUB_REPOSITORY_OWNER}:#{GH_PAT}"),
app_identifier: [
"com.#{TEAMID}.loopkit.Loop",
"com.#{TEAMID}.loopkit.Loop.statuswidget",
"com.#{TEAMID}.loopkit.Loop.LoopWatch.watchkitextension",
"com.#{TEAMID}.loopkit.Loop.LoopWatch",
"com.#{TEAMID}.loopkit.Loop.Loop-Intent-Extension",
"com.#{TEAMID}.loopkit.Loop.LoopWidgetExtension"
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.statuswidget",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWatch.watchkitextension",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWatch",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.Loop-Intent-Extension",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWidgetExtension"
]
)

Expand All @@ -70,7 +72,7 @@ platform :ios do

update_code_signing_settings(
path: "#{GITHUB_WORKSPACE}/Loop/Loop.xcodeproj",
profile_name: mapping["com.#{TEAMID}.loopkit.Loop"],
profile_name: mapping["com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop"],
code_sign_identity: "iPhone Distribution",
targets: ["Loop"]
)
Expand All @@ -83,35 +85,35 @@ platform :ios do

update_code_signing_settings(
path: "#{GITHUB_WORKSPACE}/Loop/Loop.xcodeproj",
profile_name: mapping["com.#{TEAMID}.loopkit.Loop.statuswidget"],
profile_name: mapping["com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.statuswidget"],
code_sign_identity: "iPhone Distribution",
targets: ["Loop Status Extension"]
)

update_code_signing_settings(
path: "#{GITHUB_WORKSPACE}/Loop/Loop.xcodeproj",
profile_name: mapping["com.#{TEAMID}.loopkit.Loop.LoopWatch.watchkitextension"],
profile_name: mapping["com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWatch.watchkitextension"],
code_sign_identity: "iPhone Distribution",
targets: ["WatchApp Extension"]
)

update_code_signing_settings(
path: "#{GITHUB_WORKSPACE}/Loop/Loop.xcodeproj",
profile_name: mapping["com.#{TEAMID}.loopkit.Loop.LoopWatch"],
profile_name: mapping["com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWatch"],
code_sign_identity: "iPhone Distribution",
targets: ["WatchApp"]
)

update_code_signing_settings(
path: "#{GITHUB_WORKSPACE}/Loop/Loop.xcodeproj",
profile_name: mapping["com.#{TEAMID}.loopkit.Loop.Loop-Intent-Extension"],
profile_name: mapping["com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.Loop-Intent-Extension"],
code_sign_identity: "iPhone Distribution",
targets: ["Loop Intent Extension"]
)

update_code_signing_settings(
path: "#{GITHUB_WORKSPACE}/Loop/Loop.xcodeproj",
profile_name: mapping["com.#{TEAMID}.loopkit.Loop.LoopWidgetExtension"],
profile_name: mapping["com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWidgetExtension"],
code_sign_identity: "iPhone Distribution",
targets: ["Loop Widget Extension"]
)
Expand Down Expand Up @@ -170,30 +172,30 @@ platform :ios do
end
end

configure_bundle_id("Loop", "com.#{TEAMID}.loopkit.Loop", [
configure_bundle_id("Loop", "com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop", [
Spaceship::ConnectAPI::BundleIdCapability::Type::APP_GROUPS,
Spaceship::ConnectAPI::BundleIdCapability::Type::HEALTHKIT,
Spaceship::ConnectAPI::BundleIdCapability::Type::PUSH_NOTIFICATIONS,
Spaceship::ConnectAPI::BundleIdCapability::Type::SIRIKIT,
Spaceship::ConnectAPI::BundleIdCapability::Type::NFC_TAG_READING
])

configure_bundle_id("Loop Intent Extension", "com.#{TEAMID}.loopkit.Loop.Loop-Intent-Extension", [
configure_bundle_id("Loop Intent Extension", "com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.Loop-Intent-Extension", [
Spaceship::ConnectAPI::BundleIdCapability::Type::APP_GROUPS
])

configure_bundle_id("Loop Status Extension", "com.#{TEAMID}.loopkit.Loop.statuswidget", [
configure_bundle_id("Loop Status Extension", "com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.statuswidget", [
Spaceship::ConnectAPI::BundleIdCapability::Type::APP_GROUPS
])

configure_bundle_id("WatchApp", "com.#{TEAMID}.loopkit.Loop.LoopWatch", [])
configure_bundle_id("WatchApp", "com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWatch", [])

configure_bundle_id("WatchApp Extension", "com.#{TEAMID}.loopkit.Loop.LoopWatch.watchkitextension", [
configure_bundle_id("WatchApp Extension", "com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWatch.watchkitextension", [
Spaceship::ConnectAPI::BundleIdCapability::Type::HEALTHKIT,
Spaceship::ConnectAPI::BundleIdCapability::Type::SIRIKIT
])

configure_bundle_id("Loop Widget Extension", "com.#{TEAMID}.loopkit.Loop.LoopWidgetExtension", [
configure_bundle_id("Loop Widget Extension", "com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWidgetExtension", [
Spaceship::ConnectAPI::BundleIdCapability::Type::APP_GROUPS
])

Expand All @@ -216,12 +218,12 @@ platform :ios do
verbose: true,
git_basic_authorization: Base64.strict_encode64("#{GITHUB_REPOSITORY_OWNER}:#{GH_PAT}"),
app_identifier: [
"com.#{TEAMID}.loopkit.Loop",
"com.#{TEAMID}.loopkit.Loop.statuswidget",
"com.#{TEAMID}.loopkit.Loop.LoopWatch.watchkitextension",
"com.#{TEAMID}.loopkit.Loop.LoopWatch",
"com.#{TEAMID}.loopkit.Loop.Loop-Intent-Extension",
"com.#{TEAMID}.loopkit.Loop.LoopWidgetExtension",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.statuswidget",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWatch.watchkitextension",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWatch",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.Loop-Intent-Extension",
"com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop.LoopWidgetExtension",
]
)
end
Expand All @@ -241,7 +243,7 @@ platform :ios do
bundle_id = Spaceship::ConnectAPI::BundleId.find(identifier)
end

find_bundle_id("com.#{TEAMID}.loopkit.Loop")
find_bundle_id("com.#{TEAMID}#{TEAMID_SUFFIX}.loopkit.Loop")

match(
type: "appstore",
Expand Down Expand Up @@ -321,4 +323,4 @@ platform :ios do
new_certificate_needed_content = File.read(file_path)
puts "Certificate creation or renewal needed: #{new_certificate_needed_content}"
end
end
end