# Kokio SOW
## 8/5 - 8/30
During the month of August, there were several cycles where development efforts bounced around several repositories. The Kokio team had originally created a POC repository that can be found here: https://github.com/Blockchain-Powered-eSIM/eSIM-Wallet. This is where the initial development efforts took place.
However, the Kokio team created a new repository to remove bloat and legacy code. This was not communicated to the Pollen labs team. I noticed the new repo https://github.com/Blockchain-Powered-eSIM/Kokio-RN in the org around 8/9 and confirmed that this is where development efforts should take place.
The Kokio-RN repository was not created using Expo. I began to develop the UI in the Pure React Native repository. That work can be found in the following branches:
* https://github.com/Blockchain-Powered-eSIM/Kokio-RN/tree/feat/packages
* https://github.com/Blockchain-Powered-eSIM/Kokio-RN/tree/feat/ui-primitives
The following week, I began to express my concern with the additional development that would be required in order to achieve full functionality provided out of the box by the React Native Framework Expo. I compiled the following deep dive of missing functionality in the Pure React Native repository and additional development efforts. Additionally, I created a project in Github and tickets for each item: https://github.com/orgs/Blockchain-Powered-eSIM/projects/8/views/1
At this time, the Kokio team was not sure if Expo would block them from running native device code.
### Pure React Native vs Expo Deep Dive
#### Over-the-Air (OTA) Updates
**With Expo:**
Expo allows you to push OTA updates to your app users without needing to go through the App Store or Play Store review processes. This is integrated into the Expo framework and requires minimal configuration.
**Without Expo:**
Implementing OTA updates would require setting up a custom solution, potentially using services like Microsoft CodePush or writing your own update mechanism. This involves significant setup and maintenance effort.
#### Deep Linking
**With Expo:**
Expo simplifies deep linking configuration and provides built-in support. You can set up deep links easily, and Expo handles the necessary native configuration.
**Without Expo:**
Must manually configure deep linking in both iOS and Android. This includes modifying native files like AndroidManifest.xml and Info.plist, setting up URL schemes, and handling the link routing logic.
#### Permissions Handling
**With Expo:**
Expo provides an API for managing permissions across different platforms, abstracting away the platform-specific nuances.
**Without Expo:**
Need to handle platform-specific permission requests and manage their lifecycle in your app. This can involve writing native code to ensure that the app correctly requests and checks for permissions on both iOS and Android.
#### Building and Deploying
**With Expo:**
Expo's build services allow you to create app binaries (APKs, IPAs) without needing to set up native development environments. Expo handles most of the complexity related to code signing, certificates, and provisioning profiles.
**Without Expo:**
Need to set up the entire build pipeline, including dealing with native dependencies, setting up Xcode and Android Studio projects, managing code signing certificates, and handling build and deployment scripts.
#### Asset Management
**With Expo:**
Expo includes built-in support for loading and caching assets (e.g., images, fonts, videos). It provides easy APIs for asset preloading and bundling, ensuring consistent asset handling across platforms.
**Without Expo:**
Manually handle assets, which may involve writing custom code for asset loading, caching, and dealing with platform-specific file paths. You also need to configure how assets are bundled during the build process.
#### Access to Device Features
**With Expo:**
Expo includes support for accessing various device features (e.g., accelerometer, contacts, sensors) through a simple API.
**Without Expo:**
Need to install and configure each native module individually, often dealing with platform-specific APIs and native code.
#### Push notifications
**With Expo:**
Expo provides an easy-to-use API for push notifications and handles the setup for both iOS and Android. It also includes a push notification service, which simplifies sending notifications.
**Without Expo:**
Configure Firebase Cloud Messaging (FCM) or similar for Android and Apple Push Notification Service (APNS) for iOS separately. This requires setting up credentials, dealing with platform-specific details, and integrating them into your app.
### Additional Repos
During this discovery process, I created three additional repositories on my local machine. The point of these additional repositories was to explore ejecting React Native from Expo, to migrate a Pure React Native Repo to Expo, and to experiment with various component libraries like react-native-reusables and native-wind.
* https://github.com/0xRowdy/kokio-expo
* https://github.com/0xRowdy/kokio-migration
* https://github.com/0xRowdy/react-native-reusables/
Ultimately, the Kokio team agreed that the additional development work to build the features included out of the box was not necessary. There were two viable options to make sure the integration with Kokio team's code and SDKs would work: A. The Kokio team would try to figure out how to integrate with Expo. B. Eject the React Native app from Expo after all UI development is completed.
## 8/31 - 9/13
The final stretch of work building out UI elements took place in the new repository found here: https://github.com/Blockchain-Powered-eSIM/Kokio
A branch (dev-ui) was created to build out the screens and functionality based on the designs found [here](https://www.figma.com/design/vSWlHQjEW4630P2hOKVWlW/Kokio?node-id=1344-3127&node-type=canvas&t=Wp3kXxxMu2WC374h-0).
The majority of the UI primitives and several screens' functionality was completed before the termination of the PSE Pollen labs grants.