开源软件名称(OpenSource Name):helios-framework/helios开源软件地址(OpenSource Url):https://github.com/helios-framework/helios开源编程语言(OpenSource Language):CSS 54.4%开源软件介绍(OpenSource Introduction):Helios is an open-source framework that provides essential backend services for iOS apps, from data synchronization and user accounts to push notifications, in-app purchases, and passbook integration. It allows developers to get a client-server app up-and-running in just a few minutes, and seamlessly incorporate functionality as necessary. Helios is designed for "mobile first" development. Build out great features on the device, and implement the server-side components as necessary. Pour all of your energy into crafting a great user experience, rather than getting mired down with the backend. One great example of this philosophy in Helios is Core Data Synchronization. This allows you to use your existing Core Data model definition to automatically generate a REST webservice, which can be used to shuttle data between the server and client. No iCloud, no problem. Helios also comes with a Web UI. Browse and search through all of your database records, push notification registrations, in-app purchases, and passbook passes. You can even send targeted push notifications right from the browser. Requirements
Getting Started on OS X
Read on for instructions on the following:
UsageBuilt on the Rack webserver interface, Helios can be easily added into any existing Rails or Sinatra application as middleware. Or, if you're starting with a Helios application, you can build a new Rails or Sinatra application on top of it. This means that you can develop your application using the tools and frameworks you love, and maintain flexibility with your architecture as your needs evolve. Sinatra / RackGemfilegem 'helios' config.rurequire 'bundler'
Bundler.require
run Helios::Application.new do
service :data, model: 'path/to/DataModel.xcdatamodel'
service :push_notification, apn_certificate: 'path/to/apple_push_notification.pem', apn_environment: 'development'
service :in_app_purchase
service :passbook
end RailsTo create a Rails app that uses Postgres as its database, pass the
If you're adding Helios to an existing Rails project, be sure to specify a PostgreSQL database in Gemfilegem 'helios'
gem 'pg' Helios can be run as Rails middleware by adding this to the configuration block in config/application.rbconfig.middleware.use Helios::Application do
service :data, model: 'path/to/DataModel.xcdatamodel'
service :push_notification, apn_certificate: 'path/to/apple_push_notification.pem', apn_environment: 'development'
service :in_app_purchase
service :passbook
end Available ServicesEach service in Helios can be enabled and configured separately:
Parameters
Associated Classes Each entity in the specified data model will have a
Associated Classes
Associated Classes
Associated Classes
Associated Classes
Command-Line InterfaceHelios comes with a CLI to help create and manage your application. After you
Creating an ApplicationThe first step to using Helios is to create a new application. This can be done with the
Linking a Core Data ModelIn order to keep your data model and REST webservices in sync, you can link it to your helios application:
This creates a hard link between the data model file in your Xcode and Helios projects—any changes made to either file will affect both. The next time you start the server, Helios will automatically migrate the database to create tables and insert columns to accomodate any new entities or attributes.
Starting the Application LocallyTo run Helios in development mode on
Testing Push NotificationsOnce you have registered a device and set up your certificate, try this:
Setting Up Storage for NewsstandIn order to set up storage for Newsstand, you will need an account with one of the following cloud storage providers: In your application directory, edit the require 'bundler'
Bundler.require
app = Helios::Application.new {
service :data, model: Dir['*.xcdatamodel*'].first if Dir['*.xcdatamodel*'].any?
service :push_notification
service :in_app_purchase
service :passbook
service :newsstand, {
storage: {
provider: 'AWS',
aws_access_key_id: 'YOUR_ACCESS_KEY_ID',
aws_secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
}
}
}
run app For other configuration options, see fog.io. Running the Helios ConsoleYou can start an IRB session with the runtime environment of the Helios application with the
This command activates the services as configured by your Helios application, including any generated Core Data models. The > Data::Artist.all #=> [...]
> InAppPurchase::Receipt.all #=> [...]
> Newsstand::Issue.all #=> [...]
> Passbook::Passes.all #=> [...]
> PushNotification::Device.all #=> [...] Deploying to HerokuHeroku is the easiest way to get your app up and running. For full instructions on how to get started, check out "Getting Started with Ruby on Heroku". Once you've installed the Heroku Toolbelt, and have a Heroku account, enter the following commands from the project directory:
Integrating with an iOS ApplicationCore Data SynchronizationWith AFIncrementalStore, you can integrate your Helios app directly into the Core Data stack. Whether it’s a fetch or save changes request, or fulfilling an attribute or relation fault, AFIncrementalStore handles all of the networking needed to read and write to and from the server. See "Building an iOS App with AFIncrementalStore and the Core Data Buildpack" on the Heroku Dev Center for a comprehensive guide on how to use AFIncrementalStore with the Core Data buildpack. An article for Helios is forthcoming, but aside from deployment, the instructions are essentially unchanged. Push Notification RegistrationWith Orbiter you can integrate Push Notifications into your app easily. - (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSURL *serverURL = [NSURL URLWithString:@"http://raging-notification-3556.herokuapp.com/"];
Orbiter *orbiter = [[Orbiter alloc] initWithBaseURL:serverURL credential:nil];
[orbiter registerDeviceToken:deviceToken withAlias:nil success:^(id responseObject) {
NSLog(@"Registration Success: %@", responseObject);
} failure:^(NSError *error) {
NSLog(@"Registration Error: %@", error);
}];
} Converting Your Push Notification Certificate
Once you have the certificate from Apple for your application, export your key and the apple certificate as p12 files. Here is a quick walkthrough on how to do this:
Now covert the p12 file to a pem file:
LicenseHelios is released under the MIT License. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论