-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1221 lines (848 loc) · 43.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
<link rel="mask-icon" href="/images/logo.svg" color="#222">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.2/css/all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css">
<script class="hexo-configurations">
var NexT = window.NexT || {};
var CONFIG = {"hostname":"hanpanpan200.github.io","root":"/","images":"/images","scheme":"Pisces","version":"8.2.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false,"dimmer":false},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果:${query}","hits_time":"找到 ${hits} 个搜索结果(用时 ${time} 毫秒)","hits":"找到 ${hits} 个搜索结果"}};
</script>
<meta name="description" content="思考,总结,成长,分享,改变">
<meta property="og:type" content="website">
<meta property="og:title" content="成长自习室">
<meta property="og:url" content="https://hanpanpan200.github.io/index.html">
<meta property="og:site_name" content="成长自习室">
<meta property="og:description" content="思考,总结,成长,分享,改变">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="Grace Han">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="https://hanpanpan200.github.io/">
<script class="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: "",
isHome : true,
isPost : false,
lang : 'zh-CN'
};
</script>
<title>成长自习室</title>
<script async src="https://www.googletagmanager.com/gtag/js?id=268383104"></script>
<script>
if (CONFIG.hostname === location.hostname) {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '268383104');
}
</script>
<noscript>
<style>
body { margin-top: 2rem; }
.use-motion .menu-item,
.use-motion .sidebar,
.use-motion .post-block,
.use-motion .pagination,
.use-motion .comments,
.use-motion .post-header,
.use-motion .post-body,
.use-motion .collection-header {
visibility: visible;
}
.use-motion .header,
.use-motion .site-brand-container .toggle,
.use-motion .footer { opacity: initial; }
.use-motion .site-title,
.use-motion .site-subtitle,
.use-motion .custom-logo-image {
opacity: initial;
top: initial;
}
.use-motion .logo-line {
transform: scaleX(1);
}
.search-pop-overlay, .sidebar-nav { display: none; }
.sidebar-panel { display: block; }
</style>
</noscript>
</head>
<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
<div class="headband"></div>
<main class="main">
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="切换导航栏" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
</div>
<div class="site-meta">
<a href="/" class="brand" rel="start">
<i class="logo-line"></i>
<h1 class="site-title">成长自习室</h1>
<i class="logo-line"></i>
</a>
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
</div>
</div>
</div>
<nav class="site-nav">
<ul class="main-menu menu">
<li class="menu-item menu-item-home"><a href="/" rel="section"><i class="home fa-fw"></i>首页</a></li>
<li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="user fa-fw"></i>关于</a></li>
<li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="tags fa-fw"></i>标签</a></li>
<li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="th fa-fw"></i>分类</a></li>
<li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="archive fa-fw"></i>归档</a></li>
<li class="menu-item menu-item-sitemap"><a href="/sitemap.xml" rel="section"><i class="sitemap fa-fw"></i>站点地图</a></li>
</ul>
</nav>
</div>
<div class="toggle sidebar-toggle" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
<aside class="sidebar">
<div class="sidebar-inner sidebar-overview-active">
<ul class="sidebar-nav">
<li class="sidebar-nav-toc">
文章目录
</li>
<li class="sidebar-nav-overview">
站点概览
</li>
</ul>
<div class="sidebar-panel-container">
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image" alt="Grace Han"
src="/images/avatar.jpeg">
<p class="site-author-name" itemprop="name">Grace Han</p>
<div class="site-description" itemprop="description">思考,总结,成长,分享,改变</div>
</div>
<div class="site-state-wrap site-overview-item animated">
<nav class="site-state">
<div class="site-state-item site-state-posts">
<a href="/archives/">
<span class="site-state-item-count">12</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<span class="site-state-item-count">7</span>
<span class="site-state-item-name">分类</span>
</div>
<div class="site-state-item site-state-tags">
<span class="site-state-item-count">6</span>
<span class="site-state-item-name">标签</span>
</div>
</nav>
</div>
<div class="links-of-blogroll site-overview-item animated">
<div class="links-of-blogroll-title"><i class="fa fa-globe fa-fw"></i>
Links
</div>
<ul class="links-of-blogroll-list">
<li class="links-of-blogroll-item">
<a href="https://codinglife.tech/" title="https://codinglife.tech/" rel="noopener" target="_blank">Max Peng</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</aside>
<div class="sidebar-dimmer"></div>
</header>
<div class="back-to-top" role="button">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
<a href="https://github.com/hanpanpan200" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>
<noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>
<div class="main-inner index posts-expand">
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://hanpanpan200.github.io/2019/10/14/setup-multiple-git-accounts-by-ssh-config/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpeg">
<meta itemprop="name" content="Grace Han">
<meta itemprop="description" content="思考,总结,成长,分享,改变">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="成长自习室">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2019/10/14/setup-multiple-git-accounts-by-ssh-config/" class="post-title-link" itemprop="url">通过 ssh config 配置 Git 多账户 SSH 登录</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2019-10-14 16:22:46" itemprop="dateCreated datePublished" datetime="2019-10-14T16:22:46+08:00">2019-10-14</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2021-04-09 18:05:04" itemprop="dateModified" datetime="2021-04-09T18:05:04+08:00">2021-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/Git/" itemprop="url" rel="index"><span itemprop="name">Git</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>当我们使用 git 时,常用的授权通常有两种方式 HTTPS 和 SSH。当选用 HTTPS 时,每次代码的增删改查都需要输入一串密码进行身份验证,影响代码提交效率,因此大部分情况下我们会使用 SSH 免密登录。那么,在使用 SSH 免密登录过程中,你有遇到过什么问题吗?</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2019/10/14/setup-multiple-git-accounts-by-ssh-config/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://hanpanpan200.github.io/2019/02/28/set-env-via-xcconfig-and-scheme/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpeg">
<meta itemprop="name" content="Grace Han">
<meta itemprop="description" content="思考,总结,成长,分享,改变">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="成长自习室">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2019/02/28/set-env-via-xcconfig-and-scheme/" class="post-title-link" itemprop="url">用 Xcode Configuration 和 Scheme 配置项目环境</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2019-02-28 14:49:33" itemprop="dateCreated datePublished" datetime="2019-02-28T14:49:33+08:00">2019-02-28</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2021-04-09 18:05:04" itemprop="dateModified" datetime="2021-04-09T18:05:04+08:00">2021-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/iOS/" itemprop="url" rel="index"><span itemprop="name">iOS</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<img src="/images/set-env-via-xcconfig-and-scheme/logo.svg" alt="Landing" />
<p>想象一个场景,我们正在开发一款支付系统,这个支付系统同时支持有Web版和原生的iOS APP版本。<br>这个支付系统有三个环境:</p>
<ul>
<li>dev: 调用支付的开发环境接口,并不会真的扣钱。</li>
<li>qa: 调用支付的测试环境接口,假的测试账户中的余额会发生变化。</li>
<li>production: 调用产品环境中的支付接口,账户余额和钱会真实发生变化。</li>
</ul>
<p>对于 Web 版的系统,我可以在浏览器中打开三个窗口,然后依次输入不同环境下的域名: <code>www.dev.pay-example.com</code>,<code>www.qa.pay-example.com</code>,<code>www.prod.pay-example.com</code> 来分别进行测试。</p>
<p>对于 iOS APP 呢?我们想要的其实是类似的,打开一台手机,我们可以同时安装三个APP:<code>PayExampleDev</code>,<code>PayExampleQA</code>,<code>PayExample</code> 然后可以切换APP来使用它们。</p>
<p>那么怎样通过一个 iOS 工程打包出三个不同的 APP 呢?方法很多,本文我们就来介绍通过 <code>Xcode Configuration</code> 和 <code>Scheme</code> 的配置方式来实现。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2019/02/28/set-env-via-xcconfig-and-scheme/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://hanpanpan200.github.io/2017/11/21/pushing-notification-in-RN-android/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpeg">
<meta itemprop="name" content="Grace Han">
<meta itemprop="description" content="思考,总结,成长,分享,改变">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="成长自习室">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2017/11/21/pushing-notification-in-RN-android/" class="post-title-link" itemprop="url">基于 react-native-fcm 的消息推送 - Android(二)</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2017-11-21 21:14:21" itemprop="dateCreated datePublished" datetime="2017-11-21T21:14:21+08:00">2017-11-21</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2021-04-09 18:05:04" itemprop="dateModified" datetime="2021-04-09T18:05:04+08:00">2021-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/ReactNative/" itemprop="url" rel="index"><span itemprop="name">ReactNative</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<img src="/images/pushing-notification-in-RN/android-landing.jpeg" alt="landing" />
<p>在上篇文章中,我们提到了 <a href="http://hanpanpan200.github.io/2017/11/20/pushing-notification-in-RN-iOS">怎样在 iOS 中集成 react-natiave-fcm</a>,今天我们主要讨论 Android 中的配置和注意事项。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2017/11/21/pushing-notification-in-RN-android/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://hanpanpan200.github.io/2017/11/20/pushing-notification-in-RN-iOS/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpeg">
<meta itemprop="name" content="Grace Han">
<meta itemprop="description" content="思考,总结,成长,分享,改变">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="成长自习室">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2017/11/20/pushing-notification-in-RN-iOS/" class="post-title-link" itemprop="url">基于 react-native-fcm 的消息推送 - iOS(一)</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2017-11-20 21:14:21" itemprop="dateCreated datePublished" datetime="2017-11-20T21:14:21+08:00">2017-11-20</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2021-04-09 18:05:04" itemprop="dateModified" datetime="2021-04-09T18:05:04+08:00">2021-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/ReactNative/" itemprop="url" rel="index"><span itemprop="name">ReactNative</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<img src="/images/pushing-notification-in-RN/landing.jpg" alt="landing" />
<p>消息推送在 App 中很常用,那么在 React Native 中怎样来集成消息推送呢?Google 推出的 <a target="_blank" rel="noopener" href="https://firebase.google.com/docs/cloud-messaging/?hl=zh-cn">Firebase Cloud Messaging</a> 是用来做消息推送的,不过在中国国内使用时需要安装 Google Service 。</p>
<p>阅读本文时,你需要知道以下几个概念:</p>
<ol>
<li><a target="_blank" rel="noopener" href="https://firebase.google.com/docs/cloud-messaging/?hl=zh-cn">Firebase Cloud Messaging</a>:Firebase 的消息推送服务,是 <a target="_blank" rel="noopener" href="https://developers.google.com/cloud-messaging/">GCM</a> 的 升级版,是 Android 消息推送的新方案,并且其在背后集成了 Apple 的 APNs 服务, 因此开发者可以使用它提供的接口向 iOS 和 Android 设备推送消息。</li>
<li><a target="_blank" rel="noopener" href="https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html#//apple_ref/doc/uid/TP40008194-CH8-SW1">APNs</a>: Apple 的 APNs 服务是消息推送功能的核心,开发者可以使用它提供的一系列接口向 iOS App 推送消息。</li>
</ol>
<p><a target="_blank" rel="noopener" href="https://github.com/evollu/react-native-fcm">react-native-fcm</a> 是 <a target="_blank" rel="noopener" href="https://firebase.google.com/docs/cloud-messaging/?hl=zh-cn">Firebase Cloud Messaging</a> 的 React Native 插件,将其集成到 React Native 项目中时,需要完成 iOS 和 Android 项目中的消息推送配置后,才可成功向对应的平台成功推送消息。本文属于 <a href="http://hanpanpan200.github.io/tags/PushNotification/">基于 react-native-fcm 的消息推送</a> 系列文档的第一篇,主要介绍基于 react-native-fcm 的 iOS 消息推送配置。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2017/11/20/pushing-notification-in-RN-iOS/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://hanpanpan200.github.io/2017/07/16/create-custom-native-modules-in-RN/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpeg">
<meta itemprop="name" content="Grace Han">
<meta itemprop="description" content="思考,总结,成长,分享,改变">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="成长自习室">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2017/07/16/create-custom-native-modules-in-RN/" class="post-title-link" itemprop="url">自定义 React Native 模块</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2017-07-16 16:42:17" itemprop="dateCreated datePublished" datetime="2017-07-16T16:42:17+08:00">2017-07-16</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2021-04-09 18:05:04" itemprop="dateModified" datetime="2021-04-09T18:05:04+08:00">2021-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/ReactNative/" itemprop="url" rel="index"><span itemprop="name">ReactNative</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<img src="/images/create-custom-native-modules-in-RN/landing.jpeg" alt="Landing" />
<p>虽然 React Native 目前已经提供了很多常用的组件,但是在实际项目中,我们总会发现需求往往是这些常用组件所不能够满足的。比如说:图像识别模块、指纹识别模块等。这种模块大部分已经有了比较成熟的SDK,我们此时需要做的就是将已有的轮子,封装到 React Native 中来使用。</p>
<p>经过一些尝试和探索后,我终于找到了一个比较容易上手的封装 React Native 插件方案,希望能得到更多的反馈来改善。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2017/07/16/create-custom-native-modules-in-RN/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://hanpanpan200.github.io/2017/07/12/icons-in-rn/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpeg">
<meta itemprop="name" content="Grace Han">
<meta itemprop="description" content="思考,总结,成长,分享,改变">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="成长自习室">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2017/07/12/icons-in-rn/" class="post-title-link" itemprop="url">Using Icons in React Native</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2017-07-12 16:01:38" itemprop="dateCreated datePublished" datetime="2017-07-12T16:01:38+08:00">2017-07-12</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2021-04-09 18:05:04" itemprop="dateModified" datetime="2021-04-09T18:05:04+08:00">2021-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/ReactNative/" itemprop="url" rel="index"><span itemprop="name">ReactNative</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<img src="/images/icons-in-rn/landing.jpg" alt="Landing" />
<p>在 React Native 开发中,我们常常会有下面这样的需求:</p>
<ol>
<li>需要在 App 中显示图标</li>
<li>图标需要兼容不同设备的分辨率(包括 Android 和 iOS 两个平台)</li>
</ol>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2017/07/12/icons-in-rn/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://hanpanpan200.github.io/2017/06/08/dispatch-in-depth/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpeg">
<meta itemprop="name" content="Grace Han">
<meta itemprop="description" content="思考,总结,成长,分享,改变">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="成长自习室">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2017/06/08/dispatch-in-depth/" class="post-title-link" itemprop="url">Dispatch in Depth</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2017-06-08 15:30:33" itemprop="dateCreated datePublished" datetime="2017-06-08T15:30:33+08:00">2017-06-08</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2021-04-09 18:05:04" itemprop="dateModified" datetime="2021-04-09T18:05:04+08:00">2021-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/Redux/" itemprop="url" rel="index"><span itemprop="name">Redux</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<img src="/images/redux-dispatch/landing.jpeg" alt="Landing" />
<p><a target="_blank" rel="noopener" href="http://cn.redux.js.org/index.html">Redux</a> 是 JavaScript 状态容器,提供可预测化的状态管理。它支持 React、Angular、Ember、jQuery 甚至纯 JavaScript。</p>
<h2 id="知识准备"><a href="#知识准备" class="headerlink" title="知识准备"></a>知识准备</h2><p>阅读本文时,你需要提前了解一下以下内容:</p>
<ul>
<li><a target="_blank" rel="noopener" href="http://cn.redux.js.org/index.html">redux</a></li>
<li><a target="_blank" rel="noopener" href="https://github.com/reactjs/react-redux">react-redux</a></li>
<li><a target="_blank" rel="noopener" href="https://github.com/gaearon/redux-thunk">redux-thunk</a></li>
</ul>
<p>这三个库中都提供了 dispatch 方法。<br>本文以这三种不同的 dispatch 为突破口来了解 redux, react-redux 和 redux-thunk 的工作原理。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2017/06/08/dispatch-in-depth/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://hanpanpan200.github.io/2017/02/08/react-native-android-share/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpeg">
<meta itemprop="name" content="Grace Han">
<meta itemprop="description" content="思考,总结,成长,分享,改变">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="成长自习室">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2017/02/08/react-native-android-share/" class="post-title-link" itemprop="url">React Native 在 Android 中下载文件并分享</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2017-02-08 13:28:10" itemprop="dateCreated datePublished" datetime="2017-02-08T13:28:10+08:00">2017-02-08</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2021-04-09 18:05:04" itemprop="dateModified" datetime="2021-04-09T18:05:04+08:00">2021-04-09</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/ReactNative/" itemprop="url" rel="index"><span itemprop="name">ReactNative</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<img src="/images/react-native-android-share/landing.jpg" alt="Landing" />
<p>有这样一个应用场景:</p>
<p>在一个 Android 的 App 中,我们将一个文件下载到 App 中以后,通过点击一个分享按钮,将这个文件分享到本机已经安装了的其他 App 中。</p>
<p>这个场景涉及到<code>下载</code>和<code>分享</code>两个步骤。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2017/02/08/react-native-android-share/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
<link itemprop="mainEntityOfPage" href="https://hanpanpan200.github.io/2017/01/23/2016-summary/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpeg">
<meta itemprop="name" content="Grace Han">
<meta itemprop="description" content="思考,总结,成长,分享,改变">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="成长自习室">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2017/01/23/2016-summary/" class="post-title-link" itemprop="url">2016年终总结</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">