npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@flownet/lib-to-ios-app

v0.3.14

Published

This project is designed to streamline the process of creating an iOS application from your source files using Flownet's infrastructure. Its primary function is to automate and simplify the tasks involved in setting up an iOS project, rendering templates,

Downloads

124

Readme

@flownet/lib-to-ios-app

This project is designed to streamline the process of creating an iOS application from your source files using Flownet's infrastructure. Its primary function is to automate and simplify the tasks involved in setting up an iOS project, rendering templates, and incorporating essential resources like icons and launch screens.

How It Works

The iOS app creation process begins by setting up various parameters for your app, such as its name, version, and identifier. The project then:

  1. Inspects your system for suitable development certificates and uses them to configure code-signing settings.
  2. Prepares the necessary directories for project output and packaging.
  3. Renders project templates using your predefined configurations.
  4. Includes the content from your source directory into a structured output folder.
  5. Generates default app icons and launch screens for various device sizes.
  6. Compiles the iOS application using Xcode's build tools, producing both Debug and Release versions.

Key Features

  • Automated Setup: Configures your iOS app project with essential settings and structures.
  • Template Rendering: Utilizes provided templates to standardize your app’s foundation.
  • Asset Generation: Creates app icons and launch screens to ensure your app looks professional across devices.
  • Certificate Inspection: Automatically selects suitable development certificates and adapts to your macOS configuration.
  • Build Automation: Leverages Xcode commands to build your app for both simulator and device deployment.

Conclusion

@flownet/lib-to-ios-app is a useful tool for developers looking to efficiently produce iOS applications. By automating many of the initial setup tasks, it provides a smooth transition from development environment to a deployable iOS project, allowing you to focus more on building features and less on setup logistics.

@flownet/lib-to-ios-app Developer Guide

Overview

@flownet/lib-to-ios-app is a Node.js library that facilitates the conversion of source code into a structured iOS application. It's designed to streamline the setup and build processes, enabling developers to quickly create iOS applications with pre-defined structures, organize assets, and manage build configurations. The library automates tasks like generating app icons and launch screens, rendering templates, and running Xcode build processes.

Installation

Install the library using npm or yarn with the following commands:

# Using npm
npm install @flownet/lib-to-ios-app

# Using yarn
yarn add @flownet/lib-to-ios-app

Usage

Below is an example of using @flownet/lib-to-ios-app to create an iOS application package from a specified source directory. Ensure that the required parameters like src (source directory) and dest (destination directory) are provided.

import createIosApp from '@flownet/lib-to-ios-app';

// Define parameters for the iOS app creation
const params = {
  name: "my-ios-app",
  entry: "src", // source directory
  id: "com.example.my-ios-app",
  version: "1.0.0"
};

// Define source and destination directories
const src = path.resolve(__dirname, '../app-source'); // your source directory
const dest = path.resolve(__dirname, '../dist'); // your output directory

// Execute the function to create the iOS app
createIosApp({ params, src, dest }).then(() => {
  console.log('iOS app created successfully.');
}).catch(error => {
  console.error('An error occurred:', error);
});

Examples

Basic Example

The following code sets up a simple iOS application named "my-ios-app" using default settings. It specifies source and destination folders for the build:

import createIosApp from '@flownet/lib-to-ios-app';

const params = {
  name: "my-ios-app",
  entry: "src/app",
  id: "com.example.myiosapp",
};

const src = path.resolve(__dirname, 'path/to/source');
const dest = path.resolve(__dirname, 'path/to/output');

createIosApp({ params, src, dest }).then(() => {
  console.log('iOS application build completed.');
}).catch(err => {
  console.error('Failed to create iOS application:', err);
});

Custom Configuration Example

This code demonstrates how to specify custom build configurations and additional settings for the iOS application:

const params = {
  name: "custom-ios-app",
  id: "org.custom.iosapp",
  version: "2.0.0",
  code_sign_identity: "Custom Developer Identity",
  development_team: "TEAM_ID"
};

const src = path.resolve(__dirname, 'custom/src');
const dest = path.resolve(__dirname, 'custom/output');

createIosApp({ params, src, dest }).catch(err => {
  console.error('Build process encountered issues: ', err);
});

Acknowledgement

Development by the Flownet team; contributions and utilities by related Flownet packages are acknowledged accordingly.

Input Schema

$schema: https://json-schema.org/draft/2020-12/schema
type: object
properties:
  params:
    type: object
    properties:
      name:
        type: string
        default: ios-app
        description: The name of the iOS application.
      entry:
        type: string
        default: app/ios
        description: The entry point directory of the iOS app.
      id:
        type: string
        default: com.example.ios-app
        description: The app identifier.
      version:
        type: string
        default: 0.1.0
        description: The version of the application.
      title:
        type: string
        default: iOS App
        description: The title of the application.
      package_name:
        type: string
        description: The package name for the app.
      author:
        type: string
        default: Flownet
        description: The author of the app.
      description:
        type: string
        default: iOS App built with Flownet
        description: The description of the app.
      vendor:
        type: string
        default: flownet.ai
        description: The vendor of the app.
      include_css:
        type: boolean
        description: Flag to include CSS extraction.
      bundle_name:
        type: string
        description: The bundle name for the app.
      package_dir:
        type: string
        description: The package directory.
      code_sign_identity:
        type: string
        default: Apple Development
        description: Identity used for code signing.
      code_sign_style:
        type: string
        default: Automatic
        description: The code sign style for the app.
      development_team:
        type: string
        description: The development team ID.
      provisioning_profile_specifier:
        type: string
        description: The provisioning profile specifier.
      product_bundle_identifier:
        type: string
        description: The product bundle identifier.
      product_name:
        type: string
        description: The product name.
      out_dir:
        type: string
        description: The output directory for the build artifacts.
  config:
    type: object
    description: Additional configuration for the app.
  src:
    type: string
    description: The source directory for the application.
  dest:
    type: string
    description: The destination directory for the build.