Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get sample app compiling with RubyMotion 6 #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Easily integrate [Fabric](https://fabric.io) in your [RubyMotion](http://www.rubymotion.com) application.

**Note:** _In Jan 2017, Google acquired Fabric. Their current [roadmap](https://get.fabric.io/roadmap) indicates that Fabric will go out of service on March 31, 2020. By that time, developers would need to migrate to [Google's Firebase](https://get.fabric.io/roadmap#meet-firebase) platform._

_Already, support for [3rd party kits](https://docs.fabric.io/apple/third-party-kits.html) for new applications has been removed:_

> _Fabric has deprecated the third party kits as of August 2, 2018. As of this date, you will not be able to onboard new third party kits via Fabric to your apps_

_We continue to mention the kits below for those that might be currently using them._

Supported [Fabric kits](https://fabric.io/kits):

Kit Name | Description | Supported?
Expand Down Expand Up @@ -29,11 +37,11 @@ Add this line to your application's Gemfile:
And then execute:

$ bundle

To install the required Pods execute:

$ rake pod:install

## Configuration

NOTE: If you already have a Fabric team with an API KEY and BUILD SECRET, skip to step 5.
Expand Down Expand Up @@ -64,7 +72,7 @@ NOTE: If you already have a Fabric team with an API KEY and BUILD SECRET, skip t

```ruby
Fabric.with([Crashlytics])
```
```

7. Register your app with Fabric (this will run your app in the simulator):

Expand All @@ -83,12 +91,12 @@ This file is called the `dSYM` file and is generated every time you build the ap

By default `motion-fabric` does NOT upload any `dSYM` file.

Usually, you only want crash reporting for your distribution and Crashlytics
Usually, you only want crash reporting for your distribution and Crashlytics
Beta builds:

```ruby
if RUBYMOTION_ENV == 'release' || CRASHLYTICS_BETA == true
Fabric.with([Crashlytics])
Fabric.with([Crashlytics])
end
```

Expand Down Expand Up @@ -174,7 +182,7 @@ config.kit 'AWSCognitoIdentity' do |info|
info[:AWSCognitoIdentityRegionType] = 'MyRegionType'
end

app.pods do
app.pods do
pod 'AWSCognito'
end
```
Expand Down Expand Up @@ -203,7 +211,7 @@ config.kit 'Appsee' do |info|
info[:apikey] = 'MyApiKey'
end

app.pods do
app.pods do
pod 'Appsee'
end
```
Expand All @@ -229,7 +237,7 @@ config.kit 'Digits' do |info|
info[:consumerSecret] = 'MySecret'
end

app.pods do
app.pods do
pod 'Digits'
end
```
Expand All @@ -251,7 +259,7 @@ config.kit 'GameAnalytics' do |info|
info['api-secret'] = 'MySecret'
end

app.pods do
app.pods do
pod 'GA-SDK-IOS'
end
```
Expand All @@ -274,7 +282,7 @@ config.kit 'MGLAccountManager' do |info|
info[:accessToken] = 'MyToken'
end

app.pods do
app.pods do
pod 'Mapbox-iOS-SDK'
end
```
Expand All @@ -288,7 +296,7 @@ Fabric.with([MGLAccountManager])
Add the following to your `Rakefile`:

```ruby
app.pods do
app.pods do
pod 'mopub-ios-sdk'
end
```
Expand All @@ -312,7 +320,7 @@ config.kit 'SKSession' do |info|
info[:url] = 'MyURL'
end

app.pods do
app.pods do
pod 'SpeechKit'
end
```
Expand All @@ -333,7 +341,7 @@ config.kit 'Optimizely' do |info|
info[:socket_token] = 'MyToken'
end

app.pods do
app.pods do
pod 'Optimizely-iOS-SDK'
end
```
Expand All @@ -357,7 +365,7 @@ config.kit 'PubNub' do |info|
info['secret-key'] = 'MySecretKey'
end

app.pods do
app.pods do
pod 'PubNub/Fabric'
end
```
Expand All @@ -378,7 +386,7 @@ config.kit 'STPAPIClient' do |info|
info[:publishable] = 'MyPublishableAPIKey'
end

app.pods do
app.pods do
pod 'Stripe'
end
```
Expand All @@ -402,7 +410,7 @@ app.fabric do |config|
end
end

app.pods do
app.pods do
pod 'TwitterKit'
end
```
Expand Down
1 change: 0 additions & 1 deletion sample_app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ nbproject
.sass-cache
.idea
.dat*.*
Pods
93 changes: 51 additions & 42 deletions sample_app/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,70 +1,79 @@
PATH
remote: ../
remote: ..
specs:
motion-fabric (0.6)
motion-fabric (0.7)
motion-cocoapods (~> 1.8)

GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.6)
CFPropertyList (3.0.0)
activesupport (4.2.11.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
claide (1.0.0)
cocoapods (1.0.0)
activesupport (>= 4.0.2)
claide (>= 1.0.0, < 2.0)
cocoapods-core (= 1.0.0)
cocoapods-deintegrate (>= 1.0.0, < 2.0)
cocoapods-downloader (>= 1.0.0, < 2.0)
atomos (0.1.3)
claide (1.0.2)
cocoapods (1.7.1)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.7.1)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.0.0, < 2.0)
cocoapods-try (>= 1.0.0, < 2.0)
colored (~> 1.2)
cocoapods-trunk (>= 1.3.1, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 0.3.0)
molinillo (~> 0.4.5)
fourflusher (>= 2.2.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
nap (~> 1.0)
xcodeproj (>= 1.0.0, < 2.0)
cocoapods-core (1.0.0)
activesupport (>= 4.0.2)
ruby-macho (~> 1.4)
xcodeproj (>= 1.8.2, < 2.0)
cocoapods-core (1.7.1)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.0)
cocoapods-downloader (1.0.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.2.2)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.3.1)
nap (>= 0.8, < 2.0)
netrc (= 0.7.8)
cocoapods-try (1.0.0)
colored (1.2)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored2 (3.1.2)
concurrent-ruby (1.1.5)
escape (0.0.4)
fourflusher (0.3.0)
fourflusher (2.3.0)
fuzzy_match (2.0.4)
i18n (0.7.0)
json (1.8.3)
minitest (5.9.0)
molinillo (0.4.5)
motion-cocoapods (1.8.0)
cocoapods (>= 1.0.0)
gh_inspector (1.1.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
minitest (5.11.3)
molinillo (0.6.6)
motion-cocoapods (1.10.0)
cocoapods (>= 1.6.0, <= 1.8.0)
nanaimo (0.2.6)
nap (1.1.0)
netrc (0.7.8)
rake (11.1.2)
thread_safe (0.3.5)
tzinfo (1.2.2)
netrc (0.11.0)
rake (12.3.2)
ruby-macho (1.4.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
xcodeproj (1.0.0)
activesupport (>= 3)
claide (>= 1.0.0, < 2.0)
colored (~> 1.2)
xcodeproj (1.9.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)

PLATFORMS
ruby
Expand All @@ -74,4 +83,4 @@ DEPENDENCIES
rake

BUNDLED WITH
1.11.2
1.17.3
76 changes: 34 additions & 42 deletions sample_app/Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
$:.unshift("~/.rubymotion/rubymotion-templates")

require 'motion/project/template/ios'

begin
Expand All @@ -9,54 +11,44 @@ rescue LoadError
end

Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
define_icon_defaults!(app)

app.name = 'sample-app'
app.version = '1.0'

app.device_family = [:iphone, :ipad]
app.interface_orientations = [:portrait]
app.info_plist['UIRequiresFullScreen'] = true
app.info_plist['ITSAppUsesNonExemptEncryption'] = false

app.fabric do |config|
config.api_key = "api_key"
config.build_secret = "build_secret"
config.kit 'Crashlytics'
config.kit 'AWSCognitoIdentity' do |info|
info[:AWSCognitoIdentityPoolId] = 'MyPoolId'
info[:AWSCognitoIdentityRegionType] = 'MyRegionType'
end
config.kit 'Appsee' do |info|
info[:apikey] = 'MyApiKey'
end
config.kit 'Digits' do |info|
info[:consumerKey] = 'MyKey'
info[:consumerSecret] = 'MySecret'
end
config.kit 'GameAnalytics' do |info|
info['api-key'] = 'MyKey'
info['api-secret'] = 'MySecret'
end
config.kit 'Optimizely' do |info|
info[:socket_token] = 'MyToken'
end
config.kit 'PubNub' do |info|
info['publish-key'] = 'MyPublishKey'
info['subscribe-key'] = 'MySubscribeKey'
info['secret-key'] = 'MySecretKey'
end
config.kit 'STPAPIClient' do |info|
info[:publishable] = 'MyPublishableAPIKey'
end
config.kit 'Twitter' do |info|
info[:consumerKey] = 'MyKey'
info[:consumerSecret] = 'MySecret'
end
end

app.pods do
pod 'AWSCognito'
pod 'Appsee'
pod 'Digits'
pod 'GA-SDK-IOS'
pod 'mopub-ios-sdk'
pod 'Optimizely-iOS-SDK'
pod 'PubNub/Fabric'
pod 'Stripe'
pod 'TwitterKit'
# Fabric has deprecated the third party kits as of August 2, 2018.
# As of this date, you will not be able to onboard new third party
# kits via Fabric to your apps
# https://docs.fabric.io/apple/third-party-kits.html
end
end

def define_icon_defaults!(app)
# This is required as of iOS 11.0 (you must use asset catalogs to
# define icons or your app will be rejected. More information in
# located in the readme.

app.info_plist['CFBundleIcons'] = {
'CFBundlePrimaryIcon' => {
'CFBundleIconName' => 'AppIcon',
'CFBundleIconFiles' => ['AppIcon60x60']
}
}

app.info_plist['CFBundleIcons~ipad'] = {
'CFBundlePrimaryIcon' => {
'CFBundleIconName' => 'AppIcon',
'CFBundleIconFiles' => ['AppIcon60x60', 'AppIcon76x76']
}
}
end
Loading