- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
69 lines
2.2 KiB
Ruby
69 lines
2.2 KiB
Ruby
# Overrides CocoaPods `Sandbox` class to patch podspecs on the fly
|
|
# See: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/sandbox.rb
|
|
|
|
require 'json'
|
|
|
|
REACT_DEFINE_MODULES_LIST = [
|
|
'ReactCommon',
|
|
'React-RCTAppDelegate',
|
|
'React-hermes',
|
|
'React-jsc',
|
|
'React-Fabric',
|
|
'React-graphics',
|
|
'React-utils',
|
|
'React-debug',
|
|
]
|
|
|
|
module Pod
|
|
class Sandbox
|
|
private
|
|
|
|
_original_store_podspec = instance_method(:store_podspec)
|
|
|
|
public
|
|
|
|
define_method(:store_podspec) do |name, podspec, _external_source, json|
|
|
spec = _original_store_podspec.bind(self).(name, podspec, _external_source, json)
|
|
patched_spec = nil
|
|
|
|
# Patch `React-Core.podspec` for clang to generate correct submodules for swift integration
|
|
if name == 'React-Core'
|
|
spec_json = JSON.parse(spec.to_pretty_json)
|
|
|
|
# clang module does not support objc++.
|
|
# We should put Hermes headers inside private headers directory.
|
|
# Otherwise, clang will throw errors in building module.
|
|
hermes_subspec_index = spec_json['subspecs'].index { |subspec| subspec['name'] == 'Hermes' }
|
|
if hermes_subspec_index
|
|
spec_json['subspecs'][hermes_subspec_index]['private_header_files'] ||= [
|
|
'ReactCommon/hermes/executor/*.h',
|
|
'ReactCommon/hermes/inspector/*.h',
|
|
'ReactCommon/hermes/inspector/chrome/*.h',
|
|
'ReactCommon/hermes/inspector/detail/*.h',
|
|
]
|
|
end
|
|
|
|
patched_spec = Specification.from_json(spec_json.to_json)
|
|
|
|
# Patch podspecs to define module
|
|
elsif REACT_DEFINE_MODULES_LIST.include? name
|
|
spec_json = JSON.parse(podspec.to_pretty_json)
|
|
spec_json['pod_target_xcconfig'] ||= {}
|
|
spec_json['pod_target_xcconfig']['DEFINES_MODULE'] = 'YES'
|
|
patched_spec = Specification.from_json(spec_json.to_json)
|
|
end
|
|
|
|
if patched_spec != nil
|
|
# Store the patched spec with original checksum and local saved file path
|
|
patched_spec.defined_in_file = spec.defined_in_file
|
|
patched_spec.instance_variable_set(:@checksum, spec.checksum)
|
|
@stored_podspecs[spec.name] = patched_spec
|
|
return patched_spec
|
|
end
|
|
|
|
return spec
|
|
end # define_method(:store_podspec)
|
|
|
|
end # class Sandbox
|
|
end # module Pod
|