Posts

Post not yet marked as solved
1 Replies
If your app is using a Safari View Controller to display the survey or redirect URLs, ensure that the delegate methods are correctly implemented. Check if any errors are being reported through the delegate methods, such as safariViewController:didCompleteInitialLoad:. that the URL you are trying to redirect to is using HTTPS, or add an exception to the ATS settings if necessary. also try summate your URL with other online tool such as https://redirectchecker.com/ to get its detail redirection report.
Post not yet marked as solved
1 Replies
Consider using HTTP 301 instead of HTTP 302 if applicable. AVPlayer might handle permanent redirects differently and perform only one request in such cases.
Post not yet marked as solved
3 Replies
There is no specific limitation in iOS for multiple redirections. However, there are certain factors that could affect the redirection process and cause issues when tracking URLs on iOS devices. Here are a few potential causes to consider: Universal Link configuration: Universal Links require proper configuration on both the server and the app side. Ensure that the Universal Links are set up correctly and that the associated domains and entitlements are properly configured in your app's capabilities and on your server. App association file: Make sure that the app association file (AASA file) is correctly configured and hosted on your server. The AASA file is responsible for mapping the domain to the associated app. Deep linking implementation: If the redirection is meant to open a specific page or screen within the app, verify that the deep linking implementation is correctly set up. This includes handling the incoming URL and navigating to the appropriate content within the app. SSL certificate and HTTPS: Check that your server is using a valid SSL certificate and serving the tracking URLs over HTTPS. iOS requires secure connections for Universal Links to work properly. iOS version compatibility: Ensure that the iOS version on the devices you are testing is compatible with the features and configurations used for redirection. It's possible that certain versions of iOS may have specific bugs or limitations related to Universal Links or URL handling. Testing and debugging: Test the tracking URLs and redirection process on multiple iOS devices and versions to identify any inconsistencies or issues. You can also examine the logs and console output on the server and within the app to check for any error messages or unexpected behavior. If you have already verified the above factors and are still experiencing issues, it might be helpful to consult with the Braze support team or the developers responsible for the app's deep linking implementation. They can provide more specific guidance based on the configurations and tools you are using. Remember to test the redirection process thoroughly on various iOS devices and versions to ensure compatibility and a smooth user experience. I hope this helps! Let me know if you have any further questions.
Post not yet marked as solved
2 Replies
If a server responds with a 302 redirect and the app does not explicitly implement the willPerformHTTPRedirection delegate method, the network request will follow the redirect automatically. In this case, the redirect will be handled by the underlying networking framework used by the app, such as URLSession or Alamofire. The default behavior of these networking frameworks is to handle redirects automatically, unless explicitly configured otherwise. The frameworks will typically follow the redirect and make a new request to the URL specified in the redirect response. Therefore, if the server responds with a 302 redirect and the new URL specified in the redirect response is valid and accessible, the subsequent network request should be successful (assuming there are no other issues). However, if the new URL is not valid or accessible, or if there are any network connectivity issues, the subsequent request may fail. In such cases, the app would typically receive an error or failure response, rather than a successful 200 response. To ensure successful requests during domain migrations, it's important to test the redirects thoroughly on different versions of the app and network conditions. You should also consider implementing appropriate error handling and fallback mechanisms in the app to handle cases where the redirect fails or encounters errors. Additionally, if you have control over the app's codebase, implementing the willPerformHTTPRedirection delegate method allows you to have more control over the redirect behavior and handle it in a customized manner if needed. Overall, if the server is set up to respond with a 302 redirect and the app is using a standard networking framework, the redirect should be followed automatically by the app, and a successful request (200 response) can be expected if the new URL is valid and accessible. I hope this clarifies the behavior of redirects in the context of app networking. Let me know if you have any further questions.
Post not yet marked as solved
10 Replies
To convert HEIC (High Efficiency Image Format) images to JPG format using Swift, you can utilize the UIImage and Data APIs provided by iOS. Here's an example of how you can convert HEIC images to JPG: import UIKit func convertHEICtoJPG(heicData: Data) -> Data? { guard let image = UIImage(data: heicData) else { print("Failed to create UIImage from HEIC data") return nil } guard let jpgData = image.jpegData(compressionQuality: 1.0) else { print("Failed to convert UIImage to JPG data") return nil } return jpgData } In this example, the convertHEICtoJPG function takes an input Data object containing the HEIC image data and returns a Data object containing the converted JPG image data. Here's how you can use this function to convert a HEIC image: // Assuming you have the HEIC image data stored in a Data object let heicData: Data = ... if let jpgData = convertHEICtoJPG(heicData: heicData) { // Use the converted JPG data as needed // For example, you can save it to a file or upload it to a server // ... } else { // Conversion failed, handle the error or notify the user // ... } Make sure to handle any potential errors, such as if the input HEIC data cannot be converted to a UIImage or if the conversion to JPG data fails. Remember to include the appropriate error handling and consider any additional steps required for your specific use case, such as saving the converted JPG data to a file or uploading it to a server. Note: HEIC images are supported starting from iOS 11. If you're targeting older versions of iOS, you may need to consider using third-party libraries or tools for HEIC to JPG conversion.