iBeacon-enabled conference meet-up app for Gluecon
This is a Kinvey iOS app that illustrates how to make it easy to create an application for a different kind of events, that give possibility to manage interests with help of iBeacon. Application use iBeacon to tracing User's location and post him notifications.
- Create a new app on Kinvey
- Create the following collections:
events
- This collection should have one row to describe the event including the following columns:Name
- common name, for your use onlyinterests
- an array of topics covered by the conferencestartDate
- the KinveyKit-formatted date & time for the conference to start. e.g."ISODate(\"2014-05-01T17:54:00.000Z\")"
.endDate
the KinveyKit-formatted date & time that the conference endsboothPopupDistance
- max distance in meters for the "Welcome to Kinvey" popup - tweak to configure the user experience between useful and annoyingportalURL
- the web portal for the app. This is configurable because the URL wasn't known at ship time
roomBeacons
- This collection has a row for each beacon at the conferenceevent
- the_id
of the corresponding event in theevents
collectionname
- a short, user-visible string to identify the beacon in the UIuuid
- the beacon uuidmajor
- the beacon major identifierminor
- the beacon minor identifierbeaconId
- this field is autogenerated by business logic to create a unique identifier based on the uuid, major, and minor numbers
Upload the business logic scripts to the new app.
-
Download the BL Command Line Interface
-
Navigate to the root of the project directory http://devcenter.kinvey.com/ios/bl-cli-downloads
-
Temporarily rename the business-logic directory
mv business-logic/ business-logic-temp/
-
Run and select the newly created backend.
kinvey init
-
Delete the new directory
rm -rf business-logic
-
Move the temp directory back
mv business-logic-temp/ business-logic/
-
Upload the code
The app is set up to use LinkedIn login, since there is also an option for creating a new app account with just email and password, it's optional.
Then update following code in AppDelegate.m
@{KCS_LINKEDIN_SECRET_KEY:@"<#LinkedIn Secret Key#>",
KCS_LINKEDIN_API_KEY:@"<#LinkedIn API Key#>",
KCS_LINKEDIN_ACCEPT_REDIRECT:@"<#LinkedIn Accept URL#>",
KCS_LINKEDIN_CANCEL_REDIRECT:@"<#LinkedIn Cancel URL#>"}
-
Download the source
`git clone`
-
Before the app can be used, the dependencies have to be pulled through CocoaPods. If you've never used CocoaPods before, first follow the instalation steps here http://cocoapods.org/.
-
Since the Podfile is in the repo, just install it:
`pod install`
-
Open
WhosAtGlue.xcworkspace
-
In
Appdelegate.m
add the Kinvey app credentials, and the LinkedIn credentials in-application:didFinishLaunchingWithOptions:
. -
In
EventModel.m
set thekEventId
macro to be the_id
of the particular event row in theevents
collection. -
In
MainViewController.m
also insert that event id in thekEventId
macro, and optionally specify akKinveyBoothId
if you want a particular beacon to trigger the Kinvey popup. -
Export the
events
androomBeacons
collections from the Kinvey web console. Copy the generated.json
files into the project. These are used to pre-seed the data in case the app started in offline mode.
You can use Mock data for easy use this tutorial.
Application use AJNotificationView
for notification user when he appears near something in his interests. User can change his interests in SettingsTableViewController
.
Copyright (c) 2014 Kinvey, Inc.
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.