-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #351 from mindbox-cloud/release/2.9.0
Release/2.9.0
- Loading branch information
Showing
72 changed files
with
2,426 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Preparation for release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
preparation: | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Extract version from branch name | ||
run: echo "VERSION=${GITHUB_REF#refs/heads/release/}" >> $GITHUB_ENV | ||
|
||
- name: Check for existing branch | ||
run: | | ||
if git ls-remote --heads origin release/${{ env.VERSION }} | grep release/${{ env.VERSION }}; then | ||
echo "Branch release/${{ env.VERSION }} already exists." | ||
exit 1 | ||
fi | ||
shell: bash | ||
|
||
- name: Bump version | ||
run: ./git-release-branch-create.sh "${{ env.VERSION }}" | ||
|
||
- name: Check if sdkVersion matches VERSION | ||
run: | | ||
SDK_VERSION=$(sed -n 's/^.*sdkVersion = "\(.*\)"/\1/p' SDKVersionProvider/SDKVersionProvider.swift) | ||
if [ "$SDK_VERSION" != "${{ env.VERSION }}" ]; then | ||
echo "SDK version ($SDK_VERSION) does not match the branch version (${{ env.VERSION }})." | ||
exit 1 | ||
fi | ||
shell: bash | ||
|
||
- name: Create Pull Request | ||
id: create-pr | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
commit-message: Update release version to ${{ env.VERSION }} | ||
title: "Release/${{ env.VERSION }}" | ||
body: | | ||
Updates the release version to ${{ env.VERSION }}. | ||
branch: "release/${{ env.VERSION }}" | ||
base: "master" | ||
|
||
- name: Post to a Slack channel | ||
id: slack | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: 'C06RXV161RA' | ||
payload: | | ||
{ | ||
"text": "iOS Release Branch Notification", | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "🚀 iOS Release Branch Created" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Branch Name:* *`release/${{ env.VERSION }}`*\n*Status:* Success :white_check_mark:" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "actions", | ||
"elements": [ | ||
{ | ||
"type": "button", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "Pull Request" | ||
}, | ||
"url": "${{ steps.create-pr.outputs.pull-request-url }}" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_MOBILE_NOTIFIER_TOKEN }} |
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
78 changes: 78 additions & 0 deletions
78
Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1530" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES" | ||
buildArchitectures = "Automatic"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "0AEDBC752BB6F8F200EE8722" | ||
BuildableName = "Example.app" | ||
BlueprintName = "Example" | ||
ReferencedContainer = "container:Example.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
</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 = "0AEDBC752BB6F8F200EE8722" | ||
BuildableName = "Example.app" | ||
BlueprintName = "Example" | ||
ReferencedContainer = "container:Example.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "0AEDBC752BB6F8F200EE8722" | ||
BuildableName = "Example.app" | ||
BlueprintName = "Example" | ||
ReferencedContainer = "container:Example.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// | ||
// AppDelegate.swift | ||
// Example | ||
// | ||
// Created by Дмитрий Ерофеев on 29.03.2024. | ||
// | ||
|
||
import Mindbox | ||
import Foundation | ||
import UIKit | ||
|
||
@main | ||
class AppDelegate: MindboxAppDelegate { | ||
|
||
//https://developers.mindbox.ru/docs/ios-sdk-initialization | ||
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | ||
super.application(application, didFinishLaunchingWithOptions: launchOptions) | ||
|
||
do { | ||
let mindboxSdkConfig = try MBConfiguration( | ||
//To run the application on a physical device you need to change the endpoint | ||
//You should also change the application bundle ID in all targets, more details in the readme | ||
//You can still run the application on the simulator to see In-Apps | ||
endpoint: "Mpush-test.ReleaseExample.IosApp", | ||
domain: "api.mindbox.ru", | ||
subscribeCustomerIfCreated: true, | ||
shouldCreateCustomer: true | ||
) | ||
Mindbox.shared.initialization(configuration: mindboxSdkConfig) | ||
} catch { | ||
print(error) | ||
} | ||
//https://developers.mindbox.ru/docs/ios-send-push-notifications-appdelegate | ||
registerForRemoteNotifications() | ||
return true | ||
} | ||
|
||
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { | ||
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) | ||
} | ||
|
||
//https://developers.mindbox.ru/docs/ios-send-push-notifications-appdelegate | ||
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { | ||
completionHandler([.list, .badge, .sound]) | ||
|
||
//https://developers.mindbox.ru/docs/ios-sdk-methods | ||
print("Is mindbox notification: \(Mindbox.shared.isMindboxPush(userInfo: notification.request.content.userInfo))") | ||
print("Notification data: \(String(describing: Mindbox.shared.getMindboxPushData(userInfo: notification.request.content.userInfo)))") | ||
if let uniqueKey = Mindbox.shared.getMindboxPushData(userInfo: notification.request.content.userInfo)?.uniqueKey { | ||
Mindbox.shared.pushClicked(uniqueKey: uniqueKey) | ||
} | ||
} | ||
|
||
//https://developers.mindbox.ru/docs/ios-send-push-notifications-appdelegate | ||
func registerForRemoteNotifications() { | ||
UNUserNotificationCenter.current().delegate = self | ||
DispatchQueue.main.async { | ||
UIApplication.shared.registerForRemoteNotifications() | ||
UNUserNotificationCenter.current().requestAuthorization(options: [ .alert, .sound, .badge]) { granted, error in | ||
print("Permission granted: \(granted)") | ||
if let error = error { | ||
print("NotificationsRequestAuthorization failed with error: \(error.localizedDescription)") | ||
} | ||
Mindbox.shared.notificationsRequestAuthorization(granted: granted) | ||
} | ||
} | ||
} | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
Example/Example/Assets.xcassets/AccentColor.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+46.6 KB
Example/Example/Assets.xcassets/AppIcon.appiconset/AppIcon1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions
14
Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "AppIcon1024x1024.png", | ||
"idiom" : "universal", | ||
"platform" : "ios", | ||
"size" : "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
Example/Example/Assets.xcassets/MBBackground.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "1.000", | ||
"green" : "1.000", | ||
"red" : "1.000" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
}, | ||
{ | ||
"appearances" : [ | ||
{ | ||
"appearance" : "luminosity", | ||
"value" : "dark" | ||
} | ||
], | ||
"color" : { | ||
"color-space" : "display-p3", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0.165", | ||
"green" : "0.176", | ||
"red" : "0.169" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Oops, something went wrong.