conduit/ios/Podfile
cogwheel d5c6b11b28
Optimize performance and harden lifecycle handling (#581)
* Optimize performance and harden lifecycle handling

* Address PR review feedback

* Clean up duplicate App Intent image retries

* Fix follow-up pin-to-top routing

* Restore no-jump pin dismissal on user scroll

A later timeline optimization kept the synthetic pin spacer active through every manual scroll, undoing the guarded dismissal from #560 and allowing iOS range correction to snap the viewport. Restore the phantom-free range guard and cover both unsafe and safe dismissal offsets so the regression cannot recur silently.

* Rebuild chat turn anchoring like T3 Code

Create the anchor from the exact optimistic user-message ID, replace the full-screen phantom range and capped physics with measured anchored end space, and use item-level layout correction until real content fills the viewport. Cancel automatic corrections on the first user gesture so streaming growth cannot reintroduce scroll jumps.

* Fix Android cookie-clear verification and allow https-upgrade capture origins

The verified cookie clear treated Android's unimplemented getAllCookies as
failure, blocking SSO sign-in on empty stores and permanently arming the
incomplete-logout fence. Exact-origin capture checks silently dropped token
capture for http-configured servers upgraded to https by their proxy; capture
now also trusts the default-port https upgrade of the configured origin.
Also stabilize the background-validation sanitization test's poll deadline.

* Restore same-origin redirect recovery, pool warmup, and native fixes

- Replay credential-safe 3xx hops (same origin or default-port https
  upgrade) for idempotent methods on the shared API client; cross-origin
  hops still surface to the caller.
- Warm the completion client's actual connection pool at startup again;
  checkHealth's request-scoped probe no longer touches it.
- Graceful ApiService dispose so provider rebuilds cannot abort in-flight
  SSE streams; cap connectivity failure backoff at the healthy interval.
- iOS: thread the trusted origin into native sheet avatar loads so auth
  headers are attached again; let oversized STT tap buffers fall back to
  one-off copies instead of being dropped.

* Harden PR re-application: auth, upload/share, and provider regression fixes

Auth: logout preserves connection prerequisites (custom headers, mTLS)
while still revoking session credentials (legacy apiKey, captured proxy
Cookie headers); config-header edits and legacy apiKey migration no
longer sign the user out; cold-start background validation retries for
~7s to cover slow tunnels; interactively reissued byte-identical tokens
are accepted after logout; SSO button failures surface visibly.

Uploads/share: native-share durable keys derive from payload id +
ordinal instead of mutable content checksums; Hermes/direct-model
shares route through the local composer path instead of retrying
forever; pre-connection network failures defer instead of failing
terminally; orphaned receipt-held rows are garbage collected once
native storage is confirmed drained; disposed-queue persistence reports
failure so staged files survive; legacy staging roots are reclaimable.

Providers/UI: queued-completion banner watches every ownership-fence
input so retry/cancel cannot silently no-op; drawer keeps previous rows
during pagination reloads; authenticated image cache keys derive from a
stable server+token digest so the disk cache survives restarts while
accounts stay isolated.

* Make share staging indeterminate-ownership test hermetic under concurrency

The test snapshotted the process-global staging temp root, so files staged
or cleaned by concurrently running suites broke exact set equality. Assert
only that this test's own artifact never appears.

* Stabilize streaming UI and pending share persistence

Persist Android pending-share state atomically with migration coverage. Keep prompt anchoring and streaming haptics stable across row remounts, and reduce markdown streaming churn while hardening placeholder cleanup.

* Make streaming Markdown preparation incremental

* Reuse stable Markdown render inputs

* Avoid cumulative structured stream rebuilds

* Instrument and streamline structured output

* Hide dismissed sidebar native chrome

* Reduce streaming platform view retention
2026-07-20 21:04:28 +05:30

112 lines
4.6 KiB
Ruby

# Uncomment this line to define a global platform for your project
IOS_DEPLOYMENT_TARGET = '16.0'
platform :ios, IOS_DEPLOYMENT_TARGET
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
# Work around Xcode cycle false-positives by letting CocoaPods not declare IO paths
install! 'cocoapods', :disable_input_output_paths => true
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
# Use dynamic frameworks for native extension compatibility
use_frameworks! :linkage => :dynamic
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
defs = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] || ['$(inherited)']
defs = [defs] if defs.is_a?(String)
%w[
PERMISSION_MICROPHONE=1
PERMISSION_SPEECH_RECOGNIZER=1
PERMISSION_NOTIFICATIONS=1
].each do |flag|
defs << flag unless defs.include?(flag)
end
if target.name == 'geolocator_apple'
defs << 'BYPASS_PERMISSION_LOCATION_ALWAYS=1' unless defs.include?('BYPASS_PERMISSION_LOCATION_ALWAYS=1')
end
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = defs
# Flutter engine in this setup is arm64-only for simulator.
# Exclude x86_64 simulator architecture to avoid unresolved Flutter
# symbols when Xcode attempts a universal simulator link.
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = IOS_DEPLOYMENT_TARGET
end
end
# Add -ObjC linker flag for objective_c native assets (required for Release builds)
# This fixes: "dlsym(RTLD_DEFAULT, DOBJC_initializeApi): symbol not found"
installer.aggregate_targets.each do |aggregate_target|
user_project = aggregate_target.user_project
user_project.native_targets.each do |native_target|
if native_target.name == 'Runner'
native_target.build_configurations.each do |config|
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = IOS_DEPLOYMENT_TARGET
# Add -ObjC and -lc++ flags for native extensions support
other_ldflags = config.build_settings['OTHER_LDFLAGS'] || ['$(inherited)']
other_ldflags = [other_ldflags] if other_ldflags.is_a?(String)
unless other_ldflags.include?('-ObjC')
other_ldflags << '-ObjC'
end
unless other_ldflags.include?('-lc++')
other_ldflags << '-lc++'
end
if ['Release', 'Profile'].include?(config.name)
# VAD reaches ONNX Runtime through dlsym. Force the one required
# global into the final image while still allowing local symbols
# to be stripped from Release/Profile products.
unless other_ldflags.include?('-Wl,-u,_OrtGetApiBase')
other_ldflags << '-Wl,-u,_OrtGetApiBase'
end
config.build_settings['DEPLOYMENT_POSTPROCESSING'] = 'YES'
config.build_settings['COPY_PHASE_STRIP'] = 'YES'
config.build_settings['STRIP_INSTALLED_PRODUCT'] = 'YES'
config.build_settings['STRIP_STYLE'] = 'non-global'
else
other_ldflags.delete('-Wl,-u,_OrtGetApiBase')
end
config.build_settings['OTHER_LDFLAGS'] = other_ldflags
end
end
end
user_project.save
end
end