Skip to content

Aditya-sr/mobile-app-d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2ndSkrn Mobile App

Built with

  • Typescript
  • React Native
  • Jest - for testing

For more details about the libraries and tools used check packages.json.

Getting started

Prerequisites

For development, you'll need to have installed:

+#### Software +* xcode 13.3 +* Node v20.10.0 +* NPM 8.5.2 +* IOS 15.1 +* swift version is Swift 5, +*JAVA 17 +### Running the project

Minimum iOS and Android SDK requirements

  • iOS - 15.1
  • Android - SDK 24 (Android 7)

Writing code

  • Fork develop if you're using an intel processor to start working.
  • Fork develop_apple_m1 if you're using an M1 processor so start working (see troubleshooting section to see difference)
  • Write the feature / bug fix code.
  • Open pull requests against the develop branch (make sure to pull the latest version).

Running on iOS Simulator

  • In the project root folder run
react-native run-ios
  • or choose a simulator. For example:
react-native run-ios --simulator="iPhone 12"
  • Most issues I ran into got fixed by clearing the build folder:
  • Xcode -> "Product" drop down menu -> "Clean Build Folder"
  • or updating the pod file
cd ios
pod install
cd ../
react-native run-ios

Running on Android Emulator

Starting in the project root folder, the app requires Java 17, install Java 17 if you don't have it already. Look at "Other issues we ran into" below to see if you have it installed.

Before running on the emulator I had to run the following command in my terminal:

export JAVA_HOME=`/usr/libexec/java_home -v 17`

Then change directories to the Android folder:

cd android

Start your emulator, recomend setting up the emulator with 5,000+ MB RAM and Interal Storage of 10,000+ MB

In the Android folder run the following in the terminal:

npx react-native run-android

If it has problems finding the emulator run the following replacing 'myDeviceId' with the id of your emulator:

npx react-native run-android --deviceId='myDeviceId'

Building for app stores

Apple

  • At the top of the Xcode window in the middle you'll see "Socialpopcorn > * device name ". Make sure this is set to "Any Device"
  • Under General -> Identity there is Version number and Build number. If the previous build was published to the store you will need a new Version number and Build number. If the previous build was only uploaded to Test Flight, then don't change the Version number only change the Build number.
  • When ready go to Product Menu and select Archive. Follow the build wizard, make sure to keep with automatic signing.

Android

  • Navigate to " 2NDSKRN-APP -> android -> app " and open build.gradle in your favorite text editor
  • Update "versionCode" on line 139
  • Update "versionName" on line 140
  • Save the file
  • In Terminal go to project root folder
  • From the project root change directories to Android folder in Terminal:
  • cd android
  • Be sure it'll build with Java 17
  • export JAVA_HOME=/usr/libexec/java_home -v 17``
  • Still inside Android Folder use the following command in Terminal to build the app:
  • ./gradlew bundleRelease
  • This will build the .aab file in "*YourProjectRoot/android/app/build/outputs/bundle/release"

Other issues we ran into

JAVA VERSION 1.8 WASN'T SETUP FOR THE VIRTUAL MACHINES. PROJECT IS SET FOR JAVA 1.8.
  • View vitural machines setup on your system(mac)
/usr/libexec/java_home -V
  • Should get a response like the following, please note you can have more then one virtual machine at the same time
 1.8.0_292 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
  • If "1.8.x" dones't appear in the response try the following:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
  • Try viewing the vitural machings again:
/usr/libexec/java_home -V
  • If version "1.8.x" still doesn't apper, might need to install and try again.
XCODE BUILD TARGET
  • At the top of the Xcode window you will see the name of the project "SocialPopcorn > " followed by a device name, select the simulator you are running or want to test on.
API SSL CERT EXPIRING

When the API SSL Cert gets renewed or changes, you need to add a copy fo the Cert to the Android App:

  • Navigate to "2NDSKRN-APP -> android -> app -> src -> main -> raw"
  • Add the copy of the new SSL Cert
  • In Chrome go to the API website
  • Directly to the left of the URL, there is a "Lock" symbol. Click on the "Lock"
  • This will show a drop down menu, click on "Connection is Secure"
  • Click on "Certification is Valid" which will open a small pop-up
  • The bottom half of this pop-up will have a certification graphic along with name and details
  • Click and drag the certification graphic into the "raw" folder you navigated to in first step.
  • Remove the old cert
  • Rename the new SSL Cert to "upco_co_cer"

Troubleshooting

  • For non-M1 Macs you need to comment out these lines from ios/Podfile:
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.1'
    end

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published