Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Mqtt Client iOS Sample #270

Open
wants to merge 21 commits into
base: iot
Choose a base branch
from
Open

Mqtt Client iOS Sample #270

wants to merge 21 commits into from

Conversation

xiazhvera
Copy link
Contributor

@xiazhvera xiazhvera commented Jun 19, 2024

Issue #, if available:

Description of changes:
For demo purpose. Not merge into main.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@xiazhvera xiazhvera changed the base branch from main to iot June 19, 2024 22:57
@xiazhvera xiazhvera changed the base branch from iot to mqtt_error June 19, 2024 22:58
This sample is an iOS application that launches the Mqtt Client and subscribes to the topic `test/topic`.

## How to run the application
1. Open project `Samples/MqttClient/MqttClient.xcodeproj` with XCode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old readme?

## How to run the application
1. Open project `Samples/MqttClient/MqttClient.xcodeproj` with XCode
2. Signing. Signing is required for iOS application. Setup `Project > Signing & Capabilities > Team` to automatically manage signing.
3. Update Dependency. The project depends on aws-crt-swift. Go to `File > Add package dependency > Add Local ... ` and select your local aws-crt-swift. Alternatively, you can also enter Package URL `https://github.com/awslabs/aws-crt-swift` for released versions.
Copy link
Contributor

@waahm7 waahm7 Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should always depend upon the release version and people can replace that with local version if desired instead of always adding it manually.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sample is already setup to point to local version, so that the CI could test any local changes. The REAME is just there to make sure it provided detailed instructions for dependencies.

.gitignore Outdated
@@ -7,3 +7,6 @@ cmake-build-debug
.DS_Store
.swiftpm
.vscode

# Ignore XCode project local user data
Test/**/xcuserdata
Copy link
Contributor

@waahm7 waahm7 Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a proper gitignore generated by some tool like https://www.toptal.com/developers/gitignore/api/xcode?

Base automatically changed from mqtt_error to iot July 18, 2024 17:32
@zeeshanmakeen
Copy link

Is there any update on this PR getting merged?

public var publishCount = 0

/// Print the text and pending new message to message list
func printView(_ txt: String) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These UI updates need to happen on the main DispatchQueue. Wrap below in:

DispatchQueue.main.async {
let newMessage = Message(id: self.messages.count, text: txt)
self.messages.append(newMessage)
print(txt)
}

to resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants