Giter VIP home page Giter VIP logo

cross-platform-blog's Introduction

Cross-Platform Blog

alt tag This repo is an example of how to build cross-platform apps with content powered by Cosmic JS. The iOS and Android apps in this repo are built using React Native and the web app runs on a light Node.js web server, all with content served from the Cosmic JS CMS API. Create your content once, deliver everywhere. ###Features

  1. Native iOS and Android apps share the same React Native codebase. Learn once, write anywhereTM.
  2. Web is fully responsive down to mobile w/ Bootstrap frontend.
  3. Images are easily manipulated for different device / browser requirements via the Cosmic JS provided Imgix integration.

Sign up for Cosmic JS to install the app, add / edit content and deploy the web app.

** Before trying to run any of the examples, make sure you are connecting to the example bucket cross-platform-blog or have imported the bucket.json in the root of this repo to your own bucket in Cosmic JS.

Web

View the web demo here ###Get started with web

git clone https://github.com/cosmicjs/cross-platform-blog
cd cross-platform-blog/web
npm install

Run web in development

npm run development

Go to http://localhost:5000.

Run web in production

COSMIC_BUCKET=your-bucket-slug npm start

Go to http://localhost:3000.

Native

If you are new to React Native, make sure you check out the React Native docs to make sure you have everything set up properly.

Get started with native

cd cross-platform-blog/native
npm install

Config

Edit native/config.js to point to your bucket slug on Cosmic JS.

export default {
  COSMIC_BUCKET: 'your-bucket-slug'
}

Run iOS

Run the iOS command inside the native folder:

react-native run-ios

Run Android

Run the Android command inside the native folder:

react-native run-android

Questions

For any questions, feel free to reach out to us on the Cosmic JS website through the Intercom chat bubble on the bottom right side of the page. Or join the Cosmic JS Community on Slack.

cross-platform-blog's People

Contributors

tonyspiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cross-platform-blog's Issues

os.tmpDir() is deprecated

After running the

After running the following: $ react-native run-ios, it gave me the output:

(node:19496) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Found Xcode project CrossPlatformBlog.xcodeproj
dyld: Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/simctl
Reason: image not found

Command failed: xcrun simctl list devices
dyld: Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/simctl
Reason: image not found

Is this related to my Xcode setup, or is it anything related to your code ? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.