Skip to content

Commit

Permalink
official repo sync
Browse files Browse the repository at this point in the history
  • Loading branch information
SalavatR committed Aug 13, 2023
1 parent 02a99cd commit 6afa061
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
5 changes: 3 additions & 2 deletions extension-appsflyer/src/AppsFlyerAttribution.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#if defined(DM_PLATFORM_IOS)
#import <Foundation/Foundation.h>
#import "AppsFlyerAttribution.h"

Expand Down Expand Up @@ -76,4 +76,5 @@ - (void) receiveBridgeReadyNotification:(NSNotification *) notification
self.restorationHandler = nil;
}
}
@end
@end
#endif // platform
5 changes: 4 additions & 1 deletion extension-appsflyer/src/AppsflyerAppDelegate.mm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if defined(DM_PLATFORM_IOS)
#import "AppsflyerAppDelegate.h"
#import <AppsFlyerLib/AppsFlyerLib.h>
#import "AppsFlyerAttribution.h"
Expand Down Expand Up @@ -27,4 +28,6 @@ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
return YES;
}

@end
@end

#endif // platform
3 changes: 0 additions & 3 deletions extension-appsflyer/src/appsflyer_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ void Initialize_Ext()
g_appsflyer.m_AppsflyerJNI = env->NewGlobalRef(env->NewObject(cls, jni_constructor, threadAttacher.GetActivity()->clazz));
}

void Finalize_Ext(){
}

void InitializeSDK(const char* key, const char* appleAppID)
{
dmAndroid::ThreadAttacher threadAttacher;
Expand Down
6 changes: 1 addition & 5 deletions extension-appsflyer/src/appsflyer_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,18 @@ static void InvokeCallback(MessageId type, const char* json)
dmLogError("Appsflyer callback is invalid. Set new callback using `appsflyer.set_callback()` function.");
return;
}

lua_State* L = dmScript::GetCallbackLuaContext(m_luaCallback);
int top = lua_gettop(L);

if (!dmScript::SetupCallback(m_luaCallback))
{
return;
}

lua_pushnumber(L, type);
dmScript::JsonToLua(L, json, strlen(json));
dmScript::JsonToLua(L, json, strlen(json)); // throws lua error if it fails

int ret = dmScript::PCall(L, 3, 0);
(void)ret;
dmScript::TeardownCallback(m_luaCallback);

assert(top == lua_gettop(L));
}

Expand Down

0 comments on commit 6afa061

Please sign in to comment.