1 Pod::Spec.new do |s|
2 s.name = 'onde_inference'
3 s.version = '0.1.0'
4 s.summary = 'On-device LLM inference SDK for Flutter (iOS).'
5 s.description = 'Runs Qwen 2.5 models locally on iOS with Metal acceleration.'
6 s.homepage = 'https://ondeinference.com'
7 s.license = { :type => 'MIT', :file => '../LICENSE' }
8 s.author = { 'Onde Inference' => 'hello@ondeinference.com' }
9 s.source = { :path => '.' }
10 s.source_files = 'Classes/**/*'
11 s.dependency 'Flutter'
12 s.platform = :ios, '13.0'
13
14 s.pod_target_xcconfig = {
15 'DEFINES_MODULE' => 'YES',
16 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
17 }
18 s.swift_version = '5.0'
19
20 s.script_phases = [
21 {
22 :name => 'Build Rust bridge (onde_inference_dart)',
23 :script => <<~SHELL,
24 set -e
25 RUST_DIR="${PODS_TARGET_SRCROOT}/../rust"
26 cd "$RUST_DIR"
27
28 if [[ "$PLATFORM_NAME" == "iphonesimulator" ]]; then
29 TARGET="aarch64-apple-ios-sim"
30 else
31 TARGET="aarch64-apple-ios"
32 fi
33
34 cargo build --release --target "$TARGET"
35
36 cp "target/$TARGET/release/libonde_inference_dart.a" \
37 "${PODS_TARGET_SRCROOT}/libonde_inference_dart.a"
38 SHELL
39 :execution_position => :before_compile,
40 :output_files => ["${PODS_TARGET_SRCROOT}/libonde_inference_dart.a"],
41 }
42 ]
43
44 s.pod_target_xcconfig = {
45 'DEFINES_MODULE' => 'YES',
46 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
47 'OTHER_LDFLAGS' =>
48 '-force_load ${PODS_TARGET_SRCROOT}/libonde_inference_dart.a',
49 }
50 s.preserve_paths = '../rust/**/*'
51 end