Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios/RNMBX/RNMBXMapViewModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#import "RNMBXMapViewComponentView.h"
#endif // RCT_NEW_ARCH_ENABLED

#import "rnmapbox_maps-Swift.h.pre"
#import "rnmapbox_maps-Swift.pre.h"

@implementation RNMBXMapViewModule

Expand Down
2 changes: 1 addition & 1 deletion ios/RNMBX/RNMBXStyleImportComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import <react/renderer/components/rnmapbox_maps_specs/Props.h>
#import <react/renderer/components/rnmapbox_maps_specs/RCTComponentViewHelpers.h>

#import "rnmapbox_maps-Swift.h.pre"
#import "rnmapbox_maps-Swift.pre.h"

using namespace facebook::react;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
@interface MapView : UIView
@end

#import <rnmapbox_maps-Swift.h>
#if RNMBX_USE_FRAMEWORKS
#import <rnmapbox_maps/rnmapbox_maps-Swift.h>
#else
#import <rnmapbox_maps-Swift.h>
#endif
14 changes: 13 additions & 1 deletion rnmapbox-maps.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ def $RNMapboxMaps._add_spm_to_target(project, target, url, requirement, product_
end
end

def $RNMapboxMaps._add_compiler_flags(sp, extra_flags)
exisiting_flags = sp.attributes_hash["compiler_flags"]
if exisiting_flags.present?
sp.compiler_flags = exisiting_flags + " #{extra_flags}"
else
sp.compiler_flags = extra_flags
end
end

def $RNMapboxMaps.post_install(installer)
if $RNMapboxMapsUseV11
installer.pods_project.build_configurations.each do |config|
Expand Down Expand Up @@ -219,10 +228,13 @@ Pod::Spec.new do |s|
case $RNMapboxMapsImpl
when 'mapbox'
sp.source_files = "ios/RNMBX/**/*.{h,m,mm,swift}"
sp.private_header_files = 'ios/RNMBX/RNMBXFabricHelpers.h'
sp.private_header_files = 'ios/RNMBX/RNMBXFabricHelpers.h', 'ios/RNMBX/rnmapbox_maps-Swift.pre.h'
if new_arch_enabled
install_modules_dependencies(sp)
end
if ENV['USE_FRAMEWORKS'] || $RNMapboxMapsUseFrameworks
$RNMapboxMaps._add_compiler_flags(sp, "-DRNMBX_USE_FRAMEWORKS=1")
end
else
fail "$RNMapboxMapsImpl should be mapbox but was: $RNMapboxMapsImpl"
end
Expand Down