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

rename(init): rename init function to start #72

Merged
merged 4 commits into from
Jun 10, 2020
Merged

Conversation

mpodwysocki
Copy link
Member

@mpodwysocki mpodwysocki commented Jun 10, 2020

This PR renames the initWithConnectionString to be startWithConnectionString as it makes sense since it doesn't return anything. Also adds the NS_SWIFT_NAME to rename it to start.

+ (void)startWithConnectionString:(NSString *)connectionString hubName:(NSString *)notificationHubName NS_SWIFT_NAME(start(connectionString:hubName:));

This allows for better ergonomics for Swift such as setting up the Notification Hub:

MSNotificationHub.start(connectionString: connectionString!, hubName: hubName!)

Addresses comments made from feedback on #43

cc: @powerje

@mpodwysocki mpodwysocki changed the title rename(init): rename init function to setup rename(init): rename init function to start Jun 10, 2020
@mpodwysocki mpodwysocki merged commit 79e8ccc into sdk-v3 Jun 10, 2020
@mpodwysocki mpodwysocki deleted the ns-rename-setup branch June 10, 2020 21:13
mpodwysocki added a commit that referenced this pull request Jul 2, 2020
* Initial commit

* Updating MSNotification.m

* Deleting bad files

* Update commands

* Test app refresh swift (#42)

Swift Test App Refresh

* Move tests to common folder

* Update links at test project

* Fix tests

* Add Sample App using NH iOS SDK V3 (#44)

* Add HttpClient and all dependencies from AppCenter

* Add tests for http client

* Update test schema

* Back schema to static from library for tests

* Remove separate project for tests

* Update commands for CIT and BVT

* Add frameworks for testings

* Intermediate state for fixing tests for http client

* Fix reference for OHHTTPStubs

* Fix tests for http client

* Rename AppCenter components to NotificationHub

* Add custom MSNotificationHubMessage (#51)

Add custom MSNotificationHubMessage

* Add Swizzling for AppDelegate lifecycle methods (#49)

Add Swizzling for AppDelegate lifecycle methods

* Fixing BVT tests (#53)

* Update targets for Framework

* Fixing BVT (add required frameworks for new SDK)

* Create custom delegate for intercepting remote notifications (#52)

Create custom delegate for intercepting remote notifications

* Update sample app for Objective-C for receiving pushes

* Update sample app for Swift for receiving pushes

* fix

* Installation manager (#55)

Installation manager

* Add support for adding and removing tags (#56)

Add support for adding and removing tags

* Add clang formatting

* Add debouncer for adding/removing tags  (#58)

 debouncer for installation manager

* Final updates before new release

* Add templates to MSInstallation

* Fix formatting for clang-format

* Add templates operations in MSNotificationHub

* Added tests for installation template.

* Fix headers and spacing

* Removing templates and changed tags to Set

* Update the installation manager

* Fix some headers

* Fixing equality

* Fix pch issues

* Add unit tests setup

* Fix get tags

* Code cleanup

* Fix sample apps (#60)

Fix sample apps

* Fixing unit tests

* Add enable/disable SDK

* Combine upsert/install

* Fixed tests.

* Refactored to use nsset instead of nsarray. Fixed to json logic.

* Refactored toJson logic

* Fixed save installation test.

* Fix CIT (#62)

Fix CIT

* mutable to non-mutable dictionary for data

* Fixed merge.

* Adding 3rd party notice

* Fix project file and gitignore

* Move setHttpClient to private

* Update third party notices

* Addressing LocalStorage constants

* Adds user-agent

* Fixing tests for header checks

* Cleanup the MSNotificationHubMessage interface. Don't hide the
underlying notification data. Add unit tests for the class.

* Cleanup HTTP code imported from App Center.

* Remove usage from MSNotificationHubMessage.data from Swift sample.

* Resolved cr comments.

* Resolved cr comments.

* Fixed styling with clang-format.

* Fixup pod with license

* Change back new version number

* Update podspec to include the correct frameworks.

* Proper error handling for pod

* Adding UIKit for the build

* Add UIKit to frameworks

* Add weak framework for user notifications

* Update to build only active architecture

* Refine Installation Templates (#66)

* Change back new version number

* Update podspec to include the correct frameworks.

* Proper error handling for pod

* Adding UIKit for the build

* Add UIKit to frameworks

* Add weak framework for user notifications

* Update to build only active architecture

* Updating tests for templates/tags

Co-authored-by: Brannon Jones <[email protected]>

* Final touches on the SDK for Preview 2

* Fix regressions with deprecated APIs

* Bump version

* Update as per comments

* Rename addTemplate to setTemplate

* Fix indentation

* Clang format cleanup

* Installation management (#69)

* Added enrichment delegate.

* Update samples

* Fixed installation manager unit tests.

* Formatted affected files.

* Added installation management delegate. Updated samples.

* Fixed misprint.

* fix samples

* Added installation lifecycle delegate.

* Update samples

* Formatted.

* Fixed tests.

* Added test for installation equality.

* Fixed comment.

Co-authored-by: Artem Egorov <[email protected]>

* Fix Swift protocol implementations

* Fixup Swift again

* Adding notification to global error handler

* Update status code for 403

* Changing ms to seconds for retry-after

* Added defining sdk version in config file and dynamic assigning of api-origin based on it. (#71)

* SPM support for sdk-v3 (#47)

* Added SPM manifest

* Added include folder for public headers and created SPM manifest

* Reduce duplication of sources folders in SPM manifest

* rename(init): rename init function to start (#72)

* rename(init): rename init function to setup

* fix(tests): Fixing tests and include headers

* chore(BVTs): change to 13.5 for simulator

* Rename setup to start

* feat(tags): Add tags samples (#74)

* macOS and Mac Catalyst support (#78)

* Initial commit

* Removing old src

* Updating swift project

* Updating scripts for archives

* Updating scripts for archives

* Update WindowsAzureMessaging/WindowsAzureMessaging/Support/iOS WindowsAzureMessaging.xcconfig

Co-authored-by: Ivan Matkov <[email protected]>

* Update WindowsAzureMessaging/WindowsAzureMessaging/Support/WindowsAzureMessaging.xcconfig

Co-authored-by: Ivan Matkov <[email protected]>

* Updating scripts for archives

* Updating as per warnings

* Add headers for SPM

* Add more interfaces

Co-authored-by: Ivan Matkov <[email protected]>

* Updating variables for build

* Updating reachability

* Rename scheme

* Updating reachability in tests

* Update paths for builds

* Adding AllFrameworks scheme

* Updating build archive

* Removing iOS Tests from macOS

* Adding installation expiration time

* Adding new samples

* Adding initial commit for testing

* Undo dev settings

* Adding entitlements to all apps

* Updating for macOS

* Reimplement Sample Apps iOS (#80)

* Reimplement Sample App for ObjC iOS

* Reimplement Sample App for Swift iOS

* Implement Sample App for ObjC macOS

* Implement Sample App for Swift macOS

* Revert "Implement Sample App for ObjC macOS"

This reverts commit 1d5b686.

* add extended tags

* Add xcconfig

* refactoring xcconfig

* refactoring xcconfig

* check for creds

* typo

* refactoring xcconfig

* Version bump

Co-authored-by: Evgenii Karpov <[email protected]>
Co-authored-by: Artem Egorov <[email protected]>
Co-authored-by: Artem Egorov <[email protected]>
Co-authored-by: Artem Osadchuk <[email protected]>
Co-authored-by: Olga Chistyakova <[email protected]>
Co-authored-by: Brannon Jones <[email protected]>
Co-authored-by: olga chistyakova <[email protected]>
Co-authored-by: James Power <[email protected]>
Co-authored-by: Ivan Matkov <[email protected]>
mpodwysocki added a commit that referenced this pull request Aug 17, 2020
* Initial commit

* Updating MSNotification.m

* Deleting bad files

* Update commands

* Test app refresh swift (#42)

Swift Test App Refresh

* Move tests to common folder

* Update links at test project

* Fix tests

* Add Sample App using NH iOS SDK V3 (#44)

* Add HttpClient and all dependencies from AppCenter

* Add tests for http client

* Update test schema

* Back schema to static from library for tests

* Remove separate project for tests

* Update commands for CIT and BVT

* Add frameworks for testings

* Intermediate state for fixing tests for http client

* Fix reference for OHHTTPStubs

* Fix tests for http client

* Rename AppCenter components to NotificationHub

* Add custom MSNotificationHubMessage (#51)

Add custom MSNotificationHubMessage

* Add Swizzling for AppDelegate lifecycle methods (#49)

Add Swizzling for AppDelegate lifecycle methods

* Fixing BVT tests (#53)

* Update targets for Framework

* Fixing BVT (add required frameworks for new SDK)

* Create custom delegate for intercepting remote notifications (#52)

Create custom delegate for intercepting remote notifications

* Update sample app for Objective-C for receiving pushes

* Update sample app for Swift for receiving pushes

* fix

* Installation manager (#55)

Installation manager

* Add support for adding and removing tags (#56)

Add support for adding and removing tags

* Add clang formatting

* Add debouncer for adding/removing tags  (#58)

 debouncer for installation manager

* Final updates before new release

* Add templates to MSInstallation

* Fix formatting for clang-format

* Add templates operations in MSNotificationHub

* Added tests for installation template.

* Fix headers and spacing

* Removing templates and changed tags to Set

* Update the installation manager

* Fix some headers

* Fixing equality

* Fix pch issues

* Add unit tests setup

* Fix get tags

* Code cleanup

* Fix sample apps (#60)

Fix sample apps

* Fixing unit tests

* Add enable/disable SDK

* Combine upsert/install

* Fixed tests.

* Refactored to use nsset instead of nsarray. Fixed to json logic.

* Refactored toJson logic

* Fixed save installation test.

* Fix CIT (#62)

Fix CIT

* mutable to non-mutable dictionary for data

* Fixed merge.

* Adding 3rd party notice

* Fix project file and gitignore

* Move setHttpClient to private

* Update third party notices

* Addressing LocalStorage constants

* Adds user-agent

* Fixing tests for header checks

* Cleanup the MSNotificationHubMessage interface. Don't hide the
underlying notification data. Add unit tests for the class.

* Cleanup HTTP code imported from App Center.

* Remove usage from MSNotificationHubMessage.data from Swift sample.

* Resolved cr comments.

* Resolved cr comments.

* Fixed styling with clang-format.

* Fixup pod with license

* Change back new version number

* Update podspec to include the correct frameworks.

* Proper error handling for pod

* Adding UIKit for the build

* Add UIKit to frameworks

* Add weak framework for user notifications

* Update to build only active architecture

* Refine Installation Templates (#66)

* Change back new version number

* Update podspec to include the correct frameworks.

* Proper error handling for pod

* Adding UIKit for the build

* Add UIKit to frameworks

* Add weak framework for user notifications

* Update to build only active architecture

* Updating tests for templates/tags

Co-authored-by: Brannon Jones <[email protected]>

* Final touches on the SDK for Preview 2

* Fix regressions with deprecated APIs

* Bump version

* Update as per comments

* Rename addTemplate to setTemplate

* Fix indentation

* Clang format cleanup

* Installation management (#69)

* Added enrichment delegate.

* Update samples

* Fixed installation manager unit tests.

* Formatted affected files.

* Added installation management delegate. Updated samples.

* Fixed misprint.

* fix samples

* Added installation lifecycle delegate.

* Update samples

* Formatted.

* Fixed tests.

* Added test for installation equality.

* Fixed comment.

Co-authored-by: Artem Egorov <[email protected]>

* Fix Swift protocol implementations

* Fixup Swift again

* Adding notification to global error handler

* Update status code for 403

* Changing ms to seconds for retry-after

* Added defining sdk version in config file and dynamic assigning of api-origin based on it. (#71)

* SPM support for sdk-v3 (#47)

* Added SPM manifest

* Added include folder for public headers and created SPM manifest

* Reduce duplication of sources folders in SPM manifest

* rename(init): rename init function to start (#72)

* rename(init): rename init function to setup

* fix(tests): Fixing tests and include headers

* chore(BVTs): change to 13.5 for simulator

* Rename setup to start

* feat(tags): Add tags samples (#74)

* macOS and Mac Catalyst support (#78)

* Initial commit

* Removing old src

* Updating swift project

* Updating scripts for archives

* Updating scripts for archives

* Update WindowsAzureMessaging/WindowsAzureMessaging/Support/iOS WindowsAzureMessaging.xcconfig

Co-authored-by: Ivan Matkov <[email protected]>

* Update WindowsAzureMessaging/WindowsAzureMessaging/Support/WindowsAzureMessaging.xcconfig

Co-authored-by: Ivan Matkov <[email protected]>

* Updating scripts for archives

* Updating as per warnings

* Add headers for SPM

* Add more interfaces

Co-authored-by: Ivan Matkov <[email protected]>

* Updating variables for build

* Updating reachability

* Rename scheme

* Updating reachability in tests

* Update paths for builds

* Adding AllFrameworks scheme

* Updating build archive

* Removing iOS Tests from macOS

* Adding installation expiration time

* Adding new samples

* Adding initial commit for testing

* Undo dev settings

* Adding entitlements to all apps

* Updating for macOS

* Reimplement Sample Apps iOS (#80)

* Reimplement Sample App for ObjC iOS

* Reimplement Sample App for Swift iOS

* Implement Sample App for ObjC macOS

* Implement Sample App for Swift macOS

* Revert "Implement Sample App for ObjC macOS"

This reverts commit 1d5b686.

* add extended tags

* Add xcconfig

* refactoring xcconfig

* refactoring xcconfig

* check for creds

* typo

* refactoring xcconfig

* Version bump

* Update API version

* Update tests with API version

* Update tests with API version

* Change version from 13.1 to 10.0

* Updating apps with proper configs

* Update plist key

* Updating podspec

* Add UserNotifications for macOS

* Implement macos objective c sample (#81)

* add labels and list of tags

* add adding and removing tags in tag table

* add notification details table

* fix notifications, add some configs to xcconfig files

* fix xcconfigs

* fix review issues

* fix config issue

* Implement macos swift sample (#82)

* add labels and list of tags

* add adding and removing tags in tag table

* add notification details table

* fix notifications, add some configs to xcconfig files

* fix xcconfigs

* move build configs to xcconfig file

* implement swift sample for macos

* fix review issues

* move macOS configs to swift sample config file

* fix config issue

* fix congig issues

* fix review issues

* Way to appcenter (#83)

* Add shared schemes

* fix configs

* fix configs 2

* setup dev team

* clean embed frameworks

* struggle with embed framework

* add appcenter-pre-build.sh

* update appcenter-pre-build.sh

* add CopyableLabel

* Migrate MS to ANH for internal APIs that might collide with AppCenter (#84)

* Change AppCenter MS to ANH

* Updating settings

* Update urlEncode not to use deprecated API

* Version bump

* Update expiration time

* version bump to 3.0.0

* Fix expiration date logic

* Adding expiration unit tests

* Update README

* Update README

* Updating README

* Adding tvOS support for pushes

* Add tvOS to archive

* Updating with schemes

* Adding schemes for testing

* Adding tvOS support for cocoapods

* Updating build all frameworks

* Updating PodSpec

* add userID as a tag to NotificationHub

* fix missprints

* Creates GitHub Actions workflows for CI (#87)

* Create analyze-test.yml

* Update analyze-test.yml

* Update analyze-test.yml

* Update analyze-test.yml

* Update analyze-test.yml

* Update analyze-test.yml

* Create framework-docs.yml GitHub Workflow (#88)

* Create framework-docs.yml

* Update framework-docs.yml

* Updating symlinks

* Add reachability header

* add userId to installation

* add UserId to isEqual method

* add and fix unit tests

* Updating sample apps

* Adding templates for issues/PR (#90)

* Adding templates for issues/PR

* Updating with versions

* SwiftUI Notification Hubs Sample Apps for iOS and MacOS (#89)

* SwiftUI Notification Hubs Sample App for iOS

* SwiftUI Notification Hubs Sample App for MacOS

* update workspace

Co-authored-by: Matthew Podwysocki <[email protected]>

* Adding icons/splashscreen to SwiftUI

* Updating README with new samples

* update swiftui samples to use user id

* update storyboard samples to use user id

* update mac storyboard samples to use user id

* rerun pipeline

* revert endline

* fix tests

Co-authored-by: Matthew Podwysocki <[email protected]>
Co-authored-by: Evgenii Karpov <[email protected]>
Co-authored-by: Artem Egorov <[email protected]>
Co-authored-by: Artem Egorov <[email protected]>
Co-authored-by: Olga Chistyakova <[email protected]>
Co-authored-by: Brannon Jones <[email protected]>
Co-authored-by: olga chistyakova <[email protected]>
Co-authored-by: James Power <[email protected]>
Co-authored-by: Ivan Matkov <[email protected]>
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.

2 participants