From a89ff620ff536beff22eada1d3dd0797f9b1753c Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Mon, 28 Nov 2022 08:41:12 +0800 Subject: [PATCH] iOS build fixes --- example/ios/.gitignore | 1 + example/ios/Podfile | 6 - example/ios/Podfile.lock | 4 +- example/ios/Runner.xcodeproj/project.pbxproj | 172 ++++-------------- example/ios/Runner/Info.plist | 6 +- ios/Classes/PolyvoxFilamentPlugin.h | 4 + ios/Classes/PolyvoxFilamentPlugin.m | 15 ++ .../SwiftPolyvoxFilamentPlugin.swift | 0 ios/polyvox_filament.podspec | 10 +- ios/src/ios/PolyvoxFilamentPlugin.m | 63 ------- 10 files changed, 62 insertions(+), 219 deletions(-) create mode 100644 ios/Classes/PolyvoxFilamentPlugin.h create mode 100644 ios/Classes/PolyvoxFilamentPlugin.m rename ios/{src/ios => Classes}/SwiftPolyvoxFilamentPlugin.swift (100%) delete mode 100644 ios/src/ios/PolyvoxFilamentPlugin.m diff --git a/example/ios/.gitignore b/example/ios/.gitignore index 151026b9..7a7f9873 100644 --- a/example/ios/.gitignore +++ b/example/ios/.gitignore @@ -1,3 +1,4 @@ +**/dgph *.mode1v3 *.mode2v3 *.moved-aside diff --git a/example/ios/Podfile b/example/ios/Podfile index 39a10d12..9061ff8f 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -37,11 +37,5 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) - target.build_configurations.each do |config| - target.build_settings(config.name)['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' - end - end - installer.pods_project.build_configuration_list.build_configurations.each do |configuration| - configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' end end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 993d70a4..94234823 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -15,8 +15,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - polyvox_filament: 0c9b38ce090e93c769c8ee2e0f2358d0aef06cdc + polyvox_filament: 4be2ff351ce253eef46ac9abed088ae6d16fea32 -PODFILE CHECKSUM: 5016650b9e3f332aac9cd4748b5fc6034a63f552 +PODFILE CHECKSUM: 7adbc9d59f05e1b01f554ea99b6c79e97f2214a2 COCOAPODS: 1.10.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 8fd3ca94..90696464 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -10,10 +10,10 @@ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 8A41CA36A92CBF01E35DB723 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 729293464FDAFA80294C03ED /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + EE85ADA13CE47012212956FB /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A258321425FD15835C0E85C8 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -30,41 +30,14 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0E69A8E4F4FBCA8CA51688D8 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 729293464FDAFA80294C03ED /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 797D1F14B06B2A55521439EC /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 840FCC12274298BA008E5682 /* libutils.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libutils.a; path = ../../ios/lib/libutils.a; sourceTree = ""; }; - 840FCC13274298BA008E5682 /* libcamutils.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcamutils.a; path = ../../ios/lib/libcamutils.a; sourceTree = ""; }; - 840FCC14274298BA008E5682 /* libmathio.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmathio.a; path = ../../ios/lib/libmathio.a; sourceTree = ""; }; - 840FCC15274298BA008E5682 /* libfilamat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfilamat.a; path = ../../ios/lib/libfilamat.a; sourceTree = ""; }; - 840FCC16274298BB008E5682 /* libfilabridge.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfilabridge.a; path = ../../ios/lib/libfilabridge.a; sourceTree = ""; }; - 840FCC17274298BB008E5682 /* libfilaflat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfilaflat.a; path = ../../ios/lib/libfilaflat.a; sourceTree = ""; }; - 840FCC18274298BB008E5682 /* libgltfio_core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgltfio_core.a; path = ../../ios/lib/libgltfio_core.a; sourceTree = ""; }; - 840FCC19274298BB008E5682 /* libfilameshio.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfilameshio.a; path = ../../ios/lib/libfilameshio.a; sourceTree = ""; }; - 840FCC1A274298BB008E5682 /* libgeometry.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgeometry.a; path = ../../ios/lib/libgeometry.a; sourceTree = ""; }; - 840FCC1B274298BB008E5682 /* libgltfio_resources_lite.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgltfio_resources_lite.a; path = ../../ios/lib/libgltfio_resources_lite.a; sourceTree = ""; }; - 840FCC1C274298BB008E5682 /* libmath.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmath.a; path = ../../ios/lib/libmath.a; sourceTree = ""; }; - 840FCC1D274298BB008E5682 /* libgltfio_resources.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgltfio_resources.a; path = ../../ios/lib/libgltfio_resources.a; sourceTree = ""; }; - 840FCC3527429B1F008E5682 /* libviewer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libviewer.a; path = ../../ios/lib/libviewer.a; sourceTree = ""; }; - 840FCC3627429B1F008E5682 /* libfilament-iblprefilter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libfilament-iblprefilter.a"; path = "../../ios/lib/libfilament-iblprefilter.a"; sourceTree = ""; }; - 840FCC3727429B1F008E5682 /* libibl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libibl.a; path = ../../ios/lib/libibl.a; sourceTree = ""; }; - 840FCC3827429B1F008E5682 /* libimage.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libimage.a; path = ../../ios/lib/libimage.a; sourceTree = ""; }; - 840FCC3D27429BEC008E5682 /* libbackend.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbackend.a; path = ../../ios/lib/libbackend.a; sourceTree = ""; }; - 840FCC3E27429BEC008E5682 /* libfilament.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfilament.a; path = ../../ios/lib/libfilament.a; sourceTree = ""; }; - 840FCC4127429C5B008E5682 /* libdracodec.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libdracodec.a; path = ../../ios/lib/libdracodec.a; sourceTree = ""; }; - 8444BD13275320B200A5921D /* libOSDependent.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libOSDependent.a; path = ../../ios/lib/libOSDependent.a; sourceTree = ""; }; - 84B172F62806081B00C9FD8C /* libsmol-v.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libsmol-v.a"; path = "../../ios/lib/libsmol-v.a"; sourceTree = ""; }; - 84B172F72806081B00C9FD8C /* libmeshoptimizer.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmeshoptimizer.a; path = ../../ios/lib/libmeshoptimizer.a; sourceTree = ""; }; - 84B172F82806081C00C9FD8C /* libvkshaders.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvkshaders.a; path = ../../ios/lib/libvkshaders.a; sourceTree = ""; }; - 84B172F92806081C00C9FD8C /* libshaders.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libshaders.a; path = ../../ios/lib/libshaders.a; sourceTree = ""; }; - 84B172FA2806081C00C9FD8C /* libibl-lite.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libibl-lite.a"; path = "../../ios/lib/libibl-lite.a"; sourceTree = ""; }; - 84B172FB2806081C00C9FD8C /* libfilamat_lite.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfilamat_lite.a; path = ../../ios/lib/libfilamat_lite.a; sourceTree = ""; }; - 84B172FC2806081C00C9FD8C /* libcivetweb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcivetweb.a; path = ../../ios/lib/libcivetweb.a; sourceTree = ""; }; + 887CF3E1D8F177CD306AEE91 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -72,8 +45,8 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C38BB8F063815E911BAE04B0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - FCA201E227680DE4C83A0A35 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + A258321425FD15835C0E85C8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E540D86FF0BEABF308A14DBB /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -81,13 +54,21 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8A41CA36A92CBF01E35DB723 /* Pods_Runner.framework in Frameworks */, + EE85ADA13CE47012212956FB /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 359B21BE5E35E51F8685F431 /* Frameworks */ = { + isa = PBXGroup; + children = ( + A258321425FD15835C0E85C8 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -105,8 +86,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - B35AFB2F8AF234BCF7B9F86F /* Pods */, - F66758AA6E5A6218A5D00433 /* Frameworks */, + D3880C741B2115E941EC88CD /* Pods */, + 359B21BE5E35E51F8685F431 /* Frameworks */, ); sourceTree = ""; }; @@ -133,51 +114,16 @@ path = Runner; sourceTree = ""; }; - B35AFB2F8AF234BCF7B9F86F /* Pods */ = { + D3880C741B2115E941EC88CD /* Pods */ = { isa = PBXGroup; children = ( - 797D1F14B06B2A55521439EC /* Pods-Runner.debug.xcconfig */, - FCA201E227680DE4C83A0A35 /* Pods-Runner.release.xcconfig */, - C38BB8F063815E911BAE04B0 /* Pods-Runner.profile.xcconfig */, + 0E69A8E4F4FBCA8CA51688D8 /* Pods-Runner.debug.xcconfig */, + 887CF3E1D8F177CD306AEE91 /* Pods-Runner.release.xcconfig */, + E540D86FF0BEABF308A14DBB /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; }; - F66758AA6E5A6218A5D00433 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 84B172FC2806081C00C9FD8C /* libcivetweb.a */, - 84B172FB2806081C00C9FD8C /* libfilamat_lite.a */, - 84B172FA2806081C00C9FD8C /* libibl-lite.a */, - 84B172F72806081B00C9FD8C /* libmeshoptimizer.a */, - 84B172F92806081C00C9FD8C /* libshaders.a */, - 84B172F62806081B00C9FD8C /* libsmol-v.a */, - 84B172F82806081C00C9FD8C /* libvkshaders.a */, - 8444BD13275320B200A5921D /* libOSDependent.a */, - 840FCC4127429C5B008E5682 /* libdracodec.a */, - 840FCC3D27429BEC008E5682 /* libbackend.a */, - 840FCC3E27429BEC008E5682 /* libfilament.a */, - 840FCC3627429B1F008E5682 /* libfilament-iblprefilter.a */, - 840FCC3727429B1F008E5682 /* libibl.a */, - 840FCC3827429B1F008E5682 /* libimage.a */, - 840FCC3527429B1F008E5682 /* libviewer.a */, - 840FCC13274298BA008E5682 /* libcamutils.a */, - 840FCC16274298BB008E5682 /* libfilabridge.a */, - 840FCC17274298BB008E5682 /* libfilaflat.a */, - 840FCC15274298BA008E5682 /* libfilamat.a */, - 840FCC19274298BB008E5682 /* libfilameshio.a */, - 840FCC1A274298BB008E5682 /* libgeometry.a */, - 840FCC18274298BB008E5682 /* libgltfio_core.a */, - 840FCC1B274298BB008E5682 /* libgltfio_resources_lite.a */, - 840FCC1D274298BB008E5682 /* libgltfio_resources.a */, - 840FCC1C274298BB008E5682 /* libmath.a */, - 840FCC14274298BA008E5682 /* libmathio.a */, - 840FCC12274298BA008E5682 /* libutils.a */, - 729293464FDAFA80294C03ED /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -185,7 +131,7 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 3734E56921255BC0B0DCAC3C /* [CP] Check Pods Manifest.lock */, + 2ED3154DB81A6C5E50B63848 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, @@ -250,7 +196,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3734E56921255BC0B0DCAC3C /* [CP] Check Pods Manifest.lock */ = { + 2ED3154DB81A6C5E50B63848 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -338,9 +284,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -366,12 +311,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -382,7 +325,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - STRIP_INSTALLED_PRODUCT = NO; SUPPORTED_PLATFORMS = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -396,29 +338,15 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEAD_CODE_STRIPPING = NO; - DEVELOPMENT_TEAM = 873X6R39HP; + DEVELOPMENT_TEAM = TM2B4SJXNJ; ENABLE_BITCODE = NO; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/lib", - ); - OTHER_CFLAGS = ( - "\"--std=c++17\"", - "\"-fmodules\"", - "\"-fcxx-modules\"", - "\"$(inherited)\"", - ); - PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES; - PRODUCT_BUNDLE_IDENTIFIER = "app.polyvox.filament-example"; + PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example; PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -429,9 +357,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -457,13 +384,11 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -477,11 +402,9 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; - STRIP_INSTALLED_PRODUCT = NO; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -490,9 +413,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -518,12 +440,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -532,10 +452,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - STRIP_INSTALLED_PRODUCT = NO; SUPPORTED_PLATFORMS = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; @@ -551,29 +469,15 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEAD_CODE_STRIPPING = NO; - DEVELOPMENT_TEAM = 873X6R39HP; + DEVELOPMENT_TEAM = TM2B4SJXNJ; ENABLE_BITCODE = NO; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/lib", - ); - OTHER_CFLAGS = ( - "\"--std=c++17\"", - "\"-fmodules\"", - "\"-fcxx-modules\"", - "\"$(inherited)\"", - ); - PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES; - PRODUCT_BUNDLE_IDENTIFIER = "app.polyvox.filament-example"; + PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example; PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -588,29 +492,15 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEAD_CODE_STRIPPING = NO; - DEVELOPMENT_TEAM = 873X6R39HP; + DEVELOPMENT_TEAM = TM2B4SJXNJ; ENABLE_BITCODE = NO; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/lib", - ); - OTHER_CFLAGS = ( - "\"--std=c++17\"", - "\"-fmodules\"", - "\"-fcxx-modules\"", - "\"$(inherited)\"", - ); - PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES; - PRODUCT_BUNDLE_IDENTIFIER = "app.polyvox.filament-example"; + PRODUCT_BUNDLE_IDENTIFIER = app.polyvox.example; PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index 124a86e4..7f553465 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -4,6 +4,8 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Example CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -11,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - polyvox_filament_example + example CFBundlePackageType APPL CFBundleShortVersionString @@ -43,5 +45,7 @@ CADisableMinimumFrameDurationOnPhone + UIApplicationSupportsIndirectInputEvents + diff --git a/ios/Classes/PolyvoxFilamentPlugin.h b/ios/Classes/PolyvoxFilamentPlugin.h new file mode 100644 index 00000000..e5b6cbbc --- /dev/null +++ b/ios/Classes/PolyvoxFilamentPlugin.h @@ -0,0 +1,4 @@ +#import + +@interface PolyvoxFilamentPlugin : NSObject +@end diff --git a/ios/Classes/PolyvoxFilamentPlugin.m b/ios/Classes/PolyvoxFilamentPlugin.m new file mode 100644 index 00000000..c75cf655 --- /dev/null +++ b/ios/Classes/PolyvoxFilamentPlugin.m @@ -0,0 +1,15 @@ +#import "PolyvoxFilamentPlugin.h" +#if __has_include() +#import +#else +// Support project import fallback if the generated compatibility header +// is not copied when this plugin is created as a library. +// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 +#import "polyvox_filament-Swift.h" +#endif + +@implementation PolyvoxFilamentPlugin ++ (void)registerWithRegistrar:(NSObject*)registrar { + [SwiftPolyvoxFilamentPlugin registerWithRegistrar:registrar]; +} +@end diff --git a/ios/src/ios/SwiftPolyvoxFilamentPlugin.swift b/ios/Classes/SwiftPolyvoxFilamentPlugin.swift similarity index 100% rename from ios/src/ios/SwiftPolyvoxFilamentPlugin.swift rename to ios/Classes/SwiftPolyvoxFilamentPlugin.swift diff --git a/ios/polyvox_filament.podspec b/ios/polyvox_filament.podspec index ab1d6c13..995c3f30 100644 --- a/ios/polyvox_filament.podspec +++ b/ios/polyvox_filament.podspec @@ -13,23 +13,21 @@ A new flutter plugin project. s.license = { :file => '../LICENSE' } s.author = { 'Your Company' => 'email@example.com' } s.source = { :path => '.' } - s.source_files = 'src/*', 'src/ios/*', 'src/shaders/*.c', 'src/shaders/*.h', 'include/filament/*', 'include/*', 'include/material/*.h', 'include/material/*.c' + s.source_files = 'Classes/*', 'src/*', 'src/ios/*', 'src/shaders/*.c', 'src/shaders/*.h', 'include/filament/*', 'include/*', 'include/material/*.h', 'include/material/*.c' s.public_header_files = 'include/SwiftPolyvoxFilamentPlugin-Bridging-Header.h', 'include/PolyvoxFilamentIOSApi.h', 'include/PolyvoxFilamentApi.h', 'include/ResourceBuffer.hpp' #, 'include/filament/*' # s.header_mappings_dir = 'include' s.dependency 'Flutter' s.platform = :ios, '12.1' s.static_framework = true s.vendored_libraries = "lib/*.a" - - s.library = "c++" s.user_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386', "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", - 'OTHER_CXXFLAGS' => '"--std=c++17" "-fmodules" "-fcxx-modules" "$(inherited)"', + 'OTHER_CXXFLAGS' => '"--std=c++17" "-fmodules" "-fcxx-modules" "-stdlib=libc++" "$(inherited)"', 'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/image" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/shaders" "$(inherited)"', 'ALWAYS_SEARCH_USER_PATHS' => 'YES', - "OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -lcamutils -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -limageio -lpng -lpng16 -ltinyexr -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd', + "OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -lcamutils -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -limageio -lpng -lpng16 -ltinyexr -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++', 'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/lib" "$(inherited)"', } @@ -40,7 +38,7 @@ A new flutter plugin project. 'OTHER_CXXFLAGS' => '"--std=c++17" "-fmodules" "-fcxx-modules" "$(inherited)"', 'USER_HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/include" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/image" "${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/src/shaders" "$(inherited)"', 'ALWAYS_SEARCH_USER_PATHS' => 'YES', - "OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -lcamutils -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -limageio -lpng -lpng16 -ltinyexr -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd', + "OTHER_LDFLAGS" => '-lfilament -lbackend -lfilameshio -lviewer -lfilamat -lgeometry -lutils -lfilabridge -lgltfio_core -lfilament-iblprefilter -limage -lcamutils -lgltfio_core -lfilaflat -ldracodec -libl -lktxreader -limageio -lpng -lpng16 -ltinyexr -lz -lstb -luberzlib -lsmol-v -luberarchive -lzstd -lstdc++', 'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/../.symlinks/plugins/polyvox_filament/ios/lib" "$(inherited)"', } diff --git a/ios/src/ios/PolyvoxFilamentPlugin.m b/ios/src/ios/PolyvoxFilamentPlugin.m deleted file mode 100644 index 14f8ef46..00000000 --- a/ios/src/ios/PolyvoxFilamentPlugin.m +++ /dev/null @@ -1,63 +0,0 @@ -#import "PolyvoxFilamentPlugin.h" -#if __has_include() -#import -#else -// Support project import fallback if the generated compatibility header -// is not copied when this plugin is created as a library. -// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "polyvox_filament-Swift.h" -#endif - -@implementation PolyvoxFilamentPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftPolyvoxFilamentPlugin registerWithRegistrar:registrar]; -} -@end - -// - (ResourceBuffer)loadResource:(const char* const)path { -// NSString* p = [NSString stringWithFormat:@"%s", path]; -// NSString* key = [_registrar lookupKeyForAsset:p]; -// NSString* nsPath = [[NSBundle mainBundle] pathForResource:key -// ofType:nil]; -// if (![[NSFileManager defaultManager] fileExistsAtPath:nsPath]) { -// NSLog(@"Error: no file exists at %@", p); -// exit(-1); -// } - -// NSData* buffer = [NSData dataWithContentsOfFile:nsPath]; -// void* cpy = malloc([buffer length]); -// memcpy(cpy, [buffer bytes], [buffer length]); // can we avoid this copy somehow? -// _resourceId++; -// ResourceBuffer rbuf(cpy, [buffer length], _resourceId); -// return rbuf; -// } - -// - (void)freeResource:(ResourceBuffer)rb { -// free((void*)rb.data); -// } - -// - (void)ready { -// [_channel invokeMethod:@"ready" arguments:nil]; -// } - -// - (NSMutableArray*) getAnimationNames { -// unique_ptr> list = _viewer->getAnimationNames(); -// NSMutableArray* asArray = [NSMutableArray arrayWithCapacity:list->size()]; -// for(int i = 0; i < list->size(); i++) { -// asArray[i] = [NSString stringWithFormat:@"%s", list->at(i).c_str()]; -// } -// return asArray; -// } - -// - (NSMutableArray*) getTargetNames:(NSString*) meshName { -// unique_ptr> list = _viewer->getTargetNames([meshName UTF8String]); -// NSMutableArray* asArray = [NSMutableArray arrayWithCapacity:list->size()]; -// for(int i = 0; i < list->size(); i++) { -// asArray[i] = [NSString stringWithFormat:@"%s", list->at(i).c_str()]; -// } -// return asArray; -// } - -// @end - -// @end