Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS bindings #3

Closed
wants to merge 0 commits into from
Closed

iOS bindings #3

wants to merge 0 commits into from

Conversation

kaloudis
Copy link
Contributor

@kaloudis kaloudis commented Oct 3, 2022

These are the full iOS bindings for LNC-rn.

To test, run the connect-demo or multi-connect-demo

@kaloudis kaloudis marked this pull request as ready for review November 16, 2022 02:06
@kaloudis kaloudis requested a review from jamaljsr November 17, 2022 00:07
@jamaljsr
Copy link
Member

I'm getting this error when trying to install the pods from the /demos/connect-demo/ios dir.

$ pod install
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'expo/package.json'
Require stack:
- /Users/jamal/dev/lightninglabs/dev-resources/frontend-regtest/repos/lnc-rn/demos/connect-demo/ios/[eval]
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at [eval]:1:9
    at Script.runInThisContext (node:vm:129:12)
    at Object.runInThisContext (node:vm:305:38)
    at node:internal/process/execution:76:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:75:60)
    at node:internal/main/eval_string:27:3 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/jamal/dev/lightninglabs/dev-resources/frontend-regtest/repos/lnc-rn/demos/connect-demo/ios/[eval]'
  ]
}

[!] Invalid `Podfile` file: cannot load such file -- ./scripts/autolinking.

 #  from /Users/jamal/dev/lightninglabs/dev-resources/frontend-regtest/repos/lnc-rn/demos/connect-demo/ios/Podfile:1
 #  -------------------------------------------
 >  require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
 #  require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
 #  -------------------------------------------

Any ideas on how to resolve this?

I am able to create and run a brand new ReactNative app so I think my machine is setup correctly.

Copy link
Member

@jamaljsr jamaljsr left a comment

Choose a reason for hiding this comment

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

Ok, so I did npm install expo and now I'm getting this error:

$ pod install
Using Expo modules
[Expo] Enabling modular headers for pod ExpoModulesCore
Auto-generating `.xcode.env.local` with
$NODE_BINARY=/Users/jamal/.nvm/versions/node/v16.16.0/bin/node
Auto-linking React Native modules for target `lncmobiledemo`: RNCMaskedView, RNGestureHandler, RNReanimated, RNScreens, lnc-rn, react-native-encrypted-storage, and react-native-safe-area-context
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[!] CocoaPods could not find compatible versions for pod "Expo":
  In Podfile:
    Expo (from `../node_modules/expo`)

Specs satisfying the `Expo (from `../node_modules/expo`)` dependency were found, but they required a higher minimum deployment target.

I assume that I may need to install an older version of the expo package which supports the deployment target of 12.0 specified in the Podfile. I have the latest expo v47.0.6 installed now which is throwing this error.

Is this correct? If so, what version are you using?

@kaloudis
Copy link
Contributor Author

@jamaljsr looks like I have expo v6.0.2 installed 😲

something must have gotten messed up when getting this branch up to sync though as I'm having issues finding my expo/package.json

Also throwing on /Users/satoshi/Repos/lightninglabs/lnc-rn/demos/connect-demo/node_modules/react-native-gesture-handler/ios/Handlers/RNNativeViewHandler.mm Build input file cannot be found: '/Users/satoshi/Repos/lightninglabs/lnc-rn/demos/connect-demo/node_modules/react-native-gesture-handler/ios/Handlers/RNNativeViewHandler.mm'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

Investigating

@kaloudis
Copy link
Contributor Author

When I use npx create-react-native-app on my machine, the created app dependencies look like this:

  "name": "test",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "expo": "~47.0.6",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "react": "18.1.0",
    "react-native": "0.70.5"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

@jamaljsr
Copy link
Member

jamaljsr commented Nov 17, 2022

Ah ok. I've been following the React Native CLI Quickstart instructions which uses npx react-native init AwesomeProject. There's also the Expo quickstart which uses npx create-expo-app AwesomeProject. I'm not sure if the create-react-native-app tool is actively being maintained as it hasn't had a commit in 4 months.

@kaloudis
Copy link
Contributor Author

Closed in favor of #7

@kaloudis kaloudis deleted the ios-bindings branch November 17, 2022 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants