Commit a3fd2ea
Make Util.log autoclosure-based and add setUp lifecycle logs
Util.log:
- Switch the message parameter to @autoclosure so the interpolated string
is only built when DEBUG is set. Eliminates allocation/format cost in
release builds where the print() is compiled out.
- Bracket the prefix as "[UnityAdapter] ..." for consistency with other
third-party adapter logs (AppLovin, AdMob, etc.).
UnityAdapter.setUp:
- Log when initialization starts (gameId, testMode), when it succeeds,
when the SDK reports a failure, and when setUp aborts before reaching
the SDK (e.g. missing gameId in server config). Gives integrators
enough breadcrumbs from the adapter alone to diagnose init issues
without having to attach to the SDK's internal logger.
Note: For the logs to surface in pod consumers, the host app's Podfile
must propagate SWIFT_ACTIVE_COMPILATION_CONDITIONS=DEBUG into pod
targets — CocoaPods does not do this by default.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 159886c commit a3fd2ea
2 files changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
| 58 | + | |
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments