Skip to content

Commit 2827f1b

Browse files
committed
Adding ability to link a bolt card with Phoenix wallet on iOS.
1 parent 1c6e3d6 commit 2827f1b

File tree

118 files changed

+13446
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+13446
-409
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
lightningkmp = "1.10.2"
2+
lightningkmp = "1.10.3-CARDPAYMENT"
33
secp256k1 = "0.17.3" # keep in check with lightning-kmp secp version
44

55
kotlin = "2.1.10"

phoenix-ios/phoenix-ios.xcodeproj/project.pbxproj

Lines changed: 323 additions & 40 deletions
Large diffs are not rendered by default.

phoenix-ios/phoenix-ios.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phoenix-ios/phoenix-ios/AppDelegate.swift

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, MessagingDelegate {
6060
UINavigationBar.appearance().compactAppearance = navBarAppearance
6161
UINavigationBar.appearance().standardAppearance = navBarAppearance
6262

63-
#if !targetEnvironment(simulator) // push notifications don't work on iOS simulator
64-
UIApplication.shared.registerForRemoteNotifications()
65-
#endif
63+
// Push notifictions now work on the iOS simulator.
64+
// But only for:
65+
// - Macs with Apple Silicon processor
66+
// - Macs with Intel processor & the T2 security chip
67+
// https://support.apple.com/en-us/103265
68+
//
69+
UIApplication.shared.registerForRemoteNotifications()
6670

6771
FirebaseApp.configure()
6872
Messaging.messaging().delegate = self
@@ -216,15 +220,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, MessagingDelegate {
216220
log.trace("application(_:didReceiveRemoteNotification:fetchCompletionHandler:)")
217221
log.debug("remote notification: \(userInfo)")
218222

219-
// If the app is in the foreground:
220-
// - we can ignore this notification
221-
//
222-
// If the app is in the background:
223-
// - this notification was delivered to the notifySrvExt, which is in charge of processing it
224-
225-
DispatchQueue.main.async {
226-
completionHandler(.noData)
227-
}
223+
PushManager.processRemoteNotification(userInfo, completionHandler)
228224
}
229225

230226
func messaging(
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "boltcard.svg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
},
12+
"properties" : {
13+
"preserves-vector-representation" : true
14+
}
15+
}
Lines changed: 16 additions & 0 deletions
Loading

phoenix-ios/phoenix-ios/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
6+
<array>
7+
<string>D2760000850101</string>
8+
</array>
59
<key>BGTaskSchedulerPermittedIdentifiers</key>
610
<array>
711
<string>co.acinq.phoenix.WatchTower</string>

0 commit comments

Comments
 (0)