Make iOS 9 compatible again. (#874)
Summary: React Native v0.62.0’s template still uses iOS 9 as deployment target, bumping it to 10 this late in the release cycle is probably not a good idea, so instead I made this tiny change to make it iOS 9 compatible again. ⚠️ I made this change on top of the `v0.32.2` **tag**, as `master` was giving me a build failure and in any case it would be better to release _just_ this change as a patch release so the RN `v0.62.0-rc.3` release can go out without having to test Flipper as thoroughly again. ## Changelog Make FlipperKit compatible with iOS 9 again. Pull Request resolved: https://github.com/facebook/flipper/pull/874 Test Plan: - `pod install` with a Podfile that has iOS 9 as its deployment target passes again. - Building the Flipper Sample works. - Building with a RN application created with the `v0.62.0-rc.3` template works. Reviewed By: priteshrnandgaonkar Differential Revision: D20307073 Pulled By: passy fbshipit-source-id: 0dd02dfb810b7382c52ca81b8f1322f807fb3f29
This commit is contained in:
committed by
Facebook Github Bot
parent
eca300d43f
commit
c6c667df69
@@ -17,7 +17,7 @@ Pod::Spec.new do |spec|
|
||||
spec.source = { :git => 'https://github.com/facebook/Sonar.git',
|
||||
:tag=> "v"+flipperkit_version }
|
||||
spec.module_name = 'FlipperKit'
|
||||
spec.platforms = { :ios => "10.0" }
|
||||
spec.platforms = { :ios => "9.0" }
|
||||
spec.default_subspecs = "Core"
|
||||
|
||||
# This subspec is necessary since FBDefines.h is imported as <FBDefines/FBDefines.h>
|
||||
|
||||
@@ -225,7 +225,7 @@ static NSDictionary* YGUnitEnumMap = nil;
|
||||
|
||||
- (NSDictionary<NSString*, SKNodeUpdateData>*)dataMutationsForNode:
|
||||
(UIView*)node {
|
||||
return @{
|
||||
NSDictionary<NSString*, SKNodeUpdateData>* dataMutations = @{
|
||||
// UIView
|
||||
@"UIView.alpha" : ^(NSNumber* value){
|
||||
node.alpha = [value floatValue];
|
||||
@@ -453,9 +453,6 @@ static NSDictionary* YGUnitEnumMap = nil;
|
||||
@"Accessibility.accessibilityTraits.UIAccessibilityTraitCausesPageTurn": ^(NSNumber *value) {
|
||||
node.accessibilityTraits = AccessibilityTraitsToggle(node.accessibilityTraits, UIAccessibilityTraitCausesPageTurn, [value boolValue]);
|
||||
},
|
||||
@"Accessibility.accessibilityTraits.UIAccessibilityTraitTabBar": ^(NSNumber *value) {
|
||||
node.accessibilityTraits = AccessibilityTraitsToggle(node.accessibilityTraits, UIAccessibilityTraitTabBar, [value boolValue]);
|
||||
},
|
||||
@"Accessibility.accessibilityViewIsModal": ^(NSNumber *value) {
|
||||
node.accessibilityViewIsModal = [value boolValue];
|
||||
},
|
||||
@@ -464,6 +461,20 @@ static NSDictionary* YGUnitEnumMap = nil;
|
||||
},
|
||||
}
|
||||
;
|
||||
if (@available(iOS 10.0, *)) {
|
||||
NSMutableDictionary<NSString*, SKNodeUpdateData>* latestDataMutations =
|
||||
[dataMutations mutableCopy];
|
||||
latestDataMutations
|
||||
[@"Accessibility.accessibilityTraits.UIAccessibilityTraitTabBar"] =
|
||||
^(NSNumber* value) {
|
||||
node.accessibilityTraits = AccessibilityTraitsToggle(
|
||||
node.accessibilityTraits,
|
||||
UIAccessibilityTraitTabBar,
|
||||
[value boolValue]);
|
||||
};
|
||||
dataMutations = latestDataMutations;
|
||||
}
|
||||
return dataMutations;
|
||||
}
|
||||
|
||||
- (NSArray<SKNamed<NSString*>*>*)attributesForNode:(UIView*)node {
|
||||
|
||||
@@ -3,7 +3,7 @@ source 'https://github.com/facebook/Sonar.git'
|
||||
source 'https://github.com/CocoaPods/Specs'
|
||||
|
||||
target 'Sample' do
|
||||
platform :ios, '10.0'
|
||||
platform :ios, '9.0'
|
||||
pod 'FlipperKit', :path => '../../FlipperKit.podspec'
|
||||
pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', :path => '../../FlipperKit.podspec'
|
||||
pod 'FlipperKit/SKIOSNetworkPlugin', :path => '../../FlipperKit.podspec'
|
||||
|
||||
Reference in New Issue
Block a user