Code Monkey home page Code Monkey logo

accengage-ios-sdk-releases's Introduction

image

About

urbanairship is a Ruby library for using the Airship REST API for push notifications, message center messages, email, and SMS.

Requirements

We officially support the following Ruby versions:

2.6.7
2.7.2

Newer 2.x versions should work as well.

Functionality

Version 8.0 is a major upgrade, as we have changed the tested/supported versions of Ruby. A more detailed list of changes can be found in the CHANGELOG.

Questions

The best place to ask questions or report a problem is our support site: http://support.airship.com/

Installation

If you have the bundler gem (if not you can get it with $ gem install bundler) add this line to your application's Gemfile:

>>> $ gem 'urbanairship'

And then execute:

>>> $ bundle

OR install it yourself as:

>>> $ gem install urbanairship

Configuration

In your app initialization, you can do something like the following:

require 'urbanairship'

Urbanairship.configure do |config|
  config.server = 'api.asnapieu.com'
  config.oauth_server = 'oauth2.asnapieu.com'
  config.log_path = '/path/to/your/logfile'
  config.log_level = Logger::WARN
  config.timeout = 60
end

If you want to use a custom logger (e.g Rails.logger), you can do:

require 'urbanairship'

Urbanairship.configure do |config|
  config.custom_logger = Rails.logger
  config.log_level = Logger::WARN
end

Available Configurations

  • log_path: Allows you to define the folder where the log file will be created (the default is nil).
  • log_level: Allows you to define the log level and only messages at that level or higher will be printed (the default is INFO).
  • server: Allows you to define the Airship server you want to use ("api.asnapieu.com" for EU or "api.asnapius.com" for US)
  • oauth_server Allows you to define the Airship Oauth server you want to use ("oauth2.asnapieu.com" for EU or "oauth2.asnapius.com" for US)
  • timeout: Allows you to define the request timeout in seconds (the default is 5).

Usage

Once the gem has been installed you can start sending pushes! See the full documentation, api examples, as well as the Airship API Documentation for more information.

Broadcast to All Devices

require 'urbanairship'

UA = Urbanairship

airship = UA::Client.new(key:'application_key', secret:'master_secret')
p = airship.create_push
p.audience = UA.all
p.notification = UA.notification(alert: 'Hello')
p.device_types = UA.device_types(['ios','android'])
p.send_push

Simple Tag Push

require 'urbanairship'

UA = Urbanairship

airship = UA::Client.new(key:'application_key', secret:'master_secret')
p = airship.create_push
p.audience = UA.tag('some_tag')
p.notification = UA.notification(alert: 'Hello')
p.device_types = UA.device_types(['ios','android'])
p.send_push

Specify the Airship server used to make your requests

By default, the request will be sent to the 'api.asnapius.com' server:

require 'urbanairship'

Urbanairship::Client.new(key:'application_key', secret:'master_secret')

You can change the server globally in the Urbanairship configuration:

require 'urbanairship'

Urbanairship.configure do |config|
  config.server = 'api.asnapieu.com'
end

Urbanairship::Client.new(key:'application_key', secret:'master_secret')
# request will be sent to the 'api.asnapieu.com' server

Finally, you can change the targeted server on a request basis:

require 'urbanairship'

Urbanairship.configure do |config|
  config.server = 'api.asnapieu.com'
end

Urbanairship::Client.new(key:'application_key', secret:'master_secret', server: 'api.asnapius.com')
# The Urbanairship configuration is overridden by the client and the
# request will be sent to the 'api.asnapius.com' server

Using Bearer Token Auth

require 'urbanairship'

UA = Urbanairship
airship = UA::Client.new(key:'application_key', token:'token')
# Then continue as you would otherwise

Note: If you include a token in your instantiation, the request will use bearer token auth. Bearer token auth is required for some endpoints, but not supported by others. Please check the Airship docs site to see where it is supported.

Using Oauth

require 'urbanairship'

UA = Urbanairship
app_key = 'application_key'

oauth = UA::Oauth.new(
  client_id: 'client_id',
  key: app_key,
  assertion_private_key: 'your_private_key',
  scopes: ['psh', 'chn'], # Optional
  ip_addresses: ['23.74.131.15/22'], # Optional
  oauth_server: 'api.asnapieu.com' # Optional
)
airship = UA::Client.new(key: app_key, oauth: oauth)
# Then continue as you would otherwise

Note: You can not use both Oauth and bearer token auth at the same time. Oauth also cannot be used with the older 'api.urbanairship.com' and 'api.airship.eu' base URLs. Lastly there are some endpoints in which Oauth is not supported. Please check the Airship docs site to see where it is supported.

Contributing

  1. Fork it ( https://github.com/urbanairship/ruby-library )
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes git commit -am 'Add some feature'
  4. Push to the branch git push origin my-new-feature
  5. Create a new Pull Request
  6. Sign Airship's contribution agreement.

7. Reach out to our support team at https://support.airship.com to let us know about your PR and your urgency level.

Note: Changes will not be approved and merged without a signed contribution agreement.

Development

After checking out the repo, ensure you have bundler installed ($ gem install bundler) run:

>>> $ bin/setup

to install dependencies. Then, run:

>>> $ bin/console

for an interactive prompt that will allow you to experiment.

OR you can build a local gem to play with:

>>> $ gem build urbanairship.gemspec
>>> $ gem install ./urbanairship-<VERSION>.gem

Having a local build will give you better logging if you are running into issues, but be careful to make sure to use our released public gem in Production.

accengage-ios-sdk-releases's People

Contributors

aslimacc avatar khmmouna avatar oristanovic avatar ulrico972 avatar yacir avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

accengage-ios-sdk-releases's Issues

Carthage support

Hello,

Currently there is no way to use Accengage with Carthage.

Can you please add version file for Carthage for binary only frameworks:

e.g. accengage-ios-sdk-releases.json

{
  "6.3.0": "https://github.com/Accengage/accengage-ios-sdk-releases/releases/download/6.3.0/Accengage.framework.zip"
}

accengage-ios-extension-sdk-releases.json

{
  "1.1.0": "https://github.com/Accengage/accengage-ios-extension-sdk-releases/releases/download/1.1.0/AccengageExtension.framework.zip"
}

I can create PR if you agree

Accengage.profile can be nil

profile is expected to be not nullable as it is declared in NONNULL section, but really after launch it can be nil

NS_ASSUME_NONNULL_BEGIN

+ (ACCUserProfile *)profile;

NS_ASSUME_NONNULL_END

Accengage version 6.4.1

Remove all references containing UIWebView to stop triggering App Store deprecation warnings

Hello,

We still have the issue #8 with Accengage SDK 7.0.1, even though it should be resolved since 7.0.0 according to your changelog.
Apple keeps sending the warning email when uploading a build on the App Store:

Dear Developer,

We identified one or more issues with a recent delivery for your app. Your delivery was successful, but you may wish to correct the following issues in your next delivery:

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs starting from December 2020 . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

After you’ve corrected the issues, you can upload a new binary to App Store Connect.

Best regards,

The App Store Team

Maybe you do not link UIWebView directly but even variables or classes names containing UIWebView can trigger Apple warning apparently.

Running grep -r "UIWebView" ~/Downloads/Accengage.framework produces the following output:

Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-nobuttons-landscape.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-nobuttons-landscape.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-nobuttons-landscape-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-nobuttons-landscape-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-landscape.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-landscape.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-nobuttons-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-nobuttons-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-nobuttons-landscape.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-nobuttons-landscape.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-nobuttons.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-nobuttons.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-landscape-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-landscape-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-landscape-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-landscape-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-nobuttons-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-nobuttons-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-landscape.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-landscape.nib/runtime.nib matches
/Users/gdavo/Downloads/Accengage.framework/Headers/Accengage.h:    ACCUIWebViewFramework,
/Users/gdavo/Downloads/Accengage.framework/Headers/A4SWebView.h: You can use this webview as a standard UIWebView.
/Users/gdavo/Downloads/Accengage.framework/Headers/A4SWebView.h:@interface A4SWebView : UIWebView
/Users/gdavo/Downloads/Accengage.framework/Headers/BMA4SInAppNotificationDataSource.h: <td rowspan="8">__Web view__ : <b>UIWebView</b> with tag <i>BMA4SInAppOverlayViewBodyTag</i></td>
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-nobuttons-landscape.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-nobuttons-landscape.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-nobuttons.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-nobuttons.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-landscape.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-landscape.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/Accengage matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-nobuttons-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-nobuttons-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-landscape-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewNotifView-landscape-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-nobuttons.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-nobuttons.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-nobuttons-landscape-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneWebViewNotifView-nobuttons-landscape-iPad.nib/runtime.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-nobuttons-landscape-iPad.nib/objects-13.0+.nib matches
Binary file /Users/gdavo/Downloads/Accengage.framework/BMA4SiPhoneIntersticialWebViewWithToolBarNotifView-nobuttons-landscape-iPad.nib/runtime.nib matches

Drop UIWebView in favour of WKWebView

Since Apple won't accept apps that makes use of UIWebView starting from December 2020, it would be good to replace UIWebView in the SDK with WKWebView.
Right now, A4SWebView is a subclass of UIWebView, and this is causing an alert every time we submit a new version of an app to the App Store, even if we don't make use of UIWebView in our code.
This is the e-mail we receive from Apple:

Dear Developer,

We identified one or more issues with a recent delivery for your app. Your delivery was successful, but you may wish to correct the following issues in your next delivery:

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs starting from December 2020 . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

After you’ve corrected the issues, you can upload a new binary to App Store Connect.

Best regards,

The App Store Team

CocoaPods

When I try to use it, we receive a ok installation but on pod we only have support files and cannot import or use it.

image

image

UI API called on a background thread: -[UIApplication canOpenURL:]

I just wanted to let you aware of this warning coming from the Main Thread Checker:
Main Thread Checker: UI API called on a background thread: -[UIApplication canOpenURL:]

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication canOpenURL:]
PID: 52436, TID: 1300976, Thread name: (none), Queue name: com.apple.usernotifications.UNUserNotificationServiceConnection.call-out, QoS: 0
Backtrace:
4 Accengage 0x00000001039db672 __22+[BMA4SLogger enabled]_block_invoke + 96
5 libdispatch.dylib 0x0000000109625848 _dispatch_client_callout + 8
6 libdispatch.dylib 0x0000000109626dc0 dispatch_once_f + 285
7 Accengage 0x00000001039db610 +[BMA4SLogger enabled] + 101
8 Accengage 0x00000001039dc8c8 _A4SLog + 84
9 Accengage 0x00000001039dcc68 A4SLog + 521
10 Accengage 0x00000001039eb99a -[ACCPush resetBadge] + 23
11 Accengage 0x00000001039ee907 __61-[ACCPush updateAuthorizedNotificationOptionsWithBadgeReset:]_block_invoke + 240
12 libdispatch.dylib 0x0000000109624807 _dispatch_call_block_and_release + 12
13 libdispatch.dylib 0x0000000109625848 _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000010962dc41 _dispatch_queue_serial_drain + 1305
15 libdispatch.dylib 0x000000010962e556 _dispatch_queue_invoke + 328
16 libdispatch.dylib 0x000000010962a3a0 _dispatch_queue_override_invoke + 726
17 libdispatch.dylib 0x00000001096313c8 _dispatch_root_queue_drain + 664
18 libdispatch.dylib 0x00000001096310d2 _dispatch_worker_thread3 + 132
19 libsystem_pthread.dylib 0x0000000109beb169 _pthread_wqthread + 1387
20 libsystem_pthread.dylib 0x0000000109beabe9 start_wqthread + 13
[reports] Main Thread Checker: UI API called on a background thread: -[UIApplication canOpenURL:]
PID: 52436, TID: 1300976, Thread name: (none), Queue name: com.apple.usernotifications.UNUserNotificationServiceConnection.call-out, QoS: 0
Backtrace:
4 Accengage 0x00000001039db672 __22+[BMA4SLogger enabled]_block_invoke + 96
5 libdispatch.dylib 0x0000000109625848 _dispatch_client_callout + 8
6 libdispatch.dylib 0x0000000109626dc0 dispatch_once_f + 285
7 Accengage 0x00000001039db610 +[BMA4SLogger enabled] + 101
8 Accengage 0x00000001039dc8c8 _A4SLog + 84
9 Accengage 0x00000001039dcc68 A4SLog + 521
10 Accengage 0x00000001039eb99a -[ACCPush resetBadge] + 23
11 Accengage 0x00000001039ee907 __61-[ACCPush updateAuthorizedNotificationOptionsWithBadgeReset:]_block_invoke + 240
12 libdispatch.dylib 0x0000000109624807 _dispatch_call_block_and_release + 12
13 libdispatch.dylib 0x0000000109625848 _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000010962dc41 _dispatch_queue_serial_drain + 1305
15 libdispatch.dylib 0x000000010962e556 _dispatch_queue_invoke + 328
16 libdispatch.dylib 0x000000010962a3a0 _dispatch_queue_override_invoke + 726
17 libdispatch.dylib 0x00000001096313c8 _dispatch_root_queue_drain + 664
18 libdispatch.dylib 0x00000001096310d2 _dispatch_worker_thread3 + 132
19 libsystem_pthread.dylib 0x0000000109beb169 _pthread_wqthread + 1387
20 libsystem_pthread.dylib 0x0000000109beabe9 start_wqthread + 13
-canOpenURL: failed for URL: "bma4sreceiver://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

no shared framework scheme for platform iOS

Received this when I did a bootstrap to build for iOS only with Carthage:

Dependency "accengage-ios-extension-sdk-releases" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/Accengage/accengage-ios-extension-sdk-releases/issues/new
*** Skipped building accengage-ios-sdk-releases due to the error:
Dependency "accengage-ios-sdk-releases" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/Accengage/accengage-ios-sdk-releases/issues/new

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.