防止人们分享我的自定义 Apple Watch .watchface

问题描述 投票:0回答:1

我很想知道是否有办法阻止人们共享我的自定义 .watchface 文件。

我知道分享它们很容易,我想知道是否有任何方法可以阻止它(例如授权我的创作或任何我想不到的方式)。

谢谢!

watchkit watch watchos watchface
1个回答
0
投票

很久以前我曾经是一名 iOS 开发者:) 但这是我能想到的流程:

override func willActivate() {
   // here or any other initialization method

   1. get device.udid;
   2. send request to your server to check if device.udid is an owner for the watchFace id.
   3. if device.udid is empty, set it for WatchFace id. It is the first usage.
   4. if device.udid for WatchFace id is not null, then check if if is the same.
      4.1 success if equals;
      4.2 fail if differs. It means WatchFace was shared

        // This method is called when watch view controller is about to be visible to user
   super.willActivate()
}
© www.soinside.com 2019 - 2024. All rights reserved.