Skip to content

Commit

Permalink
Merge pull request #205 from nemgrouplimited/feature_postlaunch_optin
Browse files Browse the repository at this point in the history
Post-launch opt in
  • Loading branch information
AdriaCarrera authored Jun 14, 2021
2 parents 1f55959 + a73c7ac commit 59886ce
Show file tree
Hide file tree
Showing 55 changed files with 5,774 additions and 1,836 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ orbs:
jobs:
build_testnet:
macos:
xcode: 11.5.0 # Specify the Xcode version to use
xcode: "12.1" # Specify the Xcode version to use
working_directory: /Users/distiller/project
environment:
FL_OUTPUT_DIR: output
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:

- run:
name: Fastlane
command: cd ios && export BUILD_NUMBER=${CIRCLE_BUILD_NUM} && export VERSION_NUMBER=4 && bundle exec fastlane $FASTLANE_LANE
command: cd ios && export BUILD_NUMBER=${CIRCLE_BUILD_NUM} && export VERSION_NUMBER=4.2 && bundle exec fastlane $FASTLANE_LANE

- store_artifacts:
path: ios/output
Expand All @@ -58,3 +58,4 @@ workflows:
only:
- main
- dev
- feature_postlaunch_optin
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ allprojects {
google()
jcenter()
maven { url 'https://jitpack.io' }
maven { url "$rootDir/../node_modules/react-native-background-fetch/android/libs" }
}
}

Expand Down
31 changes: 25 additions & 6 deletions env/default.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
"nodeTypes": { "MAINNET": "mainnet", "TESTNET": "testnet", "CUSTOM": "custom" },
"networks": {
"mainnet": {
"nisNodes": [
"http://hugealice2.nem.ninja",
"http://hachi.nem.ninja",
"http://alice2.nem.ninja"
],
"nodes": [
"http://api.experimental.symboldev.network:3000",
"http://ngl-api-501.symbolblockchain.io:3000",
"http://ngl-api-601.symbolblockchain.io:3000",
"http://ngl-api-401.symbolblockchain.io:3000",
Expand All @@ -37,17 +41,32 @@
]
},
"testnet": {
"nisNodes": [
"http://hugetestalice2.nem.ninja",
"http://hugetestalice.nem.ninja",
"http://medalice2.nem.ninja"
],
"nodes": [
"http://api-01.us-west-1.testnet.symboldev.network:3000",
"http://api-01.ap-northeast-1.testnet.symboldev.network:3000",
"http://api-01.ap-southeast-1.testnet.symboldev.network:3000",
"http://api-01.eu-central-1.testnet.symboldev.network:3000",
"http://api-01.eu-west-1.testnet.symboldev.network:3000"
"http://ngl-dual-001.testnet.symboldev.network:3000",
"http://ngl-dual-101.testnet.symboldev.network:3000",
"http://ngl-dual-201.testnet.symboldev.network:3000",
"http://ngl-dual-301.testnet.symboldev.network:3000",
"http://ngl-dual-401.testnet.symboldev.network:3000",
"http://ngl-dual-501.testnet.symboldev.network:3000",
"http://ngl-dual-601.testnet.symboldev.network:3000"
]
}
},
"defaultNetworkType": "mainnet",
"nativeMosaicId": "5F160D7851F3CB30",
"nglFinanceBot": {
"testnet": [
"E5F5638C626F58E1937C181E668EC383C94C5BC72AAE400C19AD28BDD3A4D37E"
],
"mainnet": [
"46038372D2A63D5207BDD9B33E9DA3C5B0B8EFAC399BB4103378E7994746CA14"
]
},
"optInWhiteList" : {
"testnet": [],
"mainnet": []
Expand Down
20 changes: 10 additions & 10 deletions ios/NEMCatapultWallet/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import "AppDelegate.h"
#import <UserNotifications/UserNotifications.h>
#import <RNCPushNotificationIOS.h>
// #import <RNCPushNotificationIOS.h>

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
Expand All @@ -26,17 +26,17 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
// Define UNUserNotificationCenter
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
center.delegate = self;

// [REQUIRED] Register BackgroundFetch
[[TSBackgroundFetch sharedInstance] didFinishLaunching];
return YES;
}

// Required to register for notifications
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
[RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];
}
// - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
// {
// [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];
// }
//// Required for the register event.
//- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
//{
Expand All @@ -54,10 +54,10 @@ - (void)application:(UIApplication *)application didRegisterUserNotificationSett
// [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];
//}
// Required for the localNotification event.
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
[RNCPushNotificationIOS didReceiveLocalNotification:notification];
}
// - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
// {
// [RNCPushNotificationIOS didReceiveLocalNotification:notification];
// }

// Called when a notification is delivered to a foreground app.
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
Expand Down
73 changes: 39 additions & 34 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ PODS:
- GCDWebServer/Core (= 3.5.4)
- GCDWebServer/Core (3.5.4)
- glog (0.3.5)
- Permission-Camera (2.0.9):
- Permission-Camera (2.2.2):
- RNPermissions
- RCTRequired (0.61.5)
- RCTTypeSafety (0.61.5):
Expand Down Expand Up @@ -199,17 +199,17 @@ PODS:
- React
- react-native-netinfo (4.7.0):
- React
- react-native-randombytes (3.5.3):
- React
- react-native-randombytes (3.6.0):
- React-Core
- react-native-splash-screen (3.2.0):
- React
- react-native-udp (2.7.0):
- React
- react-native-video (5.1.0-alpha8):
- React
- react-native-video/Video (= 5.1.0-alpha8)
- react-native-video/Video (5.1.0-alpha8):
- React
- react-native-video (5.1.1):
- React-Core
- react-native-video/Video (= 5.1.1)
- react-native-video/Video (5.1.1):
- React-Core
- react-native-view-shot (3.1.2):
- React
- React-RCTActionSheet (0.61.5):
Expand Down Expand Up @@ -247,7 +247,12 @@ PODS:
- React-cxxreact (= 0.61.5)
- React-jsi (= 0.61.5)
- ReactCommon/jscallinvoker (= 0.61.5)
- ReactNativeNavigation (6.3.1):
- ReactNativeNavigation (6.12.2):
- React
- React-RCTImage
- React-RCTText
- ReactNativeNavigation/Core (= 6.12.2)
- ReactNativeNavigation/Core (6.12.2):
- React
- React-RCTImage
- React-RCTText
Expand All @@ -256,26 +261,24 @@ PODS:
- React
- rn-fetch-blob (0.11.2):
- React-Core
- RNBackgroundFetch (3.0.4):
- React
- RNCAsyncStorage (1.8.0):
- RNBackgroundFetch (3.1.0):
- React
- RNCAsyncStorage (1.12.1):
- React-Core
- RNCClipboard (1.5.1):
- React-Core
- RNCPushNotificationIOS (1.0.7):
- React
- RNFS (2.16.6):
- React
- RNGestureHandler (1.6.0):
- React
- RNKeychain (4.0.5):
- React
- RNLocalize (1.3.3):
- React
- RNPermissions (2.0.9):
- React
- RNReanimated (1.7.0):
- React
- RNLocalize (1.4.3):
- React-Core
- RNPermissions (2.2.2):
- React-Core
- RNReanimated (1.13.3):
- React-Core
- RNSecureStorage (1.0.82):
- React
- RNShare (2.0.0):
Expand All @@ -284,6 +287,8 @@ PODS:
- React
- TcpSockets (3.3.2):
- React
- toolbar-android (0.1.0-rc.2):
- React
- TouchID (4.4.1):
- React
- Yoga (1.14.0)
Expand Down Expand Up @@ -331,7 +336,6 @@ DEPENDENCIES:
- RNBackgroundFetch (from `../node_modules/react-native-background-fetch`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCClipboard (from `../node_modules/@react-native-community/clipboard`)"
- "RNCPushNotificationIOS (from `../node_modules/@react-native-community/push-notification-ios`)"
- RNFS (from `../node_modules/react-native-fs`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNKeychain (from `../node_modules/react-native-keychain`)
Expand All @@ -342,6 +346,7 @@ DEPENDENCIES:
- RNShare (from `../node_modules/react-native-share`)
- RNSVG (from `../node_modules/react-native-svg`)
- TcpSockets (from `../node_modules/react-native-tcp`)
- "toolbar-android (from `../node_modules/@react-native-community/toolbar-android`)"
- TouchID (from `../node_modules/react-native-touch-id`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

Expand Down Expand Up @@ -429,8 +434,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-community/async-storage"
RNCClipboard:
:path: "../node_modules/@react-native-community/clipboard"
RNCPushNotificationIOS:
:path: "../node_modules/@react-native-community/push-notification-ios"
RNFS:
:path: "../node_modules/react-native-fs"
RNGestureHandler:
Expand All @@ -451,6 +454,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-svg"
TcpSockets:
:path: "../node_modules/react-native-tcp"
toolbar-android:
:path: "../node_modules/@react-native-community/toolbar-android"
TouchID:
:path: "../node_modules/react-native-touch-id"
Yoga:
Expand All @@ -465,7 +470,7 @@ SPEC CHECKSUMS:
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
Permission-Camera: 8fe4753b02396489b11c5089e4f57bab7fe1ef42
Permission-Camera: 5d2aaf95592660b6dcb5e8d1d90ed5d0156cad02
RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
React: b6a59ef847b2b40bb6e0180a97d0ca716969ac78
Expand All @@ -477,10 +482,10 @@ SPEC CHECKSUMS:
React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
react-native-camera: a6c0ca5653cbcd9ea1c1894966207346cfeebe09
react-native-netinfo: ddaca8bbb9e6e914b1a23787ccb879bc642931c9
react-native-randombytes: 3638d24759d67c68f6ccba60c52a7a8a8faa6a23
react-native-randombytes: b6677f7d495c27e9ee0dbd77ebc97b3c59173729
react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
react-native-udp: ff9d13e523f2b58e6bc5d4d32321ac60671b5dc9
react-native-video: dbb8df4f0bbdf80de6797c90fcad8bc12b19401d
react-native-video: 0bb76b6d6b77da3009611586c7dbf817b947f30e
react-native-view-shot: 4475fde003fe8a210053d1f98fb9e06c1d834e1c
React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
Expand All @@ -492,23 +497,23 @@ SPEC CHECKSUMS:
React-RCTText: 9ccc88273e9a3aacff5094d2175a605efa854dbe
React-RCTVibration: a49a1f42bf8f5acf1c3e297097517c6b3af377ad
ReactCommon: 198c7c8d3591f975e5431bec1b0b3b581aa1c5dd
ReactNativeNavigation: d9bb71088ef37aa6af58f3172f890a1ae08861d6
RealmJS: b9004e5f5683347fa26cbc3ce20b2b792240fdc8
ReactNativeNavigation: aefc8debafb4a374575adafb44a3352b9d5b618a
RealmJS: 0f2a5db56ff20f2feab9543f57e348575e40b508
rn-fetch-blob: f525a73a78df9ed5d35e67ea65e79d53c15255bc
RNBackgroundFetch: 388cf1595934d22fed275b8db9b48a28bb4eb7b6
RNCAsyncStorage: 5d83b49070d41fd72906a116c5e7bdac4ea3a814
RNBackgroundFetch: 8dbb63141792f1473e863a0797ffbd5d987af2fc
RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398
RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495
RNCPushNotificationIOS: eea954fa69537d4a8db898fe1b1a06e2b7e15841
RNFS: 2bd9eb49dc82fa9676382f0585b992c424cd59df
RNGestureHandler: dde546180bf24af0b5f737c8ad04b6f3fa51609a
RNKeychain: 840f8e6f13be0576202aefcdffd26a4f54bfe7b5
RNLocalize: a734b53c45e77acd3ffb78b92e63bb4d6cd13257
RNPermissions: 2f74237e97b08beda01e914301e12524ddddf5b8
RNReanimated: 031fe8d9ea93c2bd689a40f05320ef9d96f74d7f
RNLocalize: 7c7aeda16c01db7a0918981c14875c0a53be9b79
RNPermissions: 5df468064df661a4c8c017e2791ce90d7695eea5
RNReanimated: 514a11da3a2bcc6c3dfd9de32b38e2b9bf101926
RNSecureStorage: 8b2b07278d80c48b3a881c56e604ab147372f243
RNShare: 8b171d4b43c1d886917fdd303bf7a4b87167b05c
RNSVG: 8ba35cbeb385a52fd960fd28db9d7d18b4c2974f
TcpSockets: 14306fb79f9750ea7d2ddd02d8bed182abb01797
toolbar-android: 85f3ef4d691469f2d304e7dee4bca013aa1ba1ff
TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b

Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@react-native-community/async-storage": "^1.5.0",
"@react-native-community/clipboard": "^1.5.1",
"@react-native-community/netinfo": "^4.3.0",
"@react-native-community/push-notification-ios": "^1.0.7",
"@react-native-community/toolbar-android": "^0.1.0-rc.2",
"@tradle/react-native-http": "^2.0.0",
"assert": "^2.0.0",
"asyncstorage-down": "^4.2.0",
Expand All @@ -36,10 +36,14 @@
"https-browserify": "^1.0.0",
"i18n-js": "^3.3.0",
"isomorphic-ws": "^4.0.1",
"js-beautify": "^1.10.3",
"js-joda": "1.6.2",
"lodash": "^4.17.11",
"lodash.memoize": "^4.1.2",
"module": "^1.2.5",
"nem-sdk": "^1.6.8",
"net-browserify": "^0.2.4",
"nodent": "^3.0.17",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.0",
"process": "^0.11.10",
Expand Down Expand Up @@ -67,7 +71,6 @@
"react-native-permissions": "^2.0.9",
"react-native-popover-view": "^3.1.1",
"react-native-progress": "^4.0.3",
"react-native-push-notification": "^3.1.9",
"react-native-qrcode-scanner": "^1.3.1",
"react-native-randombytes": "^3.0.0",
"react-native-reanimated": "^1.7.0",
Expand All @@ -93,6 +96,7 @@
"realm": "4.0.0-beta.0",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"regenerator": "0.9.7",
"reusable": "^1.0.0",
"rn-fetch-blob": "^0.11.1",
"rn-secure-storage": "https://github.com/irshadpc/rn-secure-storage.git#master",
Expand All @@ -104,6 +108,7 @@
"symbol-address-book": "^1.0.0",
"symbol-hd-wallets": "0.14.1-alpha-202103051108",
"symbol-paper-wallets": "^1.0.2",
"symbol-post-launch-optin-module": "1.0.1",
"symbol-qr-library": "0.14.1-alpha-202103081047",
"symbol-sdk": "1.0.0",
"timers-browserify": "^1.0.1",
Expand Down
16 changes: 16 additions & 0 deletions scripts/fix-rn-ios-images-workaround.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
console.log('[-] Fixing iOS RN Images workaround...');
const fs = require('fs');

const MAIN_FILE_PATH = __dirname + '/../node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m';

fs.readFile(MAIN_FILE_PATH, 'utf8', function(err, data) {
const formatted = data.replace(
/layer.contents[ ]*=[ ]*\(__bridge id\)_currentFrame.CGImage;/g,
'layer.contents = (__bridge id)_currentFrame.CGImage;}else{[super displayLayer:layer];'
);

fs.writeFile(MAIN_FILE_PATH, formatted, 'utf8', function(err) {
if (err) return console.log(err);
else console.log('[+] Fixed iOS RN Images workaround...');
});
});
1 change: 1 addition & 0 deletions scripts/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
echo "Running post install hook..."
yarn rn-nodeify --hack --install
node ./scripts/fix-qr-code-workaround.js
node ./scripts/fix-rn-ios-images-workaround.js
exit 0
Loading

0 comments on commit 59886ce

Please sign in to comment.