@superfan-app/spotify-auth 0.1.47 → 0.1.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ #import <SpotifyiOS/SpotifyiOS.h>
@@ -30,12 +30,14 @@ Pod::Spec.new do |s|
30
30
  'DEFINES_MODULE' => 'YES',
31
31
  'SWIFT_COMPILATION_MODE' => 'wholemodule',
32
32
  'ENABLE_BITCODE' => 'NO',
33
- 'IPHONEOS_DEPLOYMENT_TARGET' => '13.0'
33
+ 'IPHONEOS_DEPLOYMENT_TARGET' => '13.0',
34
+ 'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/SpotifyAuth-Bridging-Header.h'
34
35
  }
35
36
 
36
37
  s.user_target_xcconfig = {
37
38
  'ENABLE_BITCODE' => 'NO',
38
- 'IPHONEOS_DEPLOYMENT_TARGET' => '13.0'
39
+ 'IPHONEOS_DEPLOYMENT_TARGET' => '13.0',
40
+ 'OTHER_LDFLAGS' => '-ObjC'
39
41
  }
40
42
 
41
43
  # Include all Swift files in the same directory as the podspec.
@@ -639,13 +639,66 @@ final class SpotifyAuthAuth: NSObject, SPTSessionManagerDelegate, SpotifyOAuthVi
639
639
  }
640
640
  }
641
641
 
642
- private func secureLog(_ message: String) {
643
- print("[SpotifyAuthAuth] \(message)")
642
+ // MARK: - Logging
643
+
644
+ private func secureLog(_ message: String, sensitive: Bool = false) {
645
+ #if DEBUG
646
+ if sensitive {
647
+ print("[SpotifyAuth] ********")
648
+ } else {
649
+ print("[SpotifyAuth] \(message)")
650
+ }
651
+ #else
652
+ if !sensitive {
653
+ print("[SpotifyAuth] \(message)")
654
+ }
655
+ #endif
644
656
  }
645
657
 
646
658
  deinit {
647
659
  cleanupPreviousSession()
648
660
  }
661
+
662
+ // MARK: - URL Handling
663
+
664
+ /// Handle URL callback for UIApplicationDelegate
665
+ public func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
666
+ // If we're using web auth, let the web view handle it
667
+ if isUsingWebAuth {
668
+ return false
669
+ }
670
+
671
+ // Forward to session manager for app-switch flow
672
+ if let sessionManager = self.sessionManager {
673
+ let handled = sessionManager.application(app, open: url, options: options)
674
+ if handled {
675
+ secureLog("URL handled by session manager")
676
+ }
677
+ return handled
678
+ }
679
+
680
+ return false
681
+ }
682
+
683
+ /// Handle URL callback for UISceneDelegate
684
+ public func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
685
+ guard let url = URLContexts.first?.url else {
686
+ return
687
+ }
688
+
689
+ // If we're using web auth, let the web view handle it
690
+ if isUsingWebAuth {
691
+ return
692
+ }
693
+
694
+ // Forward to session manager for app-switch flow
695
+ if let sessionManager = self.sessionManager {
696
+ let handled = sessionManager.application(UIApplication.shared, open: url, options: [:])
697
+ if handled {
698
+ secureLog("URL handled by session manager")
699
+ }
700
+ }
701
+ }
649
702
  }
650
703
 
651
704
  // MARK: - Helper Extension
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superfan-app/spotify-auth",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "description": "Spotify OAuth module for Expo",
5
5
  "main": "src/index.tsx",
6
6
  "types": "build/index.d.ts",