|
@@ -287,8 +287,7 @@ class PushNotificationManager {
|
|
|
case 200:
|
|
case 200:
|
|
|
completion(true, nil)
|
|
completion(true, nil)
|
|
|
case 400:
|
|
case 400:
|
|
|
- let environmentGuidance = self.getEnvironmentGuidance()
|
|
|
|
|
- completion(false, "Bad request. The request was invalid or malformed. \(responseBodyMessage)\n\n\(environmentGuidance)")
|
|
|
|
|
|
|
+ completion(false, "Bad request. The request was invalid or malformed. \(responseBodyMessage)")
|
|
|
case 403:
|
|
case 403:
|
|
|
completion(false, "Authentication error. Check your certificate or authentication token. \(responseBodyMessage)")
|
|
completion(false, "Authentication error. Check your certificate or authentication token. \(responseBodyMessage)")
|
|
|
case 404:
|
|
case 404:
|
|
@@ -327,31 +326,4 @@ class PushNotificationManager {
|
|
|
return URL(string: urlString)
|
|
return URL(string: urlString)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /// Provides environment-specific guidance for APNS configuration
|
|
|
|
|
- /// - Returns: String with guidance based on build configuration
|
|
|
|
|
- private func getEnvironmentGuidance() -> String {
|
|
|
|
|
- #if DEBUG
|
|
|
|
|
- let buildType = "Xcode"
|
|
|
|
|
- let recommendedEnvironment = "Development"
|
|
|
|
|
- let environmentSetting = "Production Environment: OFF"
|
|
|
|
|
- #else
|
|
|
|
|
- let buildType = "Browser/TestFlight"
|
|
|
|
|
- let recommendedEnvironment = "Production"
|
|
|
|
|
- let environmentSetting = "Production Environment: ON"
|
|
|
|
|
- #endif
|
|
|
|
|
-
|
|
|
|
|
- let currentEnvironment = productionEnvironment ? "Production" : "Development"
|
|
|
|
|
-
|
|
|
|
|
- return """
|
|
|
|
|
- Environment Configuration Help:
|
|
|
|
|
-
|
|
|
|
|
- Build Type: \(buildType)
|
|
|
|
|
- Current Setting: \(currentEnvironment)
|
|
|
|
|
- Recommended Setting: \(recommendedEnvironment)
|
|
|
|
|
-
|
|
|
|
|
- Please check your Trio Remote control settings:
|
|
|
|
|
- • If you built with Xcode: Set "\(environmentSetting)"
|
|
|
|
|
- • If you built with Browser/TestFlight: Set "Production Environment: ON"
|
|
|
|
|
- """
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|