Skip to content
Merged
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
28 changes: 10 additions & 18 deletions .github/workflows/validate-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
- name: Enable Corepack
run: corepack enable

- name: Configure git (needed for CLI git init)
run: |
git config --global user.email "ci@test.com"
git config --global user.name "CI"

- name: Scaffold project with CLI
env:
YARN_ENABLE_HARDENED_MODE: '0'
Expand All @@ -55,15 +60,6 @@ jobs:
fi
echo "All template identifiers replaced successfully."

- name: Init git repo (required by nimble)
working-directory: test-app
run: |
git init
git config user.email "ci@test.com"
git config user.name "CI"
git add -A
git commit -m "init"

- name: Setup Nim
run: |
sudo apt-get update
Expand Down Expand Up @@ -109,6 +105,11 @@ jobs:
- name: Enable Corepack
run: corepack enable

- name: Configure git (needed for CLI git init)
run: |
git config --global user.email "ci@test.com"
git config --global user.name "CI"

- name: Scaffold project with CLI
env:
YARN_ENABLE_HARDENED_MODE: '0'
Expand All @@ -134,15 +135,6 @@ jobs:
fi
echo "All template identifiers replaced successfully."

- name: Init git repo (required by nimble)
working-directory: test-app
run: |
git init
git config user.email "ci@test.com"
git config user.name "CI"
git add -A
git commit -m "init"

- name: Setup Nim
run: |
brew install nim
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ android/key.store
# Generated bindings
bindings/android/*.cpp
bindings/android/*.h
bindings/android/nim_core
bindings/android/nim_core.json
bindings/ios/*.cpp
bindings/ios/*.h
bindings/ios/nim_core
bindings/ios/nim_core.json
bindings/headers/nim_core.h
bindings/android/nimcache/
bindings/ios/nimcache/

Expand Down
Binary file removed bindings/android/nim_core
Binary file not shown.
178 changes: 0 additions & 178 deletions bindings/android/nim_core.json

This file was deleted.

34 changes: 0 additions & 34 deletions bindings/headers/nim_core.h

This file was deleted.

Binary file removed bindings/ios/nim_core
Binary file not shown.
183 changes: 0 additions & 183 deletions bindings/ios/nim_core.json

This file was deleted.

25 changes: 25 additions & 0 deletions cli/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { prompt } = require('./prompts.js');
const { scaffold } = require('./scaffold.js');
const path = require('path');
const fs = require('fs');
const { execSync } = require('child_process');

function toPascalCase(str) {
return str
Expand Down Expand Up @@ -60,6 +61,11 @@ async function main() {
bundleId = (await prompt(`Bundle identifier (${defaultBundleId}): `)) || defaultBundleId;
}

if (!validateBundleId(bundleId)) {
console.error(' Invalid bundle ID. Use lowercase reverse-domain format: com.company.appname');
process.exit(1);
}

// Resolve template
const templateDir = resolveTemplateDir();
const targetDir = path.resolve(process.cwd(), projectDir);
Expand All @@ -82,13 +88,32 @@ async function main() {

try {
scaffold(config);
initGitRepo(targetDir);
printNextSteps(projectDir);
} catch (err) {
console.error(`\n Error: ${err.message}`);
process.exit(1);
}
}

function validateBundleId(id) {
return /^[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)+$/.test(id);
}

function initGitRepo(targetDir) {
try {
execSync('git init', { cwd: targetDir, stdio: 'ignore' });
execSync('git add -A', { cwd: targetDir, stdio: 'ignore' });
execSync('git commit -m "Initial commit from create-react-native-nim"', {
cwd: targetDir,
stdio: 'ignore',
});
console.log(' Initialized git repository.\n');
} catch {
// git not available — not critical, but nimble will need it later
}
}

function resolveTemplateDir() {
// When running from the repo (development)
const repoTemplate = path.resolve(__dirname, '../../mobile-app');
Expand Down
16 changes: 11 additions & 5 deletions mobile-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,17 @@ nimcache/
# Generated static libraries (auto-generated by build script)
modules/nim-bridge/ios/*.a

# Generated binding files (keep these for reference, but they're auto-generated)
# Uncomment if you want to exclude them:
# modules/nim-bridge/ios/nim_functions.h
# modules/nim-bridge/ios/NimBridge_generated.mm
# modules/nim-bridge/src/NimBridge.types.ts
# Generated binding files (auto-generated by tools/generate_bindings.py and make build-nim)
modules/nim-bridge/ios/NimBridge.h
modules/nim-bridge/ios/NimBridge.mm
modules/nim-bridge/ios/nim_functions.h
modules/nim-bridge/ios/main.h
modules/nim-bridge/ios/nimbase.h
modules/nim-bridge/android/src/main/cpp/NimBridge.cpp
modules/nim-bridge/android/src/main/cpp/nimbase.h
modules/nim-bridge/src/NimBridge.types.ts
modules/nim-bridge/src/NativeNimBridge.ts
src/nim_core.d.ts

# Misc
.env.local
Expand Down
6 changes: 6 additions & 0 deletions mobile-app/ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ project.xcworkspace

# CocoaPods
/Pods/

# Nim compiled binary, metadata and headers (generated by tools/build-mobile.sh, not needed by make build-ios)
nim_core
nim_core.json
nim_core.h
main.h
134 changes: 67 additions & 67 deletions mobile-app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2838,91 +2838,91 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
EXConstants: 59d46d25b89f88cc38291a56dbce4d550758f72d
EXConstants: a95804601ee4a6aa7800645f9b070d753b1142b3
EXJSONUtils: 1d3e4590438c3ee593684186007028a14b3686cd
EXManifests: 7469efed75d694ce3c43a6da9c6f3886f66d3c26
Expo: bc41e148d0e1129b9c10786660abe5d6df8824ec
expo-dev-client: b0363ce1f16a248d7c9b67ceaee2dbee058c1e05
expo-dev-launcher: ab9eb83b69c2f9fdd3f2f67d3da5bee02cfa7406
expo-dev-menu: 7bba844fbaa2d50ad2be63a8ffbdc6d207017062
EXManifests: 224345a575fca389073c416297b6348163f28d1a
Expo: 99022d0107ee878b9e6c474ff3637b37ff986dbf
expo-dev-client: f3434d6ca09ecb14ae48c2a3912bdbb07464cc85
expo-dev-launcher: 746f60f75a8d229581710299e37a9db0c1baa360
expo-dev-menu: 19de9e2b7a4c5d0ff2afe5d7f1d8913d4699b32d
expo-dev-menu-interface: 600df12ea01efecdd822daaf13cc0ac091775533
ExpoAsset: 3c3b7dd9b1318846a02ef05ce420e63d542aeb9f
ExpoFileSystem: 72fef9c5cb92b9995eeee114a14acb66d94d5bd4
ExpoFont: d3e56c7cc03d9fd113b90a5513ad32b4bf46b0ff
ExpoKeepAwake: 3f5e3ac53627849174f3603271df8e08f174ed4a
ExpoModulesCore: 56c8a911b34c43d54c98e1bffb80cb43c44c25c1
EXUpdatesInterface: 1436757deb0d574b84bba063bd024c315e0ec08b
ExpoAsset: 9ba6fbd677fb8e241a3899ac00fa735bc911eadf
ExpoFileSystem: 5fb091ea11198e109ceef2bdef2e6e66523e62c4
ExpoFont: 86ceec09ffed1c99cfee36ceb79ba149074901b5
ExpoKeepAwake: 1a2e820692e933c94a565ec3fbbe38ac31658ffe
ExpoModulesCore: 7cb6eef0deb6f346fc21e02e9645120f2fb5d4f0
EXUpdatesInterface: 5adf50cb41e079c861da6d9b4b954c3db9a50734
fast_float: b32c788ed9c6a8c584d114d0047beda9664e7cc6
FBLazyVector: 941bef1c8eeabd9fe1f501e30a5220beee913886
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: 35c763d57c9832d0eef764316ca1c4d043581394
NimBridge: 96e13de364931da72887a4617c6923bacfe65b4d
NimBridge: d3882c7c781b494b6f9c21b89869919a302215ef
RCT-Folly: 846fda9475e61ec7bcbf8a3fe81edfcaeb090669
RCTDeprecation: c0ed3249a97243002615517dff789bf4666cf585
RCTRequired: 58719f5124f9267b5f9649c08bf23d9aea845b23
RCTTypeSafety: 4aefa8328ab1f86da273f08517f1f6b343f6c2cc
React: 2073376f47c71b7e9a0af7535986a77522ce1049
React-callinvoker: 751b6f2c83347a0486391c3f266f291f0f53b27e
React-Core: 7195661f0b48e7ea46c3360ccb575288a20c932c
React-CoreModules: 14f0054ab46000dd3b816d6528af3bd600d82073
React-cxxreact: 7f602425c63096c398dac13cd7a300efd7c281ae
React-Core: dff5d29973349b11dd6631c9498456d75f846d5e
React-CoreModules: c0ae04452e4c5d30e06f8e94692a49107657f537
React-cxxreact: 376fd672c95dfb64ad5cc246e6a1e9edb78dec4c
React-debug: 7b56a0a7da432353287d2eedac727903e35278f5
React-defaultsnativemodule: 695d8a0b40f735edb3c4031e0f049e567fdac47a
React-domnativemodule: 6d66c1f61f277d008d98cae650ce2c025b89d3b9
React-Fabric: 997d4115d688f483cb409a1290171bff3c93dab4
React-FabricComponents: 8167e5e363ca3a3fe394d8afee355e4072bea1db
React-FabricImage: f8f9f2c97657116702acc670e3f4357bc842bed3
React-featureflags: dfb4d0d527d55dd968231370f6832b9197ee653d
React-featureflagsnativemodule: c63cfd8fe95cd98f12ebb37daa919c4544810a45
React-graphics: fd795f1c2a1133a08dde31725b20949edd545dca
React-hermes: 0a167bbb02c242664745e82154578c64e90a88e5
React-idlecallbacksnativemodule: 1798c6aa33ddc7c2e9fa3c3d67729728639889e9
React-ImageManager: c498ee6945dffacc82bfa175aa3264212f27c70b
React-jserrorhandler: 216951fea62fc26c600f4c96f0dc4fd53d1e7a9b
React-jsi: 9c27d27d3007b73c702ad3fd5a6166557c741020
React-jsiexecutor: 2b24f4ed4026344a27f717bf947a434cbbeeff7a
React-jsinspector: 02394b059c48805780f7d977366317a24168d00e
React-jsinspectorcdp: f4b6d5c5c9db05ef44d082716714f90cfeed96bb
React-jsinspectornetwork: e7c77d01b5f0664e24c0bec1aea27d5e3d7fb746
React-jsinspectortracing: aaa96a4e53abb88dc6d47da3b5744c710652fef9
React-jsitooling: 226e5f4147c7b6f1ae1954a8406ffa713f3da828
React-jsitracing: 8a2fbeaa9c53c3f0b23904ccffefc890eae48d71
React-logger: 1767babce2d28c3251039ce05556714a2c8c6ded
React-Mapbuffer: 33f678ee25b6c0ee2b01b1ecec08e3e02424cefe
React-microtasksnativemodule: 44b44a4d3cd6ffb85d928abf741acdc26722de2e
React-NativeModulesApple: b5d18bc109c45c9a1c6b71664991b5cc3adc4e48
React-defaultsnativemodule: 393b81aaa6211408f50a6ef00a277847256dd881
React-domnativemodule: 5fb5829baa7a7a0f217019cbad1eb226d94f7062
React-Fabric: a17c4ae35503673b57b91c2d1388429e7cbee452
React-FabricComponents: a76572ddeba78ebe4ec58615291e9db4a55cd46a
React-FabricImage: d806eb2695d7ef355ec28d1a21f5a14ac26b1cae
React-featureflags: 1690ec3c453920b6308e23a4e24eb9c3632f9c75
React-featureflagsnativemodule: 7b7e8483fc671c5a33aefd699b7c7a3c0bdfdfec
React-graphics: ea146ee799dc816524a3a0922fc7be0b5a52dcc1
React-hermes: fcbdc45ecf38259fe3b12642bd0757c52270a107
React-idlecallbacksnativemodule: a353f9162eaa7ad787e68aba9f52a1cfa8154098
React-ImageManager: ec5cf55ce9cc81719eb5f1f51d23d04db851c86c
React-jserrorhandler: 594c593f3d60f527be081e2cace7710c2bd9f524
React-jsi: 59ec3190dd364cca86a58869e7755477d2468948
React-jsiexecutor: b87d78a2e8dd7a6f56e9cdac038da45de98c944f
React-jsinspector: b9204adf1af622c98e78af96ec1bca615c2ce2bd
React-jsinspectorcdp: 4a356fa69e412d35d3a38c44d4a6cc555c5931e8
React-jsinspectornetwork: 7820056773178f321cbf18689e1ffcd38276a878
React-jsinspectortracing: b341c5ef6e031a33e0bd462d67fd397e8e9cd612
React-jsitooling: 401655e05cb966b0081225c5201d90734a567cb9
React-jsitracing: 67eff6dea0cb58a1e7bd8b49243012d88c0f511e
React-logger: a3cb5b29c32b8e447b5a96919340e89334062b48
React-Mapbuffer: 9d2434a42701d6144ca18f0ca1c4507808ca7696
React-microtasksnativemodule: 75b6604b667d297292345302cc5bfb6b6aeccc1b
React-NativeModulesApple: 879fbdc5dcff7136abceb7880fe8a2022a1bd7c3
React-oscompat: 93b5535ea7f7dff46aaee4f78309a70979bdde9d
React-perflogger: a03d913e3205b00aee4128082abe42fd45ce0c98
React-performancetimeline: 9b5986cc15afafb9bf246d7dd55bdd138df94451
React-perflogger: 5536d2df3d18fe0920263466f7b46a56351c0510
React-performancetimeline: 9041c53efa07f537164dcfe7670a36642352f4c2
React-RCTActionSheet: 42195ae666e6d79b4af2346770f765b7c29435b9
React-RCTAnimation: 5c10527683128c56ff2c09297fb080f7c35bd293
React-RCTAppDelegate: c616bd5b0d12f0b21dfacee9cd2d512c6df013aa
React-RCTBlob: 6e3757bdd7dce6fd9788c0dd675fd6b6c432db9d
React-RCTFabric: e8f3b9da97477710bf0904a62eb5b5209c964694
React-RCTFBReactNativeSpec: c042f8d60d44ad9e2c722da89323c0bdab7a37af
React-RCTImage: a3482fe1ae562d1bab08b42d4670a7c9a21813cd
React-RCTLinking: d82b9adb141aef9d2b38d446b837ae7017ab60aa
React-RCTNetwork: fa9350dd99354c5695964f589bd4790bdd4f6a85
React-RCTRuntime: be99a38cd23388c08921d8969c82a1997a11ec90
React-RCTSettings: b7f4a03f44dba1d3a4dc6770843547b203ca9129
React-RCTText: 91dc597a5f6b27fd1048bb287c41ea05eeca9333
React-RCTVibration: 27b09ddf74bddfa30a58d20e48f885ea6ed6c9d9
React-RCTAnimation: fa103ccc3503b1ed8dedca7e62e7823937748843
React-RCTAppDelegate: 665d4baf19424cef08276e9ac0d8771eec4519f9
React-RCTBlob: 0fa9530c255644db095f2c4fd8d89738d9d9ecc0
React-RCTFabric: 1fcd8af6e25f92532f56b4ba092e58662c14d156
React-RCTFBReactNativeSpec: db171247585774f9f0a30f75109cc51568686213
React-RCTImage: ba824e61ce2e920a239a65d130b83c3a1d426dff
React-RCTLinking: d2dc199c37e71e6f505d9eca3e5c33be930014d4
React-RCTNetwork: 87137d4b9bd77e5068f854dd5c1f30d4b072faf6
React-RCTRuntime: 137fafaa808a8b7e76a510e8be45f9f827899daa
React-RCTSettings: 71f5c7fd7b5f4e725a4e2114a4b4373d0e46048f
React-RCTText: b94d4699b49285bee22b8ebf768924d607eccee3
React-RCTVibration: 6e3993c4f6c36a3899059f9a9ead560ddaf5a7d7
React-rendererconsistency: b4785e5ed837dc7c242bbc5fdd464b33ef5bfae7
React-renderercss: cef3f26df2ddec558ce3c0790fc574b4fb62ce67
React-rendererdebug: e68433ae67738caeb672a6c8cc993e9276b298a9
React-RuntimeApple: dc1d4709bf847bc695dbe6e8aaf3e22ef25aef02
React-RuntimeCore: ca3473c8b6578693fa3bad4d44240098d49d6723
React-runtimeexecutor: 0db3ca0b09cd72489cef3a3729349b3c2cf13320
React-RuntimeHermes: f92cabaf97ef2546a74360eddfc1c74a34cb9ff8
React-runtimescheduler: 06aea75069e0d556a75d258bfc89eb0ebd5d557e
React-timing: 1a90df9a04d8e7fd165ff7fa0918b9595c776373
React-utils: 92115441fb55ce01ded4abfb5e9336a74cd93e9c
ReactAppDependencyProvider: b20fba6c3d091a393925890009999472c8f94d95
ReactCodegen: 58dc2eb138a27145826ad7d5568610159dfcadee
ReactCommon: 00df7b9f859c9d02181844255bb89a8bca544374
React-renderercss: e6fb0ba387b389c595ffa86b8b628716d31f58dc
React-rendererdebug: 60a03de5c7ea59bf2d39791eb43c4c0f5d8b24e3
React-RuntimeApple: 3df6788cd9b938bb8cb28298d80b5fbd98a4d852
React-RuntimeCore: fad8adb4172c414c00ff6980250caf35601a0f5d
React-runtimeexecutor: d2db7e72d97751855ea0bf5273d2ac84e5ea390c
React-RuntimeHermes: 04faa4cf9a285136a6d73738787fe36020170613
React-runtimescheduler: f6a1c9555e7131b4a8b64cce01489ad0405f6e8d
React-timing: 1e6a8acb66e2b7ac9d418956617fd1fdb19322fd
React-utils: 52bbb03f130319ef82e4c3bc7a85eaacdb1fec87
ReactAppDependencyProvider: 433ddfb4536948630aadd5bd925aff8a632d2fe3
ReactCodegen: 1d05923ad119796be9db37830d5e5dc76586aa00
ReactCommon: 394c6b92765cf6d211c2c3f7f6bc601dffb316a6
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: a3ed390a19db0459bd6839823a6ac6d9c6db198d
Yoga: 922d794dce2af9c437f864bf4093abfa7a131adb

PODFILE CHECKSUM: 30222b370f2c6e2622deeb5e8d786e95202de871

Expand Down
35 changes: 0 additions & 35 deletions mobile-app/ios/main.h

This file was deleted.

Binary file removed mobile-app/ios/nim_core
Binary file not shown.
Loading