RUMM-1324 Fix RUM views tracking issue for iOS 11 (and make tests green for 11.x and 12.x) #474
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What and why?
📦 This PR fixes RUM Views auto-instrumentation issue for iOS 11 and fixes unit tests issues for iOS 11.x and 12.x.
How?
RUM Views auto-instrumentation issue for iOS 11
Views instrumentation opts-out from tracking "bare" UIKit view controllers. This is determined by checking if the vc class is defined inside
UIKitCore.framework
. This check was failing for iOS 11, because it shipsUIKit.framework
instead ofUIKitCore.framework
.Tests failures for iOS 11.x and 12.x
Several encoding-related tests were fixed for versions prior to iOS 13. They were failing due to known limitation of JSON encoder on iOS 11 and 12 - it can only encode object or array as the root type.
Running all unit tests nightly on iOS 11.x-14.x
To mitigate this kind of regression in the future, I was trying to configure nightly job for running tests on all iOS versions on Bitrise CI. Unfortunately, I couldn't find a good solution to set it up. I've contacted Bitrise support for guidance and recommendation. What I've tried so far:
xcode-install
.The first approach requires patching
xcframeworks
toframeworks
for Xcode 11.x and 10.x. I did it, but then faced the swift compiler issue, as some of the APIs are not available on older versions of the compiler. This way seems to be too error-prone and very hard to maintain. (note: supporting older versions of Xcode is not our focus as Apple keeps the bar high, with enforcing Xcode 12 for App Store submissions)The second approach seems promising (simulator download takes
~1min
on Bitrise), but it's blocked byxcode-install
failing with "Please authenticate to install iOS ##.# Simulator...". This appears to come from required sudo permission. I've contacted Bitrise support to ask on that.Until getting response from Bitrise support, we can consider this topic closed. Separate JIRA was created for configuring nightly run once we unblock this topic.
Review checklist