mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
# Conflicts: # .github/workflows/check-insights-major-version.yml # .github/workflows/check-posthog-major-version.yml # .github/workflows/ci-security.yaml # .github/workflows/validate-versioning.yml # AGENTS.md # AGENTS.md~upstream_main # packages/ai/src/otel/capture.ts # packages/ai/src/otel/mappers/aiSdk.ts # packages/ai/src/otel/mappers/index.ts # packages/ai/src/otel/types.ts # packages/core/src/__tests__/posthog.init.spec.ts # packages/react-native/src/PostHogProvider.tsx # packages/react/src/context/PostHogContext.ts # packages/react/src/context/PostHogProvider.tsx # tooling/eslint-plugin-insights/no-unsafe-web-global.js
Run the example
# root folder
pnpm build
pnpm package
pnpm package:watch
# example folder
pnpm install
# you can also avoid lockfile changes
pnpm install --no-lockfile
cd ios
pod install
cd ..
pnpm start
Press s │ switch to development build.
Open Xcode 16.4
Use XcodesApp to install Xcode 16.4.
Open the ios/exampleexpo53.xcworkspace file with Xcode.
Choose an iPhone simulator (eg iPhone 16 - 18.0).
Press the play button in Xcode to run the app.
Or...
npx expo run:ios
npx expo run:android
npx expo start --web # uncomment "persistence: 'memory'" inside insights.tsx for it to work
If your RN SDK changes are not picked up:
# example folder
rm -rf node_modules
# repeat Run steps
Build Release mode locally
# android
cd android
./gradlew assembleRelease
# ios
set -o pipefail && xcrun xcodebuild clean build -workspace ios/exampleexpo53.xcworkspace -scheme exampleexpo53 -configuration Release -destination generic/platform=ios | xcpretty
# Xcode
# Signing and Capabilities -> assign a team
# Also: Xcode -> Product -> Archive
# web
npx expo export --clear --source-maps --platform web
# eject expo (delete and recreate android and ios folders) and test expo plugins
npx expo prebuild --clean