Closed SwiftNativeDeveloper closed 6 months ago
@SwiftNativeDeveloper
If using SDK below 3.1 the pendoEnableSwiftUI() modifier must be applied
OR
Deprecated from SDK 3.1. The SDK automatically performs the logic, removing the need to use this API. Calling it will be ignored.
~~otherwise its redundant and will be deprecated in the future.
The reason why we didnt put warning YET coz its not deprecated for all SDK versions and should not produce warning yet.~~
I'm a little confused about 'not deprecated for all SDK versions'. The attribute, in code, wouldn't retroactively apply to earlier versions of the SDK. Adding the attribute to newer code would only affect new code pulled from artifactory. At least that is my understanding of what is going on under the covers of the binary framework swift package.
You are right I think I confused it with something else we will do it in the next version
fixed in 3.2.1
Platform + Version iOS
SDK Version 3.1.x or newer
Framework SwiftUI
Describe the bug Your documentation states that the pendoEnableSwiftUI function is deprecated, however I'm not seeing a warning in Xcode. I assume that an availability attribute was not applied to this function and that is why I'm not seeing warnings in Xcode using a deprecated function call.
Please use the availability attributes built into the Swift programming language to mark the function as deprecated. https://docs.swift.org/swift-book/documentation/the-swift-programming-language/attributes/
To Reproduce
Expected behavior Methods that are deprecated in documentation should also be deprecated in source code so Xcode can produce build warnings for deprecated API usage. https://github.com/pendo-io/pendo-mobile-sdk/blob/master/api-documentation/native-ios-apis.md#viewpendoenableswiftui
Logs N/A
Sample Code This code does not produce an Xcode warning as expected based on the documentation.
Additional context All other functions or features in the SDK that are deprecated should also state that via code techniques.