├── iOS-MQTT-Client
├── en.lproj
│ └── InfoPlist.strings
├── icons
│ ├── glyphicons_003_user.png
│ ├── glyphicons_030_pencil.png
│ ├── glyphicons_213_up_arrow.png
│ └── glyphicons_212_down_arrow.png
├── iOS-MQTT-Client-Prefix.pch
├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── LaunchImage.launchimage
│ │ └── Contents.json
├── iOS-MQTT-Client-Info.plist
├── LogMessage.m
├── Subscription.m
├── LogViewController.h
├── MqttTestTrace.h
├── PublishViewController.h
├── Subscription.h
├── SubscribeViewController.h
├── LogMessage.h
├── main.m
├── ConnectViewController.h
├── MqttTestTrace.m
├── Messenger.h
├── AppDelegate.h
├── LogViewController.m
├── PublishViewController.m
├── ConnectViewController.m
├── AppDelegate.m
├── SubscribeViewController.m
├── Messenger.m
└── Main.storyboard
├── images
├── xcode.png
└── mqtt-ios-sample folder.png
├── iOS-MQTT-ClientTests
├── en.lproj
│ └── InfoPlist.strings
├── iOS-MQTT-ClientTests-Info.plist
└── iOS_MQTT_ClientTests.m
├── .gitignore
├── iOS-MQTT-Client.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── Mike.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── iOS-MQTT-Client.xccheckout
└── project.pbxproj
├── LICENSE
├── README.md
└── CLA.md
/iOS-MQTT-Client/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/images/xcode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibm-messaging/mqtt-ios-sample/HEAD/images/xcode.png
--------------------------------------------------------------------------------
/iOS-MQTT-ClientTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | iOS-MQTT-Client.xcodeproj/xcuserdata/
2 | iOS-MQTT-Client.xcodeproj/project.workspace/xcuserdata/
3 | .DS_Store
4 |
--------------------------------------------------------------------------------
/images/mqtt-ios-sample folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibm-messaging/mqtt-ios-sample/HEAD/images/mqtt-ios-sample folder.png
--------------------------------------------------------------------------------
/iOS-MQTT-Client/icons/glyphicons_003_user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibm-messaging/mqtt-ios-sample/HEAD/iOS-MQTT-Client/icons/glyphicons_003_user.png
--------------------------------------------------------------------------------
/iOS-MQTT-Client/icons/glyphicons_030_pencil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibm-messaging/mqtt-ios-sample/HEAD/iOS-MQTT-Client/icons/glyphicons_030_pencil.png
--------------------------------------------------------------------------------
/iOS-MQTT-Client/icons/glyphicons_213_up_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibm-messaging/mqtt-ios-sample/HEAD/iOS-MQTT-Client/icons/glyphicons_213_up_arrow.png
--------------------------------------------------------------------------------
/iOS-MQTT-Client/icons/glyphicons_212_down_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibm-messaging/mqtt-ios-sample/HEAD/iOS-MQTT-Client/icons/glyphicons_212_down_arrow.png
--------------------------------------------------------------------------------
/iOS-MQTT-Client.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client.xcodeproj/project.xcworkspace/xcuserdata/Mike.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibm-messaging/mqtt-ios-sample/HEAD/iOS-MQTT-Client.xcodeproj/project.xcworkspace/xcuserdata/Mike.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/iOS-MQTT-Client/iOS-MQTT-Client-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/iOS-MQTT-Client/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/iOS-MQTT-ClientTests/iOS-MQTT-ClientTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | IBM.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/iOS-MQTT-Client-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | IBM.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/iOS-MQTT-ClientTests/iOS_MQTT_ClientTests.m:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2014 IBM Corp.
3 | *
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v1.0
6 | * and Eclipse Distribution License v1.0 which accompany this distribution.
7 | *
8 | * The Eclipse Public License is available at
9 | * http://www.eclipse.org/legal/epl-v10.html
10 | * and the Eclipse Distribution License is available at
11 | * http://www.eclipse.org/org/documents/edl-v10.php.
12 | *
13 | * Contributors:
14 | * Mike Robertson - initial contribution
15 | *******************************************************************************/
16 |
17 | #import
18 |
19 | @interface iOS_MQTT_ClientTests : XCTestCase
20 |
21 | @end
22 |
23 | @implementation iOS_MQTT_ClientTests
24 |
25 | - (void)setUp
26 | {
27 | [super setUp];
28 | // Put setup code here. This method is called before the invocation of each test method in the class.
29 | }
30 |
31 | - (void)tearDown
32 | {
33 | // Put teardown code here. This method is called after the invocation of each test method in the class.
34 | [super tearDown];
35 | }
36 |
37 | - (void)testExample
38 | {
39 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Licensed Materials - Property of IBM
2 |
3 | © Copyright IBM Corporation 2014. All Rights Reserved.
4 |
5 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
6 |
7 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
--------------------------------------------------------------------------------
/iOS-MQTT-Client/LogMessage.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "LogMessage.h"
12 |
13 | @implementation LogMessage
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/Subscription.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "Subscription.h"
12 |
13 | @implementation Subscription
14 |
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/LogViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import
12 |
13 | @interface LogViewController : UITableViewController
14 | @end
15 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/MqttTestTrace.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "MqttOCClient.h"
12 |
13 | @interface MqttTestTrace : NSObject
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/PublishViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import
12 |
13 | @interface PublishViewController : UIViewController
14 |
15 | @end
--------------------------------------------------------------------------------
/iOS-MQTT-Client/Subscription.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import
12 |
13 | @interface Subscription : NSObject
14 |
15 | @property NSString *topicFilter;
16 | @property int qos;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/SubscribeViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import
12 |
13 | @interface SubscribeViewController : UIViewController
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/LogMessage.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import
12 |
13 | @interface LogMessage : NSObject
14 |
15 | @property NSString *timestamp;
16 | @property NSString *data;
17 | @property NSString *type;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/main.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import
12 |
13 | #import "AppDelegate.h"
14 |
15 | int main(int argc, char * argv[])
16 | {
17 | @autoreleasepool {
18 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client.xcodeproj/project.xcworkspace/xcshareddata/iOS-MQTT-Client.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 6D197D54-9811-499D-B0E2-ED6FD9D53BB5
9 | IDESourceControlProjectName
10 | iOS-MQTT-Client
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 16144FFD-3F93-492E-9DAF-18C2CE61B43A
14 | https://github.com/ibm-messaging/mqtt-ios-sample.git
15 |
16 | IDESourceControlProjectPath
17 | iOS-MQTT-Client.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 16144FFD-3F93-492E-9DAF-18C2CE61B43A
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/ibm-messaging/mqtt-ios-sample.git
25 | IDESourceControlProjectVersion
26 | 110
27 | IDESourceControlProjectWCCIdentifier
28 | 16144FFD-3F93-492E-9DAF-18C2CE61B43A
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 16144FFD-3F93-492E-9DAF-18C2CE61B43A
36 | IDESourceControlWCCName
37 | mqtt-ios-sample
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/ConnectViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import
12 |
13 | @interface ConnectViewController : UIViewController
14 | @property (weak, nonatomic) IBOutlet UIButton *connectButton;
15 | @property (weak, nonatomic) IBOutlet UITextField *serverInput;
16 | @property (weak, nonatomic) IBOutlet UITextField *portInput;
17 | @property (weak, nonatomic) IBOutlet UISwitch *cleanSession;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/MqttTestTrace.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "MqttTestTrace.h"
12 |
13 | @implementation MqttTestTrace
14 | - (void) traceDebug: (NSString *)message { NSLog(@"D] %@", message); }
15 | - (void) traceLog: (NSString *)message { NSLog(@"L] %@", message); }
16 | - (void) traceInfo: (NSString *)message { NSLog(@"I] %@", message); }
17 | - (void) traceWarn: (NSString *)message { NSLog(@"W] %@", message); }
18 | - (void) traceError: (NSString *)message { NSLog(@"E] %@", message); }
19 | @end
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | mqtt-ios-sample
2 | ===============
3 | MQTT iOS Sample is an application that provides a user the ability to publish and subscribe to MQTT topics from their iOS device.
4 |
5 | This project depends on the iOS MQTT Client library included in the [IBM WebSphere Mobile Messaging and M2M Client Pack](https://www.ibm.com/developerworks/community/blogs/c565c720-fe84-4f63-873f-607d87787327/entry/download?lang=en).
6 | Setup
7 | -----
8 | After downloading the client pack from the link above, unzip it and go to `SDK/clients/iOS/` and copy `libiosMQTT.a` and `MqttOCClient.h` into your XCode project.
9 | 
10 |
11 | Once the files have been added to the project, ensure that they are included in the `Library Search Paths` and `Header Search Paths` properties of the project. These properties can be found by selecting the project in XCode and going to `Build Settings`.
12 | 
13 |
14 | Connect
15 | -------
16 | The connect view specifies the connection options for connecting to the MQTT broker. The options include server, port, and CleanSession.
17 |
18 | Publish
19 | -------
20 | The publish view allows the user to send an MQTT message to a specified topic. The Quality of Service (QoS) and Retained flag can also be set on the message.
21 |
22 | Subscribe
23 | ---------
24 | The subscribe view allows the user to subscribe to a specified MQTT topic filter. The QoS can also be set for the subscription.
25 |
26 | Log
27 | ---
28 | The log view displays information messages about the application. These messages include connecting and disconnecting, publishing, subscribing, and receiving messages.
29 |
30 | If you have any comments or suggestions for improvements, please create an Issue or better yet submit a Pull Request. If you do submit a Pull Request please indicate in the Pull Request that you accept and agree to be bound by the terms of the IBM Contributor License Agreement that can be found in the CLA.md file in the repository.
31 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/Messenger.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import
12 | #import "MqttOCClient.h"
13 |
14 | @interface Messenger : NSObject {
15 | MqttClient *client;
16 | }
17 |
18 | @property (nonatomic, retain) MqttClient *client;
19 | @property (nonatomic, retain) NSString *clientID;
20 | @property NSMutableArray *logMessages;
21 | @property NSMutableArray *subscriptionData;
22 |
23 | + (id)sharedMessenger;
24 | - (void)connectWithHosts:(NSArray *)hosts ports:(NSArray *)ports clientId:(NSString *)clientId cleanSession:(BOOL)cleanSession;
25 | - (void)publish:(NSString *)topic payload:(NSString *)payload qos:(int)qos retained:(BOOL)retained;
26 | - (void)subscribe:(NSString *)topicFilter qos:(int)qos;
27 | - (void)unsubscribe:(NSString *)topicFilter;
28 | - (void)disconnectWithTimeout:(int)timeout;
29 | - (void)clearLog;
30 | - (void)addLogMessage:(NSString *)data type:(NSString *)type;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import
12 | #import "ConnectViewController.h"
13 | #import "PublishViewController.h"
14 | #import "SubscribeViewController.h"
15 | #import "LogViewController.h"
16 |
17 | @interface AppDelegate : UIResponder
18 |
19 | @property (strong, nonatomic) UIWindow *window;
20 | @property (weak, nonatomic) UITabBarController *tabBar;
21 | @property (weak, nonatomic) ConnectViewController *connectView;
22 | @property (weak, nonatomic) PublishViewController *publishView;
23 | @property (weak, nonatomic) SubscribeViewController *subscribeView;
24 | @property (weak, nonatomic) LogViewController *logView;
25 | @property (weak, nonatomic) UITableView *subListView;
26 |
27 | - (void)switchToConnect;
28 | - (void)switchToPublish;
29 | - (void)switchToSubscribe;
30 | - (void)switchToLog;
31 | - (void)clearLog;
32 | - (void)reloadLog;
33 | - (void)updateConnectButton;
34 | - (void)reloadSubscriptionList;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/CLA.md:
--------------------------------------------------------------------------------
1 | IBM Contributor License Agreement
2 | =================================
3 |
4 | Version 1.0.0 January 14, 2014
5 |
6 | In order for You (as defined below) to make intellectual property Contributions (as defined below) now or in the future to IBM GitHub repositories,
7 | You must agree to this Contributor License Agreement ("CLA").
8 |
9 | Please read this CLA carefully before accepting its terms. By accepting the CLA, You are agreeing to be bound by its terms.
10 | If You submit a Pull Request against an IBM repository on GitHub You must include in the Pull Request a statement of Your acceptance of this CLA.
11 |
12 | As used in this CLA:
13 | (i) "You" (or "Your") shall mean the entity that is making this Agreement with IBM;
14 | (ii)"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is submitted by You to IBM for inclusion in,
15 | or documentation of, any of the IBM GitHub repositories;
16 | (iii) "Submit" (or "Submitted") means any form of communication sent to IBM (e.g. the content You post in a GitHub Issue or submit as part of a GitHub Pull Request).
17 |
18 | This agreement applies to all Contributions You Submit.
19 |
20 | This CLA, and the license(s) associated with the particular IBM GitHub repositories You are contributing to, provides a license to Your Contributions to IBM and downstream consumers,
21 | but You still own Your Contributions, and except for the licenses provided for in this CLA, You reserve all right, title and interest in Your Contributions.
22 |
23 | IBM requires that each Contribution You Submit now or in the future comply with the following four commitments.
24 |
25 | 1) You will only Submit Contributions where You have authored 100% of the content.
26 | 2) You will only Submit Contributions to which You have the necessary rights. This means that if You are employed You have received the necessary permissions from Your employer to make the
27 | Contributions.
28 | 3) Whatever content You Contribute will be provided under the license(s) associated with the particular IBM GitHub repository You are contributing to.
29 | 4) You understand and agree that IBM GitHub repositories and Your contributions are public, and that a record of the contribution (including all personal information You submit with it)
30 | is maintained indefinitely and may be redistributed consistent with the license(s) involved.
31 | You will promptly notify the Eclipse Foundation if You become aware of any facts or circumstances that would make these commitments inaccurate in any way.
32 | To do so, please create an Issue in the appropriate GitHub repository.
33 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/LogViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "LogViewController.h"
12 | #import "LogMessage.h"
13 | #import "Messenger.h"
14 | #import "AppDelegate.h"
15 |
16 | @interface LogViewController ()
17 |
18 | @end
19 |
20 | @implementation LogViewController
21 |
22 | - (IBAction)clearPressed:(id)sender {
23 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
24 | [appDelegate clearLog];
25 | }
26 |
27 | - (id)initWithStyle:(UITableViewStyle)style
28 | {
29 | self = [super initWithStyle:style];
30 | if (self) {
31 | // Custom initialization
32 | }
33 | return self;
34 | }
35 |
36 | - (id)initWithCoder:(NSCoder *)aDecoder
37 | {
38 | self = [super initWithCoder:aDecoder];
39 | if (self) {
40 | // Custom initialization
41 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
42 | appDelegate.logView = self;
43 | }
44 |
45 | return self;
46 | }
47 |
48 | - (void)viewDidLoad
49 | {
50 | [super viewDidLoad];
51 | }
52 |
53 | - (void)didReceiveMemoryWarning
54 | {
55 | [super didReceiveMemoryWarning];
56 | // Dispose of any resources that can be recreated.
57 | }
58 |
59 | #pragma mark - Table view data source
60 |
61 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
62 | {
63 | return 1;
64 | }
65 |
66 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
67 | {
68 | Messenger *messenger = [Messenger sharedMessenger];
69 | return [messenger.logMessages count];
70 | }
71 |
72 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
73 | {
74 | static NSString *CellIdentifier = @"LogPrototypeCell";
75 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
76 |
77 | Messenger *messenger = [Messenger sharedMessenger];
78 | LogMessage *message = [messenger.logMessages objectAtIndex:indexPath.row];
79 | cell.textLabel.text = message.data;
80 | cell.detailTextLabel.text = message.timestamp;
81 |
82 | if ([message.type isEqualToString:@"Action"]) {
83 | [cell.imageView setImage:[UIImage imageNamed:@"glyphicons_003_user.png"]];
84 | } else if ([message.type isEqualToString:@"Publish"]) {
85 | [cell.imageView setImage:[UIImage imageNamed:@"glyphicons_213_up_arrow.png"]];
86 | } else if ([message.type isEqualToString:@"Subscribe"]) {
87 | [cell.imageView setImage:[UIImage imageNamed:@"glyphicons_212_down_arrow.png"]];
88 | }
89 | return cell;
90 | }
91 |
92 | @end
93 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/PublishViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "PublishViewController.h"
12 | #import "Messenger.h"
13 | #import "AppDelegate.h"
14 |
15 | @interface PublishViewController ()
16 | @property (weak, nonatomic) IBOutlet UITextField *topicInput;
17 | @property (weak, nonatomic) IBOutlet UITextField *payloadInput;
18 | @property (weak, nonatomic) IBOutlet UIButton *publishButton;
19 | @property (weak, nonatomic) IBOutlet UISwitch *retainedSwitch;
20 | @property (weak, nonatomic) IBOutlet UISegmentedControl *qos;
21 |
22 | @end
23 |
24 | @implementation PublishViewController
25 |
26 | - (IBAction)publishPressed:(id)sender {
27 | NSLog(@"%s:%d - %@", __func__, __LINE__, sender);
28 |
29 | NSString *topic = self.topicInput.text;
30 | NSString *payload = self.payloadInput.text;
31 |
32 | [[Messenger sharedMessenger] publish:topic payload:payload qos:(int)self.qos.selectedSegmentIndex retained:self.retainedSwitch.isOn];
33 | }
34 |
35 | - (IBAction)retainedChanged:(id)sender {
36 | NSLog(@"%s:%d - %@", __func__, __LINE__, sender);
37 | NSLog(@"retained changed to: %d", self.retainedSwitch.isOn);
38 | }
39 |
40 | - (IBAction)qosSegmentChanged:(id)sender {
41 | NSLog(@"%s:%d - %@", __func__, __LINE__, sender);
42 | NSLog(@"qos changed to: %ld", (long)self.qos.selectedSegmentIndex);
43 | }
44 |
45 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
46 | {
47 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
48 | if (self) {
49 | // Custom initialization
50 | }
51 | return self;
52 | }
53 |
54 | - (void)viewDidLoad
55 | {
56 | [super viewDidLoad];
57 | // Do any additional setup after loading the view.
58 |
59 | NSLog(@"%s:%d", __func__, __LINE__);
60 |
61 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
62 | appDelegate.publishView = self;
63 | }
64 |
65 | - (void)didReceiveMemoryWarning
66 | {
67 | [super didReceiveMemoryWarning];
68 | // Dispose of any resources that can be recreated.
69 | }
70 |
71 |
72 | - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
73 | NSLog(@"textFieldShouldBeginEditing");
74 | textField.backgroundColor = [UIColor colorWithRed:220.0f/255.0f green:220.0f/255.0f blue:220.0f/255.0f alpha:1.0f];
75 | return YES;
76 | }
77 | - (void)textFieldDidBeginEditing:(UITextField *)textField{
78 | NSLog(@"textFieldDidBeginEditing");
79 | }
80 | - (BOOL)textFieldShouldEndEditing:(UITextField *)textField{
81 | NSLog(@"textFieldShouldEndEditing");
82 | textField.backgroundColor = [UIColor whiteColor];
83 | return YES;
84 | }
85 | - (void)textFieldDidEndEditing:(UITextField *)textField{
86 | NSLog(@"textFieldDidEndEditing");
87 | }
88 | - (BOOL)textFieldShouldClear:(UITextField *)textField{
89 | NSLog(@"textFieldShouldClear:");
90 | return YES;
91 | }
92 | - (BOOL)textFieldShouldReturn:(UITextField *)textField{
93 | NSLog(@"textFieldShouldReturn:");
94 | if (textField.tag == 1) {
95 | UITextField *passwordTextField = (UITextField *)[self.view viewWithTag:2];
96 | [passwordTextField becomeFirstResponder];
97 | }
98 | else {
99 | [textField resignFirstResponder];
100 | }
101 | return YES;
102 | }
103 |
104 | @end
105 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/ConnectViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "ConnectViewController.h"
12 | #import "Messenger.h"
13 | #import "AppDelegate.h"
14 | #include
15 |
16 | @implementation ConnectViewController
17 |
18 | + (NSString*) uniqueId {
19 | return [NSString stringWithFormat: @"MQTTTest.%d", arc4random_uniform(10000)];
20 | }
21 |
22 | + (NSArray*) parseCommaList:(NSString*)field {
23 | return [field componentsSeparatedByString:@","];
24 | }
25 |
26 | - (IBAction)connectPressed:(id)sender {
27 | NSLog(@"%s:%d - %@", __func__, __LINE__, sender);
28 |
29 | if ([[[self connectButton] currentTitle] isEqual:@"Connect"]) {
30 | // Connect button text will be "Disconnect" while the client is connected.
31 | NSArray *servers = [ConnectViewController parseCommaList:self.serverInput.text];
32 | NSArray *ports = [ConnectViewController parseCommaList:self.portInput.text];
33 |
34 | // Only generate a new unique clientID if this client doesn't already have one.
35 | NSString *clientID = [[Messenger sharedMessenger] clientID];
36 | if (clientID == NULL) {
37 | clientID = [ConnectViewController uniqueId];
38 | [[Messenger sharedMessenger] setClientID:clientID];
39 | }
40 | [[Messenger sharedMessenger] connectWithHosts:servers ports:ports clientId:clientID cleanSession:self.cleanSession.isOn];
41 |
42 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
43 | [appDelegate switchToPublish];
44 | } else {
45 | [[Messenger sharedMessenger] disconnectWithTimeout:5];
46 | }
47 | }
48 |
49 | - (IBAction)cleanSessionChanged:(id)sender {
50 | NSLog(@"%s:%d - %@", __func__, __LINE__, sender);
51 | NSLog(@"cleanSession changed to: %d", self.cleanSession.isOn);
52 | }
53 |
54 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
55 | {
56 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
57 | if (self) {
58 | // Custom initialization
59 | }
60 | return self;
61 | }
62 |
63 | - (void)viewDidLoad
64 | {
65 | [super viewDidLoad];
66 | // Do any additional setup after loading the view.
67 |
68 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
69 | appDelegate.connectView = self;
70 |
71 | NSLog(@"%s:%d", __func__, __LINE__);
72 |
73 | }
74 |
75 | - (void)didReceiveMemoryWarning
76 | {
77 | [super didReceiveMemoryWarning];
78 | // Dispose of any resources that can be recreated.
79 | }
80 |
81 |
82 | - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
83 | NSLog(@"textFieldShouldBeginEditing");
84 | textField.backgroundColor = [UIColor colorWithRed:220.0f/255.0f green:220.0f/255.0f blue:220.0f/255.0f alpha:1.0f];
85 | return YES;
86 | }
87 | - (void)textFieldDidBeginEditing:(UITextField *)textField{
88 | NSLog(@"textFieldDidBeginEditing");
89 | }
90 | - (BOOL)textFieldShouldEndEditing:(UITextField *)textField{
91 | NSLog(@"textFieldShouldEndEditing");
92 | textField.backgroundColor = [UIColor whiteColor];
93 | return YES;
94 | }
95 | - (void)textFieldDidEndEditing:(UITextField *)textField{
96 | NSLog(@"textFieldDidEndEditing");
97 | }
98 | - (BOOL)textFieldShouldClear:(UITextField *)textField{
99 | NSLog(@"textFieldShouldClear:");
100 | return YES;
101 | }
102 | - (BOOL)textFieldShouldReturn:(UITextField *)textField{
103 | NSLog(@"textFieldShouldReturn:");
104 | if (textField.tag == 1) {
105 | UITextField *passwordTextField = (UITextField *)[self.view viewWithTag:2];
106 | [passwordTextField becomeFirstResponder];
107 | }
108 | else {
109 | [textField resignFirstResponder];
110 | }
111 | return YES;
112 | }
113 |
114 | @end
115 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "AppDelegate.h"
12 | #import "Messenger.h"
13 |
14 | @implementation AppDelegate
15 |
16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17 | {
18 | self.tabBar = (UITabBarController *)self.window.rootViewController;
19 | return YES;
20 | }
21 |
22 | - (void)switchToConnect
23 | {
24 | NSLog(@"%s:%d", __func__, __LINE__);
25 | [self.tabBar setSelectedIndex:0];
26 | }
27 |
28 | - (void)switchToPublish
29 | {
30 | // TODO: can't do this from a callback
31 | NSLog(@"%s:%d", __func__, __LINE__);
32 | [self.tabBar setSelectedIndex:1];
33 | }
34 |
35 | - (void)switchToSubscribe
36 | {
37 | NSLog(@"%s:%d", __func__, __LINE__);
38 | [self.tabBar setSelectedIndex:2];
39 | }
40 |
41 | - (void)switchToLog
42 | {
43 | NSLog(@"%s:%d", __func__, __LINE__);
44 | [self.tabBar setSelectedIndex:3];
45 | }
46 |
47 | - (void)clearLog
48 | {
49 | Messenger *messenger = [Messenger sharedMessenger];
50 | [messenger clearLog];
51 | [self reloadLog];
52 | }
53 |
54 | - (void)reloadLog
55 | {
56 | // must do this on the main thread, since we are updating the UI
57 | dispatch_async(dispatch_get_main_queue(), ^{
58 | Messenger *messenger = [Messenger sharedMessenger];
59 | NSString *badge = [NSString stringWithFormat:@"%lu", (unsigned long)[messenger.logMessages count]];
60 | if ([badge isEqualToString:@"0"]) {
61 | badge = nil;
62 | }
63 | self.logView.navigationController.tabBarItem.badgeValue = badge;
64 |
65 | [self.logView.tableView reloadData];
66 | });
67 | }
68 |
69 | - (void)updateConnectButton
70 | {
71 | dispatch_async(dispatch_get_main_queue(), ^{
72 | NSString *currentTitle = [[[self connectView] connectButton] currentTitle];
73 | if ([currentTitle isEqualToString:@"Connect"]) {
74 | [[[self connectView] connectButton] setTitle:@"Disconnect" forState:UIControlStateNormal];
75 | } else {
76 | [[[self connectView] connectButton] setTitle:@"Connect" forState:UIControlStateNormal];
77 | }
78 | });
79 | }
80 |
81 | - (void)reloadSubscriptionList
82 | {
83 | dispatch_async(dispatch_get_main_queue(), ^{
84 | [self.subListView reloadData];
85 | });
86 | }
87 |
88 | - (void)applicationWillResignActive:(UIApplication *)application
89 | {
90 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
91 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
92 | }
93 |
94 | - (void)applicationDidEnterBackground:(UIApplication *)application
95 | {
96 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
97 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
98 | }
99 |
100 | - (void)applicationWillEnterForeground:(UIApplication *)application
101 | {
102 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
103 | }
104 |
105 | - (void)applicationDidBecomeActive:(UIApplication *)application
106 | {
107 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
108 | }
109 |
110 | - (void)applicationWillTerminate:(UIApplication *)application
111 | {
112 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
113 | }
114 |
115 | @end
116 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/SubscribeViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "SubscribeViewController.h"
12 | #import "Messenger.h"
13 | #import "Subscription.h"
14 | #import "AppDelegate.h"
15 |
16 | @interface SubscribeViewController ()
17 | @property (weak, nonatomic) IBOutlet UITextField *topicInput;
18 | @property (weak, nonatomic) IBOutlet UIButton *subscribeButton;
19 | @property (weak, nonatomic) IBOutlet UITableView *subListTable;
20 | @property (weak, nonatomic) IBOutlet UISegmentedControl *qos;
21 |
22 | @end
23 |
24 | @implementation SubscribeViewController
25 |
26 | - (IBAction)subscribePressed:(id)sender {
27 | NSLog(@"%s:%d - %@", __func__, __LINE__, sender);
28 |
29 | NSString *topic = self.topicInput.text;
30 |
31 | [[Messenger sharedMessenger] subscribe:topic qos:(int)self.qos.selectedSegmentIndex];
32 | }
33 |
34 | - (IBAction)qosSegmentChanged:(id)sender {
35 | NSLog(@"%s:%d - %@", __func__, __LINE__, sender);
36 | NSLog(@"qos changed to: %ld", (long)self.qos.selectedSegmentIndex);
37 | }
38 |
39 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
40 | {
41 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
42 | if (self) {
43 | // Custom initialization
44 | }
45 | return self;
46 | }
47 |
48 | - (void)viewDidLoad
49 | {
50 | [super viewDidLoad];
51 | // Do any additional setup after loading the view.
52 |
53 | NSLog(@"%s:%d", __func__, __LINE__);
54 |
55 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
56 | appDelegate.subscribeView = self;
57 | appDelegate.subListView = self.subListTable;
58 | }
59 |
60 | - (void)didReceiveMemoryWarning
61 | {
62 | [super didReceiveMemoryWarning];
63 | // Dispose of any resources that can be recreated.
64 | }
65 |
66 | // Text Field delegate implementations
67 | - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
68 | NSLog(@"textFieldShouldBeginEditing");
69 | textField.backgroundColor = [UIColor colorWithRed:220.0f/255.0f green:220.0f/255.0f blue:220.0f/255.0f alpha:1.0f];
70 | return YES;
71 | }
72 | - (void)textFieldDidBeginEditing:(UITextField *)textField{
73 | NSLog(@"textFieldDidBeginEditing");
74 | }
75 | - (BOOL)textFieldShouldEndEditing:(UITextField *)textField{
76 | NSLog(@"textFieldShouldEndEditing");
77 | textField.backgroundColor = [UIColor whiteColor];
78 | return YES;
79 | }
80 | - (void)textFieldDidEndEditing:(UITextField *)textField{
81 | NSLog(@"textFieldDidEndEditing");
82 | }
83 | - (BOOL)textFieldShouldClear:(UITextField *)textField{
84 | NSLog(@"textFieldShouldClear:");
85 | return YES;
86 | }
87 | - (BOOL)textFieldShouldReturn:(UITextField *)textField{
88 | NSLog(@"textFieldShouldReturn:");
89 | if (textField.tag == 1) {
90 | UITextField *passwordTextField = (UITextField *)[self.view viewWithTag:2];
91 | [passwordTextField becomeFirstResponder];
92 | }
93 | else {
94 | [textField resignFirstResponder];
95 | }
96 | return YES;
97 | }
98 |
99 | # pragma mark Table view methods
100 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
101 | {
102 | return 1;
103 | }
104 | - (NSInteger)tableView:(UITableView *)tableview numberOfRowsInSection:(NSInteger)section
105 | {
106 | Messenger *messenger = [Messenger sharedMessenger];
107 | return [messenger.subscriptionData count];
108 | }
109 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
110 | {
111 | static NSString *CellIdentifier = @"SubscriptionPrototypeCell";
112 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
113 |
114 | Messenger *messenger = [Messenger sharedMessenger];
115 | Subscription *subscription = [messenger.subscriptionData objectAtIndex:indexPath.row];
116 | cell.textLabel.text = subscription.topicFilter;
117 |
118 | return cell;
119 | }
120 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
121 | return YES;
122 | }
123 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
124 | if (editingStyle == UITableViewCellEditingStyleDelete) {
125 |
126 | Messenger *messenger = [Messenger sharedMessenger];
127 | Subscription *sub = [messenger.subscriptionData objectAtIndex:indexPath.row];
128 |
129 | [messenger unsubscribe:sub.topicFilter];
130 |
131 | [self.subListTable deselectRowAtIndexPath:indexPath animated:TRUE];
132 |
133 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
134 | [appDelegate reloadSubscriptionList];
135 | }
136 | }
137 |
138 | @end
139 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/Messenger.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed Materials - Property of IBM
3 |
4 | © Copyright IBM Corporation 2014. All Rights Reserved.
5 |
6 | This licensed material is sample code intended to aid the licensee in the development of software for the Apple iOS and OS X platforms . This sample code is provided only for education purposes and any use of this sample code to develop software requires the licensee obtain and comply with the license terms for the appropriate Apple SDK (Developer or Enterprise edition). Subject to the previous conditions, the licensee may use, copy, and modify the sample code in any form without payment to IBM for the purposes of developing software for the Apple iOS and OS X platforms.
7 |
8 | Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.
9 | */
10 |
11 | #import "Messenger.h"
12 | #import "MqttOCClient.h"
13 | #import "AppDelegate.h"
14 | #import "LogMessage.h"
15 | #import "Subscription.h"
16 |
17 | // Connect Callbacks
18 | @interface ConnectCallbacks : NSObject
19 | - (void) onSuccess:(NSObject*) invocationContext;
20 | - (void) onFailure:(NSObject*) invocationContext errorCode:(int) errorCode errorMessage:(NSString*) errorMessage;
21 | @end
22 | @implementation ConnectCallbacks
23 | - (void) onSuccess:(NSObject*) invocationContext
24 | {
25 | NSLog(@"%s:%d - invocationContext=%@", __func__, __LINE__, invocationContext);
26 | [[Messenger sharedMessenger] addLogMessage:@"Connected to server!" type:@"Action"];
27 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
28 | [appDelegate updateConnectButton];
29 | }
30 | - (void) onFailure:(NSObject*) invocationContext errorCode:(int) errorCode errorMessage:(NSString*) errorMessage
31 | {
32 | NSLog(@"%s:%d - invocationContext=%@ errorCode=%d errorMessage=%@", __func__,
33 | __LINE__, invocationContext, errorCode, errorMessage);
34 | [[Messenger sharedMessenger] addLogMessage:@"Failed to connect!" type:@"Action"];
35 | }
36 | @end
37 |
38 | // Disconnect Callbacks
39 | @interface DisconnectCallbacks : NSObject
40 | - (void) onSuccess:(NSObject*) invocationContext;
41 | - (void) onFailure:(NSObject*) invocationContext errorCode:(int) errorCode errorMessage:(NSString*) errorMessage;
42 | @end
43 | @implementation DisconnectCallbacks
44 | - (void) onSuccess:(NSObject*) invocationContext
45 | {
46 | NSLog(@"%s:%d - invocationContext=%@", __func__, __LINE__, invocationContext);
47 | [[Messenger sharedMessenger] addLogMessage:@"Disconnected from server!" type:@"Action"];
48 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
49 | [appDelegate updateConnectButton];
50 | }
51 | - (void) onFailure:(NSObject*) invocationContext errorCode:(int) errorCode errorMessage:(NSString*) errorMessage
52 | {
53 | NSLog(@"%s:%d - invocationContext=%@ errorCode=%d errorMessage=%@", __func__,
54 | __LINE__, invocationContext, errorCode, errorMessage);
55 | [[Messenger sharedMessenger] addLogMessage:@"Failed to disconnect!" type:@"Action"];
56 | }
57 | @end
58 |
59 | // Publish Callbacks
60 | @interface PublishCallbacks : NSObject
61 | - (void) onSuccess:(NSObject*) invocationContext;
62 | - (void) onFailure:(NSObject*) invocationContext errorCode:(int) errorCode errorMessage:(NSString *)errorMessage;
63 | @end
64 | @implementation PublishCallbacks
65 | - (void) onSuccess:(NSObject *) invocationContext
66 | {
67 | NSLog(@"PublishCallbacks - onSuccess");
68 | }
69 | - (void) onFailure:(NSObject *) invocationContext errorCode:(int) errorCode errorMessage:(NSString *)errorMessage
70 | {
71 | NSLog(@"PublishCallbacks - onFailure");
72 | }
73 | @end
74 |
75 | // Subscribe Callbacks
76 | @interface SubscribeCallbacks : NSObject
77 | - (void) onSuccess:(NSObject*) invocationContext;
78 | - (void) onFailure:(NSObject*) invocationContext errorCode:(int) errorCode errorMessage:(NSString*) errorMessage;
79 | @end
80 | @implementation SubscribeCallbacks
81 | - (void) onSuccess:(NSObject*) invocationContext
82 | {
83 | NSLog(@"SubscribeCallbacks - onSuccess");
84 | NSString *topic = (NSString *)invocationContext;
85 | [[Messenger sharedMessenger] addLogMessage:[NSString stringWithFormat:@"Subscribed to %@", topic] type:@"Action"];
86 |
87 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
88 | [appDelegate reloadSubscriptionList];
89 | }
90 | - (void) onFailure:(NSObject*) invocationContext errorCode:(int) errorCode errorMessage:(NSString*) errorMessage
91 | {
92 | NSLog(@"SubscribeCallbacks - onFailure");
93 | }
94 | @end
95 |
96 | // Unsubscribe Callbacks
97 | @interface UnsubscribeCallbacks : NSObject
98 | - (void) onSuccess:(NSObject*) invocationContext;
99 | - (void) onFailure:(NSObject*) invocationContext errorCode:(int) errorCode errorMessage:(NSString*) errorMessage;
100 | @end
101 | @implementation UnsubscribeCallbacks
102 | - (void) onSuccess:(NSObject*) invocationContext
103 | {
104 | NSLog(@"%s:%d - invocationContext=%@", __func__, __LINE__, invocationContext);
105 | NSString *topic = (NSString *)invocationContext;
106 | [[Messenger sharedMessenger] addLogMessage:[NSString stringWithFormat:@"Unsubscribed to %@", topic] type:@"Action"];
107 | }
108 | - (void) onFailure:(NSObject*) invocationContext errorCode:(int) errorCode errorMessage:(NSString*) errorMessage
109 | {
110 | NSLog(@"%s:%d - invocationContext=%@ errorCode=%d errorMessage=%@", __func__, __LINE__, invocationContext, errorCode, errorMessage);
111 | }
112 | @end
113 |
114 | @interface GeneralCallbacks : NSObject
115 | - (void) onConnectionLost:(NSObject*)invocationContext errorMessage:(NSString*)errorMessage;
116 | - (void) onMessageArrived:(NSObject*)invocationContext message:(MqttMessage*)msg;
117 | - (void) onMessageDelivered:(NSObject*)invocationContext messageId:(int)msgId;
118 | @end
119 | @implementation GeneralCallbacks
120 | - (void) onConnectionLost:(NSObject*)invocationContext errorMessage:(NSString*)errorMessage
121 | {
122 | [[[Messenger sharedMessenger] subscriptionData] removeAllObjects];
123 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
124 | [appDelegate updateConnectButton];
125 | [appDelegate reloadSubscriptionList];
126 | }
127 | - (void) onMessageArrived:(NSObject*)invocationContext message:(MqttMessage*)msg
128 | {
129 | int qos = msg.qos;
130 | BOOL retained = msg.retained;
131 | NSString *payload = [[NSString alloc] initWithBytes:msg.payload length:msg.payloadLength encoding:NSASCIIStringEncoding];
132 | NSString *topic = msg.destinationName;
133 | NSString *retainedStr = retained ? @" [retained]" : @"";
134 | NSString *logStr = [NSString stringWithFormat:@"[%@ QoS:%d] %@%@", topic, qos, payload, retainedStr];
135 | NSLog(@"%s:%d - %@", __func__, __LINE__, logStr);
136 | NSLog(@"GeneralCallbacks - onMessageArrived!");
137 | [[Messenger sharedMessenger] addLogMessage:logStr type:@"Subscribe"];
138 | }
139 | - (void) onMessageDelivered:(NSObject*)invocationContext messageId:(int)msgId
140 | {
141 | NSLog(@"GeneralCallbacks - onMessageDelivered!");
142 | }
143 | @end
144 |
145 |
146 | @implementation Messenger
147 |
148 | @synthesize client;
149 |
150 | #pragma mark Singleton Methods
151 |
152 | + (id)sharedMessenger {
153 | static Messenger *shared = nil;
154 | static dispatch_once_t onceToken;
155 | dispatch_once(&onceToken, ^{
156 | shared = [[self alloc] init];
157 | });
158 | return shared;
159 | }
160 |
161 | - (id)init {
162 | if (self = [super init]) {
163 | self.client = [MqttClient alloc];
164 | self.clientID = nil;
165 | self.client.callbacks = [[GeneralCallbacks alloc] init];
166 | self.logMessages = [[NSMutableArray alloc] init];
167 | self.SubscriptionData = [[NSMutableArray alloc] init];
168 | }
169 | return self;
170 | }
171 |
172 | - (void)connectWithHosts:(NSArray *)hosts ports:(NSArray *)ports clientId:(NSString *)clientId cleanSession:(BOOL)cleanSession
173 | {
174 |
175 | client = [client initWithHosts:hosts ports:ports clientId:clientId];
176 | ConnectOptions *opts = [[ConnectOptions alloc] init];
177 | opts.timeout = 3600;
178 | opts.cleanSession = cleanSession;
179 | NSLog(@"%s:%d host=%@, port=%@, clientId=%@", __func__, __LINE__, hosts, ports, clientId);
180 | [client connectWithOptions:opts invocationContext:self onCompletion:[[ConnectCallbacks alloc] init]];
181 | }
182 |
183 | - (void)disconnectWithTimeout:(int)timeout {
184 | DisconnectOptions *opts = [[DisconnectOptions alloc] init];
185 | [opts setTimeout:timeout];
186 |
187 | [[self subscriptionData] removeAllObjects];
188 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
189 | [appDelegate reloadSubscriptionList];
190 |
191 | [client disconnectWithOptions:opts invocationContext:self onCompletion:[[DisconnectCallbacks alloc] init]];
192 | }
193 |
194 | - (void)publish:(NSString *)topic payload:(NSString *)payload qos:(int)qos retained:(BOOL)retained
195 | {
196 | NSString *retainedStr = retained ? @" [retained]" : @"";
197 | NSString *logStr = [NSString stringWithFormat:@"[%@] %@%@", topic, payload, retainedStr];
198 | NSLog(@"%s:%d - %@", __func__, __LINE__, logStr);
199 | [[Messenger sharedMessenger] addLogMessage:logStr type:@"Publish"];
200 |
201 | MqttMessage *msg = [[MqttMessage alloc] initWithMqttMessage:topic payload:(char*)[payload UTF8String] length:(int)payload.length qos:qos retained:retained duplicate:NO];
202 | [client send:msg invocationContext:self onCompletion:[[PublishCallbacks alloc] init]];
203 | }
204 |
205 | - (void)subscribe:(NSString *)topicFilter qos:(int)qos
206 | {
207 | NSLog(@"%s:%d topicFilter=%@, qos=%d", __func__, __LINE__, topicFilter, qos);
208 | [client subscribe:topicFilter qos:qos invocationContext:topicFilter onCompletion:[[SubscribeCallbacks alloc] init]];
209 |
210 | Subscription *sub = [[Subscription alloc] init];
211 | sub.topicFilter = topicFilter;
212 | sub.qos = qos;
213 | [self.subscriptionData addObject:sub];
214 | }
215 |
216 | - (void)unsubscribe:(NSString *)topicFilter
217 | {
218 | NSLog(@"%s:%d topicFilter=%@", __func__, __LINE__, topicFilter);
219 | [client unsubscribe:topicFilter invocationContext:topicFilter onCompletion:[[UnsubscribeCallbacks alloc] init]];
220 |
221 | NSUInteger currentIndex = 0;
222 | for (id obj in self.subscriptionData) {
223 | if ([((Subscription *)obj).topicFilter isEqualToString:topicFilter]) {
224 | [self.subscriptionData removeObjectAtIndex:currentIndex];
225 | break;
226 | }
227 | currentIndex++;
228 | }
229 | }
230 |
231 | - (void)clearLog
232 | {
233 | self.logMessages = [[NSMutableArray alloc] init];
234 | }
235 |
236 | - (void)addLogMessage:(NSString *)data type:(NSString *)type
237 | {
238 | LogMessage *msg = [[LogMessage alloc] init];
239 | msg.data = data;
240 | msg.type = type;
241 |
242 | NSDateFormatter *DateFormatter=[[NSDateFormatter alloc] init];
243 | [DateFormatter setDateFormat:@"yyyy-MM-dd hh:mm:ss"];
244 | msg.timestamp = [DateFormatter stringFromDate:[NSDate date]];
245 |
246 | [self.logMessages addObject:msg];
247 | AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
248 | [appDelegate reloadLog];
249 | }
250 |
251 | @end
--------------------------------------------------------------------------------
/iOS-MQTT-Client.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 27AA74E319266A2500920632 /* libiosMQTT.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27AA74E119266A2500920632 /* libiosMQTT.a */; };
11 | 27B4374D19B8ACC80063DA5A /* glyphicons_003_user.png in Resources */ = {isa = PBXBuildFile; fileRef = 27B4374919B8ACC80063DA5A /* glyphicons_003_user.png */; };
12 | 27B4374E19B8ACC80063DA5A /* glyphicons_030_pencil.png in Resources */ = {isa = PBXBuildFile; fileRef = 27B4374A19B8ACC80063DA5A /* glyphicons_030_pencil.png */; };
13 | 27B4374F19B8ACC80063DA5A /* glyphicons_212_down_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 27B4374B19B8ACC80063DA5A /* glyphicons_212_down_arrow.png */; };
14 | 27B4375019B8ACC80063DA5A /* glyphicons_213_up_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 27B4374C19B8ACC80063DA5A /* glyphicons_213_up_arrow.png */; };
15 | 96385B9B185E54ED001A8C0B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96385B9A185E54ED001A8C0B /* Main.storyboard */; };
16 | 96BBA9B8185E510900DEE145 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96BBA9B7185E510900DEE145 /* Foundation.framework */; };
17 | 96BBA9BA185E510900DEE145 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96BBA9B9185E510900DEE145 /* CoreGraphics.framework */; };
18 | 96BBA9BC185E510900DEE145 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96BBA9BB185E510900DEE145 /* UIKit.framework */; };
19 | 96BBA9C2185E510900DEE145 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 96BBA9C0185E510900DEE145 /* InfoPlist.strings */; };
20 | 96BBA9C4185E510A00DEE145 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9C3185E510A00DEE145 /* main.m */; };
21 | 96BBA9C8185E510A00DEE145 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9C7185E510A00DEE145 /* AppDelegate.m */; };
22 | 96BBA9CA185E510A00DEE145 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96BBA9C9185E510A00DEE145 /* Images.xcassets */; };
23 | 96BBA9D1185E510A00DEE145 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96BBA9D0185E510A00DEE145 /* XCTest.framework */; };
24 | 96BBA9D2185E510A00DEE145 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96BBA9B7185E510900DEE145 /* Foundation.framework */; };
25 | 96BBA9D3185E510A00DEE145 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96BBA9BB185E510900DEE145 /* UIKit.framework */; };
26 | 96BBA9DB185E510A00DEE145 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 96BBA9D9185E510A00DEE145 /* InfoPlist.strings */; };
27 | 96BBA9DD185E510A00DEE145 /* iOS_MQTT_ClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9DC185E510A00DEE145 /* iOS_MQTT_ClientTests.m */; };
28 | 96BBA9F9185E517600DEE145 /* ConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9E9185E517600DEE145 /* ConnectViewController.m */; };
29 | 96BBA9FA185E517600DEE145 /* LogMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9EB185E517600DEE145 /* LogMessage.m */; };
30 | 96BBA9FB185E517600DEE145 /* LogViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9ED185E517600DEE145 /* LogViewController.m */; };
31 | 96BBA9FC185E517600DEE145 /* Messenger.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9EF185E517600DEE145 /* Messenger.m */; };
32 | 96BBA9FD185E517600DEE145 /* MqttTestTrace.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9F1185E517600DEE145 /* MqttTestTrace.m */; };
33 | 96BBA9FE185E517600DEE145 /* PublishViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9F3185E517600DEE145 /* PublishViewController.m */; };
34 | 96BBA9FF185E517600DEE145 /* SubscribeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9F5185E517600DEE145 /* SubscribeViewController.m */; };
35 | 96BBAA00185E517600DEE145 /* Subscription.m in Sources */ = {isa = PBXBuildFile; fileRef = 96BBA9F7185E517600DEE145 /* Subscription.m */; };
36 | /* End PBXBuildFile section */
37 |
38 | /* Begin PBXContainerItemProxy section */
39 | 96BBA9D4185E510A00DEE145 /* PBXContainerItemProxy */ = {
40 | isa = PBXContainerItemProxy;
41 | containerPortal = 96BBA9AC185E510900DEE145 /* Project object */;
42 | proxyType = 1;
43 | remoteGlobalIDString = 96BBA9B3185E510900DEE145;
44 | remoteInfo = "iOS-MQTT-Client";
45 | };
46 | /* End PBXContainerItemProxy section */
47 |
48 | /* Begin PBXFileReference section */
49 | 27AA74E119266A2500920632 /* libiosMQTT.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libiosMQTT.a; path = ../libiosMQTT.a; sourceTree = ""; };
50 | 27AA74E219266A2500920632 /* MqttOCClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MqttOCClient.h; path = ../MqttOCClient.h; sourceTree = ""; };
51 | 27B4374919B8ACC80063DA5A /* glyphicons_003_user.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = glyphicons_003_user.png; sourceTree = ""; };
52 | 27B4374A19B8ACC80063DA5A /* glyphicons_030_pencil.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = glyphicons_030_pencil.png; sourceTree = ""; };
53 | 27B4374B19B8ACC80063DA5A /* glyphicons_212_down_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = glyphicons_212_down_arrow.png; sourceTree = ""; };
54 | 27B4374C19B8ACC80063DA5A /* glyphicons_213_up_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = glyphicons_213_up_arrow.png; sourceTree = ""; };
55 | 96385B9A185E54ED001A8C0B /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; };
56 | 96BBA9B4185E510900DEE145 /* iOS-MQTT-Client.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS-MQTT-Client.app"; sourceTree = BUILT_PRODUCTS_DIR; };
57 | 96BBA9B7185E510900DEE145 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
58 | 96BBA9B9185E510900DEE145 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
59 | 96BBA9BB185E510900DEE145 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
60 | 96BBA9BF185E510900DEE145 /* iOS-MQTT-Client-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS-MQTT-Client-Info.plist"; sourceTree = ""; };
61 | 96BBA9C1185E510900DEE145 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
62 | 96BBA9C3185E510A00DEE145 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
63 | 96BBA9C5185E510A00DEE145 /* iOS-MQTT-Client-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iOS-MQTT-Client-Prefix.pch"; sourceTree = ""; };
64 | 96BBA9C6185E510A00DEE145 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
65 | 96BBA9C7185E510A00DEE145 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
66 | 96BBA9C9185E510A00DEE145 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
67 | 96BBA9CF185E510A00DEE145 /* iOS-MQTT-ClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "iOS-MQTT-ClientTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
68 | 96BBA9D0185E510A00DEE145 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
69 | 96BBA9D8185E510A00DEE145 /* iOS-MQTT-ClientTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS-MQTT-ClientTests-Info.plist"; sourceTree = ""; };
70 | 96BBA9DA185E510A00DEE145 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
71 | 96BBA9DC185E510A00DEE145 /* iOS_MQTT_ClientTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = iOS_MQTT_ClientTests.m; sourceTree = ""; };
72 | 96BBA9E8185E517600DEE145 /* ConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConnectViewController.h; sourceTree = ""; };
73 | 96BBA9E9185E517600DEE145 /* ConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConnectViewController.m; sourceTree = ""; };
74 | 96BBA9EA185E517600DEE145 /* LogMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogMessage.h; sourceTree = ""; };
75 | 96BBA9EB185E517600DEE145 /* LogMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogMessage.m; sourceTree = ""; };
76 | 96BBA9EC185E517600DEE145 /* LogViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogViewController.h; sourceTree = ""; };
77 | 96BBA9ED185E517600DEE145 /* LogViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogViewController.m; sourceTree = ""; };
78 | 96BBA9EE185E517600DEE145 /* Messenger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Messenger.h; sourceTree = ""; };
79 | 96BBA9EF185E517600DEE145 /* Messenger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Messenger.m; sourceTree = ""; };
80 | 96BBA9F0185E517600DEE145 /* MqttTestTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MqttTestTrace.h; sourceTree = ""; };
81 | 96BBA9F1185E517600DEE145 /* MqttTestTrace.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MqttTestTrace.m; sourceTree = ""; };
82 | 96BBA9F2185E517600DEE145 /* PublishViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PublishViewController.h; sourceTree = ""; };
83 | 96BBA9F3185E517600DEE145 /* PublishViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PublishViewController.m; sourceTree = ""; };
84 | 96BBA9F4185E517600DEE145 /* SubscribeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubscribeViewController.h; sourceTree = ""; };
85 | 96BBA9F5185E517600DEE145 /* SubscribeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SubscribeViewController.m; sourceTree = ""; };
86 | 96BBA9F6185E517600DEE145 /* Subscription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Subscription.h; sourceTree = ""; };
87 | 96BBA9F7185E517600DEE145 /* Subscription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Subscription.m; sourceTree = ""; };
88 | /* End PBXFileReference section */
89 |
90 | /* Begin PBXFrameworksBuildPhase section */
91 | 96BBA9B1185E510900DEE145 /* Frameworks */ = {
92 | isa = PBXFrameworksBuildPhase;
93 | buildActionMask = 2147483647;
94 | files = (
95 | 96BBA9BA185E510900DEE145 /* CoreGraphics.framework in Frameworks */,
96 | 96BBA9BC185E510900DEE145 /* UIKit.framework in Frameworks */,
97 | 96BBA9B8185E510900DEE145 /* Foundation.framework in Frameworks */,
98 | 27AA74E319266A2500920632 /* libiosMQTT.a in Frameworks */,
99 | );
100 | runOnlyForDeploymentPostprocessing = 0;
101 | };
102 | 96BBA9CC185E510A00DEE145 /* Frameworks */ = {
103 | isa = PBXFrameworksBuildPhase;
104 | buildActionMask = 2147483647;
105 | files = (
106 | 96BBA9D1185E510A00DEE145 /* XCTest.framework in Frameworks */,
107 | 96BBA9D3185E510A00DEE145 /* UIKit.framework in Frameworks */,
108 | 96BBA9D2185E510A00DEE145 /* Foundation.framework in Frameworks */,
109 | );
110 | runOnlyForDeploymentPostprocessing = 0;
111 | };
112 | /* End PBXFrameworksBuildPhase section */
113 |
114 | /* Begin PBXGroup section */
115 | 27B4374819B8ACC80063DA5A /* icons */ = {
116 | isa = PBXGroup;
117 | children = (
118 | 27B4374919B8ACC80063DA5A /* glyphicons_003_user.png */,
119 | 27B4374A19B8ACC80063DA5A /* glyphicons_030_pencil.png */,
120 | 27B4374B19B8ACC80063DA5A /* glyphicons_212_down_arrow.png */,
121 | 27B4374C19B8ACC80063DA5A /* glyphicons_213_up_arrow.png */,
122 | );
123 | path = icons;
124 | sourceTree = "";
125 | };
126 | 96BBA9AB185E510900DEE145 = {
127 | isa = PBXGroup;
128 | children = (
129 | 27AA74E119266A2500920632 /* libiosMQTT.a */,
130 | 27AA74E219266A2500920632 /* MqttOCClient.h */,
131 | 96BBA9BD185E510900DEE145 /* iOS-MQTT-Client */,
132 | 96BBA9D6185E510A00DEE145 /* iOS-MQTT-ClientTests */,
133 | 96BBA9B6185E510900DEE145 /* Frameworks */,
134 | 96BBA9B5185E510900DEE145 /* Products */,
135 | );
136 | sourceTree = "";
137 | };
138 | 96BBA9B5185E510900DEE145 /* Products */ = {
139 | isa = PBXGroup;
140 | children = (
141 | 96BBA9B4185E510900DEE145 /* iOS-MQTT-Client.app */,
142 | 96BBA9CF185E510A00DEE145 /* iOS-MQTT-ClientTests.xctest */,
143 | );
144 | name = Products;
145 | sourceTree = "";
146 | };
147 | 96BBA9B6185E510900DEE145 /* Frameworks */ = {
148 | isa = PBXGroup;
149 | children = (
150 | 96BBA9B7185E510900DEE145 /* Foundation.framework */,
151 | 96BBA9B9185E510900DEE145 /* CoreGraphics.framework */,
152 | 96BBA9BB185E510900DEE145 /* UIKit.framework */,
153 | 96BBA9D0185E510A00DEE145 /* XCTest.framework */,
154 | );
155 | name = Frameworks;
156 | sourceTree = "";
157 | };
158 | 96BBA9BD185E510900DEE145 /* iOS-MQTT-Client */ = {
159 | isa = PBXGroup;
160 | children = (
161 | 27B4374819B8ACC80063DA5A /* icons */,
162 | 96BBA9C6185E510A00DEE145 /* AppDelegate.h */,
163 | 96BBA9C7185E510A00DEE145 /* AppDelegate.m */,
164 | 96BBA9E8185E517600DEE145 /* ConnectViewController.h */,
165 | 96BBA9E9185E517600DEE145 /* ConnectViewController.m */,
166 | 96BBA9C9185E510A00DEE145 /* Images.xcassets */,
167 | 96BBA9EA185E517600DEE145 /* LogMessage.h */,
168 | 96BBA9EB185E517600DEE145 /* LogMessage.m */,
169 | 96BBA9EC185E517600DEE145 /* LogViewController.h */,
170 | 96BBA9ED185E517600DEE145 /* LogViewController.m */,
171 | 96385B9A185E54ED001A8C0B /* Main.storyboard */,
172 | 96BBA9EE185E517600DEE145 /* Messenger.h */,
173 | 96BBA9EF185E517600DEE145 /* Messenger.m */,
174 | 96BBA9F0185E517600DEE145 /* MqttTestTrace.h */,
175 | 96BBA9F1185E517600DEE145 /* MqttTestTrace.m */,
176 | 96BBA9F2185E517600DEE145 /* PublishViewController.h */,
177 | 96BBA9F3185E517600DEE145 /* PublishViewController.m */,
178 | 96BBA9F4185E517600DEE145 /* SubscribeViewController.h */,
179 | 96BBA9F5185E517600DEE145 /* SubscribeViewController.m */,
180 | 96BBA9F6185E517600DEE145 /* Subscription.h */,
181 | 96BBA9F7185E517600DEE145 /* Subscription.m */,
182 | 96BBA9BE185E510900DEE145 /* Supporting Files */,
183 | );
184 | path = "iOS-MQTT-Client";
185 | sourceTree = "";
186 | };
187 | 96BBA9BE185E510900DEE145 /* Supporting Files */ = {
188 | isa = PBXGroup;
189 | children = (
190 | 96BBA9BF185E510900DEE145 /* iOS-MQTT-Client-Info.plist */,
191 | 96BBA9C0185E510900DEE145 /* InfoPlist.strings */,
192 | 96BBA9C3185E510A00DEE145 /* main.m */,
193 | 96BBA9C5185E510A00DEE145 /* iOS-MQTT-Client-Prefix.pch */,
194 | );
195 | name = "Supporting Files";
196 | sourceTree = "";
197 | };
198 | 96BBA9D6185E510A00DEE145 /* iOS-MQTT-ClientTests */ = {
199 | isa = PBXGroup;
200 | children = (
201 | 96BBA9DC185E510A00DEE145 /* iOS_MQTT_ClientTests.m */,
202 | 96BBA9D7185E510A00DEE145 /* Supporting Files */,
203 | );
204 | path = "iOS-MQTT-ClientTests";
205 | sourceTree = "";
206 | };
207 | 96BBA9D7185E510A00DEE145 /* Supporting Files */ = {
208 | isa = PBXGroup;
209 | children = (
210 | 96BBA9D8185E510A00DEE145 /* iOS-MQTT-ClientTests-Info.plist */,
211 | 96BBA9D9185E510A00DEE145 /* InfoPlist.strings */,
212 | );
213 | name = "Supporting Files";
214 | sourceTree = "";
215 | };
216 | /* End PBXGroup section */
217 |
218 | /* Begin PBXNativeTarget section */
219 | 96BBA9B3185E510900DEE145 /* iOS-MQTT-Client */ = {
220 | isa = PBXNativeTarget;
221 | buildConfigurationList = 96BBA9E0185E510A00DEE145 /* Build configuration list for PBXNativeTarget "iOS-MQTT-Client" */;
222 | buildPhases = (
223 | 96BBA9B0185E510900DEE145 /* Sources */,
224 | 96BBA9B1185E510900DEE145 /* Frameworks */,
225 | 96BBA9B2185E510900DEE145 /* Resources */,
226 | );
227 | buildRules = (
228 | );
229 | dependencies = (
230 | );
231 | name = "iOS-MQTT-Client";
232 | productName = "iOS-MQTT-Client";
233 | productReference = 96BBA9B4185E510900DEE145 /* iOS-MQTT-Client.app */;
234 | productType = "com.apple.product-type.application";
235 | };
236 | 96BBA9CE185E510A00DEE145 /* iOS-MQTT-ClientTests */ = {
237 | isa = PBXNativeTarget;
238 | buildConfigurationList = 96BBA9E3185E510A00DEE145 /* Build configuration list for PBXNativeTarget "iOS-MQTT-ClientTests" */;
239 | buildPhases = (
240 | 96BBA9CB185E510A00DEE145 /* Sources */,
241 | 96BBA9CC185E510A00DEE145 /* Frameworks */,
242 | 96BBA9CD185E510A00DEE145 /* Resources */,
243 | );
244 | buildRules = (
245 | );
246 | dependencies = (
247 | 96BBA9D5185E510A00DEE145 /* PBXTargetDependency */,
248 | );
249 | name = "iOS-MQTT-ClientTests";
250 | productName = "iOS-MQTT-ClientTests";
251 | productReference = 96BBA9CF185E510A00DEE145 /* iOS-MQTT-ClientTests.xctest */;
252 | productType = "com.apple.product-type.bundle.unit-test";
253 | };
254 | /* End PBXNativeTarget section */
255 |
256 | /* Begin PBXProject section */
257 | 96BBA9AC185E510900DEE145 /* Project object */ = {
258 | isa = PBXProject;
259 | attributes = {
260 | LastUpgradeCheck = 0510;
261 | ORGANIZATIONNAME = "Bryan Boyd";
262 | TargetAttributes = {
263 | 96BBA9CE185E510A00DEE145 = {
264 | TestTargetID = 96BBA9B3185E510900DEE145;
265 | };
266 | };
267 | };
268 | buildConfigurationList = 96BBA9AF185E510900DEE145 /* Build configuration list for PBXProject "iOS-MQTT-Client" */;
269 | compatibilityVersion = "Xcode 3.2";
270 | developmentRegion = English;
271 | hasScannedForEncodings = 0;
272 | knownRegions = (
273 | en,
274 | );
275 | mainGroup = 96BBA9AB185E510900DEE145;
276 | productRefGroup = 96BBA9B5185E510900DEE145 /* Products */;
277 | projectDirPath = "";
278 | projectRoot = "";
279 | targets = (
280 | 96BBA9B3185E510900DEE145 /* iOS-MQTT-Client */,
281 | 96BBA9CE185E510A00DEE145 /* iOS-MQTT-ClientTests */,
282 | );
283 | };
284 | /* End PBXProject section */
285 |
286 | /* Begin PBXResourcesBuildPhase section */
287 | 96BBA9B2185E510900DEE145 /* Resources */ = {
288 | isa = PBXResourcesBuildPhase;
289 | buildActionMask = 2147483647;
290 | files = (
291 | 96BBA9C2185E510900DEE145 /* InfoPlist.strings in Resources */,
292 | 27B4374E19B8ACC80063DA5A /* glyphicons_030_pencil.png in Resources */,
293 | 96BBA9CA185E510A00DEE145 /* Images.xcassets in Resources */,
294 | 27B4374F19B8ACC80063DA5A /* glyphicons_212_down_arrow.png in Resources */,
295 | 27B4375019B8ACC80063DA5A /* glyphicons_213_up_arrow.png in Resources */,
296 | 27B4374D19B8ACC80063DA5A /* glyphicons_003_user.png in Resources */,
297 | 96385B9B185E54ED001A8C0B /* Main.storyboard in Resources */,
298 | );
299 | runOnlyForDeploymentPostprocessing = 0;
300 | };
301 | 96BBA9CD185E510A00DEE145 /* Resources */ = {
302 | isa = PBXResourcesBuildPhase;
303 | buildActionMask = 2147483647;
304 | files = (
305 | 96BBA9DB185E510A00DEE145 /* InfoPlist.strings in Resources */,
306 | );
307 | runOnlyForDeploymentPostprocessing = 0;
308 | };
309 | /* End PBXResourcesBuildPhase section */
310 |
311 | /* Begin PBXSourcesBuildPhase section */
312 | 96BBA9B0185E510900DEE145 /* Sources */ = {
313 | isa = PBXSourcesBuildPhase;
314 | buildActionMask = 2147483647;
315 | files = (
316 | 96BBA9FA185E517600DEE145 /* LogMessage.m in Sources */,
317 | 96BBA9C8185E510A00DEE145 /* AppDelegate.m in Sources */,
318 | 96BBA9FC185E517600DEE145 /* Messenger.m in Sources */,
319 | 96BBAA00185E517600DEE145 /* Subscription.m in Sources */,
320 | 96BBA9C4185E510A00DEE145 /* main.m in Sources */,
321 | 96BBA9F9185E517600DEE145 /* ConnectViewController.m in Sources */,
322 | 96BBA9FB185E517600DEE145 /* LogViewController.m in Sources */,
323 | 96BBA9FD185E517600DEE145 /* MqttTestTrace.m in Sources */,
324 | 96BBA9FE185E517600DEE145 /* PublishViewController.m in Sources */,
325 | 96BBA9FF185E517600DEE145 /* SubscribeViewController.m in Sources */,
326 | );
327 | runOnlyForDeploymentPostprocessing = 0;
328 | };
329 | 96BBA9CB185E510A00DEE145 /* Sources */ = {
330 | isa = PBXSourcesBuildPhase;
331 | buildActionMask = 2147483647;
332 | files = (
333 | 96BBA9DD185E510A00DEE145 /* iOS_MQTT_ClientTests.m in Sources */,
334 | );
335 | runOnlyForDeploymentPostprocessing = 0;
336 | };
337 | /* End PBXSourcesBuildPhase section */
338 |
339 | /* Begin PBXTargetDependency section */
340 | 96BBA9D5185E510A00DEE145 /* PBXTargetDependency */ = {
341 | isa = PBXTargetDependency;
342 | target = 96BBA9B3185E510900DEE145 /* iOS-MQTT-Client */;
343 | targetProxy = 96BBA9D4185E510A00DEE145 /* PBXContainerItemProxy */;
344 | };
345 | /* End PBXTargetDependency section */
346 |
347 | /* Begin PBXVariantGroup section */
348 | 96BBA9C0185E510900DEE145 /* InfoPlist.strings */ = {
349 | isa = PBXVariantGroup;
350 | children = (
351 | 96BBA9C1185E510900DEE145 /* en */,
352 | );
353 | name = InfoPlist.strings;
354 | sourceTree = "";
355 | };
356 | 96BBA9D9185E510A00DEE145 /* InfoPlist.strings */ = {
357 | isa = PBXVariantGroup;
358 | children = (
359 | 96BBA9DA185E510A00DEE145 /* en */,
360 | );
361 | name = InfoPlist.strings;
362 | sourceTree = "";
363 | };
364 | /* End PBXVariantGroup section */
365 |
366 | /* Begin XCBuildConfiguration section */
367 | 96BBA9DE185E510A00DEE145 /* Debug */ = {
368 | isa = XCBuildConfiguration;
369 | buildSettings = {
370 | ALWAYS_SEARCH_USER_PATHS = NO;
371 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
372 | CLANG_CXX_LIBRARY = "libc++";
373 | CLANG_ENABLE_MODULES = YES;
374 | CLANG_ENABLE_OBJC_ARC = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_CONSTANT_CONVERSION = YES;
377 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
378 | CLANG_WARN_EMPTY_BODY = YES;
379 | CLANG_WARN_ENUM_CONVERSION = YES;
380 | CLANG_WARN_INT_CONVERSION = YES;
381 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
382 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
383 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
384 | COPY_PHASE_STRIP = NO;
385 | GCC_C_LANGUAGE_STANDARD = gnu99;
386 | GCC_DYNAMIC_NO_PIC = NO;
387 | GCC_OPTIMIZATION_LEVEL = 0;
388 | GCC_PREPROCESSOR_DEFINITIONS = (
389 | "DEBUG=1",
390 | "$(inherited)",
391 | );
392 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
393 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
394 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
395 | GCC_WARN_UNDECLARED_SELECTOR = YES;
396 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
397 | GCC_WARN_UNUSED_FUNCTION = YES;
398 | GCC_WARN_UNUSED_VARIABLE = YES;
399 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
400 | ONLY_ACTIVE_ARCH = YES;
401 | SDKROOT = iphoneos;
402 | };
403 | name = Debug;
404 | };
405 | 96BBA9DF185E510A00DEE145 /* Release */ = {
406 | isa = XCBuildConfiguration;
407 | buildSettings = {
408 | ALWAYS_SEARCH_USER_PATHS = NO;
409 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
410 | CLANG_CXX_LIBRARY = "libc++";
411 | CLANG_ENABLE_MODULES = YES;
412 | CLANG_ENABLE_OBJC_ARC = YES;
413 | CLANG_WARN_BOOL_CONVERSION = YES;
414 | CLANG_WARN_CONSTANT_CONVERSION = YES;
415 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
416 | CLANG_WARN_EMPTY_BODY = YES;
417 | CLANG_WARN_ENUM_CONVERSION = YES;
418 | CLANG_WARN_INT_CONVERSION = YES;
419 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
420 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
421 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
422 | COPY_PHASE_STRIP = YES;
423 | ENABLE_NS_ASSERTIONS = NO;
424 | GCC_C_LANGUAGE_STANDARD = gnu99;
425 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
426 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
427 | GCC_WARN_UNDECLARED_SELECTOR = YES;
428 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
429 | GCC_WARN_UNUSED_FUNCTION = YES;
430 | GCC_WARN_UNUSED_VARIABLE = YES;
431 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
432 | SDKROOT = iphoneos;
433 | VALIDATE_PRODUCT = YES;
434 | };
435 | name = Release;
436 | };
437 | 96BBA9E1185E510A00DEE145 /* Debug */ = {
438 | isa = XCBuildConfiguration;
439 | buildSettings = {
440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
441 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
442 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
443 | GCC_PREFIX_HEADER = "iOS-MQTT-Client/iOS-MQTT-Client-Prefix.pch";
444 | INFOPLIST_FILE = "iOS-MQTT-Client/iOS-MQTT-Client-Info.plist";
445 | LIBRARY_SEARCH_PATHS = (
446 | "$(inherited)",
447 | "/Users/Mike/Workspace/mqtt-ios-sample/iOS-MQTT-Client",
448 | /Users/Mike/Workspace,
449 | );
450 | PRODUCT_NAME = "$(TARGET_NAME)";
451 | WRAPPER_EXTENSION = app;
452 | };
453 | name = Debug;
454 | };
455 | 96BBA9E2185E510A00DEE145 /* Release */ = {
456 | isa = XCBuildConfiguration;
457 | buildSettings = {
458 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
459 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
460 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
461 | GCC_PREFIX_HEADER = "iOS-MQTT-Client/iOS-MQTT-Client-Prefix.pch";
462 | INFOPLIST_FILE = "iOS-MQTT-Client/iOS-MQTT-Client-Info.plist";
463 | LIBRARY_SEARCH_PATHS = (
464 | "$(inherited)",
465 | "/Users/Mike/Workspace/mqtt-ios-sample/iOS-MQTT-Client",
466 | /Users/Mike/Workspace,
467 | );
468 | PRODUCT_NAME = "$(TARGET_NAME)";
469 | WRAPPER_EXTENSION = app;
470 | };
471 | name = Release;
472 | };
473 | 96BBA9E4185E510A00DEE145 /* Debug */ = {
474 | isa = XCBuildConfiguration;
475 | buildSettings = {
476 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS-MQTT-Client.app/iOS-MQTT-Client";
477 | FRAMEWORK_SEARCH_PATHS = (
478 | "$(SDKROOT)/Developer/Library/Frameworks",
479 | "$(inherited)",
480 | "$(DEVELOPER_FRAMEWORKS_DIR)",
481 | );
482 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
483 | GCC_PREFIX_HEADER = "iOS-MQTT-Client/iOS-MQTT-Client-Prefix.pch";
484 | GCC_PREPROCESSOR_DEFINITIONS = (
485 | "DEBUG=1",
486 | "$(inherited)",
487 | );
488 | INFOPLIST_FILE = "iOS-MQTT-ClientTests/iOS-MQTT-ClientTests-Info.plist";
489 | LIBRARY_SEARCH_PATHS = (
490 | "$(inherited)",
491 | "/Users/asm/workspace/Client/client_ios_samples/iOS-MQTT-Client",
492 | );
493 | PRODUCT_NAME = "$(TARGET_NAME)";
494 | TEST_HOST = "$(BUNDLE_LOADER)";
495 | WRAPPER_EXTENSION = xctest;
496 | };
497 | name = Debug;
498 | };
499 | 96BBA9E5185E510A00DEE145 /* Release */ = {
500 | isa = XCBuildConfiguration;
501 | buildSettings = {
502 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/iOS-MQTT-Client.app/iOS-MQTT-Client";
503 | FRAMEWORK_SEARCH_PATHS = (
504 | "$(SDKROOT)/Developer/Library/Frameworks",
505 | "$(inherited)",
506 | "$(DEVELOPER_FRAMEWORKS_DIR)",
507 | );
508 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
509 | GCC_PREFIX_HEADER = "iOS-MQTT-Client/iOS-MQTT-Client-Prefix.pch";
510 | INFOPLIST_FILE = "iOS-MQTT-ClientTests/iOS-MQTT-ClientTests-Info.plist";
511 | LIBRARY_SEARCH_PATHS = (
512 | "$(inherited)",
513 | "/Users/asm/workspace/Client/client_ios_samples/iOS-MQTT-Client",
514 | );
515 | PRODUCT_NAME = "$(TARGET_NAME)";
516 | TEST_HOST = "$(BUNDLE_LOADER)";
517 | WRAPPER_EXTENSION = xctest;
518 | };
519 | name = Release;
520 | };
521 | /* End XCBuildConfiguration section */
522 |
523 | /* Begin XCConfigurationList section */
524 | 96BBA9AF185E510900DEE145 /* Build configuration list for PBXProject "iOS-MQTT-Client" */ = {
525 | isa = XCConfigurationList;
526 | buildConfigurations = (
527 | 96BBA9DE185E510A00DEE145 /* Debug */,
528 | 96BBA9DF185E510A00DEE145 /* Release */,
529 | );
530 | defaultConfigurationIsVisible = 0;
531 | defaultConfigurationName = Release;
532 | };
533 | 96BBA9E0185E510A00DEE145 /* Build configuration list for PBXNativeTarget "iOS-MQTT-Client" */ = {
534 | isa = XCConfigurationList;
535 | buildConfigurations = (
536 | 96BBA9E1185E510A00DEE145 /* Debug */,
537 | 96BBA9E2185E510A00DEE145 /* Release */,
538 | );
539 | defaultConfigurationIsVisible = 0;
540 | defaultConfigurationName = Release;
541 | };
542 | 96BBA9E3185E510A00DEE145 /* Build configuration list for PBXNativeTarget "iOS-MQTT-ClientTests" */ = {
543 | isa = XCConfigurationList;
544 | buildConfigurations = (
545 | 96BBA9E4185E510A00DEE145 /* Debug */,
546 | 96BBA9E5185E510A00DEE145 /* Release */,
547 | );
548 | defaultConfigurationIsVisible = 0;
549 | defaultConfigurationName = Release;
550 | };
551 | /* End XCConfigurationList section */
552 | };
553 | rootObject = 96BBA9AC185E510900DEE145 /* Project object */;
554 | }
555 |
--------------------------------------------------------------------------------
/iOS-MQTT-Client/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
60 |
69 |
80 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
126 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
175 |
183 |
198 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
322 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
401 |
407 |
413 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
--------------------------------------------------------------------------------