Skip to content

Commit 893b727

Browse files
Merge pull request #10 from Iterable/feature/itbl-5457-public-cocoapod
[ITBL-5457]-public-cocoapods
2 parents ff7688b + f0bb258 commit 893b727

File tree

7 files changed

+108
-108
lines changed

7 files changed

+108
-108
lines changed
Lines changed: 5 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Be sure to run `pod spec lint Iterable-iOS-SDK.podspec' to ensure this is a
2+
# Be sure to run `pod spec lint Iterable-iOS-AppExtensions.podspec' to ensure this is a
33
# valid spec and to remove all comments including this before submitting the spec.
44
#
55
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
@@ -15,16 +15,16 @@ Pod::Spec.new do |s|
1515
# summary should be tweet-length, and the description more in depth.
1616
#
1717

18-
s.name = "IterableAppExtensions"
19-
s.version = "6.0.0"
18+
s.name = "Iterable-iOS-AppExtensions"
19+
s.module_name = "IterableAppExtensions"
20+
s.version = "1.0.1"
2021
s.summary = "App Extensions for Iterable SDK"
2122

2223
s.description = <<-DESC
2324
App Extensions for Rich Push notifications with Iterable SDK
2425
DESC
2526

2627
s.homepage = "https://iterable.com/"
27-
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
2828

2929

3030
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@@ -35,7 +35,6 @@ Pod::Spec.new do |s|
3535
#
3636

3737
s.license = "MIT"
38-
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
3938

4039

4140
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@@ -49,32 +48,22 @@ Pod::Spec.new do |s|
4948
#
5049

5150
s.author = { "Ilya Brin" => "[email protected]" }
52-
# Or just: s.author = "Ilya Brin"
53-
# s.authors = { "Ilya Brin" => "[email protected]" }
54-
# s.social_media_url = "http://twitter.com/Ilya Brin"
5551

5652
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
5753
#
5854
# If this Pod runs only on iOS or OS X, then specify the platform and
5955
# the deployment target. You can optionally include the target after the platform.
6056
#
6157

62-
# s.platform = :ios
6358
s.platform = :ios, "10.0"
6459

65-
# When using multiple platforms
66-
# s.ios.deployment_target = "5.0"
67-
# s.osx.deployment_target = "10.7"
68-
# s.watchos.deployment_target = "2.0"
69-
70-
7160
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
7261
#
7362
# Specify the location from where the source should be retrieved.
7463
# Supports git, hg, bzr, svn and HTTP.
7564
#
7665

77-
s.source = { :git => "https://github.com/Iterable/iterable-ios-sdk.git", :tag => s.version }
66+
s.source = { :git => "https://github.com/Iterable/swift-sdk.git", :tag => s.version }
7867

7968

8069
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@@ -95,43 +84,4 @@ Pod::Spec.new do |s|
9584
}
9685

9786
s.swift_version = '4.1'
98-
99-
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
100-
#
101-
# A list of resources included with the Pod. These are copied into the
102-
# target bundle with a build phase script. Anything else will be cleaned.
103-
# You can preserve files from being cleaned, please don't preserve
104-
# non-essential files like tests, examples and documentation.
105-
#
106-
107-
# s.resource = "icon.png"
108-
# s.resources = "Resources/*.png"
109-
110-
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
111-
112-
113-
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
114-
#
115-
# Link your library with frameworks, or libraries. Libraries do not include
116-
# the lib prefix of their name.
117-
#
118-
119-
# s.framework = "JSONModel"
120-
# s.frameworks = "JSONModel", "foo"
121-
122-
# s.library = "iconv"
123-
# s.libraries = "iconv", "xml2"
124-
125-
126-
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
127-
#
128-
# If your library depends on compiler flags you can set them in the xcconfig hash
129-
# where they will only apply to your library. If you depend on other Podspecs
130-
# you can include multiple dependencies to ensure it works.
131-
132-
# s.requires_arc = true
133-
134-
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
135-
# s.dependency "JSONModel", "~> 1.1.0"
136-
13787
end
Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Be sure to run `pod spec lint IterableSDK.podspec' to ensure this is a
2+
# Be sure to run `pod spec lint Iterable-iOS-SDK.podspec' to ensure this is a
33
# valid spec and to remove all comments including this before submitting the spec.
44
#
55
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
@@ -15,16 +15,17 @@ Pod::Spec.new do |s|
1515
# summary should be tweet-length, and the description more in depth.
1616
#
1717

18-
s.name = "IterableSDK"
19-
s.version = "6.0.0"
18+
s.name = "Iterable-iOS-SDK"
19+
s.module_name = "IterableSDK"
20+
s.version = "1.0.1"
2021
s.summary = "Iterable's official SDK for iOS"
2122

2223
s.description = <<-DESC
2324
iOS SDK containing a wrapper around Iterable's API, in addition
2425
to some utility functions
2526
DESC
2627

27-
s.homepage = "https://iterable.com/"
28+
s.homepage = "https://github.com/Iterable/swift-sdk.git"
2829

2930

3031
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@@ -53,15 +54,15 @@ Pod::Spec.new do |s|
5354
# the deployment target. You can optionally include the target after the platform.
5455
#
5556

56-
s.platform = :ios, "8.0"
57+
s.platform = :ios, "9.0"
5758

5859
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
5960
#
6061
# Specify the location from where the source should be retrieved.
6162
# Supports git, hg, bzr, svn and HTTP.
6263
#
6364

64-
s.source = { :git => "https://github.com/Iterable/iterable-ios-sdk.git", :tag => s.version }
65+
s.source = { :git => "https://github.com/Iterable/swift-sdk.git", :tag => s.version }
6566

6667
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
6768
#
@@ -78,43 +79,4 @@ Pod::Spec.new do |s|
7879
}
7980

8081
s.swift_version = '4.1'
81-
82-
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
83-
#
84-
# A list of resources included with the Pod. These are copied into the
85-
# target bundle with a build phase script. Anything else will be cleaned.
86-
# You can preserve files from being cleaned, please don't preserve
87-
# non-essential files like tests, examples and documentation.
88-
#
89-
90-
# s.resource = "icon.png"
91-
# s.resources = "Resources/*.png"
92-
93-
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
94-
95-
96-
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
97-
#
98-
# Link your library with frameworks, or libraries. Libraries do not include
99-
# the lib prefix of their name.
100-
#
101-
102-
# s.framework = "JSONModel"
103-
# s.frameworks = "JSONModel", "foo"
104-
105-
# s.library = "iconv"
106-
# s.libraries = "iconv", "xml2"
107-
108-
109-
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
110-
#
111-
# If your library depends on compiler flags you can set them in the xcconfig hash
112-
# where they will only apply to your library. If you depend on other Podspecs
113-
# you can include multiple dependencies to ensure it works.
114-
115-
# s.requires_arc = true
116-
117-
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
118-
# s.dependency "JSONModel", "~> 1.1.0"
119-
12082
end

README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
[![CocoaPods](https://img.shields.io/cocoapods/v/Iterable-iOS-SDK.svg?style=flat)](https://cocoapods.org/pods/Iterable-iOS-SDK)
2+
[![License](https://img.shields.io/cocoapods/l/Iterable-iOS-SDK.svg?style=flat)](https://opensource.org/licenses/MIT)
3+
[![Docs](https://img.shields.io/cocoapods/metrics/doc-percent/Iterable-iOS-SDK.svg?style=flat)](http://cocoadocs.org/docsets/Iterable-iOS-SDK)
4+
[![Build Status](https://travis-ci.com/Iterable/swift-sdk.svg?branch=master)](https://travis-ci.com/Iterable/swift-sdk)
5+
6+
# Iterable iOS SDK
7+
8+
`Iterable-iOS-SDK` is a Swift implementation of an iOS client for Iterable, for iOS versions 9.0 and higher.
9+
10+
# Setting up a push integration in Iterable
11+
12+
Before you even start with the SDK, you will need to
13+
14+
1. Set your application up to receive push notifications, and
15+
2. Set up a push integration in Iterable. This allows Iterable to communicate on your behalf with Apple's Push Notification Service
16+
17+
If you haven't yet done so, you will need to enable push notifications for your application. This can be done by toggling `Push Notifications` under your target's `Capabilities` in Xcode. You can also do it directly in the app center on Apple's member center; go to `Identifiers -> App IDs -> select your app`. You should see `Push Notifications` under `Application Services`. Hit `Edit` and enable `Push Notifications`.
18+
19+
You will also need to generate an SSL certificate and private key for use with the push service. See the links at the end of this section for more information on how to do that.
20+
21+
Once you have your APNS certificates set up, go to `Integrations -> Mobile Push` in Iterable. When creating an integration, you will need to pick a name and a platform. The name is entirely up to you; it will be the `appName` when you use `registerToken` in our SDK. The platform can be `APNS` or `APNS_SANDBOX`; these correspond to the production and sandbox platforms. Your application will generate a different token depending on whether it is built using a development certificate or a distribution provisioning profile.
22+
23+
![Creating an integration in Iterable](http://support.iterable.com/hc/en-us/article_attachments/202957719/Screen_Shot_2015-07-30_at_3.15.56_PM.png)
24+
25+
For more information, see
26+
27+
* [Configuring Push Notifications](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html#//apple_ref/doc/uid/TP40012582-CH26-SW6)
28+
* [Creating Certificates](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW32)
29+
* [Amazon's Guide to Creating Certificates](http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html)
30+
31+
Congratulations, you've configured your mobile application to receive push notifications! Now, let's set up the Iterable SDK...
32+
33+
# Automatic Installation (via CocoaPods)
34+
35+
Iterable supports [CocoaPods](https://cocoapods.org) for easy installation. If you don't have it yet, you can install it with `Ruby` by running:
36+
```
37+
$ sudo gem install cocoapods
38+
```
39+
40+
To include the Iterable SDK in your project, you need to add it to your `Podfile`. If you don't have a `Podfile` yet, you can create one by running:
41+
```
42+
$ pod init
43+
```
44+
45+
To add the Iterable pod to your target, edit the `Podfile` and include this line under the target:
46+
```
47+
pod 'Iterable-iOS-SDK'
48+
```
49+
50+
Now, you need to tell Cocoapods to install the dependencies:
51+
```
52+
$ pod install
53+
```
54+
55+
Congratulations! You have now imported the Iterable SDK into your project!
56+
57+
58+
# Using the SDK
59+
1. Initialize the API with API key. The only required parameter is `apiKey`. You may also like to set default configuration parameters.
60+
61+
```
62+
IterableAPI.initialize(apiKey: "your-api-key", optionalParameters.....)
63+
```
64+
* Ideally, you will call this from inside `application:didFinishLaunchingWithOptions:` and pass in `launchOptions`. This will let the SDK automatically track a push open for you if the application was launched from a remote Iterable push notification.
65+
66+
2. Once you know the email *(Preferred)* or userId of the user, set the value.
67+
68+
```
69+
IterableAPI.email = '[email protected]'
70+
```
71+
72+
# Additional Information
73+
74+
See our [setup guide](http://support.iterable.com/hc/en-us/articles/204780589-Push-Notification-Setup-iOS-and-Android-) for more information.
75+
76+
Also see our [push notification setup FAQs](http://support.iterable.com/hc/en-us/articles/206791196-Push-Notification-Setup-FAQ-s).
77+
78+
# License
79+
80+
The MIT License
81+
82+
See [LICENSE](https://github.com/Iterable/iterable-ios-sdk/blob/master/LICENSE)
83+
84+
## Want to Contribute?
85+
86+
This library is open source, and we will look at pull requests!
87+
88+
See [CONTRIBUTING](CONTRIBUTING.md) for more information.

sample-apps/objc-sample-app/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use_frameworks!
55
swift_version = '4.0'
66

77
target 'objc-sample-app' do
8-
pod 'IterableSDK', :path => '../../../swift-sdk'
8+
pod 'Iterable-iOS-SDK', :path => '../../../swift-sdk'
99
end
1010

1111
target 'objc-sample-app-notification-extension' do
12-
pod 'IterableAppExtensions', :path => '../../../swift-sdk'
12+
pod 'Iterable-iOS-AppExtensions', :path => '../../../swift-sdk'
1313
end

sample-apps/objc-sample-app/objc-sample-app.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@
349349
);
350350
inputPaths = (
351351
"${SRCROOT}/Pods/Target Support Files/Pods-objc-sample-app/Pods-objc-sample-app-frameworks.sh",
352-
"${BUILT_PRODUCTS_DIR}/IterableSDK/IterableSDK.framework",
353-
"${BUILT_PRODUCTS_DIR}/IterableAppExtensions/IterableAppExtensions.framework",
352+
"${BUILT_PRODUCTS_DIR}/Iterable-iOS-SDK/IterableSDK.framework",
353+
"${BUILT_PRODUCTS_DIR}/Iterable-iOS-AppExtensions/IterableAppExtensions.framework",
354354
);
355355
name = "[CP] Embed Pods Frameworks";
356356
outputPaths = (

sample-apps/swift-sample-app/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ platform :ios, '11.0'
44
use_frameworks!
55

66
target 'swift-sample-app' do
7-
pod 'IterableSDK', :path => '../../../swift-sdk'
7+
pod 'Iterable-iOS-SDK', :path => '../../../swift-sdk'
88
end
99

1010
target 'swift-sample-app-notification-extension' do
11-
pod 'IterableAppExtensions', :path => '../../../swift-sdk'
11+
pod 'Iterable-iOS-AppExtensions', :path => '../../../swift-sdk'
1212
end

sample-apps/swift-sample-app/swift-sample-app.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@
320320
);
321321
inputPaths = (
322322
"${SRCROOT}/Pods/Target Support Files/Pods-swift-sample-app/Pods-swift-sample-app-frameworks.sh",
323-
"${BUILT_PRODUCTS_DIR}/IterableSDK/IterableSDK.framework",
324-
"${BUILT_PRODUCTS_DIR}/IterableAppExtensions/IterableAppExtensions.framework",
323+
"${BUILT_PRODUCTS_DIR}/Iterable-iOS-SDK/IterableSDK.framework",
324+
"${BUILT_PRODUCTS_DIR}/Iterable-iOS-AppExtensions/IterableAppExtensions.framework",
325325
);
326326
name = "[CP] Embed Pods Frameworks";
327327
outputPaths = (

0 commit comments

Comments
 (0)