diff --git a/ios/FPStaticServer.m b/ios/FPStaticServer.m index d011f5d..1d1c8d3 100644 --- a/ios/FPStaticServer.m +++ b/ios/FPStaticServer.m @@ -140,7 +140,9 @@ - (dispatch_queue_t)methodQueue } if (self.keep_alive == YES) { +#if TARGET_OS_IOS [options setObject:@(NO) forKey:GCDWebServerOption_AutomaticallySuspendInBackground]; +#endif [options setObject:@2.0 forKey:GCDWebServerOption_ConnectedStateCoalescingInterval]; } diff --git a/react-native-static-server.podspec b/react-native-static-server.podspec index 0396838..e3247b8 100644 --- a/react-native-static-server.podspec +++ b/react-native-static-server.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/futurepress/react-native-static-server.git' } s.requires_arc = true - s.platform = :ios, '7.0' + s.platforms = { :ios => "7.0", :osx => "10.11" } s.preserve_paths = 'README.md', 'package.json', 'index.js' s.source_files = 'ios/*.{h,m}'