Giter VIP home page Giter VIP logo

braze-unity-sdk's Introduction

Braze Logo

Braze Unity SDK

This repository contains the the C# interface and native Unity functionality for the Unity plugins derived from the Braze Android and iOS SDKs. Since version 1.5.0, Braze's Unity plugins require Unity 5. See the CHANGELOG for more information.

Plugin Setup

Before you can start using Braze in Unity scripts, you'll need to import the plugin files to your Unity project.

Recommended: The Android and iOS plugins are bundled as a Unity package available for download from the SDK release page.

Manual Plugin Setup: Alternatively, you can copy the plugins into your Unity project:

  1. First, clone this repo.
  2. If you're not using any other plugins, all you have to do is copy the Plugins directory from this repo into the Assets folder of your Unity project.
  3. If you already have a /<your-project>/Assets/Plugins directory (probably because you're using another plugin already), copy Plugins/Appboy/AppboyBinding.cs into /<your-project>/Assets/Plugins. Then copy the contents of Plugins/iOS and Plugins/Android from this repo into /<your-project>/Assets/Plugins/iOS and /<your-project>/Assets/Plugins/Android respectively.

Android Setup

To integrate Braze into your Android Unity application, complete our Android Unity integration instructions.

iOS Setup

To integrate Braze into your iOS Unity application, complete our iOS Unity integration instructions.

braze-unity-sdk's People

Contributors

billmag avatar briancaw avatar bucimis avatar hokstuff avatar lowip avatar martinmcroyappboy avatar pmckee11 avatar radixdev avatar sen-lu avatar sencerd avatar vanessaland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

braze-unity-sdk's Issues

Appboy Security Update: TLS 1.0/1.1 Deprecation Plan Announcement

According to the Appboy Security Update: TLS 1.0/1.1 Deprecation Plan Announcement, Android must update to Appboy SDK version 2.0.3 by May 31, 2018. That's still a long way off, but I notice the Appboy Unity SDK is only up to Appboy SDK version 2.0.0. What is the release plan for an updated Appboy Unity SDK?

Apple devices will not be affected by Appboy’s planned deprecation because Apple has required TLS 1.2 since the end of 2016. The same is true of modern web browsers, so we do not anticipate that these changes will have any impact on Web SDK usage. However, Android devices running Android 4.4 (KitKat) or lower may not use TLS 1.2 by default, so please take steps to upgrade any of your Android integrations to at least Appboy SDK version 2.0.3 (which uses TLS 1.2 by default, if a given device can support it) by May 31, 2018.

Android Status Bar is visible during Appboy In-App Message

On both Android an iOS, we are full screen; no status bar. However, during an Appboy In-App Message on Android, the status bar is visible. Is there a way we can disable that, so that appboy matches the experience of the rest of the app? Maybe a setting to enable or disable the status bar?

In-App Messages on Android

While trying to update Braze we've encountered a crash every version up from (and including) 1.17.0 when trying to display In-App Messages on Android devices that have SDK levels below that of 28. Below is the log that appears with one of those devices.

`java.lang.Error: FATAL EXCEPTION [main]
Unity version     : 2018.1.2f1
Device model      : samsung SM-G900F
Device fingerprint: samsung/kltexx/klte:5.0/LRX21T/G900FXXU1BOJ1:user/release-keys

Caused by: java.lang.NoSuchMethodError: No virtual method getDisplayCutout()Landroid/support/v4/view/DisplayCutoutCompat; in class Landroid/support/v4/view/WindowInsetsCompat; or its super classes (declaration of 'android.support.v4.view.WindowInsetsCompat' appears in /data/app/*package_name*/base.apk)
    at com.appboy.ui.inappmessage.InAppMessageViewWrapper$2.onApplyWindowInsets(InAppMessageViewWrapper.java:167)
    at android.support.v4.view.ViewCompat$ViewCompatApi21Impl$1.onApplyWindowInsets(ViewCompat.java:1307)
    at android.view.View.dispatchApplyWindowInsets(View.java:6944)
    at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:6121)
    at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:6125)
    at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:6125)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchApplyWindowInsets(PhoneWindow.java:2573)
    at android.view.ViewRootImpl.dispatchApplyInsets(ViewRootImpl.java:1334)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1588)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1180)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6558)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
    at android.view.Choreographer.doCallbacks(Choreographer.java:590)
    at android.view.Choreographer.doFrame(Choreographer.java:560)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:5832)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)`

java.lang.NullPointerException: at com.appboy.ui.inappmessage.AppboyInAppMessageManager$2.onPageFinished

HeIlo,
I got this exception on client logs:
java.lang.NullPointerException: at com.appboy.ui.inappmessage.AppboyInAppMessageManager$2.onPageFinished (Unknown Source:21) at com.appboy.ui.inappmessage.InAppMessageWebViewClient.onPageFinished (Unknown Source:26) at pn.b (PG:2) at cC0.handleMessage (PG:64) at android.os.Handler.dispatchMessage (Handler.java:112) at android.os.Looper.loop (Looper.java:216) at android.app.ActivityThread.main (ActivityThread.java:7625) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:524) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:987)

This issue may be fixed in appboy-android-sdk v3.7.1:
Appboy/appboy-android-sdk@c31da05

Looks like the lastest appboy-unity-sdk is still using appboy-android-sdk v3.7.0.

Can I replace "Asset/Plugins/Android/libs/appboy-ui.aar" with "appboy-android-sdk v3.7.1" to fix this issue? Will it break anything in appboy-unity-sdk?
:)

Location hardware hardcoded in aar

We've seen that the following using-permission have been forced inside the appboy-unity.aar. Is it possible to leave the choice of inserting them to the developer?

ACCESS_FINE_LOCATION
ACCESS_COARSE_LOCATION

Especially because they add the following restriction to the end-user:

android.hardware.LOCATION
android.hardware.location.GPS

Thanks

IAppboyUnityInAppMessageListener != IInAppMessageManagerListener

This is a feature request. Even though the Appboy Unity SDK for Android is fairly up to date with the Appboy SDK for Android, the Unity SDK does not have feature parity with the Android SDK. Specifically, we would like to have more control over the lifecycle of an in-app message.

The Appboy SDK for Android's IInAppMessageManagerListener has methods for

  • onInAppMessageReceived
  • beforeInAppMessageDisplayed
  • onInAppMessageClicked
  • onInAppMessageButtonClicked
  • onInAppMessageDismissed

The Appboy Unity SDK for Android's IAppboyUnityInAppMessageListener has methods for

  • onInAppMessageReceived
  • onInAppMessageClicked
  • onInAppMessageButtonClicked

Unity SDK Readme Issues

Cloning SDK Link

http://documentation.appboy.com/ios-sdk-integration.html#cloning-the-appboy-sdk

Should be

http://documentation.appboy.com/sdk-integration-ios.html#cloning-the-appboy-sdk

Enabling Push Notification Link

If you're using push notifications you'll need to follow the standard setup for Apple push which you can find at https://appboy.zendesk.com/entries/23690991-iOS-Push-Notifications

Link should be changed to

http://documentation.appboy.com/enabling-push-notifications-ios.html#ios

GCM Instruction Link

GCM instructions link should probably point here:
http://documentation.appboy.com/enabling-push-notifications-android.html#enabling-gcm-for-your-application

Missing notification icons on Android (v.2.1.1)

Problem:

Push campaign notifications delivered to Android devices are missing their icons despite being correctly configured in the AppBoyConfig asset.

The problem is the appboy-generated.xml does not use the correct export settings for the icons (using string instead of drawable).

Suggestion:

The following lines should use drawable as per the Braze documentation

Additional info

  • Unity 2018.4.19f1
  • Braze v.2.1.1

OnReceive and onPause crashes

Hi! In the google play developer console I see a lot of crashes when a push is received. Could you please advise - what can I do to get rid of it?
I use Appboy v 2.2.2
Thanks!
Screen Shot 2020-09-09 at 16 34 41
Screen Shot 2020-09-09 at 16 34 48
Screen Shot 2020-09-09 at 16 34 55
Screen Shot 2020-09-09 at 16 35 44

ANDROID ONLY - HTML IAM not returning focus to app on dismissal

Hi,

I've contacted one of your developers directly by email regarding this issue and was pointed towards this ticket submission process.

We recently integrated the latest version of your SDK into our product, and have encountered an issue where HTML IAMs do not return focus to our application when they are dismissed via a CLOSE button. This issue has not happened on our iOS client.

The issue manifests itself as the application appearing frozen with the Android task bar & navigation buttons visible. Selecting any of the navigation buttons will resolve the issue.

As a result of this, we have had to roll back the updated SDK on our Android client, as the current user experience is sub optimal.

If you need any additional information please let me know, I can get Android Device logs from our QA team, and screenshots etc. if required.

Regards,
James (KIXEYE - Gameplay Engineer)

Android Silent Push Notifications not parsing correctly

https://github.com/Appboy/appboy-unity-sdk/blob/40571203194e8fb3fa088d11246c7c5343b6543c/Assets/Plugins/Appboy/models/PushNotification.cs#L17

When we receive a silent push notification with the following:

{"extra":"{\"Group\":\"Test\",\"FeaturePayload\":\"{}\",\"StartImmediately\":\"true\",\"StartDate\":\"2020-09-30 00:00\",\"TargetSampleSize\":\"10000\",\"FeatureEnabled\":\"true\",\"SampleEndDate\":\"2020-09-30 00:00\",\"Type\":\"AbTest\",\"EndDate\":\"2020-10-01 00:00\",\"MainResponse\":\"LTV_day_30\",\"DisableFeatureOnEnd\":\"false\",\"SampleStartDate\":\"2020-09-29 00:00\",\"TargetResponseValue\":\"1.00\",\"SignificanceCriteria\":\"0.05\",\"UpdateNumber\":\"0\",\"Name\":\"AbTest\"}","ab_nc":"com_appboy_default_notification_channel","a":"Some Message","t":"Title","p":"0","nid":"1066395411","cid":"dGVzdF90ZXN0X2RpPWFhODU5M2UxMjkzNTc3YmQxMTJjZmViZjE3ZjcwODBi","_ab":"true","appboy_push_received_timestamp":"1601476145591"}

Every property in the PushNotification is null.

Could you look into the json deserialization? Also, if you are not doing so, it may be prudent to write unit tests for this case.

Also, it looks like "collapse_key" and "notification_id" doesn't exist in the push notification message.


Here is a potential solution:

I was able to solve this by using the Newtonsoft.Json package with the following code

    public PushNotification(string message) {
      if (String.IsNullOrEmpty(message)) {
        throw new ArgumentException("Message cannot be null or empty.", "message");
      }
      IDictionary<string, string> json;
      try {
        json = JsonConvert.DeserializeObject<IDictionary<string, string>>(message);
      } catch {
        throw new ArgumentException("Unable to parse json.");
      }
      if (json.ContainsKey("title")) {
        Title = json["title"];
      }
      if (json.ContainsKey("content")) {
        Content = json["content"];
      }
      if (json.ContainsKey("extra"))
      {
        Extras = JsonConvert.DeserializeObject<Dictionary<string, string>>(json["extra"]);
      } else {
        Extras = new Dictionary<string, string>();
      }
      CollapseKey = json.ContainsKey("collapse_key") ? json["collapse_key"] : null;
      AndroidNotificationId = json.ContainsKey("notification_id") ? Convert.ToInt32(json["notification_id"]) : 0; 
    }

I know that adding the an additional package dependency may not be the best solution for you due to potential conflicts with other clients, but this is a very good C# json parsing package.

Unsupported Architectures x86_64, i286 when submitting for Distribution on iOS

After updating appboy unity sdk from 1.9.0 to 1.13.0 we are getting this errors when submitting an iOS build to the app store:
image 3

It sounds like the problem is that SDWebImage and FLAnimatedImage frameworks are archived with support for simulator architectures.

We tried stripping out those architectures manually using lipo -remove i386 ProjectFramework_SDK -o ProjectFramework_SDK and lipo -remove x86_64 ProjectFramework_SDK -o ProjectFramework_SDK and after that build gets submitted to the app store with no problems.

Have anyone else seen this issue? Is this the correct solution? If that's the case, can it be incorporated into the SDK itself?

Push notifications with Android Oreo

Our app uses the Braze SDK to handle push notifications, and this works fine except for devices using Android 8.

I've been testing this out with a campaign configured in the braze dashboard to use the fallback channel. User 5072195 is on Android 6.0 and gets the notifications while user 5072250 on Android 8.0 doesn't. Both users show up as 'Opted In' under Engagement/Contact Settings. The android 8 user doesn't have any campaigns/push received, while the android 6 user does.

According to the documentation it seems that notifications can use the 'default'/'fallback' channel to get sent to android 8 devices without any code or config changes. Are there any sdk configuration requirements to allow push notifications on android 8? We're on version 1.11 of the braze unity sdk.

android : Experienced exception processing API response. Failing task.

I am not able to log custom events. I am getting below error log, irrespective of any Android OS version.

W/Appboy v2.2.1 .bo.app.cr: Experienced exception processing API response. Failing task.
                                                                                          bo.app.ar: Bad Http response code from Appboy: [503]
                                                                                              at bo.app.c.a(SourceFile:118)
                                                                                              at bo.app.c.a(SourceFile:78)
                                                                                              at bo.app.c.a(SourceFile:57)
                                                                                              at bo.app.c.a(SourceFile:48)
                                                                                              at bo.app.h.a(SourceFile:36)
                                                                                              at bo.app.f.a(SourceFile:34)
                                                                                              at bo.app.cr.a(SourceFile:88)
                                                                                              at bo.app.cr.run(SourceFile:61)
                                                                                              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                                                                                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                                                                                              at java.lang.Thread.run(Thread.java:764)

I am using latest SDK version 2.2.1.

Am I remaining with any steps to follow ?

Push notifications arrive, but don't open app

While upgrading our project we encountered a problem with push notifications on android devices. We're currently unsure if this is due to Braze's handling, or Firebase's since no error logs appear to point us to an exact reasoning.

From the Braze dashboard we are able to send a notification to our devices using the Open App on click behaviour. These notifications arrive successfully to our device, but on clicking them we receive a log specifying:

com.appboy.AppboyFcmReceiver: Received broadcast message. Message: Intent { act=com.appboy.action.APPBOY_PUSH_CLICKED flg=0x10 cmp=*ourPackageName*/com.appboy.AppboyFcmReceiver (has extras) }

06-06 16:43:19.196 32005-32074/? I/Appboy v3.2.1 .com.appboy.Appboy: No campaign Id associated with this notification. Not logging push click to Appboy.

After this point the notification dismisses itself, and nothing happens after this point. Looking through all the troubleshooting pages, and past issues we haven't encountered anyone specifying a problem with the notifications failing to launch the app. Is there anyway to amend this or discover why the notification isn't resulting in the app opening?

Additional details:
In our AndroidManifest we're using the prime31compatible AppboyUnityPlayerNativeActivity, and have a structure following:

    <activity android:name="com.appboy.unity.prime31compatible.AppboyUnityPlayerNativeActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="sensor">

      <meta-data android:name="android.app.lib_name" android:value="unity" />
      <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />      
      <meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
      
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
      </intent-filter>

      <!-- Required for schemeName://store deeplink -->
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="schemeName" android:host="Braze"/>
      </intent-filter>

    </activity>

    <!-- ============= Braze ============= -->

    <activity android:name="com.appboy.unity.AppboyOverlayActivity" android:theme="@style/Appboy.Theme.Transparent" />
      <activity android:name="com.appboy.ui.AppboyWebViewActivity" android:theme="@android:style/Theme" /> 
      <activity android:name="com.appboy.ui.activities.AppboyFeedActivity" android:theme="@android:style/Theme" />

    <service android:name="com.appboy.AppboyFirebaseMessagingService">
      <intent-filter>
        <action android:name="com.google.firebase.MESSAGING_EVENT" />
      </intent-filter>
    </service>

The permissions we use are:

  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.GET_ACCOUNTS" android:maxSdkVersion="18" />
  <uses-permission android:name="android.permission.WAKE_LOCK" />

  <permission
      android:name="com.android.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS"
      android:protectionLevel="signature"
        />
  <uses-permission android:name="com.android.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS" />

These obviously aren't all intended for Braze.

iOS seems to be not initializing 2.7.0 Xcode 12

Updating to 2.7.0 and using Xcode 12 we started having this message and seems not to work

 ********************************************
 **             !! WARNING !!              **
 **     [Appboy sharedInstance] called     **
 **      before Braze was initialized,     **
 **       returning nil. Please make       **
 ** sure you call [Appboy startWithApiKey] **
 **  before accessing the sharedInstance.  **
 ********************************************

Do we need to call any initialization method from Unity for iOS? Documentation seems to be outdated and it does not say anything

3.20.1 TestFlight Upload Issues

Hi Folks. I'm trying to update my app to 3.20.1 to fix the ITMS UIWebKit warning and for the iOS 13 push token collection issues. I'm running into a snag when trying to upload to TestFlight with XCode 10.2.1 however. There are a bunch of brand new ITMS errors (90087, 90209, 90125) coming from the upload script. The only thing changed in this branch was the new SDK so I'm hoping you can help.

The output looks like this:
1 package(s) were not uploaded because they had problems: /var/folders/2x/4rydsdl17sxfz0mt36hbhyc00000gp/T/C1CA3646-924B-4599-B6C0-60216040335B/1298010172.itmsp - Error Messages: ERROR ITMS-90087: "Unsupported Architectures. The executable for MyApp..app/Frameworks/Appboy_iOS_SDK.framework contains unsupported architectures '[x86_64, i386]'." ERROR ITMS-90087: "Unsupported Architectures. The executable for MyApp..app/Frameworks/SDWebImage.framework contains unsupported architectures '[x86_64, i386]'." ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/Appboy_iOS_SDK.framework/Appboy_iOS_SDK' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version." ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/SDWebImage.framework/SDWebImage' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version." ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker." 2019-09-16 17:35:43.500 altool[45111:3885293] *** Error: Errors uploading 'UnityMonctonClient/Builds/iOS/moncton/Moncton_TestFlight.ipa': ( "Error Domain=ITunesTransporterErrorDomain Code=-18000 \"ERROR ITMS-90087: \"Unsupported Architectures. The executable for MyApp..app/Frameworks/Appboy_iOS_SDK.framework contains unsupported architectures '[x86_64, i386]'.\"\" UserInfo={NSLocalizedRecoverySuggestion=ERROR ITMS-90087: \"Unsupported Architectures. The executable for MyApp..app/Frameworks/Appboy_iOS_SDK.framework contains unsupported architectures '[x86_64, i386]'.\", NSLocalizedDescription=ERROR ITMS-90087: \"Unsupported Architectures. The executable for MyApp..app/Frameworks/Appboy_iOS_SDK.framework contains unsupported architectures '[x86_64, i386]'.\", NSLocalizedFailureReason=ERROR ITMS-90087: \"Unsupported Architectures. The executable for MyApp..app/Frameworks/Appboy_iOS_SDK.framework contains unsupported architectures '[x86_64, i386]'.\"}", "Error Domain=ITunesTransporterErrorDomain Code=-18000 \"ERROR ITMS-90087: \"Unsupported Architectures. The executable for MyApp..app/Frameworks/SDWebImage.framework contains unsupported architectures '[x86_64, i386]'.\"\" UserInfo={NSLocalizedRecoverySuggestion=ERROR ITMS-90087: \"Unsupported Architectures. The executable for MyApp..app/Frameworks/SDWebImage.framework contains unsupported architectures '[x86_64, i386]'.\", NSLocalizedDescription=ERROR ITMS-90087: \"Unsupported Architectures. The executable for MyApp..app/Frameworks/SDWebImage.framework contains unsupported architectures '[x86_64, i386]'.\", NSLocalizedFailureReason=ERROR ITMS-90087: \"Unsupported Architectures. The executable for MyApp..app/Frameworks/SDWebImage.framework contains unsupported architectures '[x86_64, i386]'.\"}", "Error Domain=ITunesTransporterErrorDomain Code=-18000 \"ERROR ITMS-90209: \"Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/Appboy_iOS_SDK.framework/Appboy_iOS_SDK' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.\"\" UserInfo={NSLocalizedRecoverySuggestion=ERROR ITMS-90209: \"Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/Appboy_iOS_SDK.framework/Appboy_iOS_SDK' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.\", NSLocalizedDescription=ERROR ITMS-90209: \"Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/Appboy_iOS_SDK.framework/Appboy_iOS_SDK' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.\", NSLocalizedFailureReason=ERROR ITMS-90209: \"Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/Appboy_iOS_SDK.framework/Appboy_iOS_SDK' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.\"}", "Error Domain=ITunesTransporterErrorDomain Code=-18000 \"ERROR ITMS-90209: \"Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/SDWebImage.framework/SDWebImage' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.\"\" UserInfo={NSLocalizedRecoverySuggestion=ERROR ITMS-90209: \"Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/SDWebImage.framework/SDWebImage' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.\", NSLocalizedDescription=ERROR ITMS-90209: \"Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/SDWebImage.framework/SDWebImage' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.\", NSLocalizedFailureReason=ERROR ITMS-90209: \"Invalid Segment Alignment. The app binary at 'MyApp..app/Frameworks/SDWebImage.framework/SDWebImage' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.\"}", "Error Domain=ITunesTransporterErrorDomain Code=-18000 \"ERROR ITMS-90125: \"The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker.\"\" UserInfo={NSLocalizedRecoverySuggestion=ERROR ITMS-90125: \"The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker.\", NSLocalizedDescription=ERROR ITMS-90125: \"The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker.\", NSLocalizedFailureReason=ERROR ITMS-90125: \"The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker.\"}"

I've checked using the lipo tool (as outlined here) and the Frameworks do appear to contain more than just arm64.

Any ideas?

Thanks,
Kieran

androidSessions should be an int

Appsflyer intergration issue

Hi!
My team is having a trouble with Appsflyer and Appboy. We receive a crash
1 case

  • An app was open by invite link
  • The apps in the background
  • The app was open by icon

2 case

  • The app was opened by icon
  • The apps in the background
  • The app was open by invite link

I receive the crash only when I use AppboyActivity. It's required by the documentation. With UnityPlayerActivity everything works well. The crash is not readable.
Please, check the integration with Appsflyer.

Link - https://boardkings.onelink.me/Fymc/50cd9536

Appsflyer 5.4.2
Appboy 2.4.0

https://drive.google.com/file/d/1m40Gu97TndFeM8lGvjScTz1aOSDRTSFl/view?usp=sharing
https://drive.google.com/file/d/1PR65SiDke_YIw-Jtp6RD0uhYBC1tbDrX/view?usp=sharing

AAR files not set to run on Android platform

Question about appboy.xml

HI there
I've seen that when building Unity an appboy-generated.xml is created. But also there is an appboy.xml in Plugins/Android/res/values.

Which one is being used?
Should we delete appboy.xml?
Should both exist?

Thanks

IOS Post Process step help

hey,

Trying to enable rich notifications on ios has been successful with a manual approach by adding a notification service as suggested here #39

now I am trying to integrate it with a post process build using the files that worked for me in the manual approach.

I Encounter many issues with automating this process.
some issues encountered are Cycle depedencies between targets, and a linker error.
funny thing is that it doesnt happen when doing this step manually.

Crash with Content-Available flag

Hi! I receive a crash when I put content-available flag in a game, when I didn't implement rich pushes. Could you please check?

Appboy 2.2.2
Xcode 11.6
Unity 2018.4.25f1
iOS 14.0
Screen Shot 2020-10-20 at 15 47 00

Screen Shot 2020-10-20 at 15 46 52

Exception warning

We get this warning on some Android devices (Samsung Galaxy S6, LG Nexus 5x for example):

*I/Appboy v1.10.3 .bo.app.x(893): Adding request to dispatcher with parameters: {"only_respond_with":[]}
W/Appboy v1.10.3 .bo.app.di(893): Experienced exception processing API response. Failing task.
W/Appboy v1.10.3 .bo.app.di(893): java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.lang.String)' on a null object reference
W/Appboy v1.10.3 .bo.app.di(893): at bo.app.i.b(SourceFile:131)
W/Appboy v1.10.3 .bo.app.di(893): at bo.app.i.a(SourceFile:69)
W/Appboy v1.10.3 .bo.app.di(893): at bo.app.i.a(SourceFile:51)
W/Appboy v1.10.3 .bo.app.di(893): at bo.app.i.a(SourceFile:42)
W/Appboy v1.10.3 .bo.app.di(893): at bo.app.l.a(SourceFile:36)
W/Appboy v1.10.3 .bo.app.di(893): at bo.app.k.a(SourceFile:36)
W/Appboy v1.10.3 .bo.app.di(893): at bo.app.di.run(SourceFile:60)
W/Appboy v1.10.3 .bo.app.di(893): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
W/Appboy v1.10.3 .bo.app.di(893): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
W/Appboy v1.10.3 .bo.app.di(893): at java.lang.Thread.run(Thread.java:818)
*

We get it once every 2/3 sec.

Do not call concrete methods in AppboyUnityPlayerNativeActivity

This issue is related to Appboy/appboy-android-sdk#95

There should be a change in c# and java side.

Script AppboyBinding.cs is calling some methods stored in AppboyUnityPlayerNativeActivity that force the client to use AppboyActivity.

AppboyBinding.cs

 public static void LogInAppMessageClicked(string inAppMessageJSONString) {
      AppboyUnityActivity.Call("logInAppMessageClick", new object[] { inAppMessageJSONString });
    }

    public static void LogInAppMessageImpression(string inAppMessageJSONString) {
      AppboyUnityActivity.Call("logInAppMessageImpression", new object[] { inAppMessageJSONString });
    }
    
    public static void LogInAppMessageButtonClicked(string inAppMessageJSONString, int buttonID) {
      AppboyUnityActivity.Call("logInAppMessageButtonClick", new object[] { inAppMessageJSONString, buttonID });
    }

    [System.Obsolete("LogSlideupClicked is deprecated, please use LogInAppMessageClicked instead.")]
    public static void LogSlideupClicked(string slideupJSONString) {
      AppboyUnityActivity.Call("logInAppMessageClick", new object[] { slideupJSONString });
    }

    [System.Obsolete("LogSlideupImpression is deprecated, please use LogInAppMessageImpression instead.")]
    public static void LogSlideupImpression(string slideupJSONString) {
      AppboyUnityActivity.Call("logInAppMessageImpression", new object[] { slideupJSONString });
    }

logInAppMessageXXX can be called directly to it class, instead they are stored in the main AppboyActivity. Removing this will allow us to create ActivityListener without being forced to implement a specific Activity.

Also AppboyUnityPlayerNativeActivity is extending a deprecated UnityPlayerNativeActivity.

Thanks!

Old Appboy version for iOS14

Hi! Will everything be ok if we use old version (2.2.2) with iOS 14? We don't use location framework in our game

Using rich notification in Unity

Hi!
I have a problem - I need to add supporting reach notifications. I've tried to use it https://www.braze.com/docs/developer_guide/platform_integration_guides/ios/push_notifications/rich/
but it didn't work in Unity. When I add files from the example manually I don't see info.plist in Xcode project. Maybe you have an example how to use it?

I tried this
https://answers.unity.com/questions/1407184/create-notification-service-extension-from-post-bu.html
but it didn't work ;(

Thanks!

Using deep links with Unity SDK

I'm having issues getting push notification callbacks to fire and deep links from Appboy push notifications working with my Android Unity App and just wanted to verify what is needed for this.

My app is integrated with the unity appboy sdk and can receive push notifications, but neither the 'PushNotificationReceivedCallback' nor 'PushNotificationOpenedCallback' fire when the notification is received. I have an 'AppboyListener' game object in the main scene with the included 'AppboyListener.cs' as a component (standard setup based on the integration docs.) Clicking the notification DOES open the app as expected, just none of the callbacks fire.

As for deep links, is setting 'com_appboy_handle_push_deep_links_automatically' to 'true' in appboy.xml sufficient to handle deep links from a push notification? Currently if I set the 'on click' behavior of a push notification to deep link into the app (with url 'bpcompanion://battlelog') it will cause my app to crash. There is mention of updating a BroadcastReceiver to support deep links, but I wasn't sure how this should be added to work with the unity sdk.

Any help is much appreciated, thanks!

iOS push opened callback

Hi! I use appboy 1.2.1 version and I have a problem - iOSPushOpenedCallbackMethod doesn't call after opening a game from the background. My GO - doesn't DestroyOnLoad, it's named in config. How doesn't the method iOSPushOpenedCallbackMethodName work?

iOS - Issue with SDWebImage and FLAnimatedImage when building with CI

Hi.

In our pipeline we build our Unity projects through CI (Continuos Integration). In this scenario, we encounter an issue when testing our product on runtime regarding issues finding libraries SDWebImage and FLAnimatedImage.

We can resolve it doing a manual build and configuring in Xcode both libraries as embedded binaries but this manual process don't fix this issue when building with CI.

We found a solution using method AddFileToEmbedFrameworks from UnityEditor.iOS.Xcode.Extensions. I'm pushing a PR with an updated PostBuild.cs adding this process.

PR: #35

Rich notifications on iOS

Rich notifications aren't working for us on iOS, only the standard notification message displays. The same campaign displays correctly as a rich notification on Android, however.

Does iOS require additional config to allow rich notifications to display? We're on v1.11 of the Unity SDK.

Build error using Unity and Windows 10.

Hello,

I am currently attempting to implement Appboy in a Unity 5.2.4f1 project for Windows 10. I get stuck when trying to build the project in Visual Studio 2015. I am using the Appboy v1.6.0 sdk. This is the output when building in VS.

Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
1>------ Build started: Project: Assembly-CSharp-firstpass, Configuration: Debug ARM ------
1>  Assembly-CSharp-firstpass -> C:\Users\TicTocGarth\Projects\LetsTestThis\AppboyTest\UWP\Assembly-CSharp-firstpass\bin\ARM\Debug\Assembly-CSharp-firstpass.dll
2>------ Build started: Project: AppboyTest, Configuration: Debug ARM ------
2>  UnityInstallationDir "C:\Program Files\Unity 5.2.4f1\Editor".
2>  UnityWSAPlayerDir "C:\Program Files\Unity 5.2.4f1\Editor\Data\PlaybackEngines\metrosupport".
2>  UnityProjectDir "C:\Users\TicTocGarth\Projects\LetsTestThis\AppboyTest".
2>  Copying unprocessed assemblies...
2>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(263,5): Xaml Internal Error error WMC9999: Index not found. (Exception from HRESULT: 0x80131124)
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

I also receive many "reference rewrite" errors in Unity when creating the VS solution. I can remove these errors if I check the "Do Not Process" flag in Unity's import settings.

Reference rewriter: Error: method `System.Reflection.MethodInfo System.Type::GetMethod(System.String,System.Reflection.BindingFlags)` doesn't exist in target framework. It is referenced from Lex.Db.dll at System.Reflection.MethodInfo Lex.Db.TypeHelper::GetStaticMethod(System.Type,System.String).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:558)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:118)
UnityEditor.HostView:OnGUI()

This is on a blank Windows 10 Unity project with only the Appboy plugins added. I have a sample project and a video of the build process if those would help!

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.