<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>IOS on 知识铺的博客</title>
    <link>https://index.zshipu.com/geek002/tags/iOS/</link>
    <description>Recent content in IOS on 知识铺的博客</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <lastBuildDate>Sat, 12 Oct 2024 05:47:33 +0000</lastBuildDate>
    <atom:link href="https://index.zshipu.com/geek002/tags/iOS/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>实现真正无侵入的iOS埋点采集SDK</title>
      <link>https://index.zshipu.com/geek002/post/202410/%E5%AE%9E%E7%8E%B0%E7%9C%9F%E6%AD%A3%E6%97%A0%E4%BE%B5%E5%85%A5%E7%9A%84iOS%E5%9F%8B%E7%82%B9%E9%87%87%E9%9B%86SDK--%E7%9F%A5%E8%AF%86%E9%93%BA/</link>
      <pubDate>Sat, 12 Oct 2024 05:47:33 +0000</pubDate>
      <guid>https://index.zshipu.com/geek002/post/202410/%E5%AE%9E%E7%8E%B0%E7%9C%9F%E6%AD%A3%E6%97%A0%E4%BE%B5%E5%85%A5%E7%9A%84iOS%E5%9F%8B%E7%82%B9%E9%87%87%E9%9B%86SDK--%E7%9F%A5%E8%AF%86%E9%93%BA/</guid>
      <description>实现一个真正无侵入的埋点 SDK，关键实现： Hook UINavigationController 和 UITabBarController 以自动捕获页面切换事件。 利用 AppDelegate 生命周期钩子，自动监听应用的状态，统计停留时长等数据。 使用 runtime 动态注入机制，避免使用 swizzling。 以下是实现的完整代码示例，涵盖无侵入式的 SDK 逻辑： 1. SensorsAnalyticsManager.h 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #import &amp;lt;Foundation/Foundation.h&amp;gt; #import &amp;lt;UIKit/UIKit.h&amp;gt; @interface SensorsAnalyticsManager :</description>
    </item>
  </channel>
</rss>
