Compare commits
476
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d4f6dd0d8 | ||
|
|
62f5e5daf9 | ||
|
|
71eb7a6d40 | ||
|
|
a3f02e4963 | ||
|
|
1cdd622bba | ||
|
|
b927856e7c | ||
|
|
4d5ed70ba0 | ||
|
|
9c4e303f5a | ||
|
|
a3a2cf157e | ||
|
|
aa4058c8cf | ||
|
|
8861d009fd | ||
|
|
4c41e5d1a6 | ||
|
|
bdaa68f9ea | ||
|
|
84e4616f1b | ||
|
|
4d00551add | ||
|
|
76de60f1d8 | ||
|
|
a072bf93fe | ||
|
|
4c7aa5480d | ||
|
|
5fcf800e8d | ||
|
|
f350d311a5 | ||
|
|
284af5fd78 | ||
|
|
c683734884 | ||
|
|
d7d386d140 | ||
|
|
8ef58d6943 | ||
|
|
5ac71d74e2 | ||
|
|
0055eb5ef7 | ||
|
|
601b56300f | ||
|
|
b4e872ae02 | ||
|
|
b9401ecdf5 | ||
|
|
7034e13263 | ||
|
|
93265fd4fc | ||
|
|
104b7b6508 | ||
|
|
f40bf0b46c | ||
|
|
5e476b55f3 | ||
|
|
e14426badf | ||
|
|
8e84bfb095 | ||
|
|
079ff048f6 | ||
|
|
c614fdb0f5 | ||
|
|
3bc72354f6 | ||
|
|
009e7565f1 | ||
|
|
91e2da6a8d | ||
|
|
f65a08644b | ||
|
|
7cbcbddec0 | ||
|
|
d2dfdb00a4 | ||
|
|
e815722062 | ||
|
|
3d40e9858b | ||
|
|
cf791ff21f | ||
|
|
afd0197fca | ||
|
|
b55c0667d9 | ||
|
|
989d83f54b | ||
|
|
18b93ec4c7 | ||
|
|
6c61b6abb4 | ||
|
|
ae816b8691 | ||
|
|
7e97de70c9 | ||
|
|
1329d2aedc | ||
|
|
8ca65fa7d4 | ||
|
|
e6d8c87e1f | ||
|
|
a7bbb4e377 | ||
|
|
e6b32bc5ea | ||
|
|
4af5add03b | ||
|
|
fc69e0f30d | ||
|
|
b2a7dca18f | ||
|
|
debd8d9b89 | ||
|
|
4a5d8bbfb9 | ||
|
|
e6dac7c837 | ||
|
|
ce2f07a90f | ||
|
|
591be6154f | ||
|
|
798ab5623b | ||
|
|
7893bb6a49 | ||
|
|
b373a30e20 | ||
|
|
a6730637ac | ||
|
|
881c41e222 | ||
|
|
c79771acc8 | ||
|
|
d5397f950b | ||
|
|
ce6fb608fd | ||
|
|
69a9896863 | ||
|
|
3aa698966c | ||
|
|
b51459c095 | ||
|
|
fa437af86d | ||
|
|
fc4550a584 | ||
|
|
ea34869e4c | ||
|
|
90df4a535c | ||
|
|
1f25f97872 | ||
|
|
0c22b6fdb4 | ||
|
|
5dc8932a34 | ||
|
|
9a37bfb160 | ||
|
|
c31850080d | ||
|
|
1683ca96e9 | ||
|
|
32a42455d0 | ||
|
|
20d6923903 | ||
|
|
63dcc53c86 | ||
|
|
1cc34db4f0 | ||
|
|
a25ad22beb | ||
|
|
ad6d9614e2 | ||
|
|
c9ecfcde0a | ||
|
|
cc555a4a1a | ||
|
|
591bde1be4 | ||
|
|
cfc548d631 | ||
|
|
64444f6f1e | ||
|
|
885f8a6992 | ||
|
|
df4a39276b | ||
|
|
d4cb378674 | ||
|
|
92a8085382 | ||
|
|
b5ae3bde85 | ||
|
|
e8063322a6 | ||
|
|
304799e4b4 | ||
|
|
c5020884f9 | ||
|
|
617781c26d | ||
|
|
ac46c7787b | ||
|
|
934988faa6 | ||
|
|
97951e7e8e | ||
|
|
3d98b64a42 | ||
|
|
d3dfd54f54 | ||
|
|
2e15732f64 | ||
|
|
e71cce152f | ||
|
|
2bbebe980c | ||
|
|
6aab2a562f | ||
|
|
8263a87ccf | ||
|
|
98ce0fe64f | ||
|
|
64af3db34c | ||
|
|
7ce9b7ad4f | ||
|
|
1cd621429d | ||
|
|
a0357e2740 | ||
|
|
d5d9ee4aad | ||
|
|
1eb7d7e8fa | ||
|
|
6e88197004 | ||
|
|
b28621a172 | ||
|
|
68d1b66f4f | ||
|
|
51f91fb77f | ||
|
|
cf3ccd47a6 | ||
|
|
a9fa12039e | ||
|
|
58db6fccb0 | ||
|
|
dbfebf6487 | ||
|
|
c99c1dc0e5 | ||
|
|
c8e4899143 | ||
|
|
7ce9319d89 | ||
|
|
8aaebf0228 | ||
|
|
2497da8c6f | ||
|
|
667f21a2b9 | ||
|
|
8ed40c01a5 | ||
|
|
574aae5ec3 | ||
|
|
c4bec53dae | ||
|
|
45f5c5368a | ||
|
|
dd07578d1f | ||
|
|
40ae87821d | ||
|
|
dfa6b5a68e | ||
|
|
577dfccdf4 | ||
|
|
30e7393253 | ||
|
|
012e3b5f3c | ||
|
|
7b30f415cc | ||
|
|
35521a5214 | ||
|
|
ad1e8d03e4 | ||
|
|
ec118a54cc | ||
|
|
e4f0f5b78c | ||
|
|
172bdfff71 | ||
|
|
f414a4b78d | ||
|
|
cb1159a29a | ||
|
|
b7610b6a33 | ||
|
|
3056d833e7 | ||
|
|
d0aee12d4f | ||
|
|
888de4c4e1 | ||
|
|
e7ac3e41c6 | ||
|
|
4854cfd968 | ||
|
|
ee9e40ce44 | ||
|
|
f78543b173 | ||
|
|
1eef1e083d | ||
|
|
bb5215c306 | ||
|
|
2c47b4e585 | ||
|
|
4371eb7c39 | ||
|
|
e16a3d46b3 | ||
|
|
1a3996e73b | ||
|
|
c3006c69a6 | ||
|
|
523bcbb6e3 | ||
|
|
127ad155ba | ||
|
|
14d287afe3 | ||
|
|
6231977e70 | ||
|
|
758b3e804e | ||
|
|
67a6d8194d | ||
|
|
31b5a3df77 | ||
|
|
785cf9c73a | ||
|
|
d9aa319e2c | ||
|
|
141e7233ff | ||
|
|
9ff25e7c3a | ||
|
|
c9fe54ed29 | ||
|
|
bbaef6cf8e | ||
|
|
7df1432744 | ||
|
|
6442d85c9f | ||
|
|
f4ad2ea6c8 | ||
|
|
f7fdf3f987 | ||
|
|
b8833b74eb | ||
|
|
bc29d1e86c | ||
|
|
5ea9b8211e | ||
|
|
25f1881f85 | ||
|
|
d819d8e8a1 | ||
|
|
db022a0688 | ||
|
|
c88426e0b2 | ||
|
|
4818345ce2 | ||
|
|
70ee681757 | ||
|
|
9e03d5f665 | ||
|
|
1561f2631a | ||
|
|
c4ae5496e2 | ||
|
|
53692ffc7c | ||
|
|
3b0194d886 | ||
|
|
e75a1ff4fe | ||
|
|
042c8061f6 | ||
|
|
865570fa94 | ||
|
|
5e7f44b5ca | ||
|
|
821161363e | ||
|
|
e542da8c74 | ||
|
|
31fb795fd8 | ||
|
|
5cf7f99517 | ||
|
|
3f64463580 | ||
|
|
1a9f16a25a | ||
|
|
1084d87399 | ||
|
|
3147a6989c | ||
|
|
63502d5f30 | ||
|
|
06733812e6 | ||
|
|
f9f1c19b84 | ||
|
|
01b3a428d9 | ||
|
|
fd2f14ae2e | ||
|
|
bf6c9121f4 | ||
|
|
a67d1231de | ||
|
|
b69f5f4b5f | ||
|
|
8605b23135 | ||
|
|
7d823dd61d | ||
|
|
8152c3cebf | ||
|
|
7229b8a0a0 | ||
|
|
44a5630634 | ||
|
|
19a65050e8 | ||
|
|
04948a21f0 | ||
|
|
f7f4430be9 | ||
|
|
e77f3ed44a | ||
|
|
180ba935b1 | ||
|
|
0e106e263b | ||
|
|
7327917a81 | ||
|
|
c08dcd9fb5 | ||
|
|
ee6785f6ab | ||
|
|
537ba26645 | ||
|
|
e604ee2440 | ||
|
|
6534a2d62e | ||
|
|
b5c3bedd14 | ||
|
|
10bbaa9217 | ||
|
|
455e16a88f | ||
|
|
5d27a19b38 | ||
|
|
7cab722df3 | ||
|
|
b99c988970 | ||
|
|
f53c070ca1 | ||
|
|
84752e0fef | ||
|
|
0d4e0f1dab | ||
|
|
cea0cff2a7 | ||
|
|
a60f1e13db | ||
|
|
abe2e0b73b | ||
|
|
f9bb33c49b | ||
|
|
7a30b18c20 | ||
|
|
3fb9a195f8 | ||
|
|
c386a0c439 | ||
|
|
216c5d8b8e | ||
|
|
b57a39d8e8 | ||
|
|
8ba828885b | ||
|
|
d2c38963c9 | ||
|
|
59d00c1765 | ||
|
|
8217ad8fa5 | ||
|
|
4b2f134f32 | ||
|
|
6526caae30 | ||
|
|
4f26bc20a0 | ||
|
|
8b9b0b4fcb | ||
|
|
d2d5016780 | ||
|
|
a09dbbfd27 | ||
|
|
82cfb62804 | ||
|
|
ebf445e3e1 | ||
|
|
2123af39a7 | ||
|
|
917e661e88 | ||
|
|
bf905b1562 | ||
|
|
f6fcac5856 | ||
|
|
d4f11542f9 | ||
|
|
f906c0ecab | ||
|
|
99f8adeb7d | ||
|
|
0965a78d46 | ||
|
|
fe38b53ff7 | ||
|
|
1065c0d440 | ||
|
|
fd84a9a5fc | ||
|
|
b62c422959 | ||
|
|
f2305429c4 | ||
|
|
292e6b0339 | ||
|
|
7b54873f08 | ||
|
|
281b3ed45b | ||
|
|
8b2d659000 | ||
|
|
4c31740f25 | ||
|
|
848ae5fc9d | ||
|
|
b5da4e00ca | ||
|
|
4c3688de12 | ||
|
|
805660d4d1 | ||
|
|
1821deaa73 | ||
|
|
c9fd9a2a46 | ||
|
|
31bd0a6d68 | ||
|
|
c3162bbb1f | ||
|
|
02451e8ec8 | ||
|
|
bd21332c25 | ||
|
|
71f1609467 | ||
|
|
5331bc630a | ||
|
|
ea05c0327b | ||
|
|
d207f86daa | ||
|
|
9c26d54eda | ||
|
|
b72c4db334 | ||
|
|
5830958478 | ||
|
|
c78481b5b1 | ||
|
|
0af9e0f42e | ||
|
|
48b0b25974 | ||
|
|
6bd303d2e8 | ||
|
|
dbddcc1c10 | ||
|
|
bb4a2b9b97 | ||
|
|
5c3b5031d8 | ||
|
|
b460443e77 | ||
|
|
69bfb4180c | ||
|
|
2d32823db8 | ||
|
|
38262f11b2 | ||
|
|
e32beea00a | ||
|
|
bfcbaacec7 | ||
|
|
be8631e90c | ||
|
|
4198881815 | ||
|
|
b91696bc89 | ||
|
|
f7d070b38c | ||
|
|
95cc29fd9c | ||
|
|
9ae76a90fc | ||
|
|
24b8617c54 | ||
|
|
892a168ee7 | ||
|
|
51336412c5 | ||
|
|
f38913b75c | ||
|
|
ae35474130 | ||
|
|
bb5cc236a7 | ||
|
|
6a6c80d9a4 | ||
|
|
ae8f7964fa | ||
|
|
3630b17cde | ||
|
|
95f97d33af | ||
|
|
1243de8010 | ||
|
|
965b179d56 | ||
|
|
5d0fff2276 | ||
|
|
d7b6b7c0ae | ||
|
|
de0497a2dc | ||
|
|
1653c16c65 | ||
|
|
88783b3f5f | ||
|
|
d701bc7347 | ||
|
|
82e9ca93b6 | ||
|
|
5f99e7280a | ||
|
|
f56bf3d41b | ||
|
|
1ac0494f96 | ||
|
|
08720d8eeb | ||
|
|
c44057f47d | ||
|
|
abd54b3939 | ||
|
|
1a9fc593d1 | ||
|
|
b1bf86724d | ||
|
|
bc4c0cc505 | ||
|
|
69a5ffd8b2 | ||
|
|
e22f2f2e90 | ||
|
|
b02972b7ea | ||
|
|
d3cabc1c05 | ||
|
|
634cf79916 | ||
|
|
7e660091e0 | ||
|
|
296ced8e9b | ||
|
|
1226caca03 | ||
|
|
f1c02442bc | ||
|
|
52f8f513da | ||
|
|
c22b364ebe | ||
|
|
0792838b16 | ||
|
|
f16f6ea4d7 | ||
|
|
2e9cc3b581 | ||
|
|
71543dc615 | ||
|
|
f4f327e7d4 | ||
|
|
4c6777862e | ||
|
|
7acee37607 | ||
|
|
1bb9fd04d8 | ||
|
|
022806bea2 | ||
|
|
55bbfe59e6 | ||
|
|
52d7d21019 | ||
|
|
6974de02ac | ||
|
|
d46bd8d10c | ||
|
|
9129ff6e75 | ||
|
|
ed102015ad | ||
|
|
26e2375bfb | ||
|
|
bb1de75128 | ||
|
|
254f238f82 | ||
|
|
85210e2935 | ||
|
|
cdb461ab68 | ||
|
|
0569ed0f86 | ||
|
|
64d1e8677e | ||
|
|
790f6440f3 | ||
|
|
9e46bd8e2c | ||
|
|
02590579df | ||
|
|
fccae7734d | ||
|
|
f97cd74bd3 | ||
|
|
9b5cd427e6 | ||
|
|
0b85b09f62 | ||
|
|
6887291151 | ||
|
|
26b72e3792 | ||
|
|
2d042f2c44 | ||
|
|
52c9e644b8 | ||
|
|
058a0f82d3 | ||
|
|
17fbcc5f09 | ||
|
|
be50758451 | ||
|
|
f5fc5ba813 | ||
|
|
64d4a78570 | ||
|
|
d4780f61bc | ||
|
|
79c290603d | ||
|
|
a6ea7a3950 | ||
|
|
17f98b5c6b | ||
|
|
467736ca2f | ||
|
|
74386d0c42 | ||
|
|
b51a790997 | ||
|
|
6329cd35f9 | ||
|
|
c66e106613 | ||
|
|
4368015435 | ||
|
|
762b072c5e | ||
|
|
664c5b9628 | ||
|
|
6f931305cc | ||
|
|
92afb11668 | ||
|
|
b668928c89 | ||
|
|
3ad8619920 | ||
|
|
3709b62084 | ||
|
|
1db15e041b | ||
|
|
f4eb6ff49d | ||
|
|
4a264abadd | ||
|
|
21133ce118 | ||
|
|
e2d26f2abc | ||
|
|
98c144efe8 | ||
|
|
f1be3cf3e3 | ||
|
|
1539727da1 | ||
|
|
b55c9f1f6c | ||
|
|
9d2899d5b7 | ||
|
|
2905f7d1aa | ||
|
|
23bbd6498f | ||
|
|
1ca7eb48db | ||
|
|
47d283eb61 | ||
|
|
194e7266bd | ||
|
|
2869603573 | ||
|
|
5cd7b44580 | ||
|
|
8ab0e615c8 | ||
|
|
9d2fd763e2 | ||
|
|
91821f7431 | ||
|
|
3918c227c7 | ||
|
|
f4d3db790e | ||
|
|
4623e5b7c4 | ||
|
|
b5b3c38fec | ||
|
|
749db12bbd | ||
|
|
a7026a4f24 | ||
|
|
c7911f3f5c | ||
|
|
c18aa4d91c | ||
|
|
6f33e3ae9f | ||
|
|
46566a4fb5 | ||
|
|
0dad739b15 | ||
|
|
c59368c601 | ||
|
|
44ac1e1012 | ||
|
|
5958107cd9 | ||
|
|
25d36c8c2e | ||
|
|
a368af3f01 | ||
|
|
e630acffe0 | ||
|
|
dbd252a95c | ||
|
|
1da3f3219c | ||
|
|
a880b3d830 | ||
|
|
bed335132b | ||
|
|
6734379500 | ||
|
|
c1fc40d523 | ||
|
|
6be72f36d7 | ||
|
|
682cd1ea8b | ||
|
|
9847038f26 | ||
|
|
1539030469 | ||
|
|
4e57c13a7e | ||
|
|
5bc8f82015 | ||
|
|
5a41561261 | ||
|
|
3a9862899a | ||
|
|
6e4eb295dc | ||
|
|
96904ee917 | ||
|
|
01683af8ef | ||
|
|
6f1a27a84d | ||
|
|
4dcb6bbbc0 | ||
|
|
e86990065d | ||
|
|
4ee7d22dc0 |
No files matched your search
@@ -0,0 +1,2 @@
|
||||
github: lwouis
|
||||
patreon: lwouis
|
||||
@@ -13,7 +13,7 @@ A clear and concise description of what the bug is. What happened, and what you
|
||||
|
||||
**Screenshots / video**
|
||||
|
||||
Add screenshots to help explain your problem. You can also use Loom to easily record your screen to show the bug in action. That is *really* helpful!
|
||||
Add screenshots to help explain your problem. You can also record your screen to show the bug in action. That is *really* helpful!
|
||||
|
||||
**Steps to reproduce the bug**
|
||||
|
||||
@@ -21,3 +21,9 @@ Add screenshots to help explain your problem. You can also use Loom to easily re
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Your environment**
|
||||
|
||||
* AltTab version:
|
||||
* macOS version:
|
||||
* Other relevant info: e.g. using external keyboard, multiple monitors, etc
|
||||
+5
-3
@@ -1,8 +1,9 @@
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
os: osx
|
||||
osx_image: xcode11.5
|
||||
osx_image: xcode13.4
|
||||
language: node_js
|
||||
node_js:
|
||||
- 10
|
||||
@@ -20,13 +21,14 @@ env:
|
||||
- APP_NAME="$(awk -F ' = ' '/PRODUCT_NAME/ { print $2; }' < config/base.xcconfig)"
|
||||
install: true # disable default install
|
||||
script: scripts/travis.sh
|
||||
before_deploy: if [[ $TRAVIS_TEST_RESULT == 1 ]]; then echo "build failed; exiting to prevent deploy phases"; sleep 2; exit 1; fi
|
||||
deploy:
|
||||
provider: releases
|
||||
token:
|
||||
secure: wcAMT2rbXhhdk6lsc6EG9VZZkSW0BjOwjYSyXzHjKrgiXsQcZAzAsOkuisj8EfeYN9/uhpa8XX7f5KsdkE5reMqVGGWqdmJU4NnmK5Aew0LmBbzFHfffliQecVCzMmGYPmhPcDxAjidYxgCMrMbvQFaElc0WXdIsQNcaNieSkEgZw6TwGsTxgHXABD2e575K3SN/PPcq7Nx5mRZkURI7YLmo2KfsD2OPR4IcEXFpJRFbPcAZIpKaHUIC2VzpayJA93pBe+siwU150p04PzfSs/nTH/nUO9m24SUi6kAIzVN77cExvX+JDnQoVLz0V45L0iJjkKDTVb07rVOsfm6Pcuaaj2ZVXlpujSb7B5LDUIspUn/NnqMLOtzbSTuaGcx2u+zCcC0b17KooznilQ/sFq3YpeNdmjL4VL5fsw1hdpjcP6S9DqZ90TJZqy6xBQP5NubuJukH//BRilhWGfnq5rOFUlqrN8aApJ7gYry0K2rB8rVWWvA9cU+zX351iy0EERICEU6q3rQwq8gFUbdNATPJJgNg7n0PaNXSQTTF9VluZTRVUtMrpA0hWe7dn+Tvrvhrnhmqvccw3Qfw/i3SECIDHHtsjwLqHCx5gkz/xUdf7+t3k6x+r6Veua0Z3jvyVhdHprU47VTSUhM/n87EiKyNRuKa9IpA18eSlZ59exU=
|
||||
secure: wZUHfOs+JQ0ikNMJ8BnM+8fuoQdhgOEQpNd01ueZxe760GAAjSbq1icME8qaYJJMk1G6n14jo9ecEhzxF0XV8hSdy4WtikK7l5SXiOx5Efuh/tNscmHggGk235eLwQD9pglePZsP3xJUB1BHEj260rypkjnSx5kVOfLUeB1ASeg4+KdxZd2vXjwel+YQf+dYbNUYtwoWqjiLbqT1ao+0q04MPgD2c9jb+HnsA94LUGb44lPXqfUJ+xG2LxBpcDW/q1JhFXL/AmJb0dOOEVzzrBqfWysPukgPMONexZse4c3BBqkMI52ZuF3OoEVAffofmuGKiR5OoyU/hW17xi9jGeb79r+Xt4RdaJAgwcn7/7GtemYKUJp8jhLGsy9XZJShENX7UHTkP3L4iyOrd2Wz+ctZWAebyNReLt985/xTaplpDiQrPcKAuQNBa4sgWk5rIsf7Z0tcBfZau/fQl9Q4100xTbwC+GeAbL0IyXG3kVzQGsGllXHr/2JM1sj7rmKA7lmDlp7xiOBCPscn2YCT87U+F6VbYoNvnxne0igQOUwrvX4qa4XlYrUXDeHcyKku0m8znY74nOu+m6LXkIt8r29pi6Xac0/ZGMwKZRUvKg/skamWPRoy9DAVd8TBQW1c91oYKmqDQRy0eWnD6X1djcKywJ7WlSQDejebJql0h+o=
|
||||
file_glob: true
|
||||
file: "$XCODE_BUILD_PATH/*.zip"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: lwouis/alt-tab-macos
|
||||
after_deploy: scripts/update_homebrew_cask.sh
|
||||
after_deploy: scripts/after_deploy.sh
|
||||
@@ -3,8 +3,8 @@ platform :osx, '10.12'
|
||||
target 'alt-tab-macos' do
|
||||
use_frameworks!
|
||||
pod 'LetsMove', :git => 'https://github.com/lwouis/LetsMove.git', :commit => '7abf4daed1a25218f2b52f2dfd190aee5a50071c'
|
||||
pod 'Sparkle', :podspec => 'https://raw.githubusercontent.com/lwouis/Sparkle/master/Sparkle.podspec'
|
||||
pod 'ShortcutRecorder', :git => 'https://github.com/Kentzo/ShortcutRecorder.git', :commit => 'f718220854575bad86fa89dd2bb3decd0b14b2b0'
|
||||
pod 'Sparkle', :podspec => 'https://raw.githubusercontent.com/lwouis/Sparkle/fix-iframe-popup-1.24/Sparkle.podspec'
|
||||
pod 'ShortcutRecorder', :git => 'https://github.com/lwouis/ShortcutRecorder.git', :branch => 'alt-tab-current'
|
||||
pod 'SwiftyMarkdown', '1.1.0'
|
||||
pod 'AppCenter/Crashes', '3.3.1'
|
||||
pod 'AppCenter/Crashes', '4.3.0'
|
||||
end
|
||||
+14
-14
@@ -1,17 +1,17 @@
|
||||
PODS:
|
||||
- AppCenter/Core (3.3.1)
|
||||
- AppCenter/Crashes (3.3.1):
|
||||
- AppCenter/Core (4.3.0)
|
||||
- AppCenter/Crashes (4.3.0):
|
||||
- AppCenter/Core
|
||||
- LetsMove (1.24)
|
||||
- ShortcutRecorder (3.1)
|
||||
- Sparkle (1.23.1)
|
||||
- Sparkle (1.24.0)
|
||||
- SwiftyMarkdown (1.1.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- AppCenter/Crashes (= 3.3.1)
|
||||
- AppCenter/Crashes (= 4.3.0)
|
||||
- LetsMove (from `https://github.com/lwouis/LetsMove.git`, commit `7abf4daed1a25218f2b52f2dfd190aee5a50071c`)
|
||||
- ShortcutRecorder (from `https://github.com/Kentzo/ShortcutRecorder.git`, commit `f718220854575bad86fa89dd2bb3decd0b14b2b0`)
|
||||
- Sparkle (from `https://raw.githubusercontent.com/lwouis/Sparkle/master/Sparkle.podspec`)
|
||||
- ShortcutRecorder (from `https://github.com/lwouis/ShortcutRecorder.git`, branch `alt-tab-current`)
|
||||
- Sparkle (from `https://raw.githubusercontent.com/lwouis/Sparkle/fix-iframe-popup-1.24/Sparkle.podspec`)
|
||||
- SwiftyMarkdown (= 1.1.0)
|
||||
|
||||
SPEC REPOS:
|
||||
@@ -24,26 +24,26 @@ EXTERNAL SOURCES:
|
||||
:commit: 7abf4daed1a25218f2b52f2dfd190aee5a50071c
|
||||
:git: https://github.com/lwouis/LetsMove.git
|
||||
ShortcutRecorder:
|
||||
:commit: f718220854575bad86fa89dd2bb3decd0b14b2b0
|
||||
:git: https://github.com/Kentzo/ShortcutRecorder.git
|
||||
:branch: alt-tab-current
|
||||
:git: https://github.com/lwouis/ShortcutRecorder.git
|
||||
Sparkle:
|
||||
:podspec: https://raw.githubusercontent.com/lwouis/Sparkle/master/Sparkle.podspec
|
||||
:podspec: https://raw.githubusercontent.com/lwouis/Sparkle/fix-iframe-popup-1.24/Sparkle.podspec
|
||||
|
||||
CHECKOUT OPTIONS:
|
||||
LetsMove:
|
||||
:commit: 7abf4daed1a25218f2b52f2dfd190aee5a50071c
|
||||
:git: https://github.com/lwouis/LetsMove.git
|
||||
ShortcutRecorder:
|
||||
:commit: f718220854575bad86fa89dd2bb3decd0b14b2b0
|
||||
:git: https://github.com/Kentzo/ShortcutRecorder.git
|
||||
:commit: 5bb32febdab48038ce1762bf14f5ce8024b11fe7
|
||||
:git: https://github.com/lwouis/ShortcutRecorder.git
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
AppCenter: 76ecf7e959a68e36b0fd314e8dc5897660214423
|
||||
AppCenter: 883369ab78427b0561c688158d689dfe1f993ea9
|
||||
LetsMove: fefe56bc7bc7fb7d37049e28a14f297961229fc5
|
||||
ShortcutRecorder: fdf620aca34101b0cba3b10fca815e0459254189
|
||||
Sparkle: ea073ba9c69cee3ebaab8685ba1e732e14d249f7
|
||||
Sparkle: 1fa490bb4ab2a9b37cfb9ea4feec19dd33b81cd2
|
||||
SwiftyMarkdown: 033abc9dad9a37903f81aec5188cade436f40520
|
||||
|
||||
PODFILE CHECKSUM: 78df0a34910c4c031a65ac3b58dc004c21b552d0
|
||||
PODFILE CHECKSUM: db137cd4263235b552493949169a44f7e874a90f
|
||||
|
||||
COCOAPODS: 1.9.1
|
||||
Generated
BIN
Binary file not shown.
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AppCenter.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-maccatalyst</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AppCenter.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>maccatalyst</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_i386_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AppCenter.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>i386</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_arm64e_armv7_armv7s</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AppCenter.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>arm64e</string>
|
||||
<string>armv7</string>
|
||||
<string>armv7s</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AppCenter.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>AppCenter.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
Binary file not shown.
+44
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACAppCenter.h>)
|
||||
#import <AppCenter/MSACAbstractLog.h>
|
||||
#import <AppCenter/MSACAppCenter.h>
|
||||
#import <AppCenter/MSACAppCenterErrors.h>
|
||||
#import <AppCenter/MSACChannelGroupProtocol.h>
|
||||
#import <AppCenter/MSACChannelProtocol.h>
|
||||
#import <AppCenter/MSACConstants+Flags.h>
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#import <AppCenter/MSACCustomProperties.h>
|
||||
#import <AppCenter/MSACDevice.h>
|
||||
#import <AppCenter/MSACEnable.h>
|
||||
#import <AppCenter/MSACLog.h>
|
||||
#import <AppCenter/MSACLogWithProperties.h>
|
||||
#import <AppCenter/MSACLogger.h>
|
||||
#import <AppCenter/MSACSerializableObject.h>
|
||||
#import <AppCenter/MSACService.h>
|
||||
#import <AppCenter/MSACServiceAbstract.h>
|
||||
#import <AppCenter/MSACWrapperLogger.h>
|
||||
#import <AppCenter/MSACWrapperSdk.h>
|
||||
#else
|
||||
#import "MSACAbstractLog.h"
|
||||
#import "MSACAppCenter.h"
|
||||
#import "MSACAppCenterErrors.h"
|
||||
#import "MSACChannelGroupProtocol.h"
|
||||
#import "MSACChannelProtocol.h"
|
||||
#import "MSACConstants+Flags.h"
|
||||
#import "MSACConstants.h"
|
||||
#import "MSACCustomProperties.h"
|
||||
#import "MSACDevice.h"
|
||||
#import "MSACEnable.h"
|
||||
#import "MSACLog.h"
|
||||
#import "MSACLogWithProperties.h"
|
||||
#import "MSACLogger.h"
|
||||
#import "MSACSerializableObject.h"
|
||||
#import "MSACService.h"
|
||||
#import "MSACServiceAbstract.h"
|
||||
#import "MSACWrapperLogger.h"
|
||||
#import "MSACWrapperSdk.h"
|
||||
#endif
|
||||
+4
-3
@@ -1,12 +1,13 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_ABSTRACT_LOG_H
|
||||
#define MS_ABSTRACT_LOG_H
|
||||
#ifndef MSAC_ABSTRACT_LOG_H
|
||||
#define MSAC_ABSTRACT_LOG_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MSAbstractLog : NSObject
|
||||
NS_SWIFT_NAME(AbstractLog)
|
||||
@interface MSACAbstractLog : NSObject
|
||||
|
||||
@end
|
||||
|
||||
+49
-69
@@ -3,18 +3,26 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSConstants.h"
|
||||
#ifndef MSAC_APP_CENTER
|
||||
#define MSAC_APP_CENTER
|
||||
|
||||
@class MSWrapperSdk;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
@class MSCustomProperties;
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
@interface MSAppCenter : NSObject
|
||||
@class MSACWrapperSdk;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
@class MSACCustomProperties;
|
||||
#endif
|
||||
|
||||
NS_SWIFT_NAME(AppCenter)
|
||||
@interface MSACAppCenter : NSObject
|
||||
|
||||
/**
|
||||
* Returns the singleton instance of MSAppCenter.
|
||||
* Returns the singleton instance of MSACAppCenter.
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
@@ -25,7 +33,7 @@
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)configureWithAppSecret:(NSString *)appSecret;
|
||||
+ (void)configureWithAppSecret:(NSString *)appSecret NS_SWIFT_NAME(configure(withAppSecret:));
|
||||
|
||||
/**
|
||||
* Configure the SDK.
|
||||
@@ -42,7 +50,7 @@
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)start:(NSString *)appSecret withServices:(NSArray<Class> *)services;
|
||||
+ (void)start:(NSString *)appSecret withServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(withAppSecret:services:));
|
||||
|
||||
/**
|
||||
* Start the SDK with an array of services.
|
||||
@@ -51,7 +59,7 @@
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)startWithServices:(NSArray<Class> *)services;
|
||||
+ (void)startWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(services:));
|
||||
|
||||
/**
|
||||
* Start a service.
|
||||
@@ -68,76 +76,53 @@
|
||||
*
|
||||
* @param services Array of services to start.
|
||||
*/
|
||||
+ (void)startFromLibraryWithServices:(NSArray<Class> *)services;
|
||||
+ (void)startFromLibraryWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(startFromLibrary(services:));
|
||||
|
||||
/**
|
||||
* Check whether the SDK has already been configured or not.
|
||||
*
|
||||
* @return YES if configured, NO otherwise.
|
||||
* The flag indicates whether the SDK has already been configured or not.
|
||||
*/
|
||||
+ (BOOL)isConfigured;
|
||||
@property(class, atomic, readonly, getter=isConfigured) BOOL configured;
|
||||
|
||||
/**
|
||||
* Check whether app is running in App Center Test Cloud.
|
||||
*
|
||||
* @return true if running in App Center Test Cloud, false otherwise.
|
||||
* The flag indicates whether app is running in App Center Test Cloud.
|
||||
*/
|
||||
+ (BOOL)isRunningInAppCenterTestCloud;
|
||||
@property(class, atomic, readonly, getter=isRunningInAppCenterTestCloud) BOOL runningInAppCenterTestCloud;
|
||||
|
||||
/**
|
||||
* Change the base URL (schema + authority + port only) used to communicate with the backend.
|
||||
* The flag indicates whether or not the SDK was enabled as a whole
|
||||
*
|
||||
* @param logUrl Base URL to use for backend communication.
|
||||
*/
|
||||
+ (void)setLogUrl:(NSString *)logUrl;
|
||||
|
||||
/**
|
||||
* Enable or disable the SDK as a whole. In addition to AppCenter resources, it will also enable or disable all registered services.
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*
|
||||
* @param isEnabled YES to enable, NO to disable.
|
||||
*
|
||||
* @see isEnabled
|
||||
*/
|
||||
+ (void)setEnabled:(BOOL)isEnabled;
|
||||
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
|
||||
|
||||
/**
|
||||
* Check whether the SDK is enabled or not as a whole.
|
||||
* Flag indicating whether SDK can send network requests.
|
||||
*
|
||||
* @return YES if enabled, NO otherwise.
|
||||
*
|
||||
* @see setEnabled:
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
+ (BOOL)isEnabled;
|
||||
@property(class, nonatomic, getter=isNetworkRequestsAllowed, setter=setNetworkRequestsAllowed:)
|
||||
BOOL networkRequestsAllowed NS_SWIFT_NAME(networkRequestsAllowed);
|
||||
|
||||
/**
|
||||
* Get log level.
|
||||
*
|
||||
* @return Log level.
|
||||
* The SDK's log level.
|
||||
*/
|
||||
+ (MSLogLevel)logLevel;
|
||||
@property(class, nonatomic) MSACLogLevel logLevel;
|
||||
|
||||
/**
|
||||
* Set log level.
|
||||
*
|
||||
* @param logLevel The log level.
|
||||
* Base URL to use for backend communication.
|
||||
*/
|
||||
+ (void)setLogLevel:(MSLogLevel)logLevel;
|
||||
@property(class, nonatomic, strong) NSString *logUrl;
|
||||
|
||||
/**
|
||||
* Set log level handler.
|
||||
*
|
||||
* @param logHandler Handler.
|
||||
* Set log handler.
|
||||
*/
|
||||
+ (void)setLogHandler:(MSLogHandler)logHandler;
|
||||
@property(class, nonatomic) MSACLogHandler logHandler;
|
||||
|
||||
/**
|
||||
* Set wrapper SDK information to use when building device properties. This is intended in case you are building a SDK that uses the App
|
||||
* Center SDK under the hood, e.g. our Xamarin SDK or ReactNative SDk.
|
||||
*
|
||||
* @param wrapperSdk Wrapper SDK information.
|
||||
*/
|
||||
+ (void)setWrapperSdk:(MSWrapperSdk *)wrapperSdk;
|
||||
@property(class, nonatomic, strong) MSACWrapperSdk *wrapperSdk;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
/**
|
||||
@@ -145,14 +130,12 @@
|
||||
*
|
||||
* @param customProperties Custom properties object.
|
||||
*/
|
||||
+ (void)setCustomProperties:(MSCustomProperties *)customProperties;
|
||||
+ (void)setCustomProperties:(MSACCustomProperties *)customProperties;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check whether the application delegate forwarder is enabled or not.
|
||||
*
|
||||
* @return YES if enabled, NO otherwise.
|
||||
*
|
||||
* @discussion The application delegate forwarder forwards messages that target your application delegate methods via swizzling to the SDK.
|
||||
* It simplifies the SDK integration but may not be suitable to any situations. For
|
||||
* instance it should be disabled if you or one of your third party SDK is doing message forwarding on the application delegate. Message
|
||||
@@ -160,29 +143,26 @@
|
||||
* To disable the application delegate forwarder just add the `AppCenterAppDelegateForwarderEnabled` tag to your Info .plist file and set it
|
||||
* to `0`. Then you will have to forward any application delegate needed by the SDK manually.
|
||||
*/
|
||||
+ (BOOL)isAppDelegateForwarderEnabled;
|
||||
@property(class, readonly, nonatomic, getter=isAppDelegateForwarderEnabled) BOOL appDelegateForwarderEnabled;
|
||||
|
||||
/**
|
||||
* Get unique installation identifier.
|
||||
* Unique installation identifier.
|
||||
*
|
||||
* @return Unique installation identifier.
|
||||
*/
|
||||
+ (NSUUID *)installId;
|
||||
@property(class, readonly, nonatomic) NSUUID *installId;
|
||||
|
||||
/**
|
||||
* Detect if a debugger is attached to the app process. This is only invoked once on app startup and can not detect
|
||||
* if the debugger is being attached during runtime!
|
||||
*
|
||||
* @return BOOL if the debugger is attached.
|
||||
*/
|
||||
+ (BOOL)isDebuggerAttached;
|
||||
@property(class, readonly, nonatomic, getter=isDebuggerAttached) BOOL debuggerAttached;
|
||||
|
||||
/**
|
||||
* Get the current version of AppCenter SDK.
|
||||
* Current version of AppCenter SDK.
|
||||
*
|
||||
* @return The current version of AppCenter SDK.
|
||||
*/
|
||||
+ (NSString *)sdkVersion;
|
||||
@property(class, readonly, nonatomic) NSString *sdkVersion;
|
||||
|
||||
/**
|
||||
* Set the maximum size of the internal storage. This method must be called before App Center is started. This method is only intended for
|
||||
@@ -202,22 +182,22 @@
|
||||
/**
|
||||
* Set the user identifier.
|
||||
*
|
||||
* @param userId User identifier.
|
||||
*
|
||||
* @discussion Set the user identifier for logs sent for the default target token when the secret passed in @c
|
||||
* MSAppCenter:start:withServices: contains "target={targetToken}".
|
||||
* MSACAppCenter:start:withServices: contains "target={targetToken}".
|
||||
*
|
||||
* For App Center backend the user identifier maximum length is 256 characters.
|
||||
*
|
||||
* AppCenter must be configured or started before this API can be used.
|
||||
*/
|
||||
+ (void)setUserId:(NSString *)userId;
|
||||
@property(class, nonatomic, strong) NSString *userId;
|
||||
|
||||
/**
|
||||
* Set country code to use when building device properties.
|
||||
*
|
||||
* @param countryCode The two-letter ISO country code. @see https://www.iso.org/obp/ui/#search for more information.
|
||||
* @see https://www.iso.org/obp/ui/#search for more information.
|
||||
*/
|
||||
+ (void)setCountryCode:(NSString *)countryCode;
|
||||
@property(class, nonatomic, strong) NSString *countryCode;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_APP_CENTER_ERRORS_H
|
||||
#define MSAC_APP_CENTER_ERRORS_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define MSAC_APP_CENTER_BASE_DOMAIN @"com.Microsoft.AppCenter."
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#pragma mark - Domain
|
||||
|
||||
static NSString *const kMSACACErrorDomain = MSAC_APP_CENTER_BASE_DOMAIN @"ErrorDomain";
|
||||
|
||||
#pragma mark - General
|
||||
|
||||
// Error codes.
|
||||
NS_ENUM(NSInteger){MSACACLogInvalidContainerErrorCode = 1, MSACACCanceledErrorCode = 2, MSACACDisabledErrorCode = 3};
|
||||
|
||||
// Error descriptions.
|
||||
static NSString const *kMSACACLogInvalidContainerErrorDesc = @"Invalid log container.";
|
||||
static NSString const *kMSACACCanceledErrorDesc = @"The operation was canceled.";
|
||||
static NSString const *kMSACACDisabledErrorDesc = @"The service is disabled.";
|
||||
|
||||
#pragma mark - Connection
|
||||
|
||||
// Error codes.
|
||||
NS_ENUM(NSInteger){MSACACConnectionPausedErrorCode = 100, MSACACConnectionHttpErrorCode = 101};
|
||||
|
||||
// Error descriptions.
|
||||
static NSString const *kMSACACConnectionHttpErrorDesc = @"An HTTP error occured.";
|
||||
static NSString const *kMSACACConnectionPausedErrorDesc = @"Canceled, connection paused with log deletion.";
|
||||
|
||||
// Error user info keys.
|
||||
static NSString const *kMSACACConnectionHttpCodeErrorKey = @"MSConnectionHttpCode";
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CHANNEL_GROUP_PROTOCOL_H
|
||||
#define MSAC_CHANNEL_GROUP_PROTOCOL_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACChannelProtocol.h>)
|
||||
#import <AppCenter/MSACChannelProtocol.h>
|
||||
#else
|
||||
#import "MSACChannelProtocol.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class MSACChannelUnitConfiguration;
|
||||
|
||||
@protocol MSACIngestionProtocol;
|
||||
@protocol MSACChannelUnitProtocol;
|
||||
|
||||
/**
|
||||
* `MSACChannelGroupProtocol` represents a kind of channel that contains constituent MSACChannelUnit objects. When an operation from the
|
||||
* `MSACChannelProtocol` is performed on the group, that operation should be propagated to its constituent MSACChannelUnit objects.
|
||||
*/
|
||||
NS_SWIFT_NAME(ChannelGroupProtocol)
|
||||
@protocol MSACChannelGroupProtocol <MSACChannelProtocol>
|
||||
|
||||
/**
|
||||
* Initialize a channel unit with the given configuration.
|
||||
*
|
||||
* @param configuration channel configuration.
|
||||
*
|
||||
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
|
||||
*/
|
||||
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
|
||||
NS_SWIFT_NAME(addChannelUnit(withConfiguration:));
|
||||
|
||||
/**
|
||||
* Initialize a channel unit with the given configuration.
|
||||
*
|
||||
* @param configuration channel configuration.
|
||||
* @param ingestion The alternative ingestion object
|
||||
*
|
||||
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
|
||||
*/
|
||||
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
|
||||
withIngestion:(nullable id<MSACIngestionProtocol>)ingestion
|
||||
NS_SWIFT_NAME(addChannelUnit(_:ingestion:));
|
||||
|
||||
/**
|
||||
* Change the base URL (schema + authority + port only) used to communicate with the backend.
|
||||
*/
|
||||
@property(nonatomic, strong) NSString *_Nullable logUrl;
|
||||
|
||||
/**
|
||||
* Set the app secret.
|
||||
*/
|
||||
@property(nonatomic, strong) NSString *_Nullable appSecret;
|
||||
|
||||
/**
|
||||
* Set the maximum size of the internal storage. This method must be called before App Center is started.
|
||||
*
|
||||
* @discussion The default maximum database size is 10485760 bytes (10 MiB).
|
||||
*
|
||||
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
|
||||
* (default is 4096 bytes). Values below 24576 bytes (24 KiB) will be ignored.
|
||||
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
|
||||
* is successful, and `NO` otherwise.
|
||||
*/
|
||||
- (void)setMaxStorageSize:(long)sizeInBytes
|
||||
completionHandler:(nullable void (^)(BOOL))completionHandler NS_SWIFT_NAME(setMaxStorageSize(_:completionHandler:));
|
||||
|
||||
/**
|
||||
* Return a channel unit instance for the given groupId.
|
||||
*
|
||||
* @param groupId The group ID for a channel unit.
|
||||
*
|
||||
* @return A channel unit instance or `nil`.
|
||||
*/
|
||||
- (nullable id<MSACChannelUnitProtocol>)channelUnitForGroupId:(NSString *)groupId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+14
-9
@@ -1,36 +1,41 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_CHANNEL_PROTOCOL_H
|
||||
#define MS_CHANNEL_PROTOCOL_H
|
||||
#ifndef MSAC_CHANNEL_PROTOCOL_H
|
||||
#define MSAC_CHANNEL_PROTOCOL_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSEnable.h"
|
||||
#if __has_include(<AppCenter/MSACEnable.h>)
|
||||
#import <AppCenter/MSACEnable.h>
|
||||
#else
|
||||
#import "MSACEnable.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MSChannelDelegate;
|
||||
@protocol MSACChannelDelegate;
|
||||
|
||||
/**
|
||||
* `MSChannelProtocol` contains the essential operations of a channel. Channels are broadly responsible for enqueuing logs to be sent to the
|
||||
* backend and/or stored on disk.
|
||||
* `MSACChannelProtocol` contains the essential operations of a channel. Channels are broadly responsible for enqueuing logs to be sent to
|
||||
* the backend and/or stored on disk.
|
||||
*/
|
||||
@protocol MSChannelProtocol <NSObject, MSEnable>
|
||||
NS_SWIFT_NAME(ChannelProtocol)
|
||||
@protocol MSACChannelProtocol <NSObject, MSACEnable>
|
||||
|
||||
/**
|
||||
* Add delegate.
|
||||
*
|
||||
* @param delegate delegate.
|
||||
*/
|
||||
- (void)addDelegate:(id<MSChannelDelegate>)delegate;
|
||||
- (void)addDelegate:(id<MSACChannelDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Remove delegate.
|
||||
*
|
||||
* @param delegate delegate.
|
||||
*/
|
||||
- (void)removeDelegate:(id<MSChannelDelegate>)delegate;
|
||||
- (void)removeDelegate:(id<MSACChannelDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Pause operations, logs will be stored but not sent.
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CONSTANTS_FLAGS_H
|
||||
#define MSAC_CONSTANTS_FLAGS_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, MSACFlags) {
|
||||
MSACFlagsNone = (0 << 0), // => 00000000
|
||||
MSACFlagsNormal = (1 << 0), // => 00000001
|
||||
MSACFlagsCritical = (1 << 1), // => 00000010
|
||||
MSACFlagsPersistenceNormal DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsNormal") = MSACFlagsNormal,
|
||||
MSACFlagsPersistenceCritical DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsCritical") = MSACFlagsCritical,
|
||||
MSACFlagsDefault = MSACFlagsNormal
|
||||
} NS_SWIFT_NAME(Flags);
|
||||
|
||||
#endif
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Log Levels
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, MSACLogLevel) {
|
||||
|
||||
/**
|
||||
* Logging will be very chatty
|
||||
*/
|
||||
MSACLogLevelVerbose = 2,
|
||||
|
||||
/**
|
||||
* Debug information will be logged
|
||||
*/
|
||||
MSACLogLevelDebug = 3,
|
||||
|
||||
/**
|
||||
* Information will be logged
|
||||
*/
|
||||
MSACLogLevelInfo = 4,
|
||||
|
||||
/**
|
||||
* Errors and warnings will be logged
|
||||
*/
|
||||
MSACLogLevelWarning = 5,
|
||||
|
||||
/**
|
||||
* Errors will be logged
|
||||
*/
|
||||
MSACLogLevelError = 6,
|
||||
|
||||
/**
|
||||
* Only critical errors will be logged
|
||||
*/
|
||||
MSACLogLevelAssert = 7,
|
||||
|
||||
/**
|
||||
* Logging is disabled
|
||||
*/
|
||||
MSACLogLevelNone = 99
|
||||
} NS_SWIFT_NAME(LogLevel);
|
||||
|
||||
typedef NSString * (^MSACLogMessageProvider)(void)NS_SWIFT_NAME(LogMessageProvider);
|
||||
typedef void (^MSACLogHandler)(MSACLogMessageProvider messageProvider, MSACLogLevel logLevel, NSString *tag, const char *file,
|
||||
const char *function, uint line) NS_SWIFT_NAME(LogHandler);
|
||||
|
||||
/**
|
||||
* Channel priorities, check the kMSACPriorityCount if you add a new value.
|
||||
* The order matters here! Values NEED to range from low priority to high priority.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MSACPriority) { MSACPriorityBackground, MSACPriorityDefault, MSACPriorityHigh } NS_SWIFT_NAME(Priority);
|
||||
static short const kMSACPriorityCount = MSACPriorityHigh + 1;
|
||||
|
||||
/**
|
||||
* The priority by which the modules are initialized.
|
||||
* MSACPriorityMax is reserved for only 1 module and this needs to be Crashes.
|
||||
* Crashes needs to be initialized first to catch crashes in our other SDK Modules (which will hopefully never happen) and to avoid losing
|
||||
* any log at crash time.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MSACInitializationPriority) {
|
||||
MSACInitializationPriorityDefault = 500,
|
||||
MSACInitializationPriorityHigh = 750,
|
||||
MSACInitializationPriorityMax = 999
|
||||
} NS_SWIFT_NAME(InitializationPriority);
|
||||
|
||||
/**
|
||||
* Enum with the different HTTP status codes.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MSACHTTPCodesNo) {
|
||||
|
||||
// Invalid
|
||||
MSACHTTPCodesNo0XXInvalidUnknown = 0,
|
||||
|
||||
// Informational
|
||||
MSACHTTPCodesNo1XXInformationalUnknown = 1,
|
||||
MSACHTTPCodesNo100Continue = 100,
|
||||
MSACHTTPCodesNo101SwitchingProtocols = 101,
|
||||
MSACHTTPCodesNo102Processing = 102,
|
||||
|
||||
// Success
|
||||
MSACHTTPCodesNo2XXSuccessUnknown = 2,
|
||||
MSACHTTPCodesNo200OK = 200,
|
||||
MSACHTTPCodesNo201Created = 201,
|
||||
MSACHTTPCodesNo202Accepted = 202,
|
||||
MSACHTTPCodesNo203NonAuthoritativeInformation = 203,
|
||||
MSACHTTPCodesNo204NoContent = 204,
|
||||
MSACHTTPCodesNo205ResetContent = 205,
|
||||
MSACHTTPCodesNo206PartialContent = 206,
|
||||
MSACHTTPCodesNo207MultiStatus = 207,
|
||||
MSACHTTPCodesNo208AlreadyReported = 208,
|
||||
MSACHTTPCodesNo209IMUsed = 209,
|
||||
|
||||
// Redirection
|
||||
MSACHTTPCodesNo3XXSuccessUnknown = 3,
|
||||
MSACHTTPCodesNo300MultipleChoices = 300,
|
||||
MSACHTTPCodesNo301MovedPermanently = 301,
|
||||
MSACHTTPCodesNo302Found = 302,
|
||||
MSACHTTPCodesNo303SeeOther = 303,
|
||||
MSACHTTPCodesNo304NotModified = 304,
|
||||
MSACHTTPCodesNo305UseProxy = 305,
|
||||
MSACHTTPCodesNo306SwitchProxy = 306,
|
||||
MSACHTTPCodesNo307TemporaryRedirect = 307,
|
||||
MSACHTTPCodesNo308PermanentRedirect = 308,
|
||||
|
||||
// Client error
|
||||
MSACHTTPCodesNo4XXSuccessUnknown = 4,
|
||||
MSACHTTPCodesNo400BadRequest = 400,
|
||||
MSACHTTPCodesNo401Unauthorised = 401,
|
||||
MSACHTTPCodesNo402PaymentRequired = 402,
|
||||
MSACHTTPCodesNo403Forbidden = 403,
|
||||
MSACHTTPCodesNo404NotFound = 404,
|
||||
MSACHTTPCodesNo405MethodNotAllowed = 405,
|
||||
MSACHTTPCodesNo406NotAcceptable = 406,
|
||||
MSACHTTPCodesNo407ProxyAuthenticationRequired = 407,
|
||||
MSACHTTPCodesNo408RequestTimeout = 408,
|
||||
MSACHTTPCodesNo409Conflict = 409,
|
||||
MSACHTTPCodesNo410Gone = 410,
|
||||
MSACHTTPCodesNo411LengthRequired = 411,
|
||||
MSACHTTPCodesNo412PreconditionFailed = 412,
|
||||
MSACHTTPCodesNo413RequestEntityTooLarge = 413,
|
||||
MSACHTTPCodesNo414RequestURITooLong = 414,
|
||||
MSACHTTPCodesNo415UnsupportedMediaType = 415,
|
||||
MSACHTTPCodesNo416RequestedRangeNotSatisfiable = 416,
|
||||
MSACHTTPCodesNo417ExpectationFailed = 417,
|
||||
MSACHTTPCodesNo418IamATeapot = 418,
|
||||
MSACHTTPCodesNo419AuthenticationTimeout = 419,
|
||||
MSACHTTPCodesNo420MethodFailureSpringFramework = 420,
|
||||
MSACHTTPCodesNo420EnhanceYourCalmTwitter = 4200,
|
||||
MSACHTTPCodesNo422UnprocessableEntity = 422,
|
||||
MSACHTTPCodesNo423Locked = 423,
|
||||
MSACHTTPCodesNo424FailedDependency = 424,
|
||||
MSACHTTPCodesNo424MethodFailureWebDaw = 4240,
|
||||
MSACHTTPCodesNo425UnorderedCollection = 425,
|
||||
MSACHTTPCodesNo426UpgradeRequired = 426,
|
||||
MSACHTTPCodesNo428PreconditionRequired = 428,
|
||||
MSACHTTPCodesNo429TooManyRequests = 429,
|
||||
MSACHTTPCodesNo431RequestHeaderFieldsTooLarge = 431,
|
||||
MSACHTTPCodesNo444NoResponseNginx = 444,
|
||||
MSACHTTPCodesNo449RetryWithMicrosoft = 449,
|
||||
MSACHTTPCodesNo450BlockedByWindowsParentalControls = 450,
|
||||
MSACHTTPCodesNo451RedirectMicrosoft = 451,
|
||||
MSACHTTPCodesNo451UnavailableForLegalReasons = 4510,
|
||||
MSACHTTPCodesNo494RequestHeaderTooLargeNginx = 494,
|
||||
MSACHTTPCodesNo495CertErrorNginx = 495,
|
||||
MSACHTTPCodesNo496NoCertNginx = 496,
|
||||
MSACHTTPCodesNo497HTTPToHTTPSNginx = 497,
|
||||
MSACHTTPCodesNo499ClientClosedRequestNginx = 499,
|
||||
|
||||
// Server error
|
||||
MSACHTTPCodesNo5XXSuccessUnknown = 5,
|
||||
MSACHTTPCodesNo500InternalServerError = 500,
|
||||
MSACHTTPCodesNo501NotImplemented = 501,
|
||||
MSACHTTPCodesNo502BadGateway = 502,
|
||||
MSACHTTPCodesNo503ServiceUnavailable = 503,
|
||||
MSACHTTPCodesNo504GatewayTimeout = 504,
|
||||
MSACHTTPCodesNo505HTTPVersionNotSupported = 505,
|
||||
MSACHTTPCodesNo506VariantAlsoNegotiates = 506,
|
||||
MSACHTTPCodesNo507InsufficientStorage = 507,
|
||||
MSACHTTPCodesNo508LoopDetected = 508,
|
||||
MSACHTTPCodesNo509BandwidthLimitExceeded = 509,
|
||||
MSACHTTPCodesNo510NotExtended = 510,
|
||||
MSACHTTPCodesNo511NetworkAuthenticationRequired = 511,
|
||||
MSACHTTPCodesNo522ConnectionTimedOut = 522,
|
||||
MSACHTTPCodesNo598NetworkReadTimeoutErrorUnknown = 598,
|
||||
MSACHTTPCodesNo599NetworkConnectTimeoutErrorUnknown = 599
|
||||
} NS_SWIFT_NAME(HTTPCodesNo);
|
||||
+9
-8
@@ -1,8 +1,8 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_CUSTOM_PROPERTIES_H
|
||||
#define MS_CUSTOM_PROPERTIES_H
|
||||
#ifndef MSAC_CUSTOM_PROPERTIES_H
|
||||
#define MSAC_CUSTOM_PROPERTIES_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
* Custom properties builder.
|
||||
* Collects multiple properties to send in one log.
|
||||
*/
|
||||
@interface MSCustomProperties : NSObject
|
||||
NS_SWIFT_NAME(CustomProperties)
|
||||
@interface MSACCustomProperties : NSObject
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
@@ -21,7 +22,7 @@
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setString:(NSString *)value forKey:(NSString *)key;
|
||||
- (instancetype)setString:(NSString *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
@@ -32,7 +33,7 @@
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setNumber:(NSNumber *)value forKey:(NSString *)key;
|
||||
- (instancetype)setNumber:(NSNumber *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
@@ -43,7 +44,7 @@
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setBool:(BOOL)value forKey:(NSString *)key;
|
||||
- (instancetype)setBool:(BOOL)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
@@ -54,7 +55,7 @@
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setDate:(NSDate *)value forKey:(NSString *)key;
|
||||
- (instancetype)setDate:(NSDate *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Clear the property for the specified key.
|
||||
@@ -63,7 +64,7 @@
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)clearPropertyForKey:(NSString *)key;
|
||||
- (instancetype)clearPropertyForKey:(NSString *)key NS_SWIFT_NAME(clearProperty(forKey:));
|
||||
|
||||
@end
|
||||
|
||||
+9
-4
@@ -1,14 +1,19 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_DEVICE_H
|
||||
#define MS_DEVICE_H
|
||||
#ifndef MSAC_DEVICE_H
|
||||
#define MSAC_DEVICE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSWrapperSdk.h"
|
||||
#if __has_include(<AppCenter/MSACWrapperSdk.h>)
|
||||
#import <AppCenter/MSACWrapperSdk.h>
|
||||
#else
|
||||
#import "MSACWrapperSdk.h"
|
||||
#endif
|
||||
|
||||
@interface MSDevice : MSWrapperSdk
|
||||
NS_SWIFT_NAME(Device)
|
||||
@interface MSACDevice : MSACWrapperSdk
|
||||
|
||||
/*
|
||||
* Name of the SDK. Consists of the name of the SDK and the platform, e.g. "appcenter.ios", "appcenter.android"
|
||||
+5
-4
@@ -1,15 +1,16 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_ENABLE_H
|
||||
#define MS_ENABLE_H
|
||||
#ifndef MSAC_ENABLE_H
|
||||
#define MSAC_ENABLE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Protocol to define an instance that can be enabled/disabled.
|
||||
*/
|
||||
@protocol MSEnable <NSObject>
|
||||
NS_SWIFT_NAME(Enable)
|
||||
@protocol MSACEnable <NSObject>
|
||||
|
||||
@required
|
||||
|
||||
@@ -19,7 +20,7 @@
|
||||
* @param isEnabled A boolean value set to YES to enable the instance or NO to disable it.
|
||||
* @param deleteData A boolean value set to YES to delete data or NO to keep it.
|
||||
*/
|
||||
- (void)setEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deleteData;
|
||||
- (void)setEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deleteData NS_SWIFT_NAME(setEnabled(_:deleteDataOnDisabled:));
|
||||
|
||||
@end
|
||||
|
||||
+6
-5
@@ -1,14 +1,15 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_LOG_H
|
||||
#define MS_LOG_H
|
||||
#ifndef MSAC_LOG_H
|
||||
#define MSAC_LOG_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class MSDevice;
|
||||
@class MSACDevice;
|
||||
|
||||
@protocol MSLog <NSObject>
|
||||
NS_SWIFT_NAME(Log)
|
||||
@protocol MSACLog <NSObject>
|
||||
|
||||
/**
|
||||
* Log type.
|
||||
@@ -39,7 +40,7 @@
|
||||
/**
|
||||
* Device properties associated to this log.
|
||||
*/
|
||||
@property(nonatomic, strong) MSDevice *device;
|
||||
@property(nonatomic, strong) MSACDevice *device;
|
||||
|
||||
/**
|
||||
* Transient object tag. For example, a log can be tagged with a transmission target. We do this currently to prevent properties being
|
||||
+9
-4
@@ -1,14 +1,19 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_LOG_WITH_PROPERTIES_H
|
||||
#define MS_LOG_WITH_PROPERTIES_H
|
||||
#ifndef MSAC_LOG_WITH_PROPERTIES_H
|
||||
#define MSAC_LOG_WITH_PROPERTIES_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSAbstractLog.h"
|
||||
#if __has_include(<AppCenter/MSACAbstractLog.h>)
|
||||
#import <AppCenter/MSACAbstractLog.h>
|
||||
#else
|
||||
#import "MSACAbstractLog.h"
|
||||
#endif
|
||||
|
||||
@interface MSLogWithProperties : MSAbstractLog
|
||||
NS_SWIFT_NAME(LogWithProperties)
|
||||
@interface MSACLogWithProperties : MSACAbstractLog
|
||||
|
||||
/**
|
||||
* Additional key/value pair parameters. [optional]
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef MSAC_LOGGER
|
||||
#define MSAC_LOGGER
|
||||
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
#define MSACLog(_level, _tag, _message) \
|
||||
[MSACLogger logMessage:_message level:_level tag:_tag file:__FILE__ function:__PRETTY_FUNCTION__ line:__LINE__]
|
||||
#define MSACLogAssert(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelAssert, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogError(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelError, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogWarning(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelWarning, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogInfo(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelInfo, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogDebug(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelDebug, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogVerbose(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelVerbose, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
|
||||
NS_SWIFT_NAME(Logger)
|
||||
@interface MSACLogger : NSObject
|
||||
|
||||
+ (void)logMessage:(MSACLogMessageProvider)messageProvider
|
||||
level:(MSACLogLevel)loglevel
|
||||
tag:(NSString *)tag
|
||||
file:(const char *)file
|
||||
function:(const char *)function
|
||||
line:(uint)line;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef SERIALIZABLE_OBJECT_H
|
||||
#define SERIALIZABLE_OBJECT_H
|
||||
|
||||
@protocol MSACSerializableObject <NSCoding>
|
||||
|
||||
/**
|
||||
* Serialize this object to a dictionary.
|
||||
*
|
||||
* @return A dictionary representing this object.
|
||||
*/
|
||||
- (NSMutableDictionary *)serializeToDictionary;
|
||||
|
||||
@end
|
||||
#endif
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_SERVICE_H
|
||||
#define MSAC_SERVICE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Protocol declaring service logic.
|
||||
*/
|
||||
NS_SWIFT_NAME(Service)
|
||||
@protocol MSACService <NSObject>
|
||||
|
||||
/**
|
||||
* Indicates whether this service is enabled.
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+13
-10
@@ -1,20 +1,25 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_SERVICE_ABSTRACT_H
|
||||
#define MS_SERVICE_ABSTRACT_H
|
||||
#ifndef MSAC_SERVICE_ABSTRACT_H
|
||||
#define MSAC_SERVICE_ABSTRACT_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSService.h"
|
||||
#if __has_include(<AppCenter/MSACService.h>)
|
||||
#import <AppCenter/MSACService.h>
|
||||
#else
|
||||
#import "MSACService.h"
|
||||
#endif
|
||||
|
||||
@protocol MSChannelGroupProtocol;
|
||||
@protocol MSACChannelGroupProtocol;
|
||||
|
||||
/**
|
||||
* Abstraction of services common logic.
|
||||
* This class is intended to be subclassed only not instantiated directly.
|
||||
*/
|
||||
@interface MSServiceAbstract : NSObject <MSService>
|
||||
NS_SWIFT_NAME(ServiceAbstract)
|
||||
@interface MSACServiceAbstract : NSObject <MSACService>
|
||||
|
||||
/**
|
||||
* The flag indicates whether the service is started from application or not.
|
||||
@@ -29,7 +34,7 @@
|
||||
* @param token default transmission target token for this service.
|
||||
* @param fromApplication indicates whether the service started from an application or not.
|
||||
*/
|
||||
- (void)startWithChannelGroup:(id<MSChannelGroupProtocol>)channelGroup
|
||||
- (void)startWithChannelGroup:(id<MSACChannelGroupProtocol>)channelGroup
|
||||
appSecret:(NSString *)appSecret
|
||||
transmissionTargetToken:(NSString *)token
|
||||
fromApplication:(BOOL)fromApplication;
|
||||
@@ -44,11 +49,9 @@
|
||||
- (void)updateConfigurationWithAppSecret:(NSString *)appSecret transmissionTargetToken:(NSString *)token;
|
||||
|
||||
/**
|
||||
* Checks if the service needs the application secret.
|
||||
*
|
||||
* @return `YES` if the application secret is required, `NO` otherwise.
|
||||
* The flag indicate whether the service needs the application secret or not.
|
||||
*/
|
||||
- (BOOL)isAppSecretRequired;
|
||||
@property(atomic, readonly) BOOL isAppSecretRequired;
|
||||
|
||||
@end
|
||||
|
||||
+8
-3
@@ -3,14 +3,19 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSConstants.h"
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This is a utility for producing App Center style log messages. It is only intended for use by App Center services and wrapper SDKs of App
|
||||
* Center.
|
||||
*/
|
||||
@interface MSWrapperLogger : NSObject
|
||||
NS_SWIFT_NAME(WrapperLogger)
|
||||
@interface MSACWrapperLogger : NSObject
|
||||
|
||||
+ (void)MSWrapperLog:(MSLogMessageProvider)message tag:(NSString *)tag level:(MSLogLevel)level;
|
||||
+ (void)MSACWrapperLog:(MSACLogMessageProvider)message tag:(NSString *)tag level:(MSACLogLevel)level;
|
||||
|
||||
@end
|
||||
+4
-3
@@ -1,12 +1,13 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_WRAPPER_SDK_H
|
||||
#define MS_WRAPPER_SDK_H
|
||||
#ifndef MSAC_WRAPPER_SDK_H
|
||||
#define MSAC_WRAPPER_SDK_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MSWrapperSdk : NSObject
|
||||
NS_SWIFT_NAME(WrapperSdk)
|
||||
@interface MSACWrapperSdk : NSObject
|
||||
|
||||
/*
|
||||
* Version of the wrapper SDK. When the SDK is embedding another base SDK (for example Xamarin.Android wraps Android), the Xamarin specific
|
||||
BIN
Binary file not shown.
+13
@@ -0,0 +1,13 @@
|
||||
framework module AppCenter {
|
||||
umbrella header "AppCenter.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
|
||||
link framework "Foundation"
|
||||
link framework "CoreTelephony"
|
||||
link framework "SystemConfiguration"
|
||||
link framework "UIKit"
|
||||
link "sqlite3"
|
||||
link "z"
|
||||
}
|
||||
+21
-17
@@ -3,14 +3,16 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSConstants+Flags.h"
|
||||
#import "MSACConstants+Flags.h"
|
||||
|
||||
@protocol MSChannelUnitProtocol;
|
||||
@protocol MSChannelGroupProtocol;
|
||||
@protocol MSChannelProtocol;
|
||||
@protocol MSLog;
|
||||
@protocol MSACChannelUnitProtocol;
|
||||
@protocol MSACChannelGroupProtocol;
|
||||
@protocol MSACChannelProtocol;
|
||||
@protocol MSACLog;
|
||||
|
||||
@protocol MSChannelDelegate <NSObject>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MSACChannelDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
@@ -20,14 +22,14 @@
|
||||
* @param channelGroup The channel group.
|
||||
* @param channel The newly added channel.
|
||||
*/
|
||||
- (void)channelGroup:(id<MSChannelGroupProtocol>)channelGroup didAddChannelUnit:(id<MSChannelUnitProtocol>)channel;
|
||||
- (void)channelGroup:(id<MSACChannelGroupProtocol>)channelGroup didAddChannelUnit:(id<MSACChannelUnitProtocol>)channel;
|
||||
|
||||
/**
|
||||
* A callback that is called when a log is just enqueued. Delegates may want to prepare the log a little more before further processing.
|
||||
*
|
||||
* @param log The log to prepare.
|
||||
*/
|
||||
- (void)channel:(id<MSChannelProtocol>)channel prepareLog:(id<MSLog>)log;
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel prepareLog:(id<MSACLog>)log;
|
||||
|
||||
/**
|
||||
* A callback that is called after a log is definitely prepared.
|
||||
@@ -36,7 +38,7 @@
|
||||
* @param internalId An internal Id to keep track of logs.
|
||||
* @param flags Options for the log.
|
||||
*/
|
||||
- (void)channel:(id<MSChannelProtocol>)channel didPrepareLog:(id<MSLog>)log internalId:(NSString *)internalId flags:(MSFlags)flags;
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didPrepareLog:(id<MSACLog>)log internalId:(NSString *)internalId flags:(MSACFlags)flags;
|
||||
|
||||
/**
|
||||
* A callback that is called after a log completed the enqueueing process whether it was successful or not.
|
||||
@@ -44,7 +46,7 @@
|
||||
* @param log The log.
|
||||
* @param internalId An internal Id to keep track of logs.
|
||||
*/
|
||||
- (void)channel:(id<MSChannelProtocol>)channel didCompleteEnqueueingLog:(id<MSLog>)log internalId:(NSString *)internalId;
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didCompleteEnqueueingLog:(id<MSACLog>)log internalId:(NSString *)internalId;
|
||||
|
||||
/**
|
||||
* Callback method that will be called before each log will be send to the server.
|
||||
@@ -52,7 +54,7 @@
|
||||
* @param channel The channel object.
|
||||
* @param log The log to be sent.
|
||||
*/
|
||||
- (void)channel:(id<MSChannelProtocol>)channel willSendLog:(id<MSLog>)log;
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel willSendLog:(id<MSACLog>)log;
|
||||
|
||||
/**
|
||||
* Callback method that will be called in case the SDK was able to send a log.
|
||||
@@ -60,7 +62,7 @@
|
||||
* @param channel The channel object.
|
||||
* @param log The log to be sent.
|
||||
*/
|
||||
- (void)channel:(id<MSChannelProtocol>)channel didSucceedSendingLog:(id<MSLog>)log;
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didSucceedSendingLog:(id<MSACLog>)log;
|
||||
|
||||
/**
|
||||
* Callback method that will be called in case the SDK was unable to send a log.
|
||||
@@ -69,7 +71,7 @@
|
||||
* @param log The log to be sent.
|
||||
* @param error The error that occured.
|
||||
*/
|
||||
- (void)channel:(id<MSChannelProtocol>)channel didFailSendingLog:(id<MSLog>)log withError:(NSError *)error;
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didFailSendingLog:(id<MSACLog>)log withError:(nullable NSError *)error;
|
||||
|
||||
/**
|
||||
* A callback that is called when setEnabled has been invoked.
|
||||
@@ -78,7 +80,7 @@
|
||||
* @param isEnabled The boolean that indicates enabled.
|
||||
* @param deletedData The boolean that indicates deleting data on disabled.
|
||||
*/
|
||||
- (void)channel:(id<MSChannelProtocol>)channel didSetEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deletedData;
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didSetEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deletedData;
|
||||
|
||||
/**
|
||||
* A callback that is called when pause has been invoked.
|
||||
@@ -86,7 +88,7 @@
|
||||
* @param channel The channel.
|
||||
* @param identifyingObject The identifying object used to pause the channel.
|
||||
*/
|
||||
- (void)channel:(id<MSChannelProtocol>)channel didPauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didPauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
/**
|
||||
* A callback that is called when resume has been invoked.
|
||||
@@ -94,7 +96,7 @@
|
||||
* @param channel The channel.
|
||||
* @param identifyingObject The identifying object used to resume the channel.
|
||||
*/
|
||||
- (void)channel:(id<MSChannelProtocol>)channel didResumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didResumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
/**
|
||||
* Callback method that will determine if a log should be filtered out from the usual processing pipeline. If any delegate returns true, the
|
||||
@@ -105,6 +107,8 @@
|
||||
*
|
||||
* @return `true` if the log should be filtered out.
|
||||
*/
|
||||
- (BOOL)channelUnit:(id<MSChannelUnitProtocol>)channelUnit shouldFilterLog:(id<MSLog>)log;
|
||||
- (BOOL)channelUnit:(id<MSACChannelUnitProtocol>)channelUnit shouldFilterLog:(id<MSACLog>)log;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
BIN
Binary file not shown.
+44
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACAppCenter.h>)
|
||||
#import <AppCenter/MSACAbstractLog.h>
|
||||
#import <AppCenter/MSACAppCenter.h>
|
||||
#import <AppCenter/MSACAppCenterErrors.h>
|
||||
#import <AppCenter/MSACChannelGroupProtocol.h>
|
||||
#import <AppCenter/MSACChannelProtocol.h>
|
||||
#import <AppCenter/MSACConstants+Flags.h>
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#import <AppCenter/MSACCustomProperties.h>
|
||||
#import <AppCenter/MSACDevice.h>
|
||||
#import <AppCenter/MSACEnable.h>
|
||||
#import <AppCenter/MSACLog.h>
|
||||
#import <AppCenter/MSACLogWithProperties.h>
|
||||
#import <AppCenter/MSACLogger.h>
|
||||
#import <AppCenter/MSACSerializableObject.h>
|
||||
#import <AppCenter/MSACService.h>
|
||||
#import <AppCenter/MSACServiceAbstract.h>
|
||||
#import <AppCenter/MSACWrapperLogger.h>
|
||||
#import <AppCenter/MSACWrapperSdk.h>
|
||||
#else
|
||||
#import "MSACAbstractLog.h"
|
||||
#import "MSACAppCenter.h"
|
||||
#import "MSACAppCenterErrors.h"
|
||||
#import "MSACChannelGroupProtocol.h"
|
||||
#import "MSACChannelProtocol.h"
|
||||
#import "MSACConstants+Flags.h"
|
||||
#import "MSACConstants.h"
|
||||
#import "MSACCustomProperties.h"
|
||||
#import "MSACDevice.h"
|
||||
#import "MSACEnable.h"
|
||||
#import "MSACLog.h"
|
||||
#import "MSACLogWithProperties.h"
|
||||
#import "MSACLogger.h"
|
||||
#import "MSACSerializableObject.h"
|
||||
#import "MSACService.h"
|
||||
#import "MSACServiceAbstract.h"
|
||||
#import "MSACWrapperLogger.h"
|
||||
#import "MSACWrapperSdk.h"
|
||||
#endif
|
||||
+4
-3
@@ -1,12 +1,13 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_ABSTRACT_LOG_H
|
||||
#define MS_ABSTRACT_LOG_H
|
||||
#ifndef MSAC_ABSTRACT_LOG_H
|
||||
#define MSAC_ABSTRACT_LOG_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MSAbstractLog : NSObject
|
||||
NS_SWIFT_NAME(AbstractLog)
|
||||
@interface MSACAbstractLog : NSObject
|
||||
|
||||
@end
|
||||
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef MSAC_APP_CENTER
|
||||
#define MSAC_APP_CENTER
|
||||
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
@class MSACWrapperSdk;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
@class MSACCustomProperties;
|
||||
#endif
|
||||
|
||||
NS_SWIFT_NAME(AppCenter)
|
||||
@interface MSACAppCenter : NSObject
|
||||
|
||||
/**
|
||||
* Returns the singleton instance of MSACAppCenter.
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
* Configure the SDK with an application secret.
|
||||
*
|
||||
* @param appSecret A unique and secret key used to identify the application.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)configureWithAppSecret:(NSString *)appSecret NS_SWIFT_NAME(configure(withAppSecret:));
|
||||
|
||||
/**
|
||||
* Configure the SDK.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)configure;
|
||||
|
||||
/**
|
||||
* Configure the SDK with an application secret and an array of services to start.
|
||||
*
|
||||
* @param appSecret A unique and secret key used to identify the application.
|
||||
* @param services Array of services to start.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)start:(NSString *)appSecret withServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(withAppSecret:services:));
|
||||
|
||||
/**
|
||||
* Start the SDK with an array of services.
|
||||
*
|
||||
* @param services Array of services to start.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)startWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(services:));
|
||||
|
||||
/**
|
||||
* Start a service.
|
||||
*
|
||||
* @param service A service to start.
|
||||
*
|
||||
* @discussion This may be called only once per service per application process lifetime.
|
||||
*/
|
||||
+ (void)startService:(Class)service;
|
||||
|
||||
/**
|
||||
* Configure the SDK with an array of services to start from a library. This will not start the service at application level, it will enable
|
||||
* the service only for the library.
|
||||
*
|
||||
* @param services Array of services to start.
|
||||
*/
|
||||
+ (void)startFromLibraryWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(startFromLibrary(services:));
|
||||
|
||||
/**
|
||||
* The flag indicates whether the SDK has already been configured or not.
|
||||
*/
|
||||
@property(class, atomic, readonly, getter=isConfigured) BOOL configured;
|
||||
|
||||
/**
|
||||
* The flag indicates whether app is running in App Center Test Cloud.
|
||||
*/
|
||||
@property(class, atomic, readonly, getter=isRunningInAppCenterTestCloud) BOOL runningInAppCenterTestCloud;
|
||||
|
||||
/**
|
||||
* The flag indicates whether or not the SDK was enabled as a whole
|
||||
*
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
|
||||
|
||||
/**
|
||||
* Flag indicating whether SDK can send network requests.
|
||||
*
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
@property(class, nonatomic, getter=isNetworkRequestsAllowed, setter=setNetworkRequestsAllowed:)
|
||||
BOOL networkRequestsAllowed NS_SWIFT_NAME(networkRequestsAllowed);
|
||||
|
||||
/**
|
||||
* The SDK's log level.
|
||||
*/
|
||||
@property(class, nonatomic) MSACLogLevel logLevel;
|
||||
|
||||
/**
|
||||
* Base URL to use for backend communication.
|
||||
*/
|
||||
@property(class, nonatomic, strong) NSString *logUrl;
|
||||
|
||||
/**
|
||||
* Set log handler.
|
||||
*/
|
||||
@property(class, nonatomic) MSACLogHandler logHandler;
|
||||
|
||||
/**
|
||||
* Set wrapper SDK information to use when building device properties. This is intended in case you are building a SDK that uses the App
|
||||
* Center SDK under the hood, e.g. our Xamarin SDK or ReactNative SDk.
|
||||
*/
|
||||
@property(class, nonatomic, strong) MSACWrapperSdk *wrapperSdk;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
/**
|
||||
* Set the custom properties.
|
||||
*
|
||||
* @param customProperties Custom properties object.
|
||||
*/
|
||||
+ (void)setCustomProperties:(MSACCustomProperties *)customProperties;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check whether the application delegate forwarder is enabled or not.
|
||||
*
|
||||
* @discussion The application delegate forwarder forwards messages that target your application delegate methods via swizzling to the SDK.
|
||||
* It simplifies the SDK integration but may not be suitable to any situations. For
|
||||
* instance it should be disabled if you or one of your third party SDK is doing message forwarding on the application delegate. Message
|
||||
* forwarding usually implies the implementation of @see NSObject#forwardingTargetForSelector: or @see NSObject#forwardInvocation: methods.
|
||||
* To disable the application delegate forwarder just add the `AppCenterAppDelegateForwarderEnabled` tag to your Info .plist file and set it
|
||||
* to `0`. Then you will have to forward any application delegate needed by the SDK manually.
|
||||
*/
|
||||
@property(class, readonly, nonatomic, getter=isAppDelegateForwarderEnabled) BOOL appDelegateForwarderEnabled;
|
||||
|
||||
/**
|
||||
* Unique installation identifier.
|
||||
*
|
||||
*/
|
||||
@property(class, readonly, nonatomic) NSUUID *installId;
|
||||
|
||||
/**
|
||||
* Detect if a debugger is attached to the app process. This is only invoked once on app startup and can not detect
|
||||
* if the debugger is being attached during runtime!
|
||||
*
|
||||
*/
|
||||
@property(class, readonly, nonatomic, getter=isDebuggerAttached) BOOL debuggerAttached;
|
||||
|
||||
/**
|
||||
* Current version of AppCenter SDK.
|
||||
*
|
||||
*/
|
||||
@property(class, readonly, nonatomic) NSString *sdkVersion;
|
||||
|
||||
/**
|
||||
* Set the maximum size of the internal storage. This method must be called before App Center is started. This method is only intended for
|
||||
* applications.
|
||||
*
|
||||
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
|
||||
* (default is 4096 bytes). Values below 20,480 bytes (20 KiB) will be ignored.
|
||||
*
|
||||
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
|
||||
* is successful, and `NO` otherwise. This parameter can be null.
|
||||
*
|
||||
* @discussion This only sets the maximum size of the database, but App Center modules might store additional data.
|
||||
* The value passed to this method is not persisted on disk. The default maximum database size is 10485760 bytes (10 MiB).
|
||||
*/
|
||||
+ (void)setMaxStorageSize:(long)sizeInBytes completionHandler:(void (^)(BOOL))completionHandler;
|
||||
|
||||
/**
|
||||
* Set the user identifier.
|
||||
*
|
||||
* @discussion Set the user identifier for logs sent for the default target token when the secret passed in @c
|
||||
* MSACAppCenter:start:withServices: contains "target={targetToken}".
|
||||
*
|
||||
* For App Center backend the user identifier maximum length is 256 characters.
|
||||
*
|
||||
* AppCenter must be configured or started before this API can be used.
|
||||
*/
|
||||
@property(class, nonatomic, strong) NSString *userId;
|
||||
|
||||
/**
|
||||
* Set country code to use when building device properties.
|
||||
*
|
||||
* @see https://www.iso.org/obp/ui/#search for more information.
|
||||
*/
|
||||
@property(class, nonatomic, strong) NSString *countryCode;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_APP_CENTER_ERRORS_H
|
||||
#define MSAC_APP_CENTER_ERRORS_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define MSAC_APP_CENTER_BASE_DOMAIN @"com.Microsoft.AppCenter."
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#pragma mark - Domain
|
||||
|
||||
static NSString *const kMSACACErrorDomain = MSAC_APP_CENTER_BASE_DOMAIN @"ErrorDomain";
|
||||
|
||||
#pragma mark - General
|
||||
|
||||
// Error codes.
|
||||
NS_ENUM(NSInteger){MSACACLogInvalidContainerErrorCode = 1, MSACACCanceledErrorCode = 2, MSACACDisabledErrorCode = 3};
|
||||
|
||||
// Error descriptions.
|
||||
static NSString const *kMSACACLogInvalidContainerErrorDesc = @"Invalid log container.";
|
||||
static NSString const *kMSACACCanceledErrorDesc = @"The operation was canceled.";
|
||||
static NSString const *kMSACACDisabledErrorDesc = @"The service is disabled.";
|
||||
|
||||
#pragma mark - Connection
|
||||
|
||||
// Error codes.
|
||||
NS_ENUM(NSInteger){MSACACConnectionPausedErrorCode = 100, MSACACConnectionHttpErrorCode = 101};
|
||||
|
||||
// Error descriptions.
|
||||
static NSString const *kMSACACConnectionHttpErrorDesc = @"An HTTP error occured.";
|
||||
static NSString const *kMSACACConnectionPausedErrorDesc = @"Canceled, connection paused with log deletion.";
|
||||
|
||||
// Error user info keys.
|
||||
static NSString const *kMSACACConnectionHttpCodeErrorKey = @"MSConnectionHttpCode";
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CHANNEL_GROUP_PROTOCOL_H
|
||||
#define MSAC_CHANNEL_GROUP_PROTOCOL_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACChannelProtocol.h>)
|
||||
#import <AppCenter/MSACChannelProtocol.h>
|
||||
#else
|
||||
#import "MSACChannelProtocol.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class MSACChannelUnitConfiguration;
|
||||
|
||||
@protocol MSACIngestionProtocol;
|
||||
@protocol MSACChannelUnitProtocol;
|
||||
|
||||
/**
|
||||
* `MSACChannelGroupProtocol` represents a kind of channel that contains constituent MSACChannelUnit objects. When an operation from the
|
||||
* `MSACChannelProtocol` is performed on the group, that operation should be propagated to its constituent MSACChannelUnit objects.
|
||||
*/
|
||||
NS_SWIFT_NAME(ChannelGroupProtocol)
|
||||
@protocol MSACChannelGroupProtocol <MSACChannelProtocol>
|
||||
|
||||
/**
|
||||
* Initialize a channel unit with the given configuration.
|
||||
*
|
||||
* @param configuration channel configuration.
|
||||
*
|
||||
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
|
||||
*/
|
||||
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
|
||||
NS_SWIFT_NAME(addChannelUnit(withConfiguration:));
|
||||
|
||||
/**
|
||||
* Initialize a channel unit with the given configuration.
|
||||
*
|
||||
* @param configuration channel configuration.
|
||||
* @param ingestion The alternative ingestion object
|
||||
*
|
||||
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
|
||||
*/
|
||||
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
|
||||
withIngestion:(nullable id<MSACIngestionProtocol>)ingestion
|
||||
NS_SWIFT_NAME(addChannelUnit(_:ingestion:));
|
||||
|
||||
/**
|
||||
* Change the base URL (schema + authority + port only) used to communicate with the backend.
|
||||
*/
|
||||
@property(nonatomic, strong) NSString *_Nullable logUrl;
|
||||
|
||||
/**
|
||||
* Set the app secret.
|
||||
*/
|
||||
@property(nonatomic, strong) NSString *_Nullable appSecret;
|
||||
|
||||
/**
|
||||
* Set the maximum size of the internal storage. This method must be called before App Center is started.
|
||||
*
|
||||
* @discussion The default maximum database size is 10485760 bytes (10 MiB).
|
||||
*
|
||||
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
|
||||
* (default is 4096 bytes). Values below 24576 bytes (24 KiB) will be ignored.
|
||||
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
|
||||
* is successful, and `NO` otherwise.
|
||||
*/
|
||||
- (void)setMaxStorageSize:(long)sizeInBytes
|
||||
completionHandler:(nullable void (^)(BOOL))completionHandler NS_SWIFT_NAME(setMaxStorageSize(_:completionHandler:));
|
||||
|
||||
/**
|
||||
* Return a channel unit instance for the given groupId.
|
||||
*
|
||||
* @param groupId The group ID for a channel unit.
|
||||
*
|
||||
* @return A channel unit instance or `nil`.
|
||||
*/
|
||||
- (nullable id<MSACChannelUnitProtocol>)channelUnitForGroupId:(NSString *)groupId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CHANNEL_PROTOCOL_H
|
||||
#define MSAC_CHANNEL_PROTOCOL_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACEnable.h>)
|
||||
#import <AppCenter/MSACEnable.h>
|
||||
#else
|
||||
#import "MSACEnable.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MSACChannelDelegate;
|
||||
|
||||
/**
|
||||
* `MSACChannelProtocol` contains the essential operations of a channel. Channels are broadly responsible for enqueuing logs to be sent to
|
||||
* the backend and/or stored on disk.
|
||||
*/
|
||||
NS_SWIFT_NAME(ChannelProtocol)
|
||||
@protocol MSACChannelProtocol <NSObject, MSACEnable>
|
||||
|
||||
/**
|
||||
* Add delegate.
|
||||
*
|
||||
* @param delegate delegate.
|
||||
*/
|
||||
- (void)addDelegate:(id<MSACChannelDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Remove delegate.
|
||||
*
|
||||
* @param delegate delegate.
|
||||
*/
|
||||
- (void)removeDelegate:(id<MSACChannelDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Pause operations, logs will be stored but not sent.
|
||||
*
|
||||
* @param identifyingObject Object used to identify the pause request.
|
||||
*
|
||||
* @discussion A paused channel doesn't forward logs to the ingestion. The identifying object used to pause the channel can be any unique
|
||||
* object. The same identifying object must be used to call resume. For simplicity if the caller is the one owning the channel then @c self
|
||||
* can be used as identifying object.
|
||||
*
|
||||
* @see resumeWithIdentifyingObject:
|
||||
*/
|
||||
- (void)pauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
/**
|
||||
* Resume operations, logs can be sent again.
|
||||
*
|
||||
* @param identifyingObject Object used to passed to the pause method.
|
||||
*
|
||||
* @discussion The channel only resume when all the outstanding identifying objects have been resumed.
|
||||
*
|
||||
* @see pauseWithIdentifyingObject:
|
||||
*/
|
||||
- (void)resumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CONSTANTS_FLAGS_H
|
||||
#define MSAC_CONSTANTS_FLAGS_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, MSACFlags) {
|
||||
MSACFlagsNone = (0 << 0), // => 00000000
|
||||
MSACFlagsNormal = (1 << 0), // => 00000001
|
||||
MSACFlagsCritical = (1 << 1), // => 00000010
|
||||
MSACFlagsPersistenceNormal DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsNormal") = MSACFlagsNormal,
|
||||
MSACFlagsPersistenceCritical DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsCritical") = MSACFlagsCritical,
|
||||
MSACFlagsDefault = MSACFlagsNormal
|
||||
} NS_SWIFT_NAME(Flags);
|
||||
|
||||
#endif
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Log Levels
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, MSACLogLevel) {
|
||||
|
||||
/**
|
||||
* Logging will be very chatty
|
||||
*/
|
||||
MSACLogLevelVerbose = 2,
|
||||
|
||||
/**
|
||||
* Debug information will be logged
|
||||
*/
|
||||
MSACLogLevelDebug = 3,
|
||||
|
||||
/**
|
||||
* Information will be logged
|
||||
*/
|
||||
MSACLogLevelInfo = 4,
|
||||
|
||||
/**
|
||||
* Errors and warnings will be logged
|
||||
*/
|
||||
MSACLogLevelWarning = 5,
|
||||
|
||||
/**
|
||||
* Errors will be logged
|
||||
*/
|
||||
MSACLogLevelError = 6,
|
||||
|
||||
/**
|
||||
* Only critical errors will be logged
|
||||
*/
|
||||
MSACLogLevelAssert = 7,
|
||||
|
||||
/**
|
||||
* Logging is disabled
|
||||
*/
|
||||
MSACLogLevelNone = 99
|
||||
} NS_SWIFT_NAME(LogLevel);
|
||||
|
||||
typedef NSString * (^MSACLogMessageProvider)(void)NS_SWIFT_NAME(LogMessageProvider);
|
||||
typedef void (^MSACLogHandler)(MSACLogMessageProvider messageProvider, MSACLogLevel logLevel, NSString *tag, const char *file,
|
||||
const char *function, uint line) NS_SWIFT_NAME(LogHandler);
|
||||
|
||||
/**
|
||||
* Channel priorities, check the kMSACPriorityCount if you add a new value.
|
||||
* The order matters here! Values NEED to range from low priority to high priority.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MSACPriority) { MSACPriorityBackground, MSACPriorityDefault, MSACPriorityHigh } NS_SWIFT_NAME(Priority);
|
||||
static short const kMSACPriorityCount = MSACPriorityHigh + 1;
|
||||
|
||||
/**
|
||||
* The priority by which the modules are initialized.
|
||||
* MSACPriorityMax is reserved for only 1 module and this needs to be Crashes.
|
||||
* Crashes needs to be initialized first to catch crashes in our other SDK Modules (which will hopefully never happen) and to avoid losing
|
||||
* any log at crash time.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MSACInitializationPriority) {
|
||||
MSACInitializationPriorityDefault = 500,
|
||||
MSACInitializationPriorityHigh = 750,
|
||||
MSACInitializationPriorityMax = 999
|
||||
} NS_SWIFT_NAME(InitializationPriority);
|
||||
|
||||
/**
|
||||
* Enum with the different HTTP status codes.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MSACHTTPCodesNo) {
|
||||
|
||||
// Invalid
|
||||
MSACHTTPCodesNo0XXInvalidUnknown = 0,
|
||||
|
||||
// Informational
|
||||
MSACHTTPCodesNo1XXInformationalUnknown = 1,
|
||||
MSACHTTPCodesNo100Continue = 100,
|
||||
MSACHTTPCodesNo101SwitchingProtocols = 101,
|
||||
MSACHTTPCodesNo102Processing = 102,
|
||||
|
||||
// Success
|
||||
MSACHTTPCodesNo2XXSuccessUnknown = 2,
|
||||
MSACHTTPCodesNo200OK = 200,
|
||||
MSACHTTPCodesNo201Created = 201,
|
||||
MSACHTTPCodesNo202Accepted = 202,
|
||||
MSACHTTPCodesNo203NonAuthoritativeInformation = 203,
|
||||
MSACHTTPCodesNo204NoContent = 204,
|
||||
MSACHTTPCodesNo205ResetContent = 205,
|
||||
MSACHTTPCodesNo206PartialContent = 206,
|
||||
MSACHTTPCodesNo207MultiStatus = 207,
|
||||
MSACHTTPCodesNo208AlreadyReported = 208,
|
||||
MSACHTTPCodesNo209IMUsed = 209,
|
||||
|
||||
// Redirection
|
||||
MSACHTTPCodesNo3XXSuccessUnknown = 3,
|
||||
MSACHTTPCodesNo300MultipleChoices = 300,
|
||||
MSACHTTPCodesNo301MovedPermanently = 301,
|
||||
MSACHTTPCodesNo302Found = 302,
|
||||
MSACHTTPCodesNo303SeeOther = 303,
|
||||
MSACHTTPCodesNo304NotModified = 304,
|
||||
MSACHTTPCodesNo305UseProxy = 305,
|
||||
MSACHTTPCodesNo306SwitchProxy = 306,
|
||||
MSACHTTPCodesNo307TemporaryRedirect = 307,
|
||||
MSACHTTPCodesNo308PermanentRedirect = 308,
|
||||
|
||||
// Client error
|
||||
MSACHTTPCodesNo4XXSuccessUnknown = 4,
|
||||
MSACHTTPCodesNo400BadRequest = 400,
|
||||
MSACHTTPCodesNo401Unauthorised = 401,
|
||||
MSACHTTPCodesNo402PaymentRequired = 402,
|
||||
MSACHTTPCodesNo403Forbidden = 403,
|
||||
MSACHTTPCodesNo404NotFound = 404,
|
||||
MSACHTTPCodesNo405MethodNotAllowed = 405,
|
||||
MSACHTTPCodesNo406NotAcceptable = 406,
|
||||
MSACHTTPCodesNo407ProxyAuthenticationRequired = 407,
|
||||
MSACHTTPCodesNo408RequestTimeout = 408,
|
||||
MSACHTTPCodesNo409Conflict = 409,
|
||||
MSACHTTPCodesNo410Gone = 410,
|
||||
MSACHTTPCodesNo411LengthRequired = 411,
|
||||
MSACHTTPCodesNo412PreconditionFailed = 412,
|
||||
MSACHTTPCodesNo413RequestEntityTooLarge = 413,
|
||||
MSACHTTPCodesNo414RequestURITooLong = 414,
|
||||
MSACHTTPCodesNo415UnsupportedMediaType = 415,
|
||||
MSACHTTPCodesNo416RequestedRangeNotSatisfiable = 416,
|
||||
MSACHTTPCodesNo417ExpectationFailed = 417,
|
||||
MSACHTTPCodesNo418IamATeapot = 418,
|
||||
MSACHTTPCodesNo419AuthenticationTimeout = 419,
|
||||
MSACHTTPCodesNo420MethodFailureSpringFramework = 420,
|
||||
MSACHTTPCodesNo420EnhanceYourCalmTwitter = 4200,
|
||||
MSACHTTPCodesNo422UnprocessableEntity = 422,
|
||||
MSACHTTPCodesNo423Locked = 423,
|
||||
MSACHTTPCodesNo424FailedDependency = 424,
|
||||
MSACHTTPCodesNo424MethodFailureWebDaw = 4240,
|
||||
MSACHTTPCodesNo425UnorderedCollection = 425,
|
||||
MSACHTTPCodesNo426UpgradeRequired = 426,
|
||||
MSACHTTPCodesNo428PreconditionRequired = 428,
|
||||
MSACHTTPCodesNo429TooManyRequests = 429,
|
||||
MSACHTTPCodesNo431RequestHeaderFieldsTooLarge = 431,
|
||||
MSACHTTPCodesNo444NoResponseNginx = 444,
|
||||
MSACHTTPCodesNo449RetryWithMicrosoft = 449,
|
||||
MSACHTTPCodesNo450BlockedByWindowsParentalControls = 450,
|
||||
MSACHTTPCodesNo451RedirectMicrosoft = 451,
|
||||
MSACHTTPCodesNo451UnavailableForLegalReasons = 4510,
|
||||
MSACHTTPCodesNo494RequestHeaderTooLargeNginx = 494,
|
||||
MSACHTTPCodesNo495CertErrorNginx = 495,
|
||||
MSACHTTPCodesNo496NoCertNginx = 496,
|
||||
MSACHTTPCodesNo497HTTPToHTTPSNginx = 497,
|
||||
MSACHTTPCodesNo499ClientClosedRequestNginx = 499,
|
||||
|
||||
// Server error
|
||||
MSACHTTPCodesNo5XXSuccessUnknown = 5,
|
||||
MSACHTTPCodesNo500InternalServerError = 500,
|
||||
MSACHTTPCodesNo501NotImplemented = 501,
|
||||
MSACHTTPCodesNo502BadGateway = 502,
|
||||
MSACHTTPCodesNo503ServiceUnavailable = 503,
|
||||
MSACHTTPCodesNo504GatewayTimeout = 504,
|
||||
MSACHTTPCodesNo505HTTPVersionNotSupported = 505,
|
||||
MSACHTTPCodesNo506VariantAlsoNegotiates = 506,
|
||||
MSACHTTPCodesNo507InsufficientStorage = 507,
|
||||
MSACHTTPCodesNo508LoopDetected = 508,
|
||||
MSACHTTPCodesNo509BandwidthLimitExceeded = 509,
|
||||
MSACHTTPCodesNo510NotExtended = 510,
|
||||
MSACHTTPCodesNo511NetworkAuthenticationRequired = 511,
|
||||
MSACHTTPCodesNo522ConnectionTimedOut = 522,
|
||||
MSACHTTPCodesNo598NetworkReadTimeoutErrorUnknown = 598,
|
||||
MSACHTTPCodesNo599NetworkConnectTimeoutErrorUnknown = 599
|
||||
} NS_SWIFT_NAME(HTTPCodesNo);
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CUSTOM_PROPERTIES_H
|
||||
#define MSAC_CUSTOM_PROPERTIES_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Custom properties builder.
|
||||
* Collects multiple properties to send in one log.
|
||||
*/
|
||||
NS_SWIFT_NAME(CustomProperties)
|
||||
@interface MSACCustomProperties : NSObject
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
* If the properties previously contained a property for the key, the old value is replaced.
|
||||
*
|
||||
* @param key Key with which the specified value is to be set.
|
||||
* @param value Value to be set with the specified key.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setString:(NSString *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
* If the properties previously contained a property for the key, the old value is replaced.
|
||||
*
|
||||
* @param key Key with which the specified value is to be set.
|
||||
* @param value Value to be set with the specified key.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setNumber:(NSNumber *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
* If the properties previously contained a property for the key, the old value is replaced.
|
||||
*
|
||||
* @param key Key with which the specified value is to be set.
|
||||
* @param value Value to be set with the specified key.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setBool:(BOOL)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
* If the properties previously contained a property for the key, the old value is replaced.
|
||||
*
|
||||
* @param key Key with which the specified value is to be set.
|
||||
* @param value Value to be set with the specified key.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setDate:(NSDate *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Clear the property for the specified key.
|
||||
*
|
||||
* @param key Key whose mapping is to be cleared.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)clearPropertyForKey:(NSString *)key NS_SWIFT_NAME(clearProperty(forKey:));
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_DEVICE_H
|
||||
#define MSAC_DEVICE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACWrapperSdk.h>)
|
||||
#import <AppCenter/MSACWrapperSdk.h>
|
||||
#else
|
||||
#import "MSACWrapperSdk.h"
|
||||
#endif
|
||||
|
||||
NS_SWIFT_NAME(Device)
|
||||
@interface MSACDevice : MSACWrapperSdk
|
||||
|
||||
/*
|
||||
* Name of the SDK. Consists of the name of the SDK and the platform, e.g. "appcenter.ios", "appcenter.android"
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *sdkName;
|
||||
|
||||
/*
|
||||
* Version of the SDK in semver format, e.g. "1.2.0" or "0.12.3-alpha.1".
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *sdkVersion;
|
||||
|
||||
/*
|
||||
* Device model (example: iPad2,3).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *model;
|
||||
|
||||
/*
|
||||
* Device manufacturer (example: HTC).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *oemName;
|
||||
|
||||
/*
|
||||
* OS name (example: iOS).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *osName;
|
||||
|
||||
/*
|
||||
* OS version (example: 9.3.0).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *osVersion;
|
||||
|
||||
/*
|
||||
* OS build code (example: LMY47X). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *osBuild;
|
||||
|
||||
/*
|
||||
* API level when applicable like in Android (example: 15). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSNumber *osApiLevel;
|
||||
|
||||
/*
|
||||
* Language code (example: en_US).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *locale;
|
||||
|
||||
/*
|
||||
* The offset in minutes from UTC for the device time zone, including daylight savings time.
|
||||
*/
|
||||
@property(nonatomic, readonly, strong) NSNumber *timeZoneOffset;
|
||||
|
||||
/*
|
||||
* Screen size of the device in pixels (example: 640x480).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *screenSize;
|
||||
|
||||
/*
|
||||
* Application version name, e.g. 1.1.0
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *appVersion;
|
||||
|
||||
/*
|
||||
* Carrier name (for mobile devices). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *carrierName;
|
||||
|
||||
/*
|
||||
* Carrier country code (for mobile devices). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *carrierCountry;
|
||||
|
||||
/*
|
||||
* The app's build number, e.g. 42.
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *appBuild;
|
||||
|
||||
/*
|
||||
* The bundle identifier, package identifier, or namespace, depending on what the individual plattforms use, .e.g com.microsoft.example.
|
||||
* [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *appNamespace;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_ENABLE_H
|
||||
#define MSAC_ENABLE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Protocol to define an instance that can be enabled/disabled.
|
||||
*/
|
||||
NS_SWIFT_NAME(Enable)
|
||||
@protocol MSACEnable <NSObject>
|
||||
|
||||
@required
|
||||
|
||||
/**
|
||||
* Enable/disable this instance and delete data on disabled state.
|
||||
*
|
||||
* @param isEnabled A boolean value set to YES to enable the instance or NO to disable it.
|
||||
* @param deleteData A boolean value set to YES to delete data or NO to keep it.
|
||||
*/
|
||||
- (void)setEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deleteData NS_SWIFT_NAME(setEnabled(_:deleteDataOnDisabled:));
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_LOG_H
|
||||
#define MSAC_LOG_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class MSACDevice;
|
||||
|
||||
NS_SWIFT_NAME(Log)
|
||||
@protocol MSACLog <NSObject>
|
||||
|
||||
/**
|
||||
* Log type.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *type;
|
||||
|
||||
/**
|
||||
* Log timestamp.
|
||||
*/
|
||||
@property(nonatomic, strong) NSDate *timestamp;
|
||||
|
||||
/**
|
||||
* A session identifier is used to correlate logs together. A session is an abstract concept in the API and is not necessarily an analytics
|
||||
* session, it can be used to only track crashes.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *sid;
|
||||
|
||||
/**
|
||||
* Optional distribution group ID value.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *distributionGroupId;
|
||||
|
||||
/**
|
||||
* Optional user identifier.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *userId;
|
||||
|
||||
/**
|
||||
* Device properties associated to this log.
|
||||
*/
|
||||
@property(nonatomic, strong) MSACDevice *device;
|
||||
|
||||
/**
|
||||
* Transient object tag. For example, a log can be tagged with a transmission target. We do this currently to prevent properties being
|
||||
* applied retroactively to previous logs by comparing their tags.
|
||||
*/
|
||||
@property(nonatomic, strong) NSObject *tag;
|
||||
|
||||
/**
|
||||
* Checks if the object's values are valid.
|
||||
*
|
||||
* @return YES, if the object is valid.
|
||||
*/
|
||||
- (BOOL)isValid;
|
||||
|
||||
/**
|
||||
* Adds a transmission target token that this log should be sent to.
|
||||
*
|
||||
* @param token The transmission target token.
|
||||
*/
|
||||
- (void)addTransmissionTargetToken:(NSString *)token;
|
||||
|
||||
/**
|
||||
* Gets all transmission target tokens that this log should be sent to.
|
||||
*
|
||||
* @returns Collection of transmission target tokens that this log should be sent to.
|
||||
*/
|
||||
- (NSSet *)transmissionTargetTokens;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_LOG_WITH_PROPERTIES_H
|
||||
#define MSAC_LOG_WITH_PROPERTIES_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACAbstractLog.h>)
|
||||
#import <AppCenter/MSACAbstractLog.h>
|
||||
#else
|
||||
#import "MSACAbstractLog.h"
|
||||
#endif
|
||||
|
||||
NS_SWIFT_NAME(LogWithProperties)
|
||||
@interface MSACLogWithProperties : MSACAbstractLog
|
||||
|
||||
/**
|
||||
* Additional key/value pair parameters. [optional]
|
||||
*/
|
||||
@property(nonatomic, strong) NSDictionary<NSString *, NSString *> *properties;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef MSAC_LOGGER
|
||||
#define MSAC_LOGGER
|
||||
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
#define MSACLog(_level, _tag, _message) \
|
||||
[MSACLogger logMessage:_message level:_level tag:_tag file:__FILE__ function:__PRETTY_FUNCTION__ line:__LINE__]
|
||||
#define MSACLogAssert(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelAssert, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogError(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelError, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogWarning(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelWarning, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogInfo(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelInfo, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogDebug(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelDebug, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogVerbose(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelVerbose, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
|
||||
NS_SWIFT_NAME(Logger)
|
||||
@interface MSACLogger : NSObject
|
||||
|
||||
+ (void)logMessage:(MSACLogMessageProvider)messageProvider
|
||||
level:(MSACLogLevel)loglevel
|
||||
tag:(NSString *)tag
|
||||
file:(const char *)file
|
||||
function:(const char *)function
|
||||
line:(uint)line;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef SERIALIZABLE_OBJECT_H
|
||||
#define SERIALIZABLE_OBJECT_H
|
||||
|
||||
@protocol MSACSerializableObject <NSCoding>
|
||||
|
||||
/**
|
||||
* Serialize this object to a dictionary.
|
||||
*
|
||||
* @return A dictionary representing this object.
|
||||
*/
|
||||
- (NSMutableDictionary *)serializeToDictionary;
|
||||
|
||||
@end
|
||||
#endif
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_SERVICE_H
|
||||
#define MSAC_SERVICE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Protocol declaring service logic.
|
||||
*/
|
||||
NS_SWIFT_NAME(Service)
|
||||
@protocol MSACService <NSObject>
|
||||
|
||||
/**
|
||||
* Indicates whether this service is enabled.
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+13
-10
@@ -1,20 +1,25 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MS_SERVICE_ABSTRACT_H
|
||||
#define MS_SERVICE_ABSTRACT_H
|
||||
#ifndef MSAC_SERVICE_ABSTRACT_H
|
||||
#define MSAC_SERVICE_ABSTRACT_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSService.h"
|
||||
#if __has_include(<AppCenter/MSACService.h>)
|
||||
#import <AppCenter/MSACService.h>
|
||||
#else
|
||||
#import "MSACService.h"
|
||||
#endif
|
||||
|
||||
@protocol MSChannelGroupProtocol;
|
||||
@protocol MSACChannelGroupProtocol;
|
||||
|
||||
/**
|
||||
* Abstraction of services common logic.
|
||||
* This class is intended to be subclassed only not instantiated directly.
|
||||
*/
|
||||
@interface MSServiceAbstract : NSObject <MSService>
|
||||
NS_SWIFT_NAME(ServiceAbstract)
|
||||
@interface MSACServiceAbstract : NSObject <MSACService>
|
||||
|
||||
/**
|
||||
* The flag indicates whether the service is started from application or not.
|
||||
@@ -29,7 +34,7 @@
|
||||
* @param token default transmission target token for this service.
|
||||
* @param fromApplication indicates whether the service started from an application or not.
|
||||
*/
|
||||
- (void)startWithChannelGroup:(id<MSChannelGroupProtocol>)channelGroup
|
||||
- (void)startWithChannelGroup:(id<MSACChannelGroupProtocol>)channelGroup
|
||||
appSecret:(NSString *)appSecret
|
||||
transmissionTargetToken:(NSString *)token
|
||||
fromApplication:(BOOL)fromApplication;
|
||||
@@ -44,11 +49,9 @@
|
||||
- (void)updateConfigurationWithAppSecret:(NSString *)appSecret transmissionTargetToken:(NSString *)token;
|
||||
|
||||
/**
|
||||
* Checks if the service needs the application secret.
|
||||
*
|
||||
* @return `YES` if the application secret is required, `NO` otherwise.
|
||||
* The flag indicate whether the service needs the application secret or not.
|
||||
*/
|
||||
- (BOOL)isAppSecretRequired;
|
||||
@property(atomic, readonly) BOOL isAppSecretRequired;
|
||||
|
||||
@end
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This is a utility for producing App Center style log messages. It is only intended for use by App Center services and wrapper SDKs of App
|
||||
* Center.
|
||||
*/
|
||||
NS_SWIFT_NAME(WrapperLogger)
|
||||
@interface MSACWrapperLogger : NSObject
|
||||
|
||||
+ (void)MSACWrapperLog:(MSACLogMessageProvider)message tag:(NSString *)tag level:(MSACLogLevel)level;
|
||||
|
||||
@end
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_WRAPPER_SDK_H
|
||||
#define MSAC_WRAPPER_SDK_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_SWIFT_NAME(WrapperSdk)
|
||||
@interface MSACWrapperSdk : NSObject
|
||||
|
||||
/*
|
||||
* Version of the wrapper SDK. When the SDK is embedding another base SDK (for example Xamarin.Android wraps Android), the Xamarin specific
|
||||
* version is populated into this field while sdkVersion refers to the original Android SDK. [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *wrapperSdkVersion;
|
||||
|
||||
/*
|
||||
* Name of the wrapper SDK (examples: Xamarin, Cordova). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *wrapperSdkName;
|
||||
|
||||
/*
|
||||
* Version of the wrapper technology framework (Xamarin runtime version or ReactNative or Cordova etc...). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *wrapperRuntimeVersion;
|
||||
|
||||
/*
|
||||
* Label that is used to identify application code 'version' released via Live Update beacon running on device.
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *liveUpdateReleaseLabel;
|
||||
|
||||
/*
|
||||
* Identifier of environment that current application release belongs to, deployment key then maps to environment like Production, Staging.
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *liveUpdateDeploymentKey;
|
||||
|
||||
/*
|
||||
* Hash of all files (ReactNative or Cordova) deployed to device via LiveUpdate beacon. Helps identify the Release version on device or need
|
||||
* to download updates in future
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *liveUpdatePackageHash;
|
||||
|
||||
- (instancetype)initWithWrapperSdkVersion:(NSString *)wrapperSdkVersion
|
||||
wrapperSdkName:(NSString *)wrapperSdkName
|
||||
wrapperRuntimeVersion:(NSString *)wrapperRuntimeVersion
|
||||
liveUpdateReleaseLabel:(NSString *)liveUpdateReleaseLabel
|
||||
liveUpdateDeploymentKey:(NSString *)liveUpdateDeploymentKey
|
||||
liveUpdatePackageHash:(NSString *)liveUpdatePackageHash;
|
||||
|
||||
/**
|
||||
* Checks if the object's values are valid.
|
||||
*
|
||||
* @return YES, if the object is valid.
|
||||
*/
|
||||
- (BOOL)isValid;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
BIN
Binary file not shown.
+13
@@ -0,0 +1,13 @@
|
||||
framework module AppCenter {
|
||||
umbrella header "AppCenter.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
|
||||
link framework "Foundation"
|
||||
link framework "CoreTelephony"
|
||||
link framework "SystemConfiguration"
|
||||
link framework "UIKit"
|
||||
link "sqlite3"
|
||||
link "z"
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSACConstants+Flags.h"
|
||||
|
||||
@protocol MSACChannelUnitProtocol;
|
||||
@protocol MSACChannelGroupProtocol;
|
||||
@protocol MSACChannelProtocol;
|
||||
@protocol MSACLog;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MSACChannelDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
/**
|
||||
* A callback that is called when a channel unit is added to the channel group.
|
||||
*
|
||||
* @param channelGroup The channel group.
|
||||
* @param channel The newly added channel.
|
||||
*/
|
||||
- (void)channelGroup:(id<MSACChannelGroupProtocol>)channelGroup didAddChannelUnit:(id<MSACChannelUnitProtocol>)channel;
|
||||
|
||||
/**
|
||||
* A callback that is called when a log is just enqueued. Delegates may want to prepare the log a little more before further processing.
|
||||
*
|
||||
* @param log The log to prepare.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel prepareLog:(id<MSACLog>)log;
|
||||
|
||||
/**
|
||||
* A callback that is called after a log is definitely prepared.
|
||||
*
|
||||
* @param log The log.
|
||||
* @param internalId An internal Id to keep track of logs.
|
||||
* @param flags Options for the log.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didPrepareLog:(id<MSACLog>)log internalId:(NSString *)internalId flags:(MSACFlags)flags;
|
||||
|
||||
/**
|
||||
* A callback that is called after a log completed the enqueueing process whether it was successful or not.
|
||||
*
|
||||
* @param log The log.
|
||||
* @param internalId An internal Id to keep track of logs.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didCompleteEnqueueingLog:(id<MSACLog>)log internalId:(NSString *)internalId;
|
||||
|
||||
/**
|
||||
* Callback method that will be called before each log will be send to the server.
|
||||
*
|
||||
* @param channel The channel object.
|
||||
* @param log The log to be sent.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel willSendLog:(id<MSACLog>)log;
|
||||
|
||||
/**
|
||||
* Callback method that will be called in case the SDK was able to send a log.
|
||||
*
|
||||
* @param channel The channel object.
|
||||
* @param log The log to be sent.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didSucceedSendingLog:(id<MSACLog>)log;
|
||||
|
||||
/**
|
||||
* Callback method that will be called in case the SDK was unable to send a log.
|
||||
*
|
||||
* @param channel The channel object.
|
||||
* @param log The log to be sent.
|
||||
* @param error The error that occured.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didFailSendingLog:(id<MSACLog>)log withError:(nullable NSError *)error;
|
||||
|
||||
/**
|
||||
* A callback that is called when setEnabled has been invoked.
|
||||
*
|
||||
* @param channel The channel.
|
||||
* @param isEnabled The boolean that indicates enabled.
|
||||
* @param deletedData The boolean that indicates deleting data on disabled.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didSetEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deletedData;
|
||||
|
||||
/**
|
||||
* A callback that is called when pause has been invoked.
|
||||
*
|
||||
* @param channel The channel.
|
||||
* @param identifyingObject The identifying object used to pause the channel.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didPauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
/**
|
||||
* A callback that is called when resume has been invoked.
|
||||
*
|
||||
* @param channel The channel.
|
||||
* @param identifyingObject The identifying object used to resume the channel.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didResumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
/**
|
||||
* Callback method that will determine if a log should be filtered out from the usual processing pipeline. If any delegate returns true, the
|
||||
* log is filtered.
|
||||
*
|
||||
* @param channelUnit The channel unit that is going to send the log.
|
||||
* @param log The log to be filtered or not.
|
||||
*
|
||||
* @return `true` if the log should be filtered out.
|
||||
*/
|
||||
- (BOOL)channelUnit:(id<MSACChannelUnitProtocol>)channelUnit shouldFilterLog:(id<MSACLog>)log;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+417
@@ -0,0 +1,417 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Headers/AppCenter.h</key>
|
||||
<data>
|
||||
w9sW6K7DVhGfORLCjGXijaR25m0=
|
||||
</data>
|
||||
<key>Headers/MSACAbstractLog.h</key>
|
||||
<data>
|
||||
+Ikfy/fTOpqwPZM3Fpii3cpsx8Y=
|
||||
</data>
|
||||
<key>Headers/MSACAppCenter.h</key>
|
||||
<data>
|
||||
2cUgfgx3odOGivdk+n6FXq94KgU=
|
||||
</data>
|
||||
<key>Headers/MSACAppCenterErrors.h</key>
|
||||
<data>
|
||||
x7h4qpHD4GI3jrJ3F7n4UXAANsk=
|
||||
</data>
|
||||
<key>Headers/MSACChannelGroupProtocol.h</key>
|
||||
<data>
|
||||
jyWCHN4PSygLVy0IM5565DvDQAc=
|
||||
</data>
|
||||
<key>Headers/MSACChannelProtocol.h</key>
|
||||
<data>
|
||||
Y1rKi/TsirTR0MGBf1rIO/TTG0A=
|
||||
</data>
|
||||
<key>Headers/MSACConstants+Flags.h</key>
|
||||
<data>
|
||||
GK1gUSyIjWdv7KBP68wNxjxaH+E=
|
||||
</data>
|
||||
<key>Headers/MSACConstants.h</key>
|
||||
<data>
|
||||
d9HwKA0/VH3+pLRj1Pd49mqn2gI=
|
||||
</data>
|
||||
<key>Headers/MSACCustomProperties.h</key>
|
||||
<data>
|
||||
m7A9hEgL3d0gV4SyKmXJYRtwqoQ=
|
||||
</data>
|
||||
<key>Headers/MSACDevice.h</key>
|
||||
<data>
|
||||
suv4Wkt36Nkscy7jX2SSYzrkLRs=
|
||||
</data>
|
||||
<key>Headers/MSACEnable.h</key>
|
||||
<data>
|
||||
3DnplEFkD1LImYNk+84TqcQvBho=
|
||||
</data>
|
||||
<key>Headers/MSACLog.h</key>
|
||||
<data>
|
||||
1/7NIwYuYLGHIVMZps8b6/zOpJg=
|
||||
</data>
|
||||
<key>Headers/MSACLogWithProperties.h</key>
|
||||
<data>
|
||||
I4y13KVE36pyXv85mc5OWlCjplE=
|
||||
</data>
|
||||
<key>Headers/MSACLogger.h</key>
|
||||
<data>
|
||||
CaYHmB3+psy5/txfMvd2+bWGJkc=
|
||||
</data>
|
||||
<key>Headers/MSACSerializableObject.h</key>
|
||||
<data>
|
||||
or5nqKvOQVn2ZieUCmYK6fIZkWY=
|
||||
</data>
|
||||
<key>Headers/MSACService.h</key>
|
||||
<data>
|
||||
lz5atiMe+oTdu9e6g74KPC0CjOs=
|
||||
</data>
|
||||
<key>Headers/MSACServiceAbstract.h</key>
|
||||
<data>
|
||||
rBHatSAJK78PLgsMIpFqkby4tgA=
|
||||
</data>
|
||||
<key>Headers/MSACWrapperLogger.h</key>
|
||||
<data>
|
||||
qBVuNkF12BZYytRhCKwZ7zkiKhc=
|
||||
</data>
|
||||
<key>Headers/MSACWrapperSdk.h</key>
|
||||
<data>
|
||||
W9sdhEGnIGk/aFHS3gWwQ6FxUfI=
|
||||
</data>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
vQsDzcm1lLcpUNIaE5cw31rdoVk=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
go9b9XYQJIVcGlS/K5PS+8A+0dI=
|
||||
</data>
|
||||
<key>PrivateHeaders/MSACChannelDelegate.h</key>
|
||||
<data>
|
||||
Msff4BZ/b1IjaYeKTDBHtNtT7wI=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Headers/AppCenter.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
w9sW6K7DVhGfORLCjGXijaR25m0=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
e9qe35Ew1pz0RMBfwa2Jv+3188p8iTwwktkIgCa/ztg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACAbstractLog.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
+Ikfy/fTOpqwPZM3Fpii3cpsx8Y=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
7hsXFv3UkGsJLcc3eh2pMUrGbGYP2hCUC854z05SzNQ=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACAppCenter.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
2cUgfgx3odOGivdk+n6FXq94KgU=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
C10z0NrhN4J4qdWbypOdjlQ8QLlq4tvPMP21geOS4vI=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACAppCenterErrors.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
x7h4qpHD4GI3jrJ3F7n4UXAANsk=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
OcNwIIu4yFxG62mZtiABP3/9DoN9tj1fL/7nSvF8u8s=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACChannelGroupProtocol.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
jyWCHN4PSygLVy0IM5565DvDQAc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
d36rCjxsURqDkFv+g5BwWNybz5Zksc9B91gqArFcJbk=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACChannelProtocol.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
Y1rKi/TsirTR0MGBf1rIO/TTG0A=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
fI1fLkJvo9SXh2bAUWKIYlretRCOoGWJwlyvqMfQZNc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACConstants+Flags.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
GK1gUSyIjWdv7KBP68wNxjxaH+E=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
UDnw7GyNXzip13MvAvNKQQsWIUgU296uJHjPEkReCY8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACConstants.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
d9HwKA0/VH3+pLRj1Pd49mqn2gI=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
xx69UfYa0qw6aSDuVsUAqd/1+t90QCPkQUae+elZwZ0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACCustomProperties.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
m7A9hEgL3d0gV4SyKmXJYRtwqoQ=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
FveTXq+kqUdHHlSdLAoQisgT+95bzAuXTrTOQG/b/P8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACDevice.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
suv4Wkt36Nkscy7jX2SSYzrkLRs=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
i3TVX2C+DfcRKn2HTBaydWBYHjryX2Cy/eJJxjTFiT8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACEnable.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
3DnplEFkD1LImYNk+84TqcQvBho=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
XrDKc7bXZaW8JW4NMItSBrHLR6a+LRG1JSLXZ0U0NsI=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACLog.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
1/7NIwYuYLGHIVMZps8b6/zOpJg=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
3GF6xCTfpLDmOqKnacEOEDr5mkM/llKm0IoIEyISZKA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACLogWithProperties.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
I4y13KVE36pyXv85mc5OWlCjplE=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
WIrz7Xsi04AboAmZ5dA3d3t8D/8PomKLwsp7oorznVM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACLogger.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
CaYHmB3+psy5/txfMvd2+bWGJkc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
GipSaz+D+Z5eWauQP+10U8xvbAnxPeIRD4HTvn0F5DQ=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACSerializableObject.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
or5nqKvOQVn2ZieUCmYK6fIZkWY=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
TdCeoNla8kUqc5HPES6WNwi7ycy+4vRr3HGDipEXNVE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACService.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
lz5atiMe+oTdu9e6g74KPC0CjOs=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
aiO/PWAQDwhbPW1HDGqNM0kn4xYSwqPmdpmcTgpW/CE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACServiceAbstract.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
rBHatSAJK78PLgsMIpFqkby4tgA=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
vi9/mVDQylipTtHNfUe9r4GXjlc2bEnKFV8wmN/IXaE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACWrapperLogger.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
qBVuNkF12BZYytRhCKwZ7zkiKhc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
h2VHxvALAogCMocFQMUjmOkhCm+qkJwpGTzxwdxTdwo=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/MSACWrapperSdk.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
W9sdhEGnIGk/aFHS3gWwQ6FxUfI=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
5x+0epJnQN2wZKY2xjvsjAYrr6H1QGYIGz0ptux72dU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
go9b9XYQJIVcGlS/K5PS+8A+0dI=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
o0lkqm4+xeVosltUC3U+jCZnS35Tg8gUiUaKXbo0ZbQ=
|
||||
</data>
|
||||
</dict>
|
||||
<key>PrivateHeaders/MSACChannelDelegate.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
Msff4BZ/b1IjaYeKTDBHtNtT7wI=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
d1uS+ptvOX/o3CCB23FEJAtvcf7KIf/8ozlruAf1f0g=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
BIN
Binary file not shown.
+44
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACAppCenter.h>)
|
||||
#import <AppCenter/MSACAbstractLog.h>
|
||||
#import <AppCenter/MSACAppCenter.h>
|
||||
#import <AppCenter/MSACAppCenterErrors.h>
|
||||
#import <AppCenter/MSACChannelGroupProtocol.h>
|
||||
#import <AppCenter/MSACChannelProtocol.h>
|
||||
#import <AppCenter/MSACConstants+Flags.h>
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#import <AppCenter/MSACCustomProperties.h>
|
||||
#import <AppCenter/MSACDevice.h>
|
||||
#import <AppCenter/MSACEnable.h>
|
||||
#import <AppCenter/MSACLog.h>
|
||||
#import <AppCenter/MSACLogWithProperties.h>
|
||||
#import <AppCenter/MSACLogger.h>
|
||||
#import <AppCenter/MSACSerializableObject.h>
|
||||
#import <AppCenter/MSACService.h>
|
||||
#import <AppCenter/MSACServiceAbstract.h>
|
||||
#import <AppCenter/MSACWrapperLogger.h>
|
||||
#import <AppCenter/MSACWrapperSdk.h>
|
||||
#else
|
||||
#import "MSACAbstractLog.h"
|
||||
#import "MSACAppCenter.h"
|
||||
#import "MSACAppCenterErrors.h"
|
||||
#import "MSACChannelGroupProtocol.h"
|
||||
#import "MSACChannelProtocol.h"
|
||||
#import "MSACConstants+Flags.h"
|
||||
#import "MSACConstants.h"
|
||||
#import "MSACCustomProperties.h"
|
||||
#import "MSACDevice.h"
|
||||
#import "MSACEnable.h"
|
||||
#import "MSACLog.h"
|
||||
#import "MSACLogWithProperties.h"
|
||||
#import "MSACLogger.h"
|
||||
#import "MSACSerializableObject.h"
|
||||
#import "MSACService.h"
|
||||
#import "MSACServiceAbstract.h"
|
||||
#import "MSACWrapperLogger.h"
|
||||
#import "MSACWrapperSdk.h"
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_ABSTRACT_LOG_H
|
||||
#define MSAC_ABSTRACT_LOG_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_SWIFT_NAME(AbstractLog)
|
||||
@interface MSACAbstractLog : NSObject
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef MSAC_APP_CENTER
|
||||
#define MSAC_APP_CENTER
|
||||
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
@class MSACWrapperSdk;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
@class MSACCustomProperties;
|
||||
#endif
|
||||
|
||||
NS_SWIFT_NAME(AppCenter)
|
||||
@interface MSACAppCenter : NSObject
|
||||
|
||||
/**
|
||||
* Returns the singleton instance of MSACAppCenter.
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
* Configure the SDK with an application secret.
|
||||
*
|
||||
* @param appSecret A unique and secret key used to identify the application.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)configureWithAppSecret:(NSString *)appSecret NS_SWIFT_NAME(configure(withAppSecret:));
|
||||
|
||||
/**
|
||||
* Configure the SDK.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)configure;
|
||||
|
||||
/**
|
||||
* Configure the SDK with an application secret and an array of services to start.
|
||||
*
|
||||
* @param appSecret A unique and secret key used to identify the application.
|
||||
* @param services Array of services to start.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)start:(NSString *)appSecret withServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(withAppSecret:services:));
|
||||
|
||||
/**
|
||||
* Start the SDK with an array of services.
|
||||
*
|
||||
* @param services Array of services to start.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)startWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(services:));
|
||||
|
||||
/**
|
||||
* Start a service.
|
||||
*
|
||||
* @param service A service to start.
|
||||
*
|
||||
* @discussion This may be called only once per service per application process lifetime.
|
||||
*/
|
||||
+ (void)startService:(Class)service;
|
||||
|
||||
/**
|
||||
* Configure the SDK with an array of services to start from a library. This will not start the service at application level, it will enable
|
||||
* the service only for the library.
|
||||
*
|
||||
* @param services Array of services to start.
|
||||
*/
|
||||
+ (void)startFromLibraryWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(startFromLibrary(services:));
|
||||
|
||||
/**
|
||||
* The flag indicates whether the SDK has already been configured or not.
|
||||
*/
|
||||
@property(class, atomic, readonly, getter=isConfigured) BOOL configured;
|
||||
|
||||
/**
|
||||
* The flag indicates whether app is running in App Center Test Cloud.
|
||||
*/
|
||||
@property(class, atomic, readonly, getter=isRunningInAppCenterTestCloud) BOOL runningInAppCenterTestCloud;
|
||||
|
||||
/**
|
||||
* The flag indicates whether or not the SDK was enabled as a whole
|
||||
*
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
|
||||
|
||||
/**
|
||||
* Flag indicating whether SDK can send network requests.
|
||||
*
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
@property(class, nonatomic, getter=isNetworkRequestsAllowed, setter=setNetworkRequestsAllowed:)
|
||||
BOOL networkRequestsAllowed NS_SWIFT_NAME(networkRequestsAllowed);
|
||||
|
||||
/**
|
||||
* The SDK's log level.
|
||||
*/
|
||||
@property(class, nonatomic) MSACLogLevel logLevel;
|
||||
|
||||
/**
|
||||
* Base URL to use for backend communication.
|
||||
*/
|
||||
@property(class, nonatomic, strong) NSString *logUrl;
|
||||
|
||||
/**
|
||||
* Set log handler.
|
||||
*/
|
||||
@property(class, nonatomic) MSACLogHandler logHandler;
|
||||
|
||||
/**
|
||||
* Set wrapper SDK information to use when building device properties. This is intended in case you are building a SDK that uses the App
|
||||
* Center SDK under the hood, e.g. our Xamarin SDK or ReactNative SDk.
|
||||
*/
|
||||
@property(class, nonatomic, strong) MSACWrapperSdk *wrapperSdk;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
/**
|
||||
* Set the custom properties.
|
||||
*
|
||||
* @param customProperties Custom properties object.
|
||||
*/
|
||||
+ (void)setCustomProperties:(MSACCustomProperties *)customProperties;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check whether the application delegate forwarder is enabled or not.
|
||||
*
|
||||
* @discussion The application delegate forwarder forwards messages that target your application delegate methods via swizzling to the SDK.
|
||||
* It simplifies the SDK integration but may not be suitable to any situations. For
|
||||
* instance it should be disabled if you or one of your third party SDK is doing message forwarding on the application delegate. Message
|
||||
* forwarding usually implies the implementation of @see NSObject#forwardingTargetForSelector: or @see NSObject#forwardInvocation: methods.
|
||||
* To disable the application delegate forwarder just add the `AppCenterAppDelegateForwarderEnabled` tag to your Info .plist file and set it
|
||||
* to `0`. Then you will have to forward any application delegate needed by the SDK manually.
|
||||
*/
|
||||
@property(class, readonly, nonatomic, getter=isAppDelegateForwarderEnabled) BOOL appDelegateForwarderEnabled;
|
||||
|
||||
/**
|
||||
* Unique installation identifier.
|
||||
*
|
||||
*/
|
||||
@property(class, readonly, nonatomic) NSUUID *installId;
|
||||
|
||||
/**
|
||||
* Detect if a debugger is attached to the app process. This is only invoked once on app startup and can not detect
|
||||
* if the debugger is being attached during runtime!
|
||||
*
|
||||
*/
|
||||
@property(class, readonly, nonatomic, getter=isDebuggerAttached) BOOL debuggerAttached;
|
||||
|
||||
/**
|
||||
* Current version of AppCenter SDK.
|
||||
*
|
||||
*/
|
||||
@property(class, readonly, nonatomic) NSString *sdkVersion;
|
||||
|
||||
/**
|
||||
* Set the maximum size of the internal storage. This method must be called before App Center is started. This method is only intended for
|
||||
* applications.
|
||||
*
|
||||
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
|
||||
* (default is 4096 bytes). Values below 20,480 bytes (20 KiB) will be ignored.
|
||||
*
|
||||
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
|
||||
* is successful, and `NO` otherwise. This parameter can be null.
|
||||
*
|
||||
* @discussion This only sets the maximum size of the database, but App Center modules might store additional data.
|
||||
* The value passed to this method is not persisted on disk. The default maximum database size is 10485760 bytes (10 MiB).
|
||||
*/
|
||||
+ (void)setMaxStorageSize:(long)sizeInBytes completionHandler:(void (^)(BOOL))completionHandler;
|
||||
|
||||
/**
|
||||
* Set the user identifier.
|
||||
*
|
||||
* @discussion Set the user identifier for logs sent for the default target token when the secret passed in @c
|
||||
* MSACAppCenter:start:withServices: contains "target={targetToken}".
|
||||
*
|
||||
* For App Center backend the user identifier maximum length is 256 characters.
|
||||
*
|
||||
* AppCenter must be configured or started before this API can be used.
|
||||
*/
|
||||
@property(class, nonatomic, strong) NSString *userId;
|
||||
|
||||
/**
|
||||
* Set country code to use when building device properties.
|
||||
*
|
||||
* @see https://www.iso.org/obp/ui/#search for more information.
|
||||
*/
|
||||
@property(class, nonatomic, strong) NSString *countryCode;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_APP_CENTER_ERRORS_H
|
||||
#define MSAC_APP_CENTER_ERRORS_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define MSAC_APP_CENTER_BASE_DOMAIN @"com.Microsoft.AppCenter."
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#pragma mark - Domain
|
||||
|
||||
static NSString *const kMSACACErrorDomain = MSAC_APP_CENTER_BASE_DOMAIN @"ErrorDomain";
|
||||
|
||||
#pragma mark - General
|
||||
|
||||
// Error codes.
|
||||
NS_ENUM(NSInteger){MSACACLogInvalidContainerErrorCode = 1, MSACACCanceledErrorCode = 2, MSACACDisabledErrorCode = 3};
|
||||
|
||||
// Error descriptions.
|
||||
static NSString const *kMSACACLogInvalidContainerErrorDesc = @"Invalid log container.";
|
||||
static NSString const *kMSACACCanceledErrorDesc = @"The operation was canceled.";
|
||||
static NSString const *kMSACACDisabledErrorDesc = @"The service is disabled.";
|
||||
|
||||
#pragma mark - Connection
|
||||
|
||||
// Error codes.
|
||||
NS_ENUM(NSInteger){MSACACConnectionPausedErrorCode = 100, MSACACConnectionHttpErrorCode = 101};
|
||||
|
||||
// Error descriptions.
|
||||
static NSString const *kMSACACConnectionHttpErrorDesc = @"An HTTP error occured.";
|
||||
static NSString const *kMSACACConnectionPausedErrorDesc = @"Canceled, connection paused with log deletion.";
|
||||
|
||||
// Error user info keys.
|
||||
static NSString const *kMSACACConnectionHttpCodeErrorKey = @"MSConnectionHttpCode";
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CHANNEL_GROUP_PROTOCOL_H
|
||||
#define MSAC_CHANNEL_GROUP_PROTOCOL_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACChannelProtocol.h>)
|
||||
#import <AppCenter/MSACChannelProtocol.h>
|
||||
#else
|
||||
#import "MSACChannelProtocol.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class MSACChannelUnitConfiguration;
|
||||
|
||||
@protocol MSACIngestionProtocol;
|
||||
@protocol MSACChannelUnitProtocol;
|
||||
|
||||
/**
|
||||
* `MSACChannelGroupProtocol` represents a kind of channel that contains constituent MSACChannelUnit objects. When an operation from the
|
||||
* `MSACChannelProtocol` is performed on the group, that operation should be propagated to its constituent MSACChannelUnit objects.
|
||||
*/
|
||||
NS_SWIFT_NAME(ChannelGroupProtocol)
|
||||
@protocol MSACChannelGroupProtocol <MSACChannelProtocol>
|
||||
|
||||
/**
|
||||
* Initialize a channel unit with the given configuration.
|
||||
*
|
||||
* @param configuration channel configuration.
|
||||
*
|
||||
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
|
||||
*/
|
||||
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
|
||||
NS_SWIFT_NAME(addChannelUnit(withConfiguration:));
|
||||
|
||||
/**
|
||||
* Initialize a channel unit with the given configuration.
|
||||
*
|
||||
* @param configuration channel configuration.
|
||||
* @param ingestion The alternative ingestion object
|
||||
*
|
||||
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
|
||||
*/
|
||||
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
|
||||
withIngestion:(nullable id<MSACIngestionProtocol>)ingestion
|
||||
NS_SWIFT_NAME(addChannelUnit(_:ingestion:));
|
||||
|
||||
/**
|
||||
* Change the base URL (schema + authority + port only) used to communicate with the backend.
|
||||
*/
|
||||
@property(nonatomic, strong) NSString *_Nullable logUrl;
|
||||
|
||||
/**
|
||||
* Set the app secret.
|
||||
*/
|
||||
@property(nonatomic, strong) NSString *_Nullable appSecret;
|
||||
|
||||
/**
|
||||
* Set the maximum size of the internal storage. This method must be called before App Center is started.
|
||||
*
|
||||
* @discussion The default maximum database size is 10485760 bytes (10 MiB).
|
||||
*
|
||||
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
|
||||
* (default is 4096 bytes). Values below 24576 bytes (24 KiB) will be ignored.
|
||||
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
|
||||
* is successful, and `NO` otherwise.
|
||||
*/
|
||||
- (void)setMaxStorageSize:(long)sizeInBytes
|
||||
completionHandler:(nullable void (^)(BOOL))completionHandler NS_SWIFT_NAME(setMaxStorageSize(_:completionHandler:));
|
||||
|
||||
/**
|
||||
* Return a channel unit instance for the given groupId.
|
||||
*
|
||||
* @param groupId The group ID for a channel unit.
|
||||
*
|
||||
* @return A channel unit instance or `nil`.
|
||||
*/
|
||||
- (nullable id<MSACChannelUnitProtocol>)channelUnitForGroupId:(NSString *)groupId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CHANNEL_PROTOCOL_H
|
||||
#define MSAC_CHANNEL_PROTOCOL_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACEnable.h>)
|
||||
#import <AppCenter/MSACEnable.h>
|
||||
#else
|
||||
#import "MSACEnable.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MSACChannelDelegate;
|
||||
|
||||
/**
|
||||
* `MSACChannelProtocol` contains the essential operations of a channel. Channels are broadly responsible for enqueuing logs to be sent to
|
||||
* the backend and/or stored on disk.
|
||||
*/
|
||||
NS_SWIFT_NAME(ChannelProtocol)
|
||||
@protocol MSACChannelProtocol <NSObject, MSACEnable>
|
||||
|
||||
/**
|
||||
* Add delegate.
|
||||
*
|
||||
* @param delegate delegate.
|
||||
*/
|
||||
- (void)addDelegate:(id<MSACChannelDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Remove delegate.
|
||||
*
|
||||
* @param delegate delegate.
|
||||
*/
|
||||
- (void)removeDelegate:(id<MSACChannelDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Pause operations, logs will be stored but not sent.
|
||||
*
|
||||
* @param identifyingObject Object used to identify the pause request.
|
||||
*
|
||||
* @discussion A paused channel doesn't forward logs to the ingestion. The identifying object used to pause the channel can be any unique
|
||||
* object. The same identifying object must be used to call resume. For simplicity if the caller is the one owning the channel then @c self
|
||||
* can be used as identifying object.
|
||||
*
|
||||
* @see resumeWithIdentifyingObject:
|
||||
*/
|
||||
- (void)pauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
/**
|
||||
* Resume operations, logs can be sent again.
|
||||
*
|
||||
* @param identifyingObject Object used to passed to the pause method.
|
||||
*
|
||||
* @discussion The channel only resume when all the outstanding identifying objects have been resumed.
|
||||
*
|
||||
* @see pauseWithIdentifyingObject:
|
||||
*/
|
||||
- (void)resumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CONSTANTS_FLAGS_H
|
||||
#define MSAC_CONSTANTS_FLAGS_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, MSACFlags) {
|
||||
MSACFlagsNone = (0 << 0), // => 00000000
|
||||
MSACFlagsNormal = (1 << 0), // => 00000001
|
||||
MSACFlagsCritical = (1 << 1), // => 00000010
|
||||
MSACFlagsPersistenceNormal DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsNormal") = MSACFlagsNormal,
|
||||
MSACFlagsPersistenceCritical DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsCritical") = MSACFlagsCritical,
|
||||
MSACFlagsDefault = MSACFlagsNormal
|
||||
} NS_SWIFT_NAME(Flags);
|
||||
|
||||
#endif
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Log Levels
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, MSACLogLevel) {
|
||||
|
||||
/**
|
||||
* Logging will be very chatty
|
||||
*/
|
||||
MSACLogLevelVerbose = 2,
|
||||
|
||||
/**
|
||||
* Debug information will be logged
|
||||
*/
|
||||
MSACLogLevelDebug = 3,
|
||||
|
||||
/**
|
||||
* Information will be logged
|
||||
*/
|
||||
MSACLogLevelInfo = 4,
|
||||
|
||||
/**
|
||||
* Errors and warnings will be logged
|
||||
*/
|
||||
MSACLogLevelWarning = 5,
|
||||
|
||||
/**
|
||||
* Errors will be logged
|
||||
*/
|
||||
MSACLogLevelError = 6,
|
||||
|
||||
/**
|
||||
* Only critical errors will be logged
|
||||
*/
|
||||
MSACLogLevelAssert = 7,
|
||||
|
||||
/**
|
||||
* Logging is disabled
|
||||
*/
|
||||
MSACLogLevelNone = 99
|
||||
} NS_SWIFT_NAME(LogLevel);
|
||||
|
||||
typedef NSString * (^MSACLogMessageProvider)(void)NS_SWIFT_NAME(LogMessageProvider);
|
||||
typedef void (^MSACLogHandler)(MSACLogMessageProvider messageProvider, MSACLogLevel logLevel, NSString *tag, const char *file,
|
||||
const char *function, uint line) NS_SWIFT_NAME(LogHandler);
|
||||
|
||||
/**
|
||||
* Channel priorities, check the kMSACPriorityCount if you add a new value.
|
||||
* The order matters here! Values NEED to range from low priority to high priority.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MSACPriority) { MSACPriorityBackground, MSACPriorityDefault, MSACPriorityHigh } NS_SWIFT_NAME(Priority);
|
||||
static short const kMSACPriorityCount = MSACPriorityHigh + 1;
|
||||
|
||||
/**
|
||||
* The priority by which the modules are initialized.
|
||||
* MSACPriorityMax is reserved for only 1 module and this needs to be Crashes.
|
||||
* Crashes needs to be initialized first to catch crashes in our other SDK Modules (which will hopefully never happen) and to avoid losing
|
||||
* any log at crash time.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MSACInitializationPriority) {
|
||||
MSACInitializationPriorityDefault = 500,
|
||||
MSACInitializationPriorityHigh = 750,
|
||||
MSACInitializationPriorityMax = 999
|
||||
} NS_SWIFT_NAME(InitializationPriority);
|
||||
|
||||
/**
|
||||
* Enum with the different HTTP status codes.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, MSACHTTPCodesNo) {
|
||||
|
||||
// Invalid
|
||||
MSACHTTPCodesNo0XXInvalidUnknown = 0,
|
||||
|
||||
// Informational
|
||||
MSACHTTPCodesNo1XXInformationalUnknown = 1,
|
||||
MSACHTTPCodesNo100Continue = 100,
|
||||
MSACHTTPCodesNo101SwitchingProtocols = 101,
|
||||
MSACHTTPCodesNo102Processing = 102,
|
||||
|
||||
// Success
|
||||
MSACHTTPCodesNo2XXSuccessUnknown = 2,
|
||||
MSACHTTPCodesNo200OK = 200,
|
||||
MSACHTTPCodesNo201Created = 201,
|
||||
MSACHTTPCodesNo202Accepted = 202,
|
||||
MSACHTTPCodesNo203NonAuthoritativeInformation = 203,
|
||||
MSACHTTPCodesNo204NoContent = 204,
|
||||
MSACHTTPCodesNo205ResetContent = 205,
|
||||
MSACHTTPCodesNo206PartialContent = 206,
|
||||
MSACHTTPCodesNo207MultiStatus = 207,
|
||||
MSACHTTPCodesNo208AlreadyReported = 208,
|
||||
MSACHTTPCodesNo209IMUsed = 209,
|
||||
|
||||
// Redirection
|
||||
MSACHTTPCodesNo3XXSuccessUnknown = 3,
|
||||
MSACHTTPCodesNo300MultipleChoices = 300,
|
||||
MSACHTTPCodesNo301MovedPermanently = 301,
|
||||
MSACHTTPCodesNo302Found = 302,
|
||||
MSACHTTPCodesNo303SeeOther = 303,
|
||||
MSACHTTPCodesNo304NotModified = 304,
|
||||
MSACHTTPCodesNo305UseProxy = 305,
|
||||
MSACHTTPCodesNo306SwitchProxy = 306,
|
||||
MSACHTTPCodesNo307TemporaryRedirect = 307,
|
||||
MSACHTTPCodesNo308PermanentRedirect = 308,
|
||||
|
||||
// Client error
|
||||
MSACHTTPCodesNo4XXSuccessUnknown = 4,
|
||||
MSACHTTPCodesNo400BadRequest = 400,
|
||||
MSACHTTPCodesNo401Unauthorised = 401,
|
||||
MSACHTTPCodesNo402PaymentRequired = 402,
|
||||
MSACHTTPCodesNo403Forbidden = 403,
|
||||
MSACHTTPCodesNo404NotFound = 404,
|
||||
MSACHTTPCodesNo405MethodNotAllowed = 405,
|
||||
MSACHTTPCodesNo406NotAcceptable = 406,
|
||||
MSACHTTPCodesNo407ProxyAuthenticationRequired = 407,
|
||||
MSACHTTPCodesNo408RequestTimeout = 408,
|
||||
MSACHTTPCodesNo409Conflict = 409,
|
||||
MSACHTTPCodesNo410Gone = 410,
|
||||
MSACHTTPCodesNo411LengthRequired = 411,
|
||||
MSACHTTPCodesNo412PreconditionFailed = 412,
|
||||
MSACHTTPCodesNo413RequestEntityTooLarge = 413,
|
||||
MSACHTTPCodesNo414RequestURITooLong = 414,
|
||||
MSACHTTPCodesNo415UnsupportedMediaType = 415,
|
||||
MSACHTTPCodesNo416RequestedRangeNotSatisfiable = 416,
|
||||
MSACHTTPCodesNo417ExpectationFailed = 417,
|
||||
MSACHTTPCodesNo418IamATeapot = 418,
|
||||
MSACHTTPCodesNo419AuthenticationTimeout = 419,
|
||||
MSACHTTPCodesNo420MethodFailureSpringFramework = 420,
|
||||
MSACHTTPCodesNo420EnhanceYourCalmTwitter = 4200,
|
||||
MSACHTTPCodesNo422UnprocessableEntity = 422,
|
||||
MSACHTTPCodesNo423Locked = 423,
|
||||
MSACHTTPCodesNo424FailedDependency = 424,
|
||||
MSACHTTPCodesNo424MethodFailureWebDaw = 4240,
|
||||
MSACHTTPCodesNo425UnorderedCollection = 425,
|
||||
MSACHTTPCodesNo426UpgradeRequired = 426,
|
||||
MSACHTTPCodesNo428PreconditionRequired = 428,
|
||||
MSACHTTPCodesNo429TooManyRequests = 429,
|
||||
MSACHTTPCodesNo431RequestHeaderFieldsTooLarge = 431,
|
||||
MSACHTTPCodesNo444NoResponseNginx = 444,
|
||||
MSACHTTPCodesNo449RetryWithMicrosoft = 449,
|
||||
MSACHTTPCodesNo450BlockedByWindowsParentalControls = 450,
|
||||
MSACHTTPCodesNo451RedirectMicrosoft = 451,
|
||||
MSACHTTPCodesNo451UnavailableForLegalReasons = 4510,
|
||||
MSACHTTPCodesNo494RequestHeaderTooLargeNginx = 494,
|
||||
MSACHTTPCodesNo495CertErrorNginx = 495,
|
||||
MSACHTTPCodesNo496NoCertNginx = 496,
|
||||
MSACHTTPCodesNo497HTTPToHTTPSNginx = 497,
|
||||
MSACHTTPCodesNo499ClientClosedRequestNginx = 499,
|
||||
|
||||
// Server error
|
||||
MSACHTTPCodesNo5XXSuccessUnknown = 5,
|
||||
MSACHTTPCodesNo500InternalServerError = 500,
|
||||
MSACHTTPCodesNo501NotImplemented = 501,
|
||||
MSACHTTPCodesNo502BadGateway = 502,
|
||||
MSACHTTPCodesNo503ServiceUnavailable = 503,
|
||||
MSACHTTPCodesNo504GatewayTimeout = 504,
|
||||
MSACHTTPCodesNo505HTTPVersionNotSupported = 505,
|
||||
MSACHTTPCodesNo506VariantAlsoNegotiates = 506,
|
||||
MSACHTTPCodesNo507InsufficientStorage = 507,
|
||||
MSACHTTPCodesNo508LoopDetected = 508,
|
||||
MSACHTTPCodesNo509BandwidthLimitExceeded = 509,
|
||||
MSACHTTPCodesNo510NotExtended = 510,
|
||||
MSACHTTPCodesNo511NetworkAuthenticationRequired = 511,
|
||||
MSACHTTPCodesNo522ConnectionTimedOut = 522,
|
||||
MSACHTTPCodesNo598NetworkReadTimeoutErrorUnknown = 598,
|
||||
MSACHTTPCodesNo599NetworkConnectTimeoutErrorUnknown = 599
|
||||
} NS_SWIFT_NAME(HTTPCodesNo);
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CUSTOM_PROPERTIES_H
|
||||
#define MSAC_CUSTOM_PROPERTIES_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Custom properties builder.
|
||||
* Collects multiple properties to send in one log.
|
||||
*/
|
||||
NS_SWIFT_NAME(CustomProperties)
|
||||
@interface MSACCustomProperties : NSObject
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
* If the properties previously contained a property for the key, the old value is replaced.
|
||||
*
|
||||
* @param key Key with which the specified value is to be set.
|
||||
* @param value Value to be set with the specified key.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setString:(NSString *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
* If the properties previously contained a property for the key, the old value is replaced.
|
||||
*
|
||||
* @param key Key with which the specified value is to be set.
|
||||
* @param value Value to be set with the specified key.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setNumber:(NSNumber *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
* If the properties previously contained a property for the key, the old value is replaced.
|
||||
*
|
||||
* @param key Key with which the specified value is to be set.
|
||||
* @param value Value to be set with the specified key.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setBool:(BOOL)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Set the specified property value with the specified key.
|
||||
* If the properties previously contained a property for the key, the old value is replaced.
|
||||
*
|
||||
* @param key Key with which the specified value is to be set.
|
||||
* @param value Value to be set with the specified key.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)setDate:(NSDate *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
|
||||
|
||||
/**
|
||||
* Clear the property for the specified key.
|
||||
*
|
||||
* @param key Key whose mapping is to be cleared.
|
||||
*
|
||||
* @return This instance.
|
||||
*/
|
||||
- (instancetype)clearPropertyForKey:(NSString *)key NS_SWIFT_NAME(clearProperty(forKey:));
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_DEVICE_H
|
||||
#define MSAC_DEVICE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACWrapperSdk.h>)
|
||||
#import <AppCenter/MSACWrapperSdk.h>
|
||||
#else
|
||||
#import "MSACWrapperSdk.h"
|
||||
#endif
|
||||
|
||||
NS_SWIFT_NAME(Device)
|
||||
@interface MSACDevice : MSACWrapperSdk
|
||||
|
||||
/*
|
||||
* Name of the SDK. Consists of the name of the SDK and the platform, e.g. "appcenter.ios", "appcenter.android"
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *sdkName;
|
||||
|
||||
/*
|
||||
* Version of the SDK in semver format, e.g. "1.2.0" or "0.12.3-alpha.1".
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *sdkVersion;
|
||||
|
||||
/*
|
||||
* Device model (example: iPad2,3).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *model;
|
||||
|
||||
/*
|
||||
* Device manufacturer (example: HTC).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *oemName;
|
||||
|
||||
/*
|
||||
* OS name (example: iOS).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *osName;
|
||||
|
||||
/*
|
||||
* OS version (example: 9.3.0).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *osVersion;
|
||||
|
||||
/*
|
||||
* OS build code (example: LMY47X). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *osBuild;
|
||||
|
||||
/*
|
||||
* API level when applicable like in Android (example: 15). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSNumber *osApiLevel;
|
||||
|
||||
/*
|
||||
* Language code (example: en_US).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *locale;
|
||||
|
||||
/*
|
||||
* The offset in minutes from UTC for the device time zone, including daylight savings time.
|
||||
*/
|
||||
@property(nonatomic, readonly, strong) NSNumber *timeZoneOffset;
|
||||
|
||||
/*
|
||||
* Screen size of the device in pixels (example: 640x480).
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *screenSize;
|
||||
|
||||
/*
|
||||
* Application version name, e.g. 1.1.0
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *appVersion;
|
||||
|
||||
/*
|
||||
* Carrier name (for mobile devices). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *carrierName;
|
||||
|
||||
/*
|
||||
* Carrier country code (for mobile devices). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *carrierCountry;
|
||||
|
||||
/*
|
||||
* The app's build number, e.g. 42.
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *appBuild;
|
||||
|
||||
/*
|
||||
* The bundle identifier, package identifier, or namespace, depending on what the individual plattforms use, .e.g com.microsoft.example.
|
||||
* [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *appNamespace;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_ENABLE_H
|
||||
#define MSAC_ENABLE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Protocol to define an instance that can be enabled/disabled.
|
||||
*/
|
||||
NS_SWIFT_NAME(Enable)
|
||||
@protocol MSACEnable <NSObject>
|
||||
|
||||
@required
|
||||
|
||||
/**
|
||||
* Enable/disable this instance and delete data on disabled state.
|
||||
*
|
||||
* @param isEnabled A boolean value set to YES to enable the instance or NO to disable it.
|
||||
* @param deleteData A boolean value set to YES to delete data or NO to keep it.
|
||||
*/
|
||||
- (void)setEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deleteData NS_SWIFT_NAME(setEnabled(_:deleteDataOnDisabled:));
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_LOG_H
|
||||
#define MSAC_LOG_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class MSACDevice;
|
||||
|
||||
NS_SWIFT_NAME(Log)
|
||||
@protocol MSACLog <NSObject>
|
||||
|
||||
/**
|
||||
* Log type.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *type;
|
||||
|
||||
/**
|
||||
* Log timestamp.
|
||||
*/
|
||||
@property(nonatomic, strong) NSDate *timestamp;
|
||||
|
||||
/**
|
||||
* A session identifier is used to correlate logs together. A session is an abstract concept in the API and is not necessarily an analytics
|
||||
* session, it can be used to only track crashes.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *sid;
|
||||
|
||||
/**
|
||||
* Optional distribution group ID value.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *distributionGroupId;
|
||||
|
||||
/**
|
||||
* Optional user identifier.
|
||||
*/
|
||||
@property(nonatomic, copy) NSString *userId;
|
||||
|
||||
/**
|
||||
* Device properties associated to this log.
|
||||
*/
|
||||
@property(nonatomic, strong) MSACDevice *device;
|
||||
|
||||
/**
|
||||
* Transient object tag. For example, a log can be tagged with a transmission target. We do this currently to prevent properties being
|
||||
* applied retroactively to previous logs by comparing their tags.
|
||||
*/
|
||||
@property(nonatomic, strong) NSObject *tag;
|
||||
|
||||
/**
|
||||
* Checks if the object's values are valid.
|
||||
*
|
||||
* @return YES, if the object is valid.
|
||||
*/
|
||||
- (BOOL)isValid;
|
||||
|
||||
/**
|
||||
* Adds a transmission target token that this log should be sent to.
|
||||
*
|
||||
* @param token The transmission target token.
|
||||
*/
|
||||
- (void)addTransmissionTargetToken:(NSString *)token;
|
||||
|
||||
/**
|
||||
* Gets all transmission target tokens that this log should be sent to.
|
||||
*
|
||||
* @returns Collection of transmission target tokens that this log should be sent to.
|
||||
*/
|
||||
- (NSSet *)transmissionTargetTokens;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_LOG_WITH_PROPERTIES_H
|
||||
#define MSAC_LOG_WITH_PROPERTIES_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACAbstractLog.h>)
|
||||
#import <AppCenter/MSACAbstractLog.h>
|
||||
#else
|
||||
#import "MSACAbstractLog.h"
|
||||
#endif
|
||||
|
||||
NS_SWIFT_NAME(LogWithProperties)
|
||||
@interface MSACLogWithProperties : MSACAbstractLog
|
||||
|
||||
/**
|
||||
* Additional key/value pair parameters. [optional]
|
||||
*/
|
||||
@property(nonatomic, strong) NSDictionary<NSString *, NSString *> *properties;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef MSAC_LOGGER
|
||||
#define MSAC_LOGGER
|
||||
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
#define MSACLog(_level, _tag, _message) \
|
||||
[MSACLogger logMessage:_message level:_level tag:_tag file:__FILE__ function:__PRETTY_FUNCTION__ line:__LINE__]
|
||||
#define MSACLogAssert(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelAssert, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogError(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelError, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogWarning(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelWarning, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogInfo(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelInfo, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogDebug(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelDebug, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
#define MSACLogVerbose(tag, format, ...) \
|
||||
MSACLog(MSACLogLevelVerbose, tag, (^{ \
|
||||
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
||||
}))
|
||||
|
||||
NS_SWIFT_NAME(Logger)
|
||||
@interface MSACLogger : NSObject
|
||||
|
||||
+ (void)logMessage:(MSACLogMessageProvider)messageProvider
|
||||
level:(MSACLogLevel)loglevel
|
||||
tag:(NSString *)tag
|
||||
file:(const char *)file
|
||||
function:(const char *)function
|
||||
line:(uint)line;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef SERIALIZABLE_OBJECT_H
|
||||
#define SERIALIZABLE_OBJECT_H
|
||||
|
||||
@protocol MSACSerializableObject <NSCoding>
|
||||
|
||||
/**
|
||||
* Serialize this object to a dictionary.
|
||||
*
|
||||
* @return A dictionary representing this object.
|
||||
*/
|
||||
- (NSMutableDictionary *)serializeToDictionary;
|
||||
|
||||
@end
|
||||
#endif
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_SERVICE_H
|
||||
#define MSAC_SERVICE_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* Protocol declaring service logic.
|
||||
*/
|
||||
NS_SWIFT_NAME(Service)
|
||||
@protocol MSACService <NSObject>
|
||||
|
||||
/**
|
||||
* Indicates whether this service is enabled.
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_SERVICE_ABSTRACT_H
|
||||
#define MSAC_SERVICE_ABSTRACT_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACService.h>)
|
||||
#import <AppCenter/MSACService.h>
|
||||
#else
|
||||
#import "MSACService.h"
|
||||
#endif
|
||||
|
||||
@protocol MSACChannelGroupProtocol;
|
||||
|
||||
/**
|
||||
* Abstraction of services common logic.
|
||||
* This class is intended to be subclassed only not instantiated directly.
|
||||
*/
|
||||
NS_SWIFT_NAME(ServiceAbstract)
|
||||
@interface MSACServiceAbstract : NSObject <MSACService>
|
||||
|
||||
/**
|
||||
* The flag indicates whether the service is started from application or not.
|
||||
*/
|
||||
@property(nonatomic, assign) BOOL startedFromApplication;
|
||||
|
||||
/**
|
||||
* Start this service with a channel group. Also sets the flag that indicates that a service has been started.
|
||||
*
|
||||
* @param channelGroup channel group used to persist and send logs.
|
||||
* @param appSecret app secret for the SDK.
|
||||
* @param token default transmission target token for this service.
|
||||
* @param fromApplication indicates whether the service started from an application or not.
|
||||
*/
|
||||
- (void)startWithChannelGroup:(id<MSACChannelGroupProtocol>)channelGroup
|
||||
appSecret:(NSString *)appSecret
|
||||
transmissionTargetToken:(NSString *)token
|
||||
fromApplication:(BOOL)fromApplication;
|
||||
|
||||
/**
|
||||
* Update configuration when the service requires to start again. This method should only be called if the service is started from libraries
|
||||
* and then is being started from an application.
|
||||
*
|
||||
* @param appSecret app secret for the SDK.
|
||||
* @param token default transmission target token for this service.
|
||||
*/
|
||||
- (void)updateConfigurationWithAppSecret:(NSString *)appSecret transmissionTargetToken:(NSString *)token;
|
||||
|
||||
/**
|
||||
* The flag indicate whether the service needs the application secret or not.
|
||||
*/
|
||||
@property(atomic, readonly) BOOL isAppSecretRequired;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This is a utility for producing App Center style log messages. It is only intended for use by App Center services and wrapper SDKs of App
|
||||
* Center.
|
||||
*/
|
||||
NS_SWIFT_NAME(WrapperLogger)
|
||||
@interface MSACWrapperLogger : NSObject
|
||||
|
||||
+ (void)MSACWrapperLog:(MSACLogMessageProvider)message tag:(NSString *)tag level:(MSACLogLevel)level;
|
||||
|
||||
@end
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_WRAPPER_SDK_H
|
||||
#define MSAC_WRAPPER_SDK_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_SWIFT_NAME(WrapperSdk)
|
||||
@interface MSACWrapperSdk : NSObject
|
||||
|
||||
/*
|
||||
* Version of the wrapper SDK. When the SDK is embedding another base SDK (for example Xamarin.Android wraps Android), the Xamarin specific
|
||||
* version is populated into this field while sdkVersion refers to the original Android SDK. [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *wrapperSdkVersion;
|
||||
|
||||
/*
|
||||
* Name of the wrapper SDK (examples: Xamarin, Cordova). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *wrapperSdkName;
|
||||
|
||||
/*
|
||||
* Version of the wrapper technology framework (Xamarin runtime version or ReactNative or Cordova etc...). [optional]
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *wrapperRuntimeVersion;
|
||||
|
||||
/*
|
||||
* Label that is used to identify application code 'version' released via Live Update beacon running on device.
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *liveUpdateReleaseLabel;
|
||||
|
||||
/*
|
||||
* Identifier of environment that current application release belongs to, deployment key then maps to environment like Production, Staging.
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *liveUpdateDeploymentKey;
|
||||
|
||||
/*
|
||||
* Hash of all files (ReactNative or Cordova) deployed to device via LiveUpdate beacon. Helps identify the Release version on device or need
|
||||
* to download updates in future
|
||||
*/
|
||||
@property(nonatomic, copy, readonly) NSString *liveUpdatePackageHash;
|
||||
|
||||
- (instancetype)initWithWrapperSdkVersion:(NSString *)wrapperSdkVersion
|
||||
wrapperSdkName:(NSString *)wrapperSdkName
|
||||
wrapperRuntimeVersion:(NSString *)wrapperRuntimeVersion
|
||||
liveUpdateReleaseLabel:(NSString *)liveUpdateReleaseLabel
|
||||
liveUpdateDeploymentKey:(NSString *)liveUpdateDeploymentKey
|
||||
liveUpdatePackageHash:(NSString *)liveUpdatePackageHash;
|
||||
|
||||
/**
|
||||
* Checks if the object's values are valid.
|
||||
*
|
||||
* @return YES, if the object is valid.
|
||||
*/
|
||||
- (BOOL)isValid;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
framework module AppCenter {
|
||||
umbrella header "AppCenter.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
|
||||
link framework "Foundation"
|
||||
link framework "CoreTelephony"
|
||||
link framework "SystemConfiguration"
|
||||
link framework "UIKit"
|
||||
link "sqlite3"
|
||||
link "z"
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "MSACConstants+Flags.h"
|
||||
|
||||
@protocol MSACChannelUnitProtocol;
|
||||
@protocol MSACChannelGroupProtocol;
|
||||
@protocol MSACChannelProtocol;
|
||||
@protocol MSACLog;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MSACChannelDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
/**
|
||||
* A callback that is called when a channel unit is added to the channel group.
|
||||
*
|
||||
* @param channelGroup The channel group.
|
||||
* @param channel The newly added channel.
|
||||
*/
|
||||
- (void)channelGroup:(id<MSACChannelGroupProtocol>)channelGroup didAddChannelUnit:(id<MSACChannelUnitProtocol>)channel;
|
||||
|
||||
/**
|
||||
* A callback that is called when a log is just enqueued. Delegates may want to prepare the log a little more before further processing.
|
||||
*
|
||||
* @param log The log to prepare.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel prepareLog:(id<MSACLog>)log;
|
||||
|
||||
/**
|
||||
* A callback that is called after a log is definitely prepared.
|
||||
*
|
||||
* @param log The log.
|
||||
* @param internalId An internal Id to keep track of logs.
|
||||
* @param flags Options for the log.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didPrepareLog:(id<MSACLog>)log internalId:(NSString *)internalId flags:(MSACFlags)flags;
|
||||
|
||||
/**
|
||||
* A callback that is called after a log completed the enqueueing process whether it was successful or not.
|
||||
*
|
||||
* @param log The log.
|
||||
* @param internalId An internal Id to keep track of logs.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didCompleteEnqueueingLog:(id<MSACLog>)log internalId:(NSString *)internalId;
|
||||
|
||||
/**
|
||||
* Callback method that will be called before each log will be send to the server.
|
||||
*
|
||||
* @param channel The channel object.
|
||||
* @param log The log to be sent.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel willSendLog:(id<MSACLog>)log;
|
||||
|
||||
/**
|
||||
* Callback method that will be called in case the SDK was able to send a log.
|
||||
*
|
||||
* @param channel The channel object.
|
||||
* @param log The log to be sent.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didSucceedSendingLog:(id<MSACLog>)log;
|
||||
|
||||
/**
|
||||
* Callback method that will be called in case the SDK was unable to send a log.
|
||||
*
|
||||
* @param channel The channel object.
|
||||
* @param log The log to be sent.
|
||||
* @param error The error that occured.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didFailSendingLog:(id<MSACLog>)log withError:(nullable NSError *)error;
|
||||
|
||||
/**
|
||||
* A callback that is called when setEnabled has been invoked.
|
||||
*
|
||||
* @param channel The channel.
|
||||
* @param isEnabled The boolean that indicates enabled.
|
||||
* @param deletedData The boolean that indicates deleting data on disabled.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didSetEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deletedData;
|
||||
|
||||
/**
|
||||
* A callback that is called when pause has been invoked.
|
||||
*
|
||||
* @param channel The channel.
|
||||
* @param identifyingObject The identifying object used to pause the channel.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didPauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
/**
|
||||
* A callback that is called when resume has been invoked.
|
||||
*
|
||||
* @param channel The channel.
|
||||
* @param identifyingObject The identifying object used to resume the channel.
|
||||
*/
|
||||
- (void)channel:(id<MSACChannelProtocol>)channel didResumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
/**
|
||||
* Callback method that will determine if a log should be filtered out from the usual processing pipeline. If any delegate returns true, the
|
||||
* log is filtered.
|
||||
*
|
||||
* @param channelUnit The channel unit that is going to send the log.
|
||||
* @param log The log to be filtered or not.
|
||||
*
|
||||
* @return `true` if the log should be filtered out.
|
||||
*/
|
||||
- (BOOL)channelUnit:(id<MSACChannelUnitProtocol>)channelUnit shouldFilterLog:(id<MSACLog>)log;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>19H1323</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AppCenter</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.microsoft.appcenter</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>AppCenter</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>11C505</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>19B90</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.15</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1130</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>11C505</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.15</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
File renamed without changes.
Generated
Symlink
+1
@@ -0,0 +1 @@
|
||||
Versions/Current/AppCenter
|
||||
File renamed without changes.
File renamed without changes.
Generated
Symlink
+1
@@ -0,0 +1 @@
|
||||
Versions/Current/PrivateHeaders
|
||||
File renamed without changes.
BIN
Binary file not shown.
+44
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACAppCenter.h>)
|
||||
#import <AppCenter/MSACAbstractLog.h>
|
||||
#import <AppCenter/MSACAppCenter.h>
|
||||
#import <AppCenter/MSACAppCenterErrors.h>
|
||||
#import <AppCenter/MSACChannelGroupProtocol.h>
|
||||
#import <AppCenter/MSACChannelProtocol.h>
|
||||
#import <AppCenter/MSACConstants+Flags.h>
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#import <AppCenter/MSACCustomProperties.h>
|
||||
#import <AppCenter/MSACDevice.h>
|
||||
#import <AppCenter/MSACEnable.h>
|
||||
#import <AppCenter/MSACLog.h>
|
||||
#import <AppCenter/MSACLogWithProperties.h>
|
||||
#import <AppCenter/MSACLogger.h>
|
||||
#import <AppCenter/MSACSerializableObject.h>
|
||||
#import <AppCenter/MSACService.h>
|
||||
#import <AppCenter/MSACServiceAbstract.h>
|
||||
#import <AppCenter/MSACWrapperLogger.h>
|
||||
#import <AppCenter/MSACWrapperSdk.h>
|
||||
#else
|
||||
#import "MSACAbstractLog.h"
|
||||
#import "MSACAppCenter.h"
|
||||
#import "MSACAppCenterErrors.h"
|
||||
#import "MSACChannelGroupProtocol.h"
|
||||
#import "MSACChannelProtocol.h"
|
||||
#import "MSACConstants+Flags.h"
|
||||
#import "MSACConstants.h"
|
||||
#import "MSACCustomProperties.h"
|
||||
#import "MSACDevice.h"
|
||||
#import "MSACEnable.h"
|
||||
#import "MSACLog.h"
|
||||
#import "MSACLogWithProperties.h"
|
||||
#import "MSACLogger.h"
|
||||
#import "MSACSerializableObject.h"
|
||||
#import "MSACService.h"
|
||||
#import "MSACServiceAbstract.h"
|
||||
#import "MSACWrapperLogger.h"
|
||||
#import "MSACWrapperSdk.h"
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_ABSTRACT_LOG_H
|
||||
#define MSAC_ABSTRACT_LOG_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_SWIFT_NAME(AbstractLog)
|
||||
@interface MSACAbstractLog : NSObject
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef MSAC_APP_CENTER
|
||||
#define MSAC_APP_CENTER
|
||||
|
||||
#if __has_include(<AppCenter/MSACConstants.h>)
|
||||
#import <AppCenter/MSACConstants.h>
|
||||
#else
|
||||
#import "MSACConstants.h"
|
||||
#endif
|
||||
|
||||
@class MSACWrapperSdk;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
@class MSACCustomProperties;
|
||||
#endif
|
||||
|
||||
NS_SWIFT_NAME(AppCenter)
|
||||
@interface MSACAppCenter : NSObject
|
||||
|
||||
/**
|
||||
* Returns the singleton instance of MSACAppCenter.
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
* Configure the SDK with an application secret.
|
||||
*
|
||||
* @param appSecret A unique and secret key used to identify the application.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)configureWithAppSecret:(NSString *)appSecret NS_SWIFT_NAME(configure(withAppSecret:));
|
||||
|
||||
/**
|
||||
* Configure the SDK.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)configure;
|
||||
|
||||
/**
|
||||
* Configure the SDK with an application secret and an array of services to start.
|
||||
*
|
||||
* @param appSecret A unique and secret key used to identify the application.
|
||||
* @param services Array of services to start.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)start:(NSString *)appSecret withServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(withAppSecret:services:));
|
||||
|
||||
/**
|
||||
* Start the SDK with an array of services.
|
||||
*
|
||||
* @param services Array of services to start.
|
||||
*
|
||||
* @discussion This may be called only once per application process lifetime.
|
||||
*/
|
||||
+ (void)startWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(services:));
|
||||
|
||||
/**
|
||||
* Start a service.
|
||||
*
|
||||
* @param service A service to start.
|
||||
*
|
||||
* @discussion This may be called only once per service per application process lifetime.
|
||||
*/
|
||||
+ (void)startService:(Class)service;
|
||||
|
||||
/**
|
||||
* Configure the SDK with an array of services to start from a library. This will not start the service at application level, it will enable
|
||||
* the service only for the library.
|
||||
*
|
||||
* @param services Array of services to start.
|
||||
*/
|
||||
+ (void)startFromLibraryWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(startFromLibrary(services:));
|
||||
|
||||
/**
|
||||
* The flag indicates whether the SDK has already been configured or not.
|
||||
*/
|
||||
@property(class, atomic, readonly, getter=isConfigured) BOOL configured;
|
||||
|
||||
/**
|
||||
* The flag indicates whether app is running in App Center Test Cloud.
|
||||
*/
|
||||
@property(class, atomic, readonly, getter=isRunningInAppCenterTestCloud) BOOL runningInAppCenterTestCloud;
|
||||
|
||||
/**
|
||||
* The flag indicates whether or not the SDK was enabled as a whole
|
||||
*
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
|
||||
|
||||
/**
|
||||
* Flag indicating whether SDK can send network requests.
|
||||
*
|
||||
* The state is persisted in the device's storage across application launches.
|
||||
*/
|
||||
@property(class, nonatomic, getter=isNetworkRequestsAllowed, setter=setNetworkRequestsAllowed:)
|
||||
BOOL networkRequestsAllowed NS_SWIFT_NAME(networkRequestsAllowed);
|
||||
|
||||
/**
|
||||
* The SDK's log level.
|
||||
*/
|
||||
@property(class, nonatomic) MSACLogLevel logLevel;
|
||||
|
||||
/**
|
||||
* Base URL to use for backend communication.
|
||||
*/
|
||||
@property(class, nonatomic, strong) NSString *logUrl;
|
||||
|
||||
/**
|
||||
* Set log handler.
|
||||
*/
|
||||
@property(class, nonatomic) MSACLogHandler logHandler;
|
||||
|
||||
/**
|
||||
* Set wrapper SDK information to use when building device properties. This is intended in case you are building a SDK that uses the App
|
||||
* Center SDK under the hood, e.g. our Xamarin SDK or ReactNative SDk.
|
||||
*/
|
||||
@property(class, nonatomic, strong) MSACWrapperSdk *wrapperSdk;
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
/**
|
||||
* Set the custom properties.
|
||||
*
|
||||
* @param customProperties Custom properties object.
|
||||
*/
|
||||
+ (void)setCustomProperties:(MSACCustomProperties *)customProperties;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check whether the application delegate forwarder is enabled or not.
|
||||
*
|
||||
* @discussion The application delegate forwarder forwards messages that target your application delegate methods via swizzling to the SDK.
|
||||
* It simplifies the SDK integration but may not be suitable to any situations. For
|
||||
* instance it should be disabled if you or one of your third party SDK is doing message forwarding on the application delegate. Message
|
||||
* forwarding usually implies the implementation of @see NSObject#forwardingTargetForSelector: or @see NSObject#forwardInvocation: methods.
|
||||
* To disable the application delegate forwarder just add the `AppCenterAppDelegateForwarderEnabled` tag to your Info .plist file and set it
|
||||
* to `0`. Then you will have to forward any application delegate needed by the SDK manually.
|
||||
*/
|
||||
@property(class, readonly, nonatomic, getter=isAppDelegateForwarderEnabled) BOOL appDelegateForwarderEnabled;
|
||||
|
||||
/**
|
||||
* Unique installation identifier.
|
||||
*
|
||||
*/
|
||||
@property(class, readonly, nonatomic) NSUUID *installId;
|
||||
|
||||
/**
|
||||
* Detect if a debugger is attached to the app process. This is only invoked once on app startup and can not detect
|
||||
* if the debugger is being attached during runtime!
|
||||
*
|
||||
*/
|
||||
@property(class, readonly, nonatomic, getter=isDebuggerAttached) BOOL debuggerAttached;
|
||||
|
||||
/**
|
||||
* Current version of AppCenter SDK.
|
||||
*
|
||||
*/
|
||||
@property(class, readonly, nonatomic) NSString *sdkVersion;
|
||||
|
||||
/**
|
||||
* Set the maximum size of the internal storage. This method must be called before App Center is started. This method is only intended for
|
||||
* applications.
|
||||
*
|
||||
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
|
||||
* (default is 4096 bytes). Values below 20,480 bytes (20 KiB) will be ignored.
|
||||
*
|
||||
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
|
||||
* is successful, and `NO` otherwise. This parameter can be null.
|
||||
*
|
||||
* @discussion This only sets the maximum size of the database, but App Center modules might store additional data.
|
||||
* The value passed to this method is not persisted on disk. The default maximum database size is 10485760 bytes (10 MiB).
|
||||
*/
|
||||
+ (void)setMaxStorageSize:(long)sizeInBytes completionHandler:(void (^)(BOOL))completionHandler;
|
||||
|
||||
/**
|
||||
* Set the user identifier.
|
||||
*
|
||||
* @discussion Set the user identifier for logs sent for the default target token when the secret passed in @c
|
||||
* MSACAppCenter:start:withServices: contains "target={targetToken}".
|
||||
*
|
||||
* For App Center backend the user identifier maximum length is 256 characters.
|
||||
*
|
||||
* AppCenter must be configured or started before this API can be used.
|
||||
*/
|
||||
@property(class, nonatomic, strong) NSString *userId;
|
||||
|
||||
/**
|
||||
* Set country code to use when building device properties.
|
||||
*
|
||||
* @see https://www.iso.org/obp/ui/#search for more information.
|
||||
*/
|
||||
@property(class, nonatomic, strong) NSString *countryCode;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_APP_CENTER_ERRORS_H
|
||||
#define MSAC_APP_CENTER_ERRORS_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define MSAC_APP_CENTER_BASE_DOMAIN @"com.Microsoft.AppCenter."
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#pragma mark - Domain
|
||||
|
||||
static NSString *const kMSACACErrorDomain = MSAC_APP_CENTER_BASE_DOMAIN @"ErrorDomain";
|
||||
|
||||
#pragma mark - General
|
||||
|
||||
// Error codes.
|
||||
NS_ENUM(NSInteger){MSACACLogInvalidContainerErrorCode = 1, MSACACCanceledErrorCode = 2, MSACACDisabledErrorCode = 3};
|
||||
|
||||
// Error descriptions.
|
||||
static NSString const *kMSACACLogInvalidContainerErrorDesc = @"Invalid log container.";
|
||||
static NSString const *kMSACACCanceledErrorDesc = @"The operation was canceled.";
|
||||
static NSString const *kMSACACDisabledErrorDesc = @"The service is disabled.";
|
||||
|
||||
#pragma mark - Connection
|
||||
|
||||
// Error codes.
|
||||
NS_ENUM(NSInteger){MSACACConnectionPausedErrorCode = 100, MSACACConnectionHttpErrorCode = 101};
|
||||
|
||||
// Error descriptions.
|
||||
static NSString const *kMSACACConnectionHttpErrorDesc = @"An HTTP error occured.";
|
||||
static NSString const *kMSACACConnectionPausedErrorDesc = @"Canceled, connection paused with log deletion.";
|
||||
|
||||
// Error user info keys.
|
||||
static NSString const *kMSACACConnectionHttpCodeErrorKey = @"MSConnectionHttpCode";
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CHANNEL_GROUP_PROTOCOL_H
|
||||
#define MSAC_CHANNEL_GROUP_PROTOCOL_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACChannelProtocol.h>)
|
||||
#import <AppCenter/MSACChannelProtocol.h>
|
||||
#else
|
||||
#import "MSACChannelProtocol.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class MSACChannelUnitConfiguration;
|
||||
|
||||
@protocol MSACIngestionProtocol;
|
||||
@protocol MSACChannelUnitProtocol;
|
||||
|
||||
/**
|
||||
* `MSACChannelGroupProtocol` represents a kind of channel that contains constituent MSACChannelUnit objects. When an operation from the
|
||||
* `MSACChannelProtocol` is performed on the group, that operation should be propagated to its constituent MSACChannelUnit objects.
|
||||
*/
|
||||
NS_SWIFT_NAME(ChannelGroupProtocol)
|
||||
@protocol MSACChannelGroupProtocol <MSACChannelProtocol>
|
||||
|
||||
/**
|
||||
* Initialize a channel unit with the given configuration.
|
||||
*
|
||||
* @param configuration channel configuration.
|
||||
*
|
||||
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
|
||||
*/
|
||||
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
|
||||
NS_SWIFT_NAME(addChannelUnit(withConfiguration:));
|
||||
|
||||
/**
|
||||
* Initialize a channel unit with the given configuration.
|
||||
*
|
||||
* @param configuration channel configuration.
|
||||
* @param ingestion The alternative ingestion object
|
||||
*
|
||||
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
|
||||
*/
|
||||
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
|
||||
withIngestion:(nullable id<MSACIngestionProtocol>)ingestion
|
||||
NS_SWIFT_NAME(addChannelUnit(_:ingestion:));
|
||||
|
||||
/**
|
||||
* Change the base URL (schema + authority + port only) used to communicate with the backend.
|
||||
*/
|
||||
@property(nonatomic, strong) NSString *_Nullable logUrl;
|
||||
|
||||
/**
|
||||
* Set the app secret.
|
||||
*/
|
||||
@property(nonatomic, strong) NSString *_Nullable appSecret;
|
||||
|
||||
/**
|
||||
* Set the maximum size of the internal storage. This method must be called before App Center is started.
|
||||
*
|
||||
* @discussion The default maximum database size is 10485760 bytes (10 MiB).
|
||||
*
|
||||
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
|
||||
* (default is 4096 bytes). Values below 24576 bytes (24 KiB) will be ignored.
|
||||
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
|
||||
* is successful, and `NO` otherwise.
|
||||
*/
|
||||
- (void)setMaxStorageSize:(long)sizeInBytes
|
||||
completionHandler:(nullable void (^)(BOOL))completionHandler NS_SWIFT_NAME(setMaxStorageSize(_:completionHandler:));
|
||||
|
||||
/**
|
||||
* Return a channel unit instance for the given groupId.
|
||||
*
|
||||
* @param groupId The group ID for a channel unit.
|
||||
*
|
||||
* @return A channel unit instance or `nil`.
|
||||
*/
|
||||
- (nullable id<MSACChannelUnitProtocol>)channelUnitForGroupId:(NSString *)groupId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CHANNEL_PROTOCOL_H
|
||||
#define MSAC_CHANNEL_PROTOCOL_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppCenter/MSACEnable.h>)
|
||||
#import <AppCenter/MSACEnable.h>
|
||||
#else
|
||||
#import "MSACEnable.h"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MSACChannelDelegate;
|
||||
|
||||
/**
|
||||
* `MSACChannelProtocol` contains the essential operations of a channel. Channels are broadly responsible for enqueuing logs to be sent to
|
||||
* the backend and/or stored on disk.
|
||||
*/
|
||||
NS_SWIFT_NAME(ChannelProtocol)
|
||||
@protocol MSACChannelProtocol <NSObject, MSACEnable>
|
||||
|
||||
/**
|
||||
* Add delegate.
|
||||
*
|
||||
* @param delegate delegate.
|
||||
*/
|
||||
- (void)addDelegate:(id<MSACChannelDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Remove delegate.
|
||||
*
|
||||
* @param delegate delegate.
|
||||
*/
|
||||
- (void)removeDelegate:(id<MSACChannelDelegate>)delegate;
|
||||
|
||||
/**
|
||||
* Pause operations, logs will be stored but not sent.
|
||||
*
|
||||
* @param identifyingObject Object used to identify the pause request.
|
||||
*
|
||||
* @discussion A paused channel doesn't forward logs to the ingestion. The identifying object used to pause the channel can be any unique
|
||||
* object. The same identifying object must be used to call resume. For simplicity if the caller is the one owning the channel then @c self
|
||||
* can be used as identifying object.
|
||||
*
|
||||
* @see resumeWithIdentifyingObject:
|
||||
*/
|
||||
- (void)pauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
/**
|
||||
* Resume operations, logs can be sent again.
|
||||
*
|
||||
* @param identifyingObject Object used to passed to the pause method.
|
||||
*
|
||||
* @discussion The channel only resume when all the outstanding identifying objects have been resumed.
|
||||
*
|
||||
* @see pauseWithIdentifyingObject:
|
||||
*/
|
||||
- (void)resumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#ifndef MSAC_CONSTANTS_FLAGS_H
|
||||
#define MSAC_CONSTANTS_FLAGS_H
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, MSACFlags) {
|
||||
MSACFlagsNone = (0 << 0), // => 00000000
|
||||
MSACFlagsNormal = (1 << 0), // => 00000001
|
||||
MSACFlagsCritical = (1 << 1), // => 00000010
|
||||
MSACFlagsPersistenceNormal DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsNormal") = MSACFlagsNormal,
|
||||
MSACFlagsPersistenceCritical DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsCritical") = MSACFlagsCritical,
|
||||
MSACFlagsDefault = MSACFlagsNormal
|
||||
} NS_SWIFT_NAME(Flags);
|
||||
|
||||
#endif
|
||||
Loaded 100 of 632 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user