diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd5106f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_STORE diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..671c706 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,17 @@ +# Change Log +All notable changes to this project will be documented in this file. +`Shine-iOS` adheres to [Semantic Versioning](http://semver.org/). + +--- +## [1.1](https://github.com/SoundwaveApp/Shine-iOS/releases/tag/1.1) (2015-07-28) + +#### What's New + +* Support for contacts syncing +* Support for location capture + + +## [1.0](https://github.com/SoundwaveApp/Shine-iOS/releases/tag/1.0) (2015-07-23) + +* Shine SDK initial version + diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..ebf5a76 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,13 @@ +Copyright 2015 Soundwave + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/README.md b/README.md index 9b312c0..7401f3a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This guide will walk you through adding Shine to your iOS application. ##Getting started## -To begin using Shine you will need to acquire your unique application key. Currently these applications keys are given out on an ad-hoc basis by Soundwave. Please contact Soundwave if you have not received your key or would like to enquire about receiving a key. +To begin using Shine you will need to acquire your unique application key. Currently these applications keys are given out on an ad-hoc basis by Soundwave. Please contact [Soundwave](mailto:brendan@soundwave.com) if you have not received your key or would like to enquire about receiving a key. Check out the example Shine app above for help getting started. @@ -15,23 +15,23 @@ Check out the example Shine app above for help getting started. Shine SDK requires iOS 7.1+ ###Cocoapods Installation### -Shine can be installed using [Cocoapods](http://cocoapods.org). Simple add the following to your Podfile and run _pod install_. +Shine can be installed using [Cocoapods](http://cocoapods.org). Simple add the following to your Podfile and run `pod install`. ```bash -pod 'Shine', '~>1.0' +pod 'Shine', '~>1.1' ``` ###Manual Installation### -Shine SDK needs to be installed manually. +Shine SDK can also be installed manually. - 1. Download the latest shine from [Github](https://github.com/SoundwaveApp/Shine-iOS/tree/master/Shine.framework) + 1. Download the latest Shine framework from the root folder of this repository. 2. Drag Shine.framework into your Xcode project, ticking the “Copy items if needed” checkbox. **Add Other Linker Flag** 3. Select your Xcode project in the file navigator sidebar. - 4. Select your project, then it’s “Build Settings" Tab. + 4. In the main pane, select your project, and then go to the “Build Settings" Tab. 5. Search for “Other Linker Flags”. 6. Double click the “Other Linker Flags” row’s value area, on the right side. A pop-up should appear. 7. Add “-ObjC” by pressing the + button if it is hasn’t already been added @@ -39,10 +39,10 @@ Shine SDK needs to be installed manually. ![linker](https://cloud.githubusercontent.com/assets/3185423/8828333/841a2ed8-3089-11e5-8434-cb2e111eb12c.png) -#Initializing Shine# +##Initializing Shine## -To begin using shine follow these steps: +To begin using Shine follow these steps: * Import Shine into your `AppDelegate` class ```objective-c @@ -50,7 +50,7 @@ To begin using shine follow these steps: #import ``` -* Add the following to your method `willFinishLaunchingWithOptions`. At this point you will need to provide your unique application key which is available by contacting Soundwave. +* Add the following to your method `willFinishLaunchingWithOptions`. At this point you will need to provide your unique application key which is available by contacting [Soundwave](mailto:brendan@soundwave.com). ```objective-c @@ -63,7 +63,7 @@ To begin using shine follow these steps: Once you have added this code, Shine will start capturing data once your app launches. -#User Registration# +##User Registration## You can capture user registration data by adding the following code to your app: @@ -82,9 +82,12 @@ shineUser.email = @"john.smith@soundwave.com"; ... ``` -#Optional Integration Points# +##Optional Integration Points## + The following Shine integration points are not mandatory when using Shine. -##Location Capture## + +###Location Capture### + Shine can capture a device's location if the host app has the required location services permissions. To capture location data, you need to add the following code to a class that conforms to the CLLocationDelegate protocol. ```objective-c @@ -97,7 +100,8 @@ Shine location tracking works for both _**kCLAuthorizationStatusAuthorizedAlways An example of capturing location data is available in the example app. -##Contacts Syncing## +###Contacts Syncing### + Shine can capture a device's contacts if the host app has the required contacts access permissions. ```objective-c ABAddressBookRequestAccessWithCompletion(ABAddressBookCreateWithOptions(nil, nil), ^(bool granted, CFErrorRef error) { @@ -110,7 +114,7 @@ ABAddressBookRequestAccessWithCompletion(ABAddressBookCreateWithOptions(nil, nil An example of syncing contacts data is available in the example app. -#Troubleshooting# +##Troubleshooting## **Q**. _I don't think Shine is capturing any data_ @@ -125,7 +129,7 @@ An example of syncing contacts data is available in the example app. } ``` --------- +--- **Q**. _I get an error "Undefined symbols for architecture"_ @@ -133,7 +137,8 @@ An example of syncing contacts data is available in the example app. **A**. Make sure you have added `-ObjC` to your **Other Linker Flags** -------- +--- + **Q**. _I get an error "*Shine Authorization Failed: Please Enter A Valid Developer Key*"_ **A**. Make sure you have a valid Developer Key and have entered it correctly. Please contact Soundwave to obtain a Developer Key. diff --git a/Shine.framework/Versions/A/Headers/Shine.h b/Shine.framework/Versions/A/Headers/Shine.h index 717a135..51ebd93 100644 --- a/Shine.framework/Versions/A/Headers/Shine.h +++ b/Shine.framework/Versions/A/Headers/Shine.h @@ -7,6 +7,8 @@ @import UIKit; @import Foundation; +@import CoreLocation; + //! Project version number for Shine. FOUNDATION_EXPORT double ShineVersionNumber; @@ -24,6 +26,11 @@ FOUNDATION_EXPORT const unsigned char ShineVersionString[]; + (void)setDeveloperKey:(NSString *)token; + (void)registerUserDetails:(SWUser *)userDetails; ++ (void)updateLocation:(NSArray *)locations; + +#pragma mark - Permissions + ++ (void)syncContacts; #pragma mark - Debug diff --git a/Shine.framework/Versions/A/Resources/Info.plist b/Shine.framework/Versions/A/Resources/Info.plist index a6c792f..d1d730f 100644 Binary files a/Shine.framework/Versions/A/Resources/Info.plist and b/Shine.framework/Versions/A/Resources/Info.plist differ diff --git a/Shine.framework/Versions/A/Resources/SWShineModel.momd/SWShineModel.mom b/Shine.framework/Versions/A/Resources/SWShineModel.momd/SWShineModel.mom new file mode 100644 index 0000000..1cc9584 Binary files /dev/null and b/Shine.framework/Versions/A/Resources/SWShineModel.momd/SWShineModel.mom differ diff --git a/Shine.framework/Versions/A/Resources/SWShineModel.momd/VersionInfo.plist b/Shine.framework/Versions/A/Resources/SWShineModel.momd/VersionInfo.plist new file mode 100644 index 0000000..c62b5e4 Binary files /dev/null and b/Shine.framework/Versions/A/Resources/SWShineModel.momd/VersionInfo.plist differ diff --git a/Shine.framework/Versions/A/Resources/ShineBundle.bundle/Info.plist b/Shine.framework/Versions/A/Resources/ShineBundle.bundle/Info.plist new file mode 100644 index 0000000..29ca300 Binary files /dev/null and b/Shine.framework/Versions/A/Resources/ShineBundle.bundle/Info.plist differ diff --git a/Shine.framework/Versions/A/Resources/ShineBundle.bundle/SWShineModel.momd/SWShineModel.mom b/Shine.framework/Versions/A/Resources/ShineBundle.bundle/SWShineModel.momd/SWShineModel.mom new file mode 100644 index 0000000..1cc9584 Binary files /dev/null and b/Shine.framework/Versions/A/Resources/ShineBundle.bundle/SWShineModel.momd/SWShineModel.mom differ diff --git a/Shine.framework/Versions/A/Resources/ShineBundle.bundle/SWShineModel.momd/VersionInfo.plist b/Shine.framework/Versions/A/Resources/ShineBundle.bundle/SWShineModel.momd/VersionInfo.plist new file mode 100644 index 0000000..c62b5e4 Binary files /dev/null and b/Shine.framework/Versions/A/Resources/ShineBundle.bundle/SWShineModel.momd/VersionInfo.plist differ diff --git a/Shine.framework/Versions/A/Resources/ShineBundle.bundle/ShineBundle b/Shine.framework/Versions/A/Resources/ShineBundle.bundle/ShineBundle new file mode 100755 index 0000000..c106725 Binary files /dev/null and b/Shine.framework/Versions/A/Resources/ShineBundle.bundle/ShineBundle differ diff --git a/Shine.framework/Versions/A/Resources/_CodeSignature/CodeDirectory b/Shine.framework/Versions/A/Resources/_CodeSignature/CodeDirectory index a292fda..5f097f3 100644 Binary files a/Shine.framework/Versions/A/Resources/_CodeSignature/CodeDirectory and b/Shine.framework/Versions/A/Resources/_CodeSignature/CodeDirectory differ diff --git a/Shine.framework/Versions/A/Resources/_CodeSignature/CodeResources b/Shine.framework/Versions/A/Resources/_CodeSignature/CodeResources index 59da7ea..a948b39 100644 --- a/Shine.framework/Versions/A/Resources/_CodeSignature/CodeResources +++ b/Shine.framework/Versions/A/Resources/_CodeSignature/CodeResources @@ -10,16 +10,40 @@ Headers/Shine.h - jnuUw07REOsTsKo8GOm+kjyal38= + Wfer6hXf5IfaQlXFopunZvKhTxc= Info.plist - Hztpucw6yACCoX+bPQ8bhtTkIdk= + lwByOLjmjft/fJd+GcwJjgdMR5I= Modules/module.modulemap uktMIoMnY9KbXc+ifBmXdptiwEo= + SWShineModel.momd/SWShineModel.mom + + KeTIi0XUz577VOc4Ib2UC6ymSXY= + + SWShineModel.momd/VersionInfo.plist + + 19sbxGq7v1iCnLr3vA92feH+89Q= + + ShineBundle.bundle/Info.plist + + TMW/Qm6vN96UAl+ORRx9sR3Kh3A= + + ShineBundle.bundle/SWShineModel.momd/SWShineModel.mom + + KeTIi0XUz577VOc4Ib2UC6ymSXY= + + ShineBundle.bundle/SWShineModel.momd/VersionInfo.plist + + 19sbxGq7v1iCnLr3vA92feH+89Q= + + ShineBundle.bundle/ShineBundle + + ykyQd8ieKn1U8CuGjfOJlBAesKE= + files2 @@ -29,12 +53,36 @@ Headers/Shine.h - jnuUw07REOsTsKo8GOm+kjyal38= + Wfer6hXf5IfaQlXFopunZvKhTxc= Modules/module.modulemap uktMIoMnY9KbXc+ifBmXdptiwEo= + SWShineModel.momd/SWShineModel.mom + + KeTIi0XUz577VOc4Ib2UC6ymSXY= + + SWShineModel.momd/VersionInfo.plist + + 19sbxGq7v1iCnLr3vA92feH+89Q= + + ShineBundle.bundle/Info.plist + + TMW/Qm6vN96UAl+ORRx9sR3Kh3A= + + ShineBundle.bundle/SWShineModel.momd/SWShineModel.mom + + KeTIi0XUz577VOc4Ib2UC6ymSXY= + + ShineBundle.bundle/SWShineModel.momd/VersionInfo.plist + + 19sbxGq7v1iCnLr3vA92feH+89Q= + + ShineBundle.bundle/ShineBundle + + ykyQd8ieKn1U8CuGjfOJlBAesKE= + rules diff --git a/Shine.framework/Versions/A/Resources/_CodeSignature/CodeSignature b/Shine.framework/Versions/A/Resources/_CodeSignature/CodeSignature index a7d28dd..ab8b37c 100644 Binary files a/Shine.framework/Versions/A/Resources/_CodeSignature/CodeSignature and b/Shine.framework/Versions/A/Resources/_CodeSignature/CodeSignature differ diff --git a/Shine.framework/Versions/A/Shine b/Shine.framework/Versions/A/Shine index 6be9667..54e3590 100644 Binary files a/Shine.framework/Versions/A/Shine and b/Shine.framework/Versions/A/Shine differ diff --git a/Shine.podspec b/Shine.podspec index d44ee61..056f96c 100755 --- a/Shine.podspec +++ b/Shine.podspec @@ -1,44 +1,16 @@ -# -# Be sure to run `pod lib lint ${POD_NAME}.podspec' to ensure this is a -# valid spec and remove all comments before submitting the spec. -# -# Any lines starting with a # are optional, but encouraged -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html -# - Pod::Spec.new do |s| - s.name = "Shine" - s.version = "1.0" - s.summary = "The Shine iOS SDK, for integrating Shine into your iOS application." - s.description = "The Shine iOS SDK, for integrating Shine into your iOS application. Supports iOS 7 and iOS 8." - s.homepage = "https://github.com/SoundwaveApp/Shine-iOS" - s.license = { :type => 'Apache 2.0', :text => <<-LICENSE - Copyright 2015 Soundwave - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - LICENSE - } - s.author = { "${USER_NAME}" => "${USER_EMAIL}" } - s.source = { :git => "https://github.com/SoundwaveApp/Shine-iOS.git", :tag => s.version.to_s } + s.name = "Shine" + s.version = "1.1" + s.summary = "The Shine iOS SDK, for integrating Shine into your iOS application." + s.homepage = "https://github.com/SoundwaveApp/Shine-iOS" + s.license = { :type => 'Apache 2.0', :file => 'LICENSE.txt' } + s.authors = { "Clodagh ML" => "clodagh@soundwave.com", "Liam Russell" => "liam@soundwave.com", "Brian Boyle" => "brian@soundwave.com" } + s.source = { :git => "https://github.com/SoundwaveApp/Shine-iOS.git", :tag => s.version.to_s } s.frameworks = ["Foundation", "CoreGraphics", "MobileCoreServices", "Security", "CoreData"] s.requires_arc = true - s.platform = :ios, '7.0' + s.platform = :ios, '7.1' s.preserve_paths = 'Shine.framework' s.public_header_files = 'Shine.framework/Versions/A/Headers/Shine.h' s.resource = 'Shine.framework/Versions/A/Resources/ShineBundle.bundle' s.vendored_frameworks = 'Shine.framework' - - - end