Skip to content

Commit

Permalink
iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjoberg committed Dec 20, 2020
1 parent 8047ffa commit 2fa8bfa
Show file tree
Hide file tree
Showing 117 changed files with 5,978 additions and 3,871 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ proto

# Google
google-services.json

# iOS
/ios/Pods
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ Do you like React Native, Java or Lightning? Come and help out!

## Build Steps

- Install [Node](https://nodejs.org), [Yarn](https://classic.yarnpkg.com/), [Android Studio + Android SDK (including NDK)](https://developer.android.com/studio/)
### Android

- Install [Node](https://nodejs.org), [Yarn](https://classic.yarnpkg.com/) and [Android Studio + Android SDK (including NDK)](https://developer.android.com/studio/)
- If needed, install an emulated android device inside Android Studio
- Download lnd binary from [blixt-lndmobile-releases](https://github.com/BlixtWallet/blixt-lndmobile-releases/releases) and put it in `android/lndmobile`. Alternatively build lnd for Android by following the steps in [build-android-aar.md](build-android-aar.md)
- Get the tor sub-module: `git submodule update --init`
Expand All @@ -51,7 +53,28 @@ Do you like React Native, Java or Lightning? Come and help out!

To start the application:
- Run: `yarn start-metro`
- Run: `yarn mainnet-debug` or `yarn testnet-debug`
- Run: `yarn android:mainnet-debug` or `yarn android:testnet-debug`

### iOS

_The iPhone/iOS version is still work in progress and is not yet stable nor fully working._

To build the iOS version, macOS is required. You also need an Apple Developer account, although you do not need to be enrolled in the Developer Program.

- Install [XCode](https://developer.apple.com/xcode/), [Node](https://nodejs.org) and [Yarn](https://classic.yarnpkg.com/)
- Install Node packages: `yarn`
- Generate proto files: `yarn gen-proto`
- Install CocoaPods libs: `cd ios && pod install`
- Setup team signing:
- Open ios/BlixtWallet/BlixtWallet.xcworkspace with XCode
- Login with your Apple Developer account if XCode asks you to
- Click on BlixtWallet in the left column
- Click on the Signing & Capabilities tab
- Choose your Team in the dropdown and choose a new unique Bundle Identifier (cannot be the same as the ones released on the App Store). Do this for every configuration

To start the application:
- Run: `yarn start-metro`
- Run: `yarn ios:fakelnd-debug`

## Commit and Code-Style

Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ import com.android.build.OutputFile
*/

project.ext.react = [
entryFile: "index.ts",
entryFile: "index.js",
enableHermes: true, // clean and rebuild if changing
]

Expand Down
Binary file modified android/app/src/main/assets/fonts/Feather.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/MaterialIcons.ttf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ public void handleMessage(Message msg) {
// when the RPC ready callback
// from LndMobile's start is called,
// not when the InitWallet RPC call is done
// TODO(hsjoberg): document this more clearly
unlockWalletRequest = request;

ArrayList<String> seed = bundle.getStringArrayList("seed");
Expand Down
Binary file added assets/fonts/IBMPlexSans-Medium.ttf
Binary file not shown.
Binary file added assets/fonts/IBMPlexSans-Regular.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion build-tor
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ cd tor
./gradlew install
./gradlew :universal:build
./gradlew :android:build
./gradlew :android:publishToMaven
./gradlew :android:publishToMavenLocal
File renamed without changes.
29 changes: 14 additions & 15 deletions ios/BlixtWallet-tvOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -22,6 +22,19 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand All @@ -36,19 +49,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSAppTransportSecurity</key>
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/BlixtWallet-tvOSTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
Loading

0 comments on commit 2fa8bfa

Please sign in to comment.