Skip to content

Instantly share code, notes, and snippets.

@nandorojo
nandorojo / widget.md
Last active July 8, 2024 23:35
How to create an iOS Widget with React Native (Expo / EAS)

First, copy the config plugin from this repo: https://github.com/gaishimo/eas-widget-example

You can reference my PRs there too (which, at the time of writing, aren't merged).

After adding the config plugin (see app.json) with your dev team ID, as well as a bundle ID, you can edit the widget folder to edit your code. Then npx expo run:ios (or npx expo run:android).

Workflow

After npx expo run:ios, open the ios folder, and open the file that ends in .xcworkspace in XCode. Make sure you have the latest macOS and XCode versions. If you don't, everything will break.

const flexIntegrationSdk = require('sharetribe-flex-integration-sdk');
const integrationSdk = flexIntegrationSdk.createInstance({
// client information
})
let paginationLimit = null;
const getNextPage = (params, page, results = []) => integrationSdk.listings.query({...params, page}).then(resp => {
console.log('resp.data.meta', resp.data.meta)
if (!paginationLimit) {
@hirbod
hirbod / app-release.md
Last active August 22, 2023 06:21
How to get your App through the App/Play store safely

How to Successfully Publish Your App on the App Store or Google Play

As someone who has released many apps starting in 2015 using frameworks such as Cordova and Ionic, and more recently using React Native and Expo, I have learned that the rules for publishing apps can change frequently and can sometimes be challenging to navigate. With that in mind, I want to provide a brief guide to help others navigate the process. While this guide may not cover every aspect of publishing an app, it does cover general tips and information that should be useful for anyone looking to release their app on the App Store or Google Play.

Metadata

Keywords, Description, Screenshots, App Name, Promo Videos

There are significant differences between Apple and Google when it comes to metadata. Apple is generally stricter than Google, so it is advisable to follow Apple's guidelines to ensure the best chances of success on both platforms. Here are some tips to keep in mind:

  1. Keep your screenshots and promo videos separat
@jengel3
jengel3 / authentication-1.controller.ts
Last active April 23, 2024 19:26
NestJS - Implementing Access & Refresh Token Authentication
// app/modules/authentication/authentication.controller.ts
import { Body, Controller, Post } from '@nestjs/common'
import { RegisterRequest } from './requests'
import { User } from '../../modules/user'
import { UsersService } from '../users/users.service'
@PavloBezpalov
PavloBezpalov / .rubocop.yml
Created June 19, 2019 14:01
Rubocop settings that helps
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 2.4
DisabledByDefault: true
Exclude:
- db/**/**
- bin/*
# Prefer &&/|| over and/or.
@naumanahmed19
naumanahmed19 / version-check.dart
Last active February 25, 2024 14:51
Flutter Force Update IOS and Android App Version
//Prompt users to update app if there is a new version available
//Uses url_launcher package
import 'package:url_launcher/url_launcher.dart';
const APP_STORE_URL =
'https://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftwareUpdate?id=YOUR-APP-ID&mt=8';
const PLAY_STORE_URL =
'https://play.google.com/store/apps/details?id=YOUR-APP-ID';
// Import the splash.dart into your main app and use like:
// ex: Splash(iconData:Icons.restaurant, label: 'MY APP',);
import 'package:flutter/material.dart';
class Splash extends StatefulWidget {
final IconData iconData;
final String label;
@verbaleks
verbaleks / config.yml
Created August 16, 2018 08:48 — forked from trev/config.yml
CircleCI 2.0 with parallelism & simplecov for Rails
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
defaults: &defaults
working_directory: ~/split_app
parallelism: 2
docker:
- image: circleci/ruby:2.5.0-node-browsers
#!/usr/bin/env bash
clear
printf "Checking dependency...\n"
XDOTOOL_INSTALLED=$(dpkg-query -W -f='${Status}' xdotool 2>/dev/null | grep -c "ok installed")
if [ $XDOTOOL_INSTALLED -eq 0 ];
then
printf "\a"
printf "Unmet dependency:\n xdotool"
printf "\nDo you want to install required packages (Y/n)?"
@ibraheem4
ibraheem4 / postgres-brew.md
Last active July 18, 2024 00:18 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update