diff --git a/framework/examples/ios-demo/HippyDemo.xcodeproj/project.pbxproj b/framework/examples/ios-demo/HippyDemo.xcodeproj/project.pbxproj index b5bf8471335..95f5c05b1dd 100644 --- a/framework/examples/ios-demo/HippyDemo.xcodeproj/project.pbxproj +++ b/framework/examples/ios-demo/HippyDemo.xcodeproj/project.pbxproj @@ -17,14 +17,13 @@ 5A60628334CE16EA4F8B1329 /* DemoNavigationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 16348E2DEBFF10ADD6FCF7A9 /* DemoNavigationViewController.m */; }; 72328C3389BA8DD5E54D7D5F /* TurboConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 46034630F6D4A25199673157 /* TurboConfig.m */; }; 74C51526435B1AB788CBF991 /* TurboBaseModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = CC8AEAE8BF116954FB41BDF9 /* TurboBaseModule.mm */; }; + 7C8A07982ADCEE2D7C9EAED8 /* Pods_HippyDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 344AB561913707F8A4793EC8 /* Pods_HippyDemo.framework */; }; 8C009766BC90CAF781042636 /* PageCreationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E734E5A93F5B92EA4149B8D /* PageCreationViewController.m */; }; 8D5E861571620B4DA80254C2 /* TTTGB-Medium.otf in CopyFiles */ = {isa = PBXBuildFile; fileRef = B2FA2A97C78628634C6AFC9A /* TTTGB-Medium.otf */; }; 994E84462AD481034728A29D /* HippyPageCacheView.m in Sources */ = {isa = PBXBuildFile; fileRef = 82BFD15025A6217FEE93CC45 /* HippyPageCacheView.m */; }; 9C99A05896359E49AE9A8352 /* MyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 90F34E176169143334EDFC28 /* MyView.m */; }; 9CF888F990C83ECD4F6C78AA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5EF877A8CB4B2AD68A780A12 /* Assets.xcassets */; }; - A3F629CA4C94D65F42BB4B33 /* HippyDemoViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9EB0CD5FCC3F38E3C7DC5E00 /* HippyDemoViewController.mm */; }; - B4CB9EEA2C501CCD508731F6 /* Pods_HippyDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25D66C0C95F43BF303761823 /* Pods_HippyDemo.framework */; }; - B5E0049F9941EA38E80EC858 /* HippyDemoLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9D15F65FD369654F00146AD7 /* HippyDemoLoader.mm */; }; + A3F629CA4C94D65F42BB4B33 /* HippyDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9EB0CD5FCC3F38E3C7DC5E00 /* HippyDemoViewController.m */; }; B8AA2B793BE43710EFC9D4DC /* TestModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = D2241406CEF00D2FF5938BB2 /* TestModule.mm */; }; BD5196B65EE0B712FDA2EB9B /* UIViewController+Title.m in Sources */ = {isa = PBXBuildFile; fileRef = C412B5D210F1E3359523628C /* UIViewController+Title.m */; }; C1A78F8868963E6C790472AA /* PageCreationCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 25B65684EC9C9AF27BB04D21 /* PageCreationCell.xib */; }; @@ -63,16 +62,15 @@ 1E1EECB72C2ACDCB192E6628 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; path = res; sourceTree = SOURCE_ROOT; }; 1E734E5A93F5B92EA4149B8D /* PageCreationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PageCreationViewController.m; sourceTree = ""; }; 25B65684EC9C9AF27BB04D21 /* PageCreationCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PageCreationCell.xib; sourceTree = ""; }; - 25D66C0C95F43BF303761823 /* Pods_HippyDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HippyDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 263EFA7461EF8C6CCDF67C66 /* PageCreationCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PageCreationCell.m; sourceTree = ""; }; 27E7AA75BF1236A4328285E7 /* HippyPageCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HippyPageCache.m; sourceTree = ""; }; 28C2DA6A96B596294158B364 /* HippyDemoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HippyDemoViewController.h; sourceTree = ""; }; 331F0D867F0DF450A84E4587 /* Pods-HippyDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HippyDemo.debug.xcconfig"; path = "Target Support Files/Pods-HippyDemo/Pods-HippyDemo.debug.xcconfig"; sourceTree = ""; }; + 344AB561913707F8A4793EC8 /* Pods_HippyDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HippyDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3A2AA203AF38A01360BEFB2A /* HippyDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HippyDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 427F60D1B98DA953328F4E71 /* DemoBaseViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoBaseViewController.h; sourceTree = ""; }; 46034630F6D4A25199673157 /* TurboConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TurboConfig.m; sourceTree = ""; }; 4708C41E8571123282E2B806 /* DemoBaseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoBaseViewController.m; sourceTree = ""; }; - 4BCCCB3005CE328BD310C417 /* HippyDemoLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HippyDemoLoader.h; sourceTree = ""; }; 53A0957F7CC6967C8F70403A /* PageManagerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PageManagerViewController.h; sourceTree = ""; }; 5EF877A8CB4B2AD68A780A12 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 6045C301C6CFDC6C2E87AA66 /* IconUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IconUtils.h; sourceTree = ""; }; @@ -89,8 +87,7 @@ 90F34E176169143334EDFC28 /* MyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyView.m; sourceTree = ""; }; 91861A8DD9D692FEDF657D34 /* HomePageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomePageViewController.h; sourceTree = ""; }; 9ABAD8FCDB669A1A6F327CDB /* DebugCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DebugCell.h; sourceTree = ""; }; - 9D15F65FD369654F00146AD7 /* HippyDemoLoader.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = HippyDemoLoader.mm; sourceTree = ""; }; - 9EB0CD5FCC3F38E3C7DC5E00 /* HippyDemoViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = HippyDemoViewController.mm; sourceTree = ""; }; + 9EB0CD5FCC3F38E3C7DC5E00 /* HippyDemoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HippyDemoViewController.m; sourceTree = ""; }; A066953E3614D26125F617EF /* HippyPageCacheContainerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HippyPageCacheContainerView.m; sourceTree = ""; }; B2FA2A97C78628634C6AFC9A /* TTTGB-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "TTTGB-Medium.otf"; sourceTree = ""; }; B5A22F93EAA399DE400CED88 /* TestModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestModule.h; sourceTree = ""; }; @@ -117,7 +114,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B4CB9EEA2C501CCD508731F6 /* Pods_HippyDemo.framework in Frameworks */, + 7C8A07982ADCEE2D7C9EAED8 /* Pods_HippyDemo.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -148,7 +145,6 @@ 57D9249C5EA211061816F73B /* RenderPage */, 09FA8898DDD429EC19584446 /* SettingsPage */, 529ECDFF8342B9C9D950B1FA /* turbomodule */, - 260EEB3518979BB11CBFC5C8 /* vfsloader */, ); path = HippyDemo; sourceTree = ""; @@ -164,15 +160,6 @@ path = SettingsPage; sourceTree = ""; }; - 260EEB3518979BB11CBFC5C8 /* vfsloader */ = { - isa = PBXGroup; - children = ( - 4BCCCB3005CE328BD310C417 /* HippyDemoLoader.h */, - 9D15F65FD369654F00146AD7 /* HippyDemoLoader.mm */, - ); - path = vfsloader; - sourceTree = ""; - }; 37AC1BAC994661BA846D4236 /* Products */ = { isa = PBXGroup; children = ( @@ -219,7 +206,7 @@ isa = PBXGroup; children = ( 28C2DA6A96B596294158B364 /* HippyDemoViewController.h */, - 9EB0CD5FCC3F38E3C7DC5E00 /* HippyDemoViewController.mm */, + 9EB0CD5FCC3F38E3C7DC5E00 /* HippyDemoViewController.m */, ); path = RenderPage; sourceTree = ""; @@ -259,7 +246,7 @@ C24B18F307439A018EC32537 /* Frameworks */ = { isa = PBXGroup; children = ( - 25D66C0C95F43BF303761823 /* Pods_HippyDemo.framework */, + 344AB561913707F8A4793EC8 /* Pods_HippyDemo.framework */, ); name = Frameworks; sourceTree = ""; @@ -381,8 +368,7 @@ 369577C613161936EE28F52E /* DebugCell.m in Sources */, 5A5A9B087B27BD97E132C49E /* DemoBaseViewController.m in Sources */, 5A60628334CE16EA4F8B1329 /* DemoNavigationViewController.m in Sources */, - B5E0049F9941EA38E80EC858 /* HippyDemoLoader.mm in Sources */, - A3F629CA4C94D65F42BB4B33 /* HippyDemoViewController.mm in Sources */, + A3F629CA4C94D65F42BB4B33 /* HippyDemoViewController.m in Sources */, D026B185E903AE8F958F8588 /* HippyPageCache.m in Sources */, DF04004944D28CE1569D68EC /* HippyPageCacheContainerView.m in Sources */, 994E84462AD481034728A29D /* HippyPageCacheView.m in Sources */, diff --git a/framework/examples/ios-demo/HippyDemo/RenderPage/HippyDemoViewController.mm b/framework/examples/ios-demo/HippyDemo/RenderPage/HippyDemoViewController.m similarity index 99% rename from framework/examples/ios-demo/HippyDemo/RenderPage/HippyDemoViewController.mm rename to framework/examples/ios-demo/HippyDemo/RenderPage/HippyDemoViewController.m index e4bb6087b5e..23681354726 100644 --- a/framework/examples/ios-demo/HippyDemo/RenderPage/HippyDemoViewController.mm +++ b/framework/examples/ios-demo/HippyDemo/RenderPage/HippyDemoViewController.m @@ -36,10 +36,11 @@ static NSString *const engineKey = @"Demo"; static NSString *formatLog(NSDate *timestamp, HippyLogLevel level, NSString *fileName, NSNumber *lineNumber, NSString *message) { - static NSArray *logLevelMap = @[@"TRACE", @"INFO", @"WARN", @"ERROR", @"FATAL"]; + static NSArray *logLevelMap; static NSDateFormatter *formatter; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ + logLevelMap = @[@"TRACE", @"INFO", @"WARN", @"ERROR", @"FATAL"]; formatter = [NSDateFormatter new]; formatter.dateFormat = formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss.SSS"; }); diff --git a/framework/examples/ios-demo/HippyDemo/vfsloader/HippyDemoLoader.h b/framework/examples/ios-demo/HippyDemo/vfsloader/HippyDemoLoader.h deleted file mode 100644 index eb35e4bd5c3..00000000000 --- a/framework/examples/ios-demo/HippyDemo/vfsloader/HippyDemoLoader.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making - * Hippy available. - * - * Copyright (C) 2022 THL A29 Limited, a Tencent company. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "HippyDefines.h" -#import "VFSUriHandler.h" -#import "VFSUriLoader.h" - -@class HippyBridge; -class NativeRenderManager; - -class HippyDemoLoader : public VFSUriLoader { -}; - - -class HippyDemoHandler : public VFSUriHandler { - -}; diff --git a/framework/examples/ios-demo/HippyDemo/vfsloader/HippyDemoLoader.mm b/framework/examples/ios-demo/HippyDemo/vfsloader/HippyDemoLoader.mm deleted file mode 100644 index aa5d411e65e..00000000000 --- a/framework/examples/ios-demo/HippyDemo/vfsloader/HippyDemoLoader.mm +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making - * Hippy available. - * - * Copyright (C) 2022 THL A29 Limited, a Tencent company. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "HippyBridge.h" -#import "HippyDemoLoader.h" -#import "HippyFileHandler.h" -#import "NativeRenderManager.h" diff --git a/framework/examples/ios-demo/podfile b/framework/examples/ios-demo/podfile index c9823bcbec4..d80b3186b90 100644 --- a/framework/examples/ios-demo/podfile +++ b/framework/examples/ios-demo/podfile @@ -1,10 +1,8 @@ #ENV["layout_engine"]="Taitank" #ENV["js_engine"] = "v8" -install! 'cocoapods' - -use_frameworks! :linkage => :static # 静态库framework格式 -ENV["use_frameworks"] = "true" # for hippy when set use_frameworks! +install! 'cocoapods', :deterministic_uuids => false +use_frameworks! :linkage => :static workspace 'HippyDemo.xcworkspace' diff --git a/hippy.podspec b/hippy.podspec index 3b48f1bbab1..05d6eadda55 100644 --- a/hippy.podspec +++ b/hippy.podspec @@ -1,14 +1,6 @@ -# -# Be sure to run `pod lib lint hippy.podspec --verbose --use-libraries' to ensure this is a -# valid spec before submitting. -# -# Any lines starting with a # are optional, but their use is encouraged -# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html -# layout_engine = "Taitank" js_engine = "jsc" -use_frameworks = false; Pod::Spec.new do |s| if ENV["layout_engine"] @@ -17,20 +9,14 @@ Pod::Spec.new do |s| if ENV["js_engine"] js_engine = ENV["js_engine"] end - if ENV["use_frameworks"] - use_frameworks = true - end puts "layout engine is #{layout_engine}, js engine is #{js_engine}" - puts "use_frameworks trigger is #{use_frameworks}" - if use_frameworks - framework_header_path = '${PODS_CONFIGURATION_BUILD_DIR}/hippy/hippy.framework/Headers' - end s.name = 'hippy' s.version = '3.0.0' s.summary = 'Hippy Cross Platform Framework' s.description = <<-DESC - Hippy is designed for developers to easily build cross-platform and high-performance awesome apps. + Hippy is designed for developers to easily build cross-platform + and high-performance awesome apps. DESC s.homepage = 'https://hippyjs.org' s.license = { :type => 'Apache2', :file => 'LICENSE' } @@ -38,25 +24,63 @@ Pod::Spec.new do |s| s.source = {:git => 'https://github.com/Tencent/Hippy.git', :tag => s.version} s.platform = :ios s.ios.deployment_target = '11.0' - s.module_map = false; # hippy3暂未支持module + # Disable module compilation + s.module_map = false + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'NO' } - #prepare_command not working for subspecs,so we remove devtools script from devtools subspec to root s.prepare_command = <<-CMD ./xcodeinitscript.sh "#{layout_engine}" "#{js_engine}" CMD - + + s.subspec 'Base' do |base| + base.libraries = 'c++' + base.source_files = [ + 'modules/ios/base/*.{h,m,mm}', + 'modules/ios/logutils/*.{h,mm}', + ] + base.public_header_files = [ + 'modules/ios/base/*.h', + 'modules/ios/logutils/*.h', + ] + base.private_header_files = [ + 'modules/ios/base/TypeConverter.h', + ] + base.dependency 'hippy/Footstone' + base.pod_target_xcconfig = { + 'GCC_PREPROCESSOR_DEFINITIONS' => 'HIPPY_VERSION=' + s.version.to_s, + } + end + s.subspec 'Framework' do |framework| - puts 'hippy subspec \'framework\' read begin' - framework.source_files = ['framework/ios/**/*.{h,m,c,mm,s,cpp,cc}', 'renderer/native/ios/**/*.{h,m,mm}'] - framework.public_header_files = ['framework/ios/**/*.h', 'renderer/native/ios/**/*.h'] + framework.source_files = [ + 'framework/ios/**/*.{h,m,c,mm,s,cpp,cc}', + 'renderer/native/ios/**/*.{h,m,mm}', + 'modules/vfs/ios/*.{h,m,mm}', + 'modules/ios/image/*.{h,m,mm}', + ] + framework.public_header_files = [ + 'framework/ios/**/*.h', + 'renderer/native/ios/**/*.h', + 'modules/vfs/ios/*.h', + 'modules/ios/image/*.h', + ] if js_engine == "jsc" - framework.exclude_files = ['framework/ios/base/enginewrapper/v8', 'framework/ios/utils/v8'] - elsif js_engine == "v8" - framework.exclude_files = ['framework/ios/base/enginewrapper/jsc', 'framework/ios/utils/jsc'] + framework.exclude_files = [ + 'framework/ios/base/enginewrapper/v8', + 'framework/ios/utils/v8'] + elsif js_engine == "v8" + framework.exclude_files = [ + 'framework/ios/base/enginewrapper/jsc', + 'framework/ios/utils/jsc'] else - framework.exclude_files = ['framework/ios/base/enginewrapper/jsc', 'framework/ios/utils/jsc', 'framework/ios/base/enginewrapper/v8', 'framework/ios/utils/v8'] + framework.exclude_files = [ + 'framework/ios/base/enginewrapper/jsc', + 'framework/ios/utils/jsc', + 'framework/ios/base/enginewrapper/v8', + 'framework/ios/utils/v8'] end framework.libraries = 'c++' + framework.frameworks = 'CoreServices' framework.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', 'GCC_ENABLE_CPP_EXCEPTIONS' => false, @@ -64,46 +88,33 @@ Pod::Spec.new do |s| } framework.dependency 'hippy/Base' framework.dependency 'hippy/JSDriver' - framework.dependency 'hippy/Image' - framework.dependency 'hippy/iOSVFS' + framework.dependency 'hippy/VFS' framework.dependency 'hippy/DomUtils' - puts 'hippy subspec \'framework\' read end' + framework.dependency 'hippy/Footstone' + framework.dependency 'hippy/FootstoneUtils' end s.subspec 'Footstone' do |footstone| - puts 'hippy subspec \'footstone\' read begin' footstone.libraries = 'c++' footstone.source_files = ['modules/footstone/**/*.{h,cc}'] - footstone.public_header_files = ['modules/footstone/**/*.h'] + footstone.private_header_files = ['modules/footstone/**/*.h'] footstone.exclude_files = ['modules/footstone/include/footstone/platform/adr', 'modules/footstone/src/platform/adr'] - footstone.header_mappings_dir = 'modules/footstone/' - if use_frameworks - header_search_paths = "#{framework_header_path}" + " #{framework_header_path}/include" - footstone.user_target_xcconfig = { - 'HEADER_SEARCH_PATHS' => header_search_paths - } - else - header_search_paths = '$(PODS_TARGET_SRCROOT)/modules/footstone' + ' $(PODS_TARGET_SRCROOT)/modules/footstone/include' - footstone.user_target_xcconfig = { - 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/Headers/Public/hippy/include/' - } - end + footstone.header_mappings_dir = 'modules/footstone/include/' + + header_search_paths = '$(PODS_TARGET_SRCROOT)/modules/footstone' + ' $(PODS_TARGET_SRCROOT)/modules/footstone/include' footstone.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', 'GCC_PREPROCESSOR_DEFINITIONS[config=Release]' => '${inherited} NDEBUG=1', 'GCC_ENABLE_CPP_EXCEPTIONS' => false, 'GCC_ENABLE_CPP_RTTI' => false, - 'HEADER_SEARCH_PATHS' => header_search_paths + 'HEADER_SEARCH_PATHS' => header_search_paths, } - footstone.preserve_path = 'modules/footstone' - puts 'hippy subspec \'footstone\' read end' end s.subspec 'FootstoneUtils' do |footstoneutils| - puts 'hippy subspec \'footstoneutils\' read begin' footstoneutils.libraries = 'c++' footstoneutils.source_files = ['modules/ios/footstoneutils/*.{h,mm}'] - footstoneutils.public_header_files = ['modules/ios/footstoneutils/*.h'] + footstoneutils.private_header_files = ['modules/ios/footstoneutils/*.h'] footstoneutils.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', 'GCC_ENABLE_CPP_EXCEPTIONS' => false, @@ -111,75 +122,29 @@ Pod::Spec.new do |s| } footstoneutils.dependency 'hippy/Footstone' footstoneutils.dependency 'hippy/Base' - puts 'hippy subspec \'footstoneutils\' read end' - end - - s.subspec 'Image' do |image| - puts 'hippy subspec \'image\' read begin' - image.libraries = 'c++' - image.frameworks = 'CoreServices' - image.public_header_files = 'modules/ios/image/*.h' - image.source_files = 'modules/ios/image/*.{h,m,mm}' - puts 'hippy subspec \'image\' read end' - end - - s.subspec 'Base' do |base| - puts 'hippy subspec \'base\' read begin' - base.libraries = 'c++' - base.source_files = ['modules/ios/base/*.{h,m,mm}', 'modules/ios/logutils/*.{h,mm}'] - base.public_header_files = ['modules/ios/base/*.h', 'modules/ios/logutils/*.h'] - base.dependency 'hippy/Footstone' - base.pod_target_xcconfig = { - 'GCC_PREPROCESSOR_DEFINITIONS' => 'HIPPY_VERSION=' + s.version.to_s, - } - puts 'hippy subspec \'base\' read end' end s.subspec 'VFS' do |vfs| - puts 'hippy subspec \'vfs\' read begin' vfs.libraries = 'c++' vfs.source_files = ['modules/vfs/native/**/*.{h,cc}'] - vfs.public_header_files = ['modules/vfs/native/include/**/*.h'] + vfs.private_header_files = ['modules/vfs/native/include/**/*.h'] vfs.header_mappings_dir = 'modules/vfs/native/include/' - if use_frameworks - header_search_paths = framework_header_path - else - header_search_paths = '$(PODS_TARGET_SRCROOT)/modules/vfs/native/include/' - end + + header_search_paths = '$(PODS_TARGET_SRCROOT)/modules/vfs/native/include/' vfs.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', 'HEADER_SEARCH_PATHS' => header_search_paths, 'GCC_ENABLE_CPP_EXCEPTIONS' => false, 'GCC_ENABLE_CPP_RTTI' => false, } - vfs.preserve_path = 'modules/vfs/native' vfs.dependency 'hippy/Footstone' - puts 'hippy subspec \'vfs\' read end' - end - - s.subspec 'iOSVFS' do |iosvfs| - puts 'hippy subspec \'iosvfs\' read begin' - iosvfs.libraries = 'c++' - iosvfs.source_files = ['modules/vfs/ios/*.{h,m,mm}'] - iosvfs.public_header_files = ['modules/vfs/ios/*.h'] - iosvfs.pod_target_xcconfig = { - 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', - 'GCC_ENABLE_CPP_EXCEPTIONS' => false, - 'GCC_ENABLE_CPP_RTTI' => false, - } - iosvfs.dependency 'hippy/Base' - iosvfs.dependency 'hippy/VFS' - iosvfs.dependency 'hippy/Footstone' - iosvfs.dependency 'hippy/FootstoneUtils' - puts 'hippy subspec \'iosvfs\' read end' end s.subspec 'JSDriver' do |driver| - puts 'hippy subspec \'driver\' read begin' driver.libraries = 'c++' driver.frameworks = 'JavaScriptCore' driver.source_files = ['driver/js/include/**/*.h', 'driver/js/src/**/*.cc'] - driver.public_header_files = 'driver/js/include/**/*.h' + driver.private_header_files = 'driver/js/include/**/*.h' driver.header_mappings_dir = 'driver/js/include/' if js_engine == "jsc" driver.exclude_files = [ @@ -209,11 +174,6 @@ Pod::Spec.new do |s| 'driver/js/src/vm/jsc'] end - if use_frameworks - header_search_paths = framework_header_path - else - header_search_paths = '$(PODS_TARGET_SRCROOT)/driver/js/include/' - end definition_engine = '' if js_engine == "jsc" definition_engine = 'JS_JSC=1' @@ -221,8 +181,10 @@ Pod::Spec.new do |s| definition_engine = 'JS_V8=1' else end + + header_search_paths = '$(PODS_TARGET_SRCROOT)/driver/js/include/' driver.pod_target_xcconfig = { - 'HEADER_SEARCH_PATHS' => header_search_paths, + 'HEADER_SEARCH_PATHS' => header_search_paths, 'GCC_PREPROCESSOR_DEFINITIONS' => definition_engine, 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', 'GCC_ENABLE_CPP_EXCEPTIONS' => false, @@ -230,21 +192,15 @@ Pod::Spec.new do |s| } driver.dependency 'hippy/Footstone' driver.dependency 'hippy/Dom' - driver.dependency 'hippy/iOSVFS' - driver.preserve_path = 'driver/js' - puts 'hippy subspec \'driver\' read end' end s.subspec 'Dom' do |dom| - puts 'hippy subspec \'dom\' read begin' dom_source_files = Array['dom/include/**/*.h', 'dom/src/**/*.cc'] dom_exclude_files = Array['dom/src/dom/*unittests.cc', 'dom/src/dom/tools'] - if use_frameworks - dom_pod_target_header_path = framework_header_path - else - dom_pod_target_header_path = '$(PODS_TARGET_SRCROOT)/dom/include/' - end + + dom_pod_target_header_path = '$(PODS_TARGET_SRCROOT)/dom/include/' + if layout_engine == "Taitank" dom_exclude_files.append('dom/include/dom/yoga_layout_node.h') dom_exclude_files.append('dom/src/dom/yoga_layout_node.cc') @@ -255,7 +211,7 @@ Pod::Spec.new do |s| dom.libraries = 'c++' dom.source_files = dom_source_files - dom.public_header_files = ['dom/include/**/*.h'] + dom.private_header_files = ['dom/include/**/*.h'] dom.header_mappings_dir = 'dom/include/' dom.exclude_files = dom_exclude_files dom.pod_target_xcconfig = { @@ -269,17 +225,14 @@ Pod::Spec.new do |s| dom.dependency 'hippy/Taitank' elsif layout_engine == "Yoga" dom.dependency 'hippy/Yoga' - end - dom.preserve_path = 'dom' - puts 'hippy subspec \'dom\' read end' + end end s.subspec 'DomUtils' do |domutils| - puts 'hippy subspec \'domutils\' read begin' dom_source_files = Array['modules/ios/domutils/*.{h,mm}'] domutils.libraries = 'c++' domutils.source_files = dom_source_files - domutils.public_header_files = ['modules/ios/domutils/*.h'] + domutils.private_header_files = ['modules/ios/domutils/*.h'] domutils.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', 'GCC_ENABLE_CPP_EXCEPTIONS' => false, @@ -288,47 +241,32 @@ Pod::Spec.new do |s| domutils.dependency 'hippy/Dom' domutils.dependency 'hippy/FootstoneUtils' domutils.dependency 'hippy/Base' - puts 'hippy subspec \'domutils\' read end' end if layout_engine == "Taitank" s.subspec 'Taitank' do |taitank| puts 'hippy subspec \'Taitank\' read begin' taitank.source_files = ['dom/dom_project/_deps/taitank-src/src/*.{h,cc}'] - taitank.public_header_files = ['dom/dom_project/_deps/taitank-src/src/*.h'] - if use_frameworks - header_search_paths = framework_header_path - else - header_search_paths = '$(PODS_TARGET_SRCROOT)/dom/dom_project/_deps/taitank-src/src' - end + taitank.private_header_files = ['dom/dom_project/_deps/taitank-src/src/*.h'] taitank.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', - 'HEADER_SEARCH_PATHS' => header_search_paths, 'GCC_ENABLE_CPP_EXCEPTIONS' => false, 'GCC_ENABLE_CPP_RTTI' => false, } taitank.libraries = 'c++' - taitank.preserve_path = 'dom/dom_project' puts 'hippy subspec \'Taitank\' read end' end elsif layout_engine == "Yoga" s.subspec 'Yoga' do |yoga| puts 'hippy subspec \'yoga\' read begin' yoga.source_files = ['dom/dom_project/_deps/yoga-src/yoga/**/*.{c,h,cpp}'] - yoga.public_header_files = ['dom/include/dom/yoga_layout_node.h', 'dom/dom_project/_deps/yoga-src/yoga/**/*.h'] - if use_frameworks - header_search_paths = framework_header_path - else - header_search_paths = '$(PODS_TARGET_SRCROOT)/dom/dom_project/_deps/yoga-src' - end + yoga.private_header_files = ['dom/include/dom/yoga_layout_node.h', 'dom/dom_project/_deps/yoga-src/yoga/**/*.h'] yoga.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', - 'HEADER_SEARCH_PATHS' => header_search_paths, 'GCC_ENABLE_CPP_EXCEPTIONS' => false, 'GCC_ENABLE_CPP_RTTI' => false, } yoga.libraries = 'c++' - yoga.preserve_path = 'dom/dom_project' puts 'hippy subspec \'yoga\' read end' end end @@ -338,21 +276,21 @@ Pod::Spec.new do |s| devtools_deps_path = 'devtools/devtools-integration/ios/DevtoolsBackend/_deps' s.subspec 'AsioForDevTools' do |ss| ss.libraries = 'c++' - ss.public_header_files = ["#{devtools_deps_path}/asio-src/asio/include/**/*.{hpp,ipp}",] + ss.project_header_files = ["#{devtools_deps_path}/asio-src/asio/include/**/*.{hpp,ipp}",] ss.source_files = ["#{devtools_deps_path}/asio-src/asio/include/**/*.{hpp,ipp}",] ss.header_mappings_dir = "#{devtools_deps_path}/asio-src/asio/include/" end s.subspec 'JsonForDevTools' do |ss| ss.libraries = 'c++' - ss.public_header_files = ["#{devtools_deps_path}/json-src/single_include/**/*.{hpp}",] + ss.project_header_files = ["#{devtools_deps_path}/json-src/single_include/**/*.{hpp}",] ss.source_files = ["#{devtools_deps_path}/json-src/single_include/**/*.{hpp}",] ss.header_mappings_dir = "#{devtools_deps_path}/json-src/single_include/" end s.subspec 'WebsocketForDevTools' do |ss| ss.libraries = 'c++' - ss.public_header_files = ["#{devtools_deps_path}/websocketpp-src/websocketpp/**/*.{hpp}",] + ss.project_header_files = ["#{devtools_deps_path}/websocketpp-src/websocketpp/**/*.{hpp}",] ss.source_files = ["#{devtools_deps_path}/websocketpp-src/websocketpp/**/*.{hpp,ipp}",] ss.header_mappings_dir = "#{devtools_deps_path}/websocketpp-src/" end @@ -369,7 +307,7 @@ Pod::Spec.new do |s| devtools_exclude_files += ['devtools/devtools-integration/native/include/devtools/v8', 'devtools/devtools-integration/native/src/v8'] end devtools.exclude_files = devtools_exclude_files - devtools.public_header_files = [ + devtools.project_header_files = [ #devtools_integration/native 'devtools/devtools-integration/native/**/*.h', 'devtools/devtools-integration/native/include/devtools/devtools_data_source.h', @@ -382,16 +320,14 @@ Pod::Spec.new do |s| #devtools_backend 'devtools/devtools-backend/**/*.{h,hpp,cc}', ] - if use_frameworks - pod_search_path = - " #{framework_header_path}/devtools-integration/native/include" + - " #{framework_header_path}/devtools-backend/include" - devtools.header_mappings_dir = 'devtools' - else - pod_search_path = - ' $(PODS_TARGET_SRCROOT)/devtools/devtools-integration/native/include' + - ' $(PODS_TARGET_SRCROOT)/devtools/devtools-backend/include' - end + + pod_search_path = + " $(PODS_TARGET_SRCROOT)/devtools/devtools-integration/native/include/" + + " $(PODS_TARGET_SRCROOT)/devtools/devtools-backend/include/" + + " $(PODS_TARGET_SRCROOT)/#{devtools_deps_path}/asio-src/asio/include/" + + " $(PODS_TARGET_SRCROOT)/#{devtools_deps_path}/json-src/single_include/" + + " $(PODS_TARGET_SRCROOT)/#{devtools_deps_path}/websocketpp-src/" + devtools.header_mappings_dir = 'devtools/' devtools.pod_target_xcconfig = { 'HEADER_SEARCH_PATHS' => pod_search_path, @@ -409,7 +345,6 @@ Pod::Spec.new do |s| devtools.dependency 'hippy/Footstone' devtools.dependency 'hippy/Dom' devtools.dependency 'hippy/VFS' - devtools.preserve_path = 'devtools' puts 'hippy subspec \'devtools\' read end' end @@ -417,7 +352,7 @@ Pod::Spec.new do |s| s.subspec 'v8' do |v8| puts 'hippy subspec \'v8\' read begin' v8.source_files = ['v8forios/v8/include'] - v8.public_header_files = ['v8forios/v8/include'] + v8.private_header_files = ['v8forios/v8/include'] v8.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', 'HEADER_SEARCH_PATHS' => '$(PODS_TARGET_SRCROOT)/v8forios/v8/include $(PODS_TARGET_SRCROOT)/v8forios/v8/include/v8', @@ -426,7 +361,6 @@ Pod::Spec.new do |s| } v8.libraries = 'c++' v8.vendored_library = 'v8forios/v8/libv8.a' - v8.preserve_path = 'v8forios/v8' puts 'hippy subspec \'v8\' read end' end end