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 6afa061 commit 1fc792e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extension-appsflyer/src/AppsFlyerAttribution.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ - (void) receiveBridgeReadyNotification:(NSNotification *) notification
}
}
@end
#endif // platform
#endif // platform
3 changes: 2 additions & 1 deletion extension-appsflyer/src/AppsflyerAppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url

@end

#endif // platform
#endif // platform

5 changes: 4 additions & 1 deletion extension-appsflyer/src/appsflyer_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ 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;
}

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 1fc792e

Please sign in to comment.