<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>一阅阅读 - 分类 - 宋明的博客</title><link>https://apolla.cc/categories/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/</link><description>宋明的博客</description><generator>Hugo 0.170.0 &amp; FixIt v1.0.0-rc.5-mwimukpl</generator><language>zh-cn</language><lastBuildDate>Sat, 09 Mar 2024 23:21:58 +0800</lastBuildDate><atom:link href="https://apolla.cc/categories/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/index.xml" rel="self" type="application/rss+xml"/><item><title>iOS 电脑WiFi传输文件到iphone</title><link>https://apolla.cc/posts/reading/ios-%E7%94%B5%E8%84%91wifi%E4%BC%A0%E8%BE%93%E6%96%87%E4%BB%B6%E5%88%B0iphone/</link><pubDate>Sat, 09 Mar 2024 23:21:58 +0800</pubDate><guid>https://apolla.cc/posts/reading/ios-%E7%94%B5%E8%84%91wifi%E4%BC%A0%E8%BE%93%E6%96%87%E4%BB%B6%E5%88%B0iphone/</guid><category domain="https://apolla.cc/categories/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/">一阅阅读</category><description>&lt;p&gt;##1.前言&lt;/p&gt;&#10;&lt;p&gt;这个功能早已开发好，但是博客为什么今天才更新，说起来一把鼻涕一把泪，我的小说APP更新提审遭遇了各种悲剧性的问题，关键词违规，内容被认为包含色情等待，就是那部 《我的绝色房东》审核人员打开的正好是这本，这半个月天天和审核人员勾心斗角，目前就剩下一个4.2.2 最低功能要求死活过不去，我明明是更新啊！！！&lt;/p&gt;</description></item><item><title>iOS 跳转App Store进行评分</title><link>https://apolla.cc/posts/reading/ios-%E8%B7%B3%E8%BD%ACapp-store%E8%BF%9B%E8%A1%8C%E8%AF%84%E5%88%86/</link><pubDate>Sat, 09 Mar 2024 23:21:58 +0800</pubDate><guid>https://apolla.cc/posts/reading/ios-%E8%B7%B3%E8%BD%ACapp-store%E8%BF%9B%E8%A1%8C%E8%AF%84%E5%88%86/</guid><category domain="https://apolla.cc/categories/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/">一阅阅读</category><description>&lt;h2 class="heading-element" id="1前言"&gt;&lt;span&gt;1.前言&lt;/span&gt;&#10; &lt;a href="#1%e5%89%8d%e8%a8%80" class="heading-mark"&gt;&lt;svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"&gt;&lt;path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&#10;&lt;/h2&gt;&lt;p&gt;遭遇4.2.2把我逼得没办法了，啥功能都怼上去了&lt;/p&gt;&#10;&lt;h2 class="heading-element" id="2实现"&gt;&lt;span&gt;2.实现&lt;/span&gt;&#10; &lt;a href="#2%e5%ae%9e%e7%8e%b0" class="heading-mark"&gt;&lt;svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"&gt;&lt;path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&#10;&lt;/h2&gt;&lt;p&gt;在 viewdidload 或者 viewwillappear 中判断是否需要显示评分，因为SKStoreReviewController 一年最多三次，所以我就无耻点相隔四个月调用一次&lt;/p&gt;</description></item><item><title>iOS 针对txt文档进行解码</title><link>https://apolla.cc/posts/reading/ios-%E9%92%88%E5%AF%B9txt%E6%96%87%E6%A1%A3%E8%BF%9B%E8%A1%8C%E8%A7%A3%E7%A0%81/</link><pubDate>Sat, 09 Mar 2024 23:21:58 +0800</pubDate><guid>https://apolla.cc/posts/reading/ios-%E9%92%88%E5%AF%B9txt%E6%96%87%E6%A1%A3%E8%BF%9B%E8%A1%8C%E8%A7%A3%E7%A0%81/</guid><category domain="https://apolla.cc/categories/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/">一阅阅读</category><description>&lt;p&gt;如我上一篇文章记录，我加了打开其他APPtxt文件的小功能，紧接着碰到新问题了，我在测试过程中发现用户上传的TXT编码格式很多不单单是utf-8和gb2312,针对TXT文档进行解码，我一共经历过两个阶段，如下&lt;/p&gt;&#10;&lt;p&gt;##1.通过循环 解码不为空就返回字符串&lt;/p&gt;</description></item><item><title>iOS基于AVFoundation实现朗读文字</title><link>https://apolla.cc/posts/reading/ios%E5%9F%BA%E4%BA%8Eavfoundation%E5%AE%9E%E7%8E%B0%E6%9C%97%E8%AF%BB%E6%96%87%E5%AD%97/</link><pubDate>Sat, 09 Mar 2024 23:21:58 +0800</pubDate><guid>https://apolla.cc/posts/reading/ios%E5%9F%BA%E4%BA%8Eavfoundation%E5%AE%9E%E7%8E%B0%E6%9C%97%E8%AF%BB%E6%96%87%E5%AD%97/</guid><category domain="https://apolla.cc/categories/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/">一阅阅读</category><description>&lt;p&gt;##1.心理建设&lt;/p&gt;&#10;&lt;p&gt;众所周知AVFoundation的朗读是个智障语气，所以想不花钱就只能忍着。&lt;/p&gt;&#10;&lt;p&gt;##2.speechManager&lt;/p&gt;&#10;&lt;pre&gt;&lt;code&gt;@import AVFoundation;&#10;&#10;@protocol TJSpeechManagerDelegate &amp;lt;NSObject&amp;gt;&#10;@optional&#10;- (void)didStartSpeechUtterance:(AVSpeechUtterance*)utterance;&#10;- (void)didFinishSpeechUtterance:(AVSpeechUtterance*)utterance;&#10;- (void)didPauseSpeechUtterance:(AVSpeechUtterance*)utterance;&#10;- (void)didCancelSpeechUtterance:(AVSpeechUtterance*)utterance;&#10;- (void)willSpeakRangeOfSpeechString:(NSRange)characterRange utterance:(AVSpeechUtterance *)utterance;&#10;&#10;- (void)needRepeatSpeech:(AVSpeechUtterance *)utterance;&#10;@end&#10;&#10;@interface TJSpeechManager : NSObject &amp;lt;AVSpeechSynthesizerDelegate&amp;gt;&#10;&#10;&#10;@property (nonatomic, strong) AVSpeechSynthesizer *avSpeech;&#10;@property (nonatomic, strong) AVSpeechUtterance *speechUtt;&#10;&#10;@property (nonatomic, assign) id &amp;lt;TJSpeechManagerDelegate&amp;gt; delegate;&#10;&#10;&#10;- (void)setSpeechContent:(NSString *)content;&#10;&#10;&#10;- (void)pauseSpeech;&#10;&#10;&#10;- (void)beginSpeech;&#10;&#10;- (void)continueSpeech;&#10;&#10;- (void)endSpeech;&#10;&#10;@end&#10;&#10;&#10;#import &amp;#34;TJSpeechManager.h&amp;#34;&#10;&#10;@implementation TJSpeechManager&#10;&#10;- (void)setSpeechContent:(NSString *)content {&#10; AVSpeechUtterance *speechUtt = [AVSpeechUtterance speechUtteranceWithString:content];&#10; speechUtt.rate = 0.5;&#10; speechUtt.pitchMultiplier = 1;&#10; &#10; //设置音量,[0-1] 默认 = 1&#10; speechUtt.volume = 1;&#10;&#10; //读一段前的停顿时间&#10; speechUtt.preUtteranceDelay = 1;&#10; //读完一段后的停顿时间&#10; speechUtt.postUtteranceDelay = 1;&#10; AVSpeechSynthesisVoice *voice = [AVSpeechSynthesisVoice voiceWithLanguage:@&amp;#34;zh-CN&amp;#34;];&#10; speechUtt.voice = voice;&#10; self.speechUtt = speechUtt;&#10;}&#10;&#10;- (void)beginSpeech {&#10; //这里需要注意一下，一个avspeech对象只能播放一次，同一个对象中途不能重新播放。&#10; AVSpeechSynthesizer *avSpeech = [[AVSpeechSynthesizer alloc] init];&#10; avSpeech.delegate = self;&#10; [avSpeech speakUtterance:self.speechUtt];&#10; self.avSpeech = avSpeech;&#10;}&#10;&#10;- (void)pauseSpeech {&#10; [self.avSpeech pauseSpeakingAtBoundary:AVSpeechBoundaryImmediate];&#10;}&#10;&#10;- (void)continueSpeech {&#10; if(self.avSpeech.isPaused) {&#10; [self.avSpeech continueSpeaking];&#10; [NSThread sleepForTimeInterval:0.25f];&#10; }&#10;}&#10;&#10;- (void)endSpeech {&#10; if(self.avSpeech.isSpeaking) {&#10; [self.avSpeech stopSpeakingAtBoundary:AVSpeechBoundaryImmediate];&#10; [NSThread sleepForTimeInterval:0.25f];&#10; }&#10;}&#10;&#10;//代理主要是返回给controller，用来和UI交互&#10;#pragma mark - AVSpeechSynthesizerDelegate;&#10;- (void)speechSynthesizer:(AVSpeechSynthesizer*)synthesizer didStartSpeechUtterance:(AVSpeechUtterance*)utterance{&#10; NSLog(@&amp;#34;---开始播放&amp;#34;);&#10; if(self.delegate &amp;amp;&amp;amp; [self.delegate respondsToSelector:@selector(didStartSpeechUtterance:)]) {&#10; [self.delegate didStartSpeechUtterance:utterance];&#10; }&#10;}&#10;&#10;- (void)speechSynthesizer:(AVSpeechSynthesizer*)synthesizer didFinishSpeechUtterance:(AVSpeechUtterance*)utterance{&#10; NSLog(@&amp;#34;---完成播放&amp;#34;);&#10; if(self.delegate &amp;amp;&amp;amp; [self.delegate respondsToSelector:@selector(didFinishSpeechUtterance:)]) {&#10; [self.delegate didFinishSpeechUtterance:utterance];&#10; }&#10;}&#10;&#10;- (void)speechSynthesizer:(AVSpeechSynthesizer*)synthesizer didPauseSpeechUtterance:(AVSpeechUtterance*)utterance{&#10; NSLog(@&amp;#34;---播放中止&amp;#34;);&#10; if(self.delegate &amp;amp;&amp;amp; [self.delegate respondsToSelector:@selector(didPauseSpeechUtterance:)]) {&#10; [self.delegate didPauseSpeechUtterance:utterance];&#10; }&#10;}&#10;&#10;- (void)speechSynthesizer:(AVSpeechSynthesizer*)synthesizer didContinueSpeechUtterance:(AVSpeechUtterance*)utterance{&#10; NSLog(@&amp;#34;---恢复播放&amp;#34;);&#10; &#10;}&#10;&#10;- (void)speechSynthesizer:(AVSpeechSynthesizer*)synthesizer didCancelSpeechUtterance:(AVSpeechUtterance*)utterance{&#10; NSLog(@&amp;#34;---播放取消&amp;#34;);&#10; if(self.delegate &amp;amp;&amp;amp; [self.delegate respondsToSelector:@selector(didCancelSpeechUtterance:)]) {&#10; [self.delegate didCancelSpeechUtterance:utterance];&#10; }&#10;}&#10;&#10;- (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer willSpeakRangeOfSpeechString:(NSRange)characterRange utterance:(AVSpeechUtterance *)utterance {&#10; if(self.delegate &amp;amp;&amp;amp; [self.delegate respondsToSelector:@selector(willSpeakRangeOfSpeechString:utterance:)]) {&#10; [self.delegate willSpeakRangeOfSpeechString:characterRange utterance:utterance];&#10; }&#10;}&#10;&#10;@end&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;##3.使用范例&lt;/p&gt;</description></item><item><title>ios解析txt电子书</title><link>https://apolla.cc/posts/reading/ios%E8%A7%A3%E6%9E%90txt%E7%94%B5%E5%AD%90%E4%B9%A6/</link><pubDate>Sat, 09 Mar 2024 23:21:58 +0800</pubDate><guid>https://apolla.cc/posts/reading/ios%E8%A7%A3%E6%9E%90txt%E7%94%B5%E5%AD%90%E4%B9%A6/</guid><category domain="https://apolla.cc/categories/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/">一阅阅读</category><description>&lt;p&gt;昨天上线新版本因为Other-Other账号审核被拒了，估计要等待几天了，正好抽时间把最近写的东西整理一下。&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;附上APP地址： &lt;a href="https://apps.apple.com/cn/app/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/id1573880428" target="_blank" rel="external nofollow noopener noreferrer"&gt;一阅阅读&lt;i class="fa-solid fa-external-link-alt fa-xs ms-1 text-secondary" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;有想看小说的小伙伴可以试下 支持换源 支持自定义书源&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>iOS利用多线程进行网络请求</title><link>https://apolla.cc/posts/reading/ios%E5%88%A9%E7%94%A8%E5%A4%9A%E7%BA%BF%E7%A8%8B%E8%BF%9B%E8%A1%8C%E7%BD%91%E7%BB%9C%E8%AF%B7%E6%B1%82/</link><pubDate>Sat, 09 Mar 2024 23:21:58 +0800</pubDate><guid>https://apolla.cc/posts/reading/ios%E5%88%A9%E7%94%A8%E5%A4%9A%E7%BA%BF%E7%A8%8B%E8%BF%9B%E8%A1%8C%E7%BD%91%E7%BB%9C%E8%AF%B7%E6%B1%82/</guid><category domain="https://apolla.cc/categories/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/">一阅阅读</category><description>&lt;h2 class="heading-element" id="1前言"&gt;&lt;span&gt;1.前言&lt;/span&gt;&#10; &lt;a href="#1%e5%89%8d%e8%a8%80" class="heading-mark"&gt;&lt;svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"&gt;&lt;path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&#10;&lt;/h2&gt;&lt;p&gt;这两天忙着对付Other-Other的问题，今天才抽空给APP新增了一个离线缓存的功能，由于我的APP是对书源进行转码格式化阅读，所以缓存这里是个很头疼的问题，稍不慎就会503.目前的方案就是动态切换UA和利用多线程 一章一章下 收到失败就等待一会再继续，目前测试没什么问题。&lt;/p&gt;</description></item><item><title>隐私政策</title><link>https://apolla.cc/posts/reading/%E9%9A%90%E7%A7%81%E6%94%BF%E7%AD%96/</link><pubDate>Sat, 09 Mar 2024 23:21:58 +0800</pubDate><guid>https://apolla.cc/posts/reading/%E9%9A%90%E7%A7%81%E6%94%BF%E7%AD%96/</guid><category domain="https://apolla.cc/categories/%E4%B8%80%E9%98%85%E9%98%85%E8%AF%BB/">一阅阅读</category><description>&lt;p&gt;本应用尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更有个性化的服务，本应用会按照本隐私权政策的规定使用和披露您的个人信息。但本应用将以高度的勤勉、审慎义务对待这些信息。除本隐私权政策另有规定外，在未征得您事先许可的情况下，本应用不会将这些信息对外披露或向第三方提供。本应用会不时更新本隐私权政策。 您在同意本应用服务使用协议之时，即视为您已经同意本隐私权政策全部内容。本隐私权政策属于本应用服务使用协议不可分割的一部分。&lt;/p&gt;</description></item></channel></rss>