Skip to content
Open
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,7 @@ sdk/runanywhere-react-native/packages/*/prebuilt/
# Flutter - Local builds
sdk/runanywhere-flutter/ios/*.xcframework
sdk/runanywhere-flutter/android/*.aar

# Pre-built xcframeworks (build artifacts)
sdk/runanywhere-react-native/packages/*/ios/xcframeworks/

Binary file modified examples/react-native/RunAnywhereAI/.yarn/install-state.gz
Binary file not shown.
7 changes: 7 additions & 0 deletions examples/react-native/RunAnywhereAI/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ const App: React.FC = () => {
url: 'https://huggingface.co/Triangle104/Qwen2.5-0.5B-Instruct-Q6_K-GGUF/resolve/main/qwen2.5-0.5b-instruct-q6_k.gguf',
memoryRequirement: 600_000_000,
});
// Llama 3.2 3B - Ideal for tool calling on mobile (3B params, ~1.8GB)
await LlamaCPP.addModel({
id: 'llama-3.2-3b-instruct-q4_k_m',
name: 'Llama 3.2 3B Instruct Q4_K_M (Tool Calling)',
url: 'https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf',
memoryRequirement: 2_000_000_000,
});
await LlamaCPP.addModel({
id: 'lfm2-350m-q4_k_m',
name: 'LiquidAI LFM2 350M Q4_K_M',
Expand Down
71 changes: 71 additions & 0 deletions examples/react-native/RunAnywhereAI/RESTAURANT_API_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 🍕 Real Restaurant API Setup

Make your demo go viral with **real restaurant data** near any location!

## Quick Setup (2 minutes)

### Step 1: Get FREE Foursquare API Key

1. Go to: https://foursquare.com/developers/signup
2. Create a free account (no credit card needed)
3. Create a new project
4. Copy your API key (starts with `fsq...`)

### Step 2: Add Your API Key

Open `src/services/restaurantApi.ts` and paste your key:

```typescript
// Line 15 - Replace empty string with your key
const FOURSQUARE_API_KEY = 'fsq3abc123...your-key-here';
```

### Step 3: Run the App

```bash
# Start Metro bundler
npm start

# In another terminal, run iOS
npx react-native run-ios
```

## That's it! 🎉

Now when you use the AI Food Agent:
- It searches **real restaurants** near your location
- Shows actual ratings, distances, and cuisines
- Works in any city worldwide!

## Free Tier Limits

- **10,000 API calls/month** - More than enough for demos
- No credit card required
- Reset monthly

## Location Options

The app supports 8 major US cities by default:
- San Francisco, New York, Los Angeles, Chicago
- Miami, Austin, Seattle, Boston

Tap "Deliver to" in the header to change location.

## Troubleshooting

### "Using mock data" message?
- Check your API key is set correctly
- Make sure there are no typos
- The key should start with `fsq3...`

### No restaurants found?
- Try a different search query (e.g., "pizza", "thai", "burger")
- Change to a different city location
- Some areas have less restaurant coverage

### Need help?
Check Foursquare docs: https://docs.foursquare.com/developer/reference/place-search

---

**Enjoy your viral demo!** 🚀
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = AFAL2647U9;
DEVELOPMENT_TEAM = L86FH3K93L;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = RunAnywhereAI/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -505,7 +505,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = AFAL2647U9;
DEVELOPMENT_TEAM = L86FH3K93L;
INFOPLIST_FILE = RunAnywhereAI/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
<string>CA92.1</string>
</array>
Comment on lines 7 to 21
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find iOS source files in the project
echo "=== Finding iOS source files ==="
find examples/react-native/RunAnywhereAI/ios -type f \( -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.h" \) | head -20

echo -e "\n=== Looking for UserDefaults usage ==="
rg -n --type=swift --type=objc --type=mm '\bUserDefaults\b|\bNSUserDefaults\b' examples/react-native/RunAnywhereAI/ios -C2

echo -e "\n=== Looking for file timestamp access patterns ==="
rg -n --type=swift --type=objc --type=mm -E 'FileManager|attributesOfItemAtPath|contentModificationDateKey|NSFileModificationDate|stat\(|fstat\(|getattrlist' examples/react-native/RunAnywhereAI/ios -C2

echo -e "\n=== Examining PrivacyInfo.xcprivacy file ==="
cat examples/react-native/RunAnywhereAI/ios/RunAnywhereAI/PrivacyInfo.xcprivacy

Repository: RunanywhereAI/runanywhere-sdks

Length of output: 1695


🏁 Script executed:

#!/bin/bash
echo "=== Examining NativeAudioModule.swift ==="
cat examples/react-native/RunAnywhereAI/ios/RunAnywhereAI/NativeAudioModule.swift

echo -e "\n=== Examining NativeAudioModule.m ==="
cat examples/react-native/RunAnywhereAI/ios/RunAnywhereAI/NativeAudioModule.m

echo -e "\n=== Examining AppDelegate.swift ==="
cat examples/react-native/RunAnywhereAI/ios/RunAnywhereAI/AppDelegate.swift

Repository: RunanywhereAI/runanywhere-sdks

Length of output: 13260


Remove unused privacy API declarations: UserDefaults and SystemBootTime.

The codebase only uses FileManager.attributesOfItem(atPath:) for file timestamp access, which correctly matches the NSPrivacyAccessedAPICategoryFileTimestamp declaration. However, the NSPrivacyAccessedAPICategoryUserDefaults and NSPrivacyAccessedAPICategorySystemBootTime entries have no corresponding API usage in the code. Declaring unused APIs can trigger App Store review rejection. Remove these two unused entries and keep only the FileTimestamp declaration.

🤖 Prompt for AI Agents
In `@examples/react-native/RunAnywhereAI/ios/RunAnywhereAI/PrivacyInfo.xcprivacy`
around lines 7 - 21, Remove the unused privacy API declarations by deleting the
<dict> entries for NSPrivacyAccessedAPICategoryUserDefaults and
NSPrivacyAccessedAPICategorySystemBootTime from PrivacyInfo.xcprivacy, leaving
only the NSPrivacyAccessedAPICategoryFileTimestamp declaration which corresponds
to the actual usage (FileManager.attributesOfItem(atPath:)); ensure the
remaining plist structure (keys like NSPrivacyAccessedAPIType and
NSPrivacyAccessedAPITypeReasons) stays valid and well-formed after removal.

</dict>
<dict>
Expand Down
3 changes: 2 additions & 1 deletion examples/react-native/RunAnywhereAI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"clean": "watchman watch-del-all && rm -rf node_modules && rm -rf ios/Pods && npm install && cd ios && pod install"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^2.2.0",
"@react-navigation/bottom-tabs": "^7.8.11",
"@react-navigation/native": "^7.1.24",
"@react-navigation/native-stack": "^7.8.5",
Expand All @@ -32,12 +33,12 @@
"react-native-nitro-modules": "^0.31.10",
"react-native-permissions": "^5.4.4",
"react-native-reanimated": "~4.2.1",
"react-native-worklets": "0.7.1",
"react-native-safe-area-context": "~5.6.2",
"react-native-screens": "~4.19.0",
"react-native-sound": "^0.13.0",
"react-native-tts": "^4.1.1",
"react-native-vector-icons": "^10.1.0",
"react-native-worklets": "0.7.1",
"react-native-zip-archive": "^6.1.2",
"rn-fetch-blob": "^0.12.0",
"zustand": "^5.0.0"
Expand Down
Loading
Loading