Compare commits
498 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
c8ae154ba6 | |
|
|
5061d72908 | |
|
|
c28582cee5 | |
|
|
d6d65a57ea | |
|
|
9cdb1c8669 | |
|
|
c7548404dd | |
|
|
b7da2f2a8a | |
|
|
22635ef4b0 | |
|
|
c567b487bf | |
|
|
4ddf66e973 | |
|
|
c056db5ce9 | |
|
|
2f8be07617 | |
|
|
dfcb75709e | |
|
|
a1806eb420 | |
|
|
e93fed4968 | |
|
|
37ada22c9a | |
|
|
db1865da6b | |
|
|
1ae11dad91 | |
|
|
32a5b4dd5d | |
|
|
98b76d06b2 | |
|
|
ddbd457074 | |
|
|
9868336bf2 | |
|
|
31b4193e7f | |
|
|
dd39a645f1 | |
|
|
a63607ed0e | |
|
|
ecf361ff88 | |
|
|
906e8b657b | |
|
|
2a445eafda | |
|
|
483b24682f | |
|
|
5dd3e827c9 | |
|
|
4dd46e8811 | |
|
|
197d90a268 | |
|
|
104299d7c3 | |
|
|
b5c31ac654 | |
|
|
6c567873b8 | |
|
|
072467f37f | |
|
|
8da93c0213 | |
|
|
397a4b22d4 | |
|
|
1f87380618 | |
|
|
aeb2d7c149 | |
|
|
01a9871b3f | |
|
|
9f9e229617 | |
|
|
2a2d1e9719 | |
|
|
74d2065a85 | |
|
|
30e410824c | |
|
|
0927027f03 | |
|
|
408cb7e791 | |
|
|
eeeff19c3f | |
|
|
697edbd2ec | |
|
|
871a0495ee | |
|
|
d5e6f00f10 | |
|
|
240e13b8ca | |
|
|
d0bc4bc7d5 | |
|
|
7960275dac | |
|
|
eef95cfcd1 | |
|
|
eae288614a | |
|
|
4b9603eec6 | |
|
|
7e3def395f | |
|
|
0ee1451d00 | |
|
|
64e84de83b | |
|
|
22041a163f | |
|
|
84441d48a8 | |
|
|
503bf73c01 | |
|
|
81f10484ac | |
|
|
6663992286 | |
|
|
910b4eab8e | |
|
|
cf66321aa0 | |
|
|
3cc9caeb96 | |
|
|
23f163a2e3 | |
|
|
57d8e700e1 | |
|
|
43307ff5c0 | |
|
|
c41edc1819 | |
|
|
d9473189a1 | |
|
|
2787238612 | |
|
|
a68502ea61 | |
|
|
a90b8767ee | |
|
|
30c7f750f8 | |
|
|
4a02e2622f | |
|
|
14d9ab7f79 | |
|
|
8e047deb3b | |
|
|
7357629c86 | |
|
|
3b9409311e | |
|
|
5f6c11b5e2 | |
|
|
3dfcf35985 | |
|
|
9524b8f60b | |
|
|
4256963cf7 | |
|
|
aebd049579 | |
|
|
db335040d2 | |
|
|
fc50aa7bf9 | |
|
|
01279da5e6 | |
|
|
2f90e32060 | |
|
|
910efb3092 | |
|
|
d8fcd04b79 | |
|
|
fd227bffba | |
|
|
7968aa8c88 | |
|
|
31c922cb45 | |
|
|
d5e0bfc0d9 | |
|
|
7124872ce0 | |
|
|
1d335561aa | |
|
|
799fb92434 | |
|
|
5db3ad047a | |
|
|
2e79921ff5 | |
|
|
086cc76ab5 | |
|
|
5e9134c2b7 | |
|
|
c70f0b8938 | |
|
|
5b4108fc9a | |
|
|
bfcab6c90c | |
|
|
7fd17bf2b6 | |
|
|
0f54aaaab9 | |
|
|
845d5fa8ad | |
|
|
8fbee54518 | |
|
|
a28f621d2d | |
|
|
dbe5b16ec5 | |
|
|
56c2080caf | |
|
|
c7d5b22772 | |
|
|
6510f75549 | |
|
|
2b8f62a89b | |
|
|
f1fad4e522 | |
|
|
86a786b3e9 | |
|
|
96b51ada7b | |
|
|
4242606ada | |
|
|
6a583d59bd | |
|
|
45cb26bd16 | |
|
|
c03eb3ab5e | |
|
|
64cdf28437 | |
|
|
9ab7c34dde | |
|
|
381cee4b42 | |
|
|
9c99880451 | |
|
|
eb634e52df | |
|
|
032ea3a9fe | |
|
|
1e5a851a1a | |
|
|
f8e1b68f98 | |
|
|
308189c40a | |
|
|
022b239c71 | |
|
|
3dd4dcd483 | |
|
|
4dcb08dffd | |
|
|
60932765a2 | |
|
|
8f708ccf59 | |
|
|
b77d1ee7da | |
|
|
48a4bfa0d3 | |
|
|
251447cbd4 | |
|
|
9953a56b04 | |
|
|
604787764c | |
|
|
708f7348dc | |
|
|
ac8ace8a7f | |
|
|
72ea28254c | |
|
|
c75420d77c | |
|
|
2b48548b6c | |
|
|
7c6ad3cc93 | |
|
|
b747adff10 | |
|
|
1426acc59f | |
|
|
7014dc1806 | |
|
|
554a865339 | |
|
|
4f4dc93fd4 | |
|
|
499857b128 | |
|
|
a6fee0735b | |
|
|
660d96ead5 | |
|
|
40980751af | |
|
|
f67045e283 | |
|
|
482e458301 | |
|
|
f5d5f80d55 | |
|
|
1f21bfe112 | |
|
|
23bfb38c3c | |
|
|
5a0be62e92 | |
|
|
2956d98872 | |
|
|
b1b9f3c5db | |
|
|
d05cb3b4fb | |
|
|
e90c9f3792 | |
|
|
3f7e6e24e3 | |
|
|
2db18d7517 | |
|
|
1fbcb692f2 | |
|
|
3169a048f1 | |
|
|
15012df337 | |
|
|
6cccb5530f | |
|
|
6e3b41297e | |
|
|
ee9ff585b6 | |
|
|
1dc16b9187 | |
|
|
ce7f84605f | |
|
|
40c16bc392 | |
|
|
f6be4da938 | |
|
|
0e4a7c6517 | |
|
|
75d07fae81 | |
|
|
b4b68c3f4a | |
|
|
da09b3d94c | |
|
|
6a7f084db1 | |
|
|
7689c980eb | |
|
|
c98ccfb088 | |
|
|
b0d07d2c4f | |
|
|
46a3f23244 | |
|
|
648d591be4 | |
|
|
8be52ac0dc | |
|
|
613479625b | |
|
|
16d9eeba52 | |
|
|
3f3de5d657 | |
|
|
299f758988 | |
|
|
07a0cb9c4e | |
|
|
6629ee2427 | |
|
|
88a555c581 | |
|
|
65990a0952 | |
|
|
6c2c3ecbd6 | |
|
|
1c23063a09 | |
|
|
7242be27ad | |
|
|
0bd538e271 | |
|
|
ba639f1d93 | |
|
|
36ebc1bb28 | |
|
|
b018fac4ac | |
|
|
632212ac6e | |
|
|
16ecda8c93 | |
|
|
a0c446349e | |
|
|
66a963d816 | |
|
|
6bf4beb5fb | |
|
|
17fb34c52d | |
|
|
8b809e2b45 | |
|
|
0db68f1fc8 | |
|
|
bb1983c367 | |
|
|
2d7ae8fd28 | |
|
|
1c12244c36 | |
|
|
f53cd96e1f | |
|
|
02ddaca26a | |
|
|
ff93fdb15f | |
|
|
54e8f1f3ac | |
|
|
01de02ef90 | |
|
|
ddbbb5e8f8 | |
|
|
f1fe8ec036 | |
|
|
934521b0b1 | |
|
|
34336287e9 | |
|
|
7ba0790306 | |
|
|
61622c5c08 | |
|
|
1869aeef0b | |
|
|
dda86d55a3 | |
|
|
f5cfb8af40 | |
|
|
550ffa7a73 | |
|
|
096d54805d | |
|
|
6bfcec15d0 | |
|
|
4f4c32c4aa | |
|
|
e963946e5a | |
|
|
132bf2b9f8 | |
|
|
c49e958539 | |
|
|
02bede4ce3 | |
|
|
c99ef3141a | |
|
|
7af46cec6f | |
|
|
c1e6b13a0d | |
|
|
c823b12157 | |
|
|
8785ce0d83 | |
|
|
7634681c5e | |
|
|
60ddbdeda3 | |
|
|
d7db6c5790 | |
|
|
7d12e2aedc | |
|
|
72baad29f0 | |
|
|
a992a451fa | |
|
|
d052434aef | |
|
|
8d7b7c00dd | |
|
|
0f8625c9f5 | |
|
|
761cfd5333 | |
|
|
4ce4d46ac3 | |
|
|
1df201ec4a | |
|
|
c7437f506c | |
|
|
798dd66a52 | |
|
|
bbf21cca29 | |
|
|
2a13c966ed | |
|
|
b0fc58752b | |
|
|
4ac40b0195 | |
|
|
f0007fe9f1 | |
|
|
16d6c928b5 | |
|
|
42e9f56724 | |
|
|
3f9d77efb7 | |
|
|
b7ac10b04a | |
|
|
42a7ee6d3d | |
|
|
88da70df12 | |
|
|
8dd5213a26 | |
|
|
14d81af35a | |
|
|
e80ec9f584 | |
|
|
b6a9d679ff | |
|
|
184e10566d | |
|
|
d0fe2c369c | |
|
|
c165fc50c0 | |
|
|
e4ee82fe83 | |
|
|
c8d0516a35 | |
|
|
0bc1f2fa2a | |
|
|
903348c2d1 | |
|
|
19092daccc | |
|
|
648055b193 | |
|
|
e0b4b683ec | |
|
|
c258d63f99 | |
|
|
dc8049b36f | |
|
|
22b710b2c7 | |
|
|
5109551428 | |
|
|
eb46f0de75 | |
|
|
0de8d40ff6 | |
|
|
cc84df4c1a | |
|
|
3a87a08ff3 | |
|
|
1efbcca1b7 | |
|
|
ed588af630 | |
|
|
21ff732a43 | |
|
|
2579dff46f | |
|
|
d86e9dece0 | |
|
|
63f306cc5f | |
|
|
3a51d576f5 | |
|
|
58229a7964 | |
|
|
a6048fde49 | |
|
|
49f934e030 | |
|
|
04526e9b77 | |
|
|
2013f6a744 | |
|
|
14ee30a5bb | |
|
|
4feadef804 | |
|
|
0fd83f24c9 | |
|
|
578e2db13a | |
|
|
3b2da0f99f | |
|
|
61b8c5e5ed | |
|
|
e2275c7feb | |
|
|
56cb282909 | |
|
|
796683ace3 | |
|
|
141a40d679 | |
|
|
3382e67e5c | |
|
|
e5201fc33d | |
|
|
dd3c7dec43 | |
|
|
7816ef2320 | |
|
|
4bf62c2afa | |
|
|
d3b5cd2a50 | |
|
|
7862f79061 | |
|
|
f7d76b7fe9 | |
|
|
14109fcd87 | |
|
|
7a6418dc48 | |
|
|
6f1d02e5dd | |
|
|
2677a0863b | |
|
|
ae5be4b386 | |
|
|
2e0e2d0296 | |
|
|
c9507978b1 | |
|
|
8306592ead | |
|
|
3c96685d13 | |
|
|
6e747ef15a | |
|
|
4f417c51ee | |
|
|
c01ddaea3e | |
|
|
4271ade5d5 | |
|
|
65d585df3c | |
|
|
05502afd18 | |
|
|
9eb7e0f230 | |
|
|
19cd8c4068 | |
|
|
ef5eeaf5d4 | |
|
|
86039fdcbc | |
|
|
4ff6ae1ad9 | |
|
|
3ed4b18568 | |
|
|
6f4d3a1951 | |
|
|
e4949a7700 | |
|
|
902deedfba | |
|
|
fb300f10f1 | |
|
|
9392070a9c | |
|
|
cba96d2d5d | |
|
|
68ac375e92 | |
|
|
28f0abea0d | |
|
|
51306eceff | |
|
|
c9969b732a | |
|
|
af25a5e865 | |
|
|
4abc59fc26 | |
|
|
996673939d | |
|
|
12caae4d20 | |
|
|
7b7bdb12c1 | |
|
|
c693a34d4f | |
|
|
2899565be0 | |
|
|
8140a46ef4 | |
|
|
9fd552cf6f | |
|
|
23a9d741d6 | |
|
|
0b02138ef6 | |
|
|
41ac5de5b6 | |
|
|
1830b024c1 | |
|
|
5322654319 | |
|
|
0ffd277cea | |
|
|
8ef1ed173b | |
|
|
b99fa7c09e | |
|
|
3496ef2187 | |
|
|
4b50a892f1 | |
|
|
813be1e299 | |
|
|
edfc382798 | |
|
|
4683a3c73e | |
|
|
6f8d289808 | |
|
|
b35c2c4707 | |
|
|
7765986de8 | |
|
|
fbe8729548 | |
|
|
8daeefc3ef | |
|
|
76c9b5baad | |
|
|
72cf884d2f | |
|
|
a29dd91e4a | |
|
|
e7788bd8ad | |
|
|
8433e0ca95 | |
|
|
b2537cb412 | |
|
|
f84bc4b2d9 | |
|
|
15d092bc10 | |
|
|
872ad46ca1 | |
|
|
6a91287443 | |
|
|
1fddf9d7dc | |
|
|
08f061e9b1 | |
|
|
5a8b89e692 | |
|
|
e42a9366c3 | |
|
|
fc20f611f3 | |
|
|
8eacbd168d | |
|
|
935940c9bb | |
|
|
5afe40912c | |
|
|
6fbccde5cb | |
|
|
10fd5085a5 | |
|
|
5c819196df | |
|
|
10b9c1f12a | |
|
|
9533e896cd | |
|
|
dc6ff6ff5d | |
|
|
46105000d4 | |
|
|
cc3db38b83 | |
|
|
44b432196e | |
|
|
f5067819c5 | |
|
|
7920b4553b | |
|
|
1ad4486dfb | |
|
|
097df0d6fe | |
|
|
319cf1e7f4 | |
|
|
6859c26fcf | |
|
|
3082e40f94 | |
|
|
9218d4dad7 | |
|
|
d6ebd21319 | |
|
|
d3fb6f7740 | |
|
|
60de8d2fea | |
|
|
a9c7ded839 | |
|
|
46f287ee28 | |
|
|
6dafef1428 | |
|
|
5e1cf94ed4 | |
|
|
34e35f7882 | |
|
|
d361fbd4d6 | |
|
|
bdfcde143f | |
|
|
c406f76c83 | |
|
|
e82fda12ed | |
|
|
9b56229d04 | |
|
|
ad8326802d | |
|
|
82f2f8d541 | |
|
|
a89b3f80e7 | |
|
|
6418fd3220 | |
|
|
67205adc35 | |
|
|
d1f10e07c6 | |
|
|
eef8665794 | |
|
|
834672abac | |
|
|
6d207a5e61 | |
|
|
950e91f2ee | |
|
|
d4c962d23e | |
|
|
1c9c73f569 | |
|
|
ce167cb752 | |
|
|
eec1aa9914 | |
|
|
7053e3cfd5 | |
|
|
b851eab336 | |
|
|
69cf3dc756 | |
|
|
edbf54aa23 | |
|
|
9a972cd616 | |
|
|
be3166ae80 | |
|
|
e35a646085 | |
|
|
d3980f5a9f | |
|
|
921c0c02a2 | |
|
|
c2104e8457 | |
|
|
6b3a9c523c | |
|
|
f2f28dce25 | |
|
|
17df0f6f8e | |
|
|
5f5e0e4048 | |
|
|
c6333d24ed | |
|
|
cc304c498b | |
|
|
b25b59263e | |
|
|
1cf9c7f89a | |
|
|
20b43e35ba | |
|
|
339f56e0c7 | |
|
|
cab59e8bbe | |
|
|
6c6acfc81c | |
|
|
b4f4c1cc89 | |
|
|
f0c6855ef3 | |
|
|
0959bae598 | |
|
|
da34e52a84 | |
|
|
f0b6f76e80 | |
|
|
5602a56f96 | |
|
|
0a0c3964e5 | |
|
|
debebbd03a | |
|
|
f2fea42ec4 | |
|
|
58640fbcb5 | |
|
|
dfa553d146 | |
|
|
6841a67dd6 | |
|
|
68184663a6 | |
|
|
1bffc1598c | |
|
|
d73b95ed32 | |
|
|
d57f318cd3 | |
|
|
118ad17c82 | |
|
|
0856422e3b | |
|
|
15b876c3bc | |
|
|
f2d0435e0f | |
|
|
9f03c6d2f3 | |
|
|
0c41b3ab98 | |
|
|
93e3bdbfd2 | |
|
|
d4cfe67a1c | |
|
|
800dfe92cb | |
|
|
58683b58c3 | |
|
|
2730131ddd | |
|
|
b11c84d3fa | |
|
|
8532f46fdf | |
|
|
8f8e200fa5 | |
|
|
81fda16510 | |
|
|
66b4f41577 | |
|
|
e25be5725b | |
|
|
f90a328556 | |
|
|
4ea7248e3e |
|
|
@ -0,0 +1,34 @@
|
|||
#OS noise
|
||||
profile
|
||||
[Tt]humbs.db
|
||||
*.DS_Store
|
||||
*~
|
||||
*.swp
|
||||
*.out
|
||||
*.bak*
|
||||
*.lock
|
||||
|
||||
#Other CSM
|
||||
.hg
|
||||
.svn
|
||||
CVS
|
||||
|
||||
#Xcode noise
|
||||
*.log
|
||||
*~.nib
|
||||
*.moved-aside
|
||||
**/*.xcuserdata/*
|
||||
xcuserdata
|
||||
|
||||
#Project files
|
||||
[Bb]uild/
|
||||
DerivedData/
|
||||
|
||||
#CocoaPods
|
||||
Pods
|
||||
|
||||
#AppCode
|
||||
*/.idea/*
|
||||
.idea/*
|
||||
|
||||
SDKBuildSteps.info
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
language: objective-c
|
||||
osx_image: xcode7.3
|
||||
xcode_project: VK-ios-sdk.xcodeproj
|
||||
xcode_scheme: VKSdk
|
||||
xcode_sdk: iphonesimulator9.3
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 VK.com
|
||||
Copyright (c) 2015 VK.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
|
|||
|
|
@ -1,4 +1,347 @@
|
|||
vk-ios-sdk
|
||||
==========
|
||||
|
||||
Library for working with VK API, authorization through VK app, using VK functions
|
||||
Library for working with VK API, authorizing through VK app, using VK API methods. Supported iOS from 6.0
|
||||
Prepare for Using VK SDK
|
||||
----------
|
||||
|
||||
To use VK SDK primarily you need to create a new Standalone VK application [here](https://vk.com/editapp?act=create). Choose a title and confirm the action via SMS and you will be redirected to the application settings page.
|
||||
You will need your APP_ID to use the library. Fill in the App Bundle for iOS field.
|
||||
|
||||
Setup URL schema of Your Application
|
||||
----------
|
||||
|
||||
To authorize via VK App you need to setup a url-schema for your application, which looks like vk+APP_ID (e.g. **vk1234567**).
|
||||
|
||||
[How to implement your own URL Scheme here](https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html#//apple_ref/doc/uid/TP40007072-CH6-SW10), Also there is [nice Twitter tutorial](https://dev.twitter.com/cards/mobile/url-schemes)
|
||||
|
||||
|
||||
Configuring application for iOS 9
|
||||
----------
|
||||
iOS 9 changes the way of applications security and way of using unsecured connections. Basically, you don't have to change anything in transport security settings. But, if you're planing to use VK API with `nohttps` scope, you have to change security settings that way (in your `Info.plist` file):
|
||||
```
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>vk.com</key>
|
||||
<dict>
|
||||
<key>NSExceptionRequiresForwardSecrecy</key>
|
||||
<false/>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
```
|
||||
|
||||
We **don't** recommend using `nohttps` scope.
|
||||
|
||||
Also, for iOS 9 you have to add app schemas your app will use and check for `canOpenURL:`.
|
||||
|
||||
Add this to your `Info.plist`:
|
||||
```
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>vk</string>
|
||||
<string>vk-share</string>
|
||||
<string>vkauthorize</string>
|
||||
</array>
|
||||
```
|
||||
|
||||
How to set up VK iOS SDK
|
||||
==========
|
||||
|
||||
Installation with CocoaPods
|
||||
----------
|
||||
|
||||
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like VK SDK in your projects. See the [Getting Started](http://cocoapods.org/) guide for more information.
|
||||
|
||||
`Podfile`
|
||||
|
||||
platform :ios, '6.0'
|
||||
target 'YourProjectName' do
|
||||
pod 'VK-ios-sdk'
|
||||
end
|
||||
|
||||
Then import the project as module if your podfile contains `use_frameworks!` directive:
|
||||
|
||||
@import VK_ios_sdk;
|
||||
|
||||
Or import the main project header, if you're installing pods without `use_frameworks!` directive:
|
||||
|
||||
#import <VK-ios-sdk/VKSdk.h>
|
||||
|
||||
Installation with [Carthage](https://github.com/Carthage/Carthage)
|
||||
----------
|
||||
*iOS 8 and upper only*
|
||||
|
||||
Add this to you `Cartfile`:
|
||||
```
|
||||
github "VKCOM/vk-ios-sdk" >= 1.4
|
||||
```
|
||||
|
||||
See building instructions for [Carthage here](https://github.com/Carthage/Carthage#if-youre-building-for-ios)
|
||||
|
||||
Then import the main header.
|
||||
|
||||
#import <VKSdkFramework/VKSdkFramework.h>
|
||||
|
||||
Installation with framework project
|
||||
----------
|
||||
|
||||
If you're targeting iOS 8 and upper, you can use the SDK framework target. Add `VK-ios-sdk.xcodeproj` as sub-project to your project. Open your project in Xcode **->** Go to **General** tab **->** Find the **Embedded Binaries** section **->** Click **Add items** (plus sign) **->** And select `VKSdkFramework.framework` from the VK-ios-sdk project lastly import the main header:
|
||||
|
||||
#import <VKSdkFramework/VKSdkFramework.h>
|
||||
|
||||
|
||||
Using SDK
|
||||
==========
|
||||
|
||||
SDK Initialization
|
||||
----------
|
||||
1) Put this code to the application delegate method
|
||||
|
||||
```
|
||||
//iOS 9 workflow
|
||||
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
|
||||
[VKSdk processOpenURL:url fromApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]];
|
||||
return YES;
|
||||
}
|
||||
|
||||
//iOS 8 and lower
|
||||
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
||||
{
|
||||
[VKSdk processOpenURL:url fromApplication:sourceApplication];
|
||||
return YES;
|
||||
}
|
||||
```
|
||||
Note: if you already have FaceBook SDK added and one of this methods returns `[FBSDKDelegate ...]` you can handle it
|
||||
```
|
||||
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
|
||||
|
||||
[[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
|
||||
[VKSdk processOpenURL:url fromApplication:sourceApplication];
|
||||
return YES;
|
||||
}
|
||||
```
|
||||
2) Initialize VK SDK with your APP_ID for any delegate
|
||||
|
||||
```
|
||||
VKSdk *sdkInstance = [VKSdk initializeWithAppId:YOUR_APP_ID];
|
||||
```
|
||||
|
||||
Starting from version 1.3 there are two types of delegates available: common delegate and UI delegate. You can register as much common delegates, as you need, but an UI delegate may be only one. After the SDK initialization you should register delegates separately:
|
||||
```
|
||||
[sdkInstance registerDelegate:delegate];
|
||||
[sdkInstance setUiDelegate:uiDelegate];
|
||||
```
|
||||
or
|
||||
```
|
||||
[[VKSdk initializeWithAppId:APP_ID] registerDelegate:delegate];
|
||||
```
|
||||
You will find full description of `VKSdkDelegate` and `VKSdkUIDelegate` protocols [here](http://cocoadocs.org/docsets/VK-ios-sdk) or [here](http://vkcom.github.io/vk-ios-sdk/index.html)
|
||||
|
||||
|
||||
3) You need to check, if there is previous session available, so call asynchronous method `wakeUpSession:completeBlock:`
|
||||
|
||||
```
|
||||
NSArray *SCOPE = @[@"friends", @"email"];
|
||||
|
||||
[VKSdk wakeUpSession:SCOPE completeBlock:^(VKAuthorizationState state, NSError *error) {
|
||||
if (state == VKAuthorizationAuthorized) {
|
||||
// Authorized and ready to go
|
||||
} else if (error) {
|
||||
// Some error happend, but you may try later
|
||||
}
|
||||
}];
|
||||
```
|
||||
You will find full list of available SCOPE permission [here](https://vk.com/dev/permissions)
|
||||
|
||||
Check out the VKAuthorizationState parameter. You can get several states:
|
||||
* VKAuthorizationInitialized – means the SDK is ready to work, and you can authorize user with `+authorize:` method. Probably, an old session has expired, and we wiped it out. *This is not an error.*
|
||||
* VKAuthorizationAuthorized - means a previous session is okay, and you can continue working with user data.
|
||||
* VKAuthorizationError - means some error happened when we tried to check the authorization. Probably, the internet connection has a bad quality. You have to try again later.
|
||||
```
|
||||
[VKSdk wakeUpSession:SCOPE completeBlock:^(VKAuthorizationState state, NSError *err) {
|
||||
if (state == VKAuthorizationAuthorized) {
|
||||
// authorized
|
||||
} else {
|
||||
// auth needed
|
||||
}
|
||||
}];
|
||||
```
|
||||
|
||||
User Authorization
|
||||
----------
|
||||
|
||||
If you don't have a session yet, you have to authorize user with a next method:
|
||||
```
|
||||
[VKSdk authorize:scope];
|
||||
```
|
||||
You have to conform to both `VKSdkDelegate` and `VKSdkUIDelegate` protocols to get appropriate methods called.
|
||||
|
||||
After the authorization, all common delegates will be called with a next method:
|
||||
```
|
||||
- (void)vkSdkAccessAuthorizationFinishedWithResult:(VKAuthorizationResult *)result;
|
||||
```
|
||||
|
||||
`VKAuthorizationResult` contains some initial information: new access token object, basic user information, and error (if authorization failed).
|
||||
[Complete documentation here](http://vkcom.github.io/vk-ios-sdk/index.html)
|
||||
|
||||
API Requests
|
||||
==========
|
||||
|
||||
VK API Request syntax
|
||||
----------
|
||||
Below we have listed some examples for several request types.
|
||||
|
||||
1) Plain request
|
||||
```
|
||||
VKRequest *usersReq = [[VKApi users] get];
|
||||
```
|
||||
|
||||
2) Request with parameters
|
||||
```
|
||||
VKRequest *audioReq = [[VKApi audio] get:@{VK_API_OWNER_ID : @"896232"}];
|
||||
```
|
||||
|
||||
3) Request with predetermined maximum number of attempts
|
||||
```
|
||||
VKRequest *postReq = [[VKApi wall] post:@{VK_API_MESSAGE : @"Test"}];
|
||||
postReq.attempts = 10;
|
||||
//or infinite
|
||||
//postReq.attempts = 0;
|
||||
```
|
||||
It will take 10 attempts until succeeds or an API error occurs
|
||||
|
||||
4) Request that calls any method of VK API
|
||||
```
|
||||
VKRequest *getWall = [VKRequest requestWithMethod:@"wall.get" andParameters:@{VK_API_OWNER_ID : @"-1"}];
|
||||
```
|
||||
|
||||
5) Request that uploads a photo to a user's wall
|
||||
```
|
||||
VKRequest *request = [VKApi uploadWallPhotoRequest:[UIImage imageNamed:@"my_photo"] parameters:[VKImageParameters pngImage] userId:0 groupId:0 ];
|
||||
```
|
||||
|
||||
Request firing
|
||||
----------
|
||||
```
|
||||
[audioReq executeWithResultBlock:^(VKResponse *response) {
|
||||
NSLog(@"Json result: %@", response.json);
|
||||
} errorBlock:^(NSError * error) {
|
||||
if (error.code != VK_API_ERROR) {
|
||||
[error.vkError.request repeat];
|
||||
} else {
|
||||
NSLog(@"VK error: %@", error);
|
||||
}
|
||||
}];
|
||||
```
|
||||
|
||||
Error Handling
|
||||
----------
|
||||
Every request can return `NSError` with domain equal to `VKSdkErrorDomain`. SDK can return networking error or internal SDK error (e.g. request was canceled). Category `NSError+VKError` provides `vkError` property that describes error event. Compare error code with the global constant `VK_API_ERROR`. If they are equal that means you process `vkError` property as API error. Otherwise you should handle an http error.
|
||||
|
||||
SDK can handle some errors (e.g., captcha error, validation error). Appropriate ui delegate method will be called for this purpose.
|
||||
Below is an example of captcha error processing:
|
||||
```
|
||||
- (void)vkSdkNeedCaptchaEnter:(VKError *)captchaError
|
||||
{
|
||||
VKCaptchaViewController *vc = [VKCaptchaViewController captchaControllerWithError:captchaError];
|
||||
[vc presentIn:self];
|
||||
}
|
||||
```
|
||||
|
||||
Batch Processing Requests
|
||||
----------
|
||||
SDK allows to execute several unrelated requests at the one call (aka Batch Request).
|
||||
|
||||
1) Prepare requests
|
||||
```
|
||||
VKRequest *request1 = [[VKApi audio] get];
|
||||
request1.completeBlock = ^(VKResponse *) { ... };
|
||||
|
||||
VKRequest *request2 = [[VKApi users] get:@{VK_USER_IDS : @[@(1), @(6492), @(1708231)]}];
|
||||
request2.completeBlock = ^(VKResponse *) { ... };
|
||||
```
|
||||
2) Merge requests into one
|
||||
```
|
||||
VKBatchRequest *batch = [[VKBatchRequest alloc] initWithRequests:request1, request2, nil];
|
||||
```
|
||||
3) Fire the obtained request
|
||||
```
|
||||
[batch executeWithResultBlock:^(NSArray *responses) {
|
||||
NSLog(@"Responses: %@", responses);
|
||||
} errorBlock:^(NSError \*error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}];
|
||||
```
|
||||
4) The result of each method returns to a corresponding completeBlock. Response array contains result of the requests in order they have been passed.
|
||||
|
||||
|
||||
Working with Share dialog
|
||||
==========
|
||||
Share dialog allows you to create a user friendly dialog for sharing text and photos from your application directly to VK. See the Share dialog usage example:
|
||||
```
|
||||
VKShareDialogController *shareDialog = [VKShareDialogController new]; //1
|
||||
shareDialog.text = @"This post created using #vksdk #ios"; //2
|
||||
shareDialog.vkImages = @[@"-10889156_348122347",@"7840938_319411365",@"-60479154_333497085"]; //3
|
||||
shareDialog.shareLink = [[VKShareLink alloc] initWithTitle:@"Super puper link, but nobody knows" link:[NSURL URLWithString:@"https://vk.com/dev/ios_sdk"]]; //4
|
||||
[shareDialog setCompletionHandler:^(VKShareDialogControllerResult result) {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}]; //5
|
||||
[self presentViewController:shareDialog animated:YES completion:nil]; //6
|
||||
```
|
||||
1) Create an instance of the dialog controller as usual
|
||||
|
||||
2) Attach some text information to a dialog. Notice that users can change this information
|
||||
|
||||
3) Attach images uploaded to VK earlier. If you want user to upload a new image use `uploadImages` property
|
||||
|
||||
4) Attach link at your pages
|
||||
|
||||
5) Set the dialog completion handler
|
||||
|
||||
6) Present the dialog view controller to your view controller
|
||||
|
||||
|
||||
Working with share activity
|
||||
==========
|
||||
|
||||
VK SDK provides a special class to work with `UIActivityViewController` - `VKActivity`.
|
||||
|
||||
Pay attention to the fact, that a VK App has it own Share extension since version 2.4. Since version 2.5 it will support special URL scheme to check if Share extension is available. You should call `[VKActivity vkShareExtensionEnabled]` method to remove `VKActivity` from activities list, if a VK share extension is available.
|
||||
|
||||
Check the example below to understand how it works:
|
||||
|
||||
```
|
||||
NSArray *items = @[[UIImage imageNamed:@"apple"], @"Check out information about VK SDK" , [NSURL URLWithString:@"https://vk.com/dev/ios_sdk"]]; //1
|
||||
UIActivityViewController *activityViewController = [[UIActivityViewController alloc]
|
||||
initWithActivityItems:items
|
||||
applicationActivities:@[[VKActivity new]]]; //2
|
||||
[activityViewController setValue:@"VK SDK" forKey:@"subject"]; //3
|
||||
[activityViewController setCompletionHandler:nil]; //4
|
||||
if (VK_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
|
||||
UIPopoverPresentationController *popover = activityViewController.popoverPresentationController;
|
||||
popover.sourceView = self.view;
|
||||
popover.sourceRect = [tableView rectForRowAtIndexPath:indexPath];
|
||||
} //5
|
||||
[self presentViewController:activityViewController animated:YES completion:nil]; //6
|
||||
```
|
||||
|
||||
Let's go through the example step-by-step
|
||||
|
||||
1) Prepare your share information - `UIImage`, `NSString` and `NSURL`. That kind of information may be shared through VK
|
||||
|
||||
2) Prepare `UIActivityViewController` with a new application `VKActivity`
|
||||
|
||||
3) Set additional properties for `activityViewController`
|
||||
|
||||
4) Set completion handler for `activityViewController`
|
||||
|
||||
5) Check if you're running iOS 8 or upper. If user is using iPad, you have to present the activity controller in a popover otherwise you'll get system error
|
||||
|
||||
6) Present the activity controller as usual
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "VK-ios-sdk"
|
||||
s.version = "1.4.4"
|
||||
s.summary = "Library for working with VK."
|
||||
s.homepage = "https://github.com/VKCOM/vk-ios-sdk"
|
||||
s.license = 'MIT'
|
||||
s.author = { "Roman Truba" => "dreddkr@gmail.com" }
|
||||
s.platform = :ios, '6.0'
|
||||
s.source = { :git => "https://github.com/VKCOM/vk-ios-sdk.git", :tag => s.version.to_s }
|
||||
s.source_files = 'library/source/**/*.{h,m}'
|
||||
s.public_header_files = 'library/source/**/*.h'
|
||||
s.resource_bundles = {
|
||||
'VKSdkResources' => ['library/Resources/SdkAssetCatalog.xcassets','library/Resources/*.lproj']
|
||||
}
|
||||
s.frameworks = 'Foundation','UIKit','SafariServices','CoreGraphics','Security'
|
||||
s.requires_arc = true
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:sdk.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?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>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>C8933561-83EC-4A85-B929-CB503A995C4D</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>VK-ios-sdk</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</key>
|
||||
<string>github.com:VKCOM/vk-ios-sdk.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>library/VK-ios-sdk.xcodeproj</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</key>
|
||||
<string>../../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>github.com:VKCOM/vk-ios-sdk.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>111</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>vk-ios-sdk</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?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>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>BD9FB851-AE91-4CA6-ADE0-B5714551D043</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>VKSdk</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</key>
|
||||
<string>github.com:VKCOM/vk-ios-sdk.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>VKSdk.xcodeproj</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</key>
|
||||
<string>../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>github.com:VKCOM/vk-ios-sdk.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>111</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>vk-ios-sdk-pub</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F34670301B8B7C5A003EF74B"
|
||||
BuildableName = "VKSdkFramework.framework"
|
||||
BlueprintName = "VKSdkFramework"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F3C58CCC1D213B2C005E94B5"
|
||||
BuildableName = "VKSdkTests.xctest"
|
||||
BlueprintName = "VKSdkTests"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F34670301B8B7C5A003EF74B"
|
||||
BuildableName = "VKSdkFramework.framework"
|
||||
BlueprintName = "VKSdkFramework"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F34670301B8B7C5A003EF74B"
|
||||
BuildableName = "VKSdkFramework.framework"
|
||||
BlueprintName = "VKSdkFramework"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F34670301B8B7C5A003EF74B"
|
||||
BuildableName = "VKSdkFramework.framework"
|
||||
BlueprintName = "VKSdkFramework"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F3C7542C182133CC00964716"
|
||||
BuildableName = "libVKSdk.a"
|
||||
BlueprintName = "VKSdk"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F3C58CCC1D213B2C005E94B5"
|
||||
BuildableName = "VKSdkTests.xctest"
|
||||
BlueprintName = "VKSdkTests"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F3C7542C182133CC00964716"
|
||||
BuildableName = "libVKSdk.a"
|
||||
BlueprintName = "VKSdk"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F3C7542C182133CC00964716"
|
||||
BuildableName = "libVKSdk.a"
|
||||
BlueprintName = "VKSdk"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F3C7542C182133CC00964716"
|
||||
BuildableName = "libVKSdk.a"
|
||||
BlueprintName = "VKSdk"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F3C58CCC1D213B2C005E94B5"
|
||||
BuildableName = "VKSdkTests.xctest"
|
||||
BlueprintName = "VKSdkTests"
|
||||
ReferencedContainer = "container:VK-ios-sdk.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F3EEFF651827B1DD000BB525"
|
||||
BuildableName = "VKSDKTestApplication.app"
|
||||
BlueprintName = "VKSDKTestApplication"
|
||||
ReferencedContainer = "container:example/VKSDKTestApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:example/VKSDKTestApplication.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?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>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>D2B31607-2F25-4041-8719-7694C0CEFCA7</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>VK-ios-sdk</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</key>
|
||||
<string>github.com:VKCOM/vk-ios-sdk.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>VK-ios-sdk.xcworkspace</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</key>
|
||||
<string>..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>github.com:VKCOM/vk-ios-sdk.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>111</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>vk-ios-sdk</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
|
@ -0,0 +1,24 @@
|
|||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
//
|
||||
// VKSdkTests.m
|
||||
// VKSdkTests
|
||||
//
|
||||
// Created by Roman Truba on 27.06.16.
|
||||
// Copyright © 2016 VK. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "VKUser.h"
|
||||
#import "VKUtil.h"
|
||||
#import "VKSdk.h"
|
||||
|
||||
@interface VKSdkTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation VKSdkTests
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
|
||||
self.continueAfterFailure = NO;
|
||||
|
||||
[VKSdk initializeWithAppId:@"3974615" apiVersion:@"5.50"];
|
||||
|
||||
NSURL *URL = [NSURL URLWithString:@"https://api.vk.com"];
|
||||
|
||||
[NSURLRequest.class performSelector:NSSelectorFromString(@"setAllowsAnyHTTPSCertificate:forHost:")
|
||||
withObject:NSNull.null // Just need to pass non-nil here to appear as a BOOL YES, using the NSNull.null singleton is pretty safe
|
||||
withObject:[URL host]];
|
||||
}
|
||||
|
||||
- (void)tearDown {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
static NSString *const ALL_USER_FIELDS = @"id,first_name,last_name,sex,bdate,city,country,photo_50,photo_100,photo_200_orig,photo_200,photo_400_orig,photo_max,photo_max_orig,online,online_mobile,lists,domain,has_mobile,contacts,connections,site,education,universities,schools,can_post,can_see_all_posts,can_see_audio,can_write_private_message,status,last_seen,relation,relatives,counters";
|
||||
|
||||
- (void)testApi {
|
||||
VKRequest *request = [VKRequest requestWithMethod:@"users.get" parameters:@{VK_API_USER_ID : @1, VK_API_FIELDS : ALL_USER_FIELDS} modelClass:[VKUsersArray class]];
|
||||
[request setPreferredLang:@"ru"];
|
||||
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:[NSString stringWithFormat:@"Api call: %@", request.methodName]];
|
||||
|
||||
[request executeWithResultBlock:^(VKResponse<VKUsersArray*> *response) {
|
||||
XCTAssertNotNil(response.parsedModel);
|
||||
XCTAssertTrue([response.parsedModel isKindOfClass:[VKUsersArray class]]);
|
||||
|
||||
NSError *error = nil;
|
||||
NSDictionary *jsonObject = [NSJSONSerialization JSONObjectWithData:[response.responseString dataUsingEncoding:NSUTF8StringEncoding] options:0 error:&error];
|
||||
XCTAssertNil(error);
|
||||
[self validateUsers:response.parsedModel withJsonData:jsonObject];
|
||||
|
||||
[expectation fulfill];
|
||||
} errorBlock:^(NSError *error) {
|
||||
XCTAssertNil(error);
|
||||
}];
|
||||
|
||||
[self waitForExpectationsWithTimeout:5.f handler:^(NSError * _Nullable error) {
|
||||
NSLog(@"Request timed out %@", error);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)testUserParse {
|
||||
NSString *PaulDurov = @"{\"response\":[{\"id\":1,\"first_name\":\"Павел\",\"last_name\":\"Дуров\",\"sex\":2,\"domain\":\"durov\",\"bdate\":\"10.10.1984\",\"city\":{\"id\":2,\"title\":\"Санкт-Петербург\"},\"country\":{\"id\":1,\"title\":\"Россия\"},\"photo_50\":\"https:\\/\\/pp.vk.me\\/c629231\\/v629231001\\/c543\\/FfB--bOEVOY.jpg\",\"photo_100\":\"https:\\/\\/pp.vk.me\\/c629231\\/v629231001\\/c542\\/fcMCbfjDsv0.jpg\",\"photo_200\":\"https:\\/\\/pp.vk.me\\/c629231\\/v629231001\\/c541\\/TaUV7CG7RHg.jpg\",\"photo_max\":\"https:\\/\\/pp.vk.me\\/c629231\\/v629231001\\/c541\\/TaUV7CG7RHg.jpg\",\"photo_200_orig\":\"https:\\/\\/pp.vk.me\\/c629231\\/v629231001\\/c535\\/Aolq7Qohi2o.jpg\",\"photo_400_orig\":\"https:\\/\\/pp.vk.me\\/c629231\\/v629231001\\/c536\\/dcqdvDEUs4E.jpg\",\"photo_max_orig\":\"https:\\/\\/pp.vk.me\\/c629231\\/v629231001\\/c536\\/dcqdvDEUs4E.jpg\",\"has_mobile\":1,\"online\":0,\"can_post\":0,\"can_see_all_posts\":0,\"can_see_audio\":0,\"can_write_private_message\":0,\"twitter\":\"durov\",\"instagram\":\"durov\",\"site\":\"http:\\/\\/telegram.org\",\"status\":\"道德經\",\"last_seen\":{\"time\":1398447188,\"platform\":7},\"common_count\":2,\"counters\":{\"albums\":2,\"videos\":14,\"audios\":0,\"notes\":6,\"photos\":226,\"friends\":721,\"online_friends\":126,\"mutual_friends\":2,\"followers\":6062370,\"subscriptions\":1,\"pages\":42},\"university\":1,\"university_name\":\"СПбГУ\",\"faculty\":0,\"faculty_name\":\"\",\"graduation\":2006,\"relation\":0,\"universities\":[{\"id\":1,\"country\":1,\"city\":2,\"name\":\"СПбГУ\",\"graduation\":2006}],\"schools\":[{\"id\":\"1035386\",\"country\":88,\"city\":16,\"name\":\"Sc.Elem. Coppino - Falletti di Barolo\",\"year_from\":1990,\"year_to\":1992,\"class\":\"\"},{\"id\":\"1\",\"country\":1,\"city\":2,\"name\":\"Академическая гимназия (АГ) СПбГУ\",\"year_from\":1996,\"year_to\":2001,\"year_graduated\":2001,\"class\":\"о\",\"type\":1,\"type_str\":\"Гимназия\"}],\"relatives\":[]}]}";
|
||||
|
||||
NSError *error = nil;
|
||||
NSDictionary *jsonObject = [NSJSONSerialization JSONObjectWithData:[PaulDurov dataUsingEncoding:NSUTF8StringEncoding] options:0 error:&error];
|
||||
XCTAssertNil(error);
|
||||
|
||||
__block VKUsersArray *users = [[VKUsersArray alloc] initWithDictionary:jsonObject];
|
||||
XCTAssert(users.count == 1);
|
||||
XCTAssert(users.items.count == 1);
|
||||
|
||||
[self validateUsers:users withJsonData:jsonObject];
|
||||
}
|
||||
|
||||
- (void)validateUsers:(VKUsersArray*)users withJsonData:(NSDictionary*)jsonData {
|
||||
|
||||
VKUser *user = users.items.firstObject;
|
||||
|
||||
NSArray *jsonResponse = VK_ENSURE_ARRAY(jsonData[@"response"]);
|
||||
XCTAssertNotNil(jsonResponse);
|
||||
NSDictionary *jsonUser = VK_ENSURE_DICT(jsonResponse.firstObject);
|
||||
|
||||
for (NSString *key in jsonUser) {
|
||||
id userValue = [user valueForKey:key];
|
||||
XCTAssertNotNil(userValue);
|
||||
|
||||
NSDictionary *dictValue = VK_ENSURE_DICT(jsonUser[key]);
|
||||
if (dictValue) {
|
||||
NSLog(@"%@ %@", key, [userValue class]);
|
||||
XCTAssert([userValue isKindOfClass:[VKApiObject class]] == YES);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XCTAssertNotNil(user);
|
||||
XCTAssertEqualObjects(user.first_name, @"Павел");
|
||||
XCTAssertEqualObjects(user.last_name, @"Дуров");
|
||||
|
||||
XCTAssertNotNil(VK_ENSURE(user.country, [VKCountry class]));
|
||||
XCTAssertEqualObjects(user.country.id, @(1));
|
||||
XCTAssertEqualObjects(user.country.title, @"Россия");
|
||||
|
||||
// Universities
|
||||
XCTAssertNotNil(VK_ENSURE(user.universities, [VKUniversities class]));
|
||||
XCTAssertEqual(user.universities.count, 1);
|
||||
|
||||
VKUniversity *university = user.universities.firstObject;
|
||||
XCTAssertNotNil(university);
|
||||
XCTAssertEqualObjects(university.name, @"СПбГУ");
|
||||
|
||||
// Schools
|
||||
XCTAssertNotNil(VK_ENSURE(user.schools, [VKSchools class]));
|
||||
XCTAssertEqual(user.schools.count, 2);
|
||||
for (VKSchool *school in user.schools) {
|
||||
XCTAssertNotNil(VK_ENSURE(school, [VKSchool class]));
|
||||
XCTAssertNotNil(school.id);
|
||||
XCTAssertNotNil(school.name);
|
||||
XCTAssertNotNil(school.name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,495 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
F34DED0C1D2173D6005495E5 /* VKSdkFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F34DED091D2173C9005495E5 /* VKSdkFramework.framework */; };
|
||||
F34DED0D1D2173D6005495E5 /* VKSdkFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F34DED091D2173C9005495E5 /* VKSdkFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
F36114C21976DC770085898F /* apple.png in Resources */ = {isa = PBXBuildFile; fileRef = F36114C11976DC770085898F /* apple.png */; };
|
||||
F3769E671BE8D48800AEC4AF /* SafariServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3769E661BE8D48800AEC4AF /* SafariServices.framework */; };
|
||||
F3B7EEAB184353CF00104B90 /* ApiCallViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F3B7EEAA184353CF00104B90 /* ApiCallViewController.m */; };
|
||||
F3D38E6F183CD29700D05079 /* VKStartScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = F3D38E6E183CD29700D05079 /* VKStartScreen.m */; };
|
||||
F3DC2446183B811E00E3A93D /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3DC2445183B811E00E3A93D /* Storyboard.storyboard */; };
|
||||
F3EEFF6A1827B1DD000BB525 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3EEFF691827B1DD000BB525 /* Foundation.framework */; };
|
||||
F3EEFF6C1827B1DD000BB525 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3EEFF6B1827B1DD000BB525 /* CoreGraphics.framework */; };
|
||||
F3EEFF6E1827B1DD000BB525 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3EEFF6D1827B1DD000BB525 /* UIKit.framework */; };
|
||||
F3EEFF741827B1DD000BB525 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F3EEFF721827B1DD000BB525 /* InfoPlist.strings */; };
|
||||
F3EEFF761827B1DD000BB525 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F3EEFF751827B1DD000BB525 /* main.m */; };
|
||||
F3EEFF7A1827B1DD000BB525 /* VKAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F3EEFF791827B1DD000BB525 /* VKAppDelegate.m */; };
|
||||
F3EEFF7C1827B1DD000BB525 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F3EEFF7B1827B1DD000BB525 /* Images.xcassets */; };
|
||||
F3EEFFC01827E990000BB525 /* TestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F3EEFFBE1827E990000BB525 /* TestViewController.m */; };
|
||||
F3EEFFCE1827F9AF000BB525 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3EEFFCD1827F9AF000BB525 /* MobileCoreServices.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||
F3EEFFD01827F9B5000BB525 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3EEFFCF1827F9B5000BB525 /* SystemConfiguration.framework */; settings = {ATTRIBUTES = (Required, ); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
F34DED041D2173C9005495E5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F34DECFD1D2173C9005495E5 /* VK-ios-sdk.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = F3C7542D182133CC00964716;
|
||||
remoteInfo = VKSdk;
|
||||
};
|
||||
F34DED061D2173C9005495E5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F34DECFD1D2173C9005495E5 /* VK-ios-sdk.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = F3BACC401865905B003158DA;
|
||||
remoteInfo = VKSdkResources;
|
||||
};
|
||||
F34DED081D2173C9005495E5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F34DECFD1D2173C9005495E5 /* VK-ios-sdk.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = F34670311B8B7C5A003EF74B;
|
||||
remoteInfo = VKSdkFramework;
|
||||
};
|
||||
F34DED0A1D2173C9005495E5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F34DECFD1D2173C9005495E5 /* VK-ios-sdk.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = F3C58CCD1D213B2C005E94B5;
|
||||
remoteInfo = VKSdkTests;
|
||||
};
|
||||
F34DED0E1D2173D6005495E5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F34DECFD1D2173C9005495E5 /* VK-ios-sdk.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = F34670301B8B7C5A003EF74B;
|
||||
remoteInfo = VKSdkFramework;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
F34DED101D2173D6005495E5 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
F34DED0D1D2173D6005495E5 /* VKSdkFramework.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
F34DECFD1D2173C9005495E5 /* VK-ios-sdk.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "VK-ios-sdk.xcodeproj"; path = "../VK-ios-sdk.xcodeproj"; sourceTree = "<group>"; };
|
||||
F36114AA197687050085898F /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
F36114C11976DC770085898F /* apple.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = apple.png; sourceTree = "<group>"; };
|
||||
F3769E661BE8D48800AEC4AF /* SafariServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SafariServices.framework; path = System/Library/Frameworks/SafariServices.framework; sourceTree = SDKROOT; };
|
||||
F3B7EEA9184353CF00104B90 /* ApiCallViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApiCallViewController.h; sourceTree = "<group>"; };
|
||||
F3B7EEAA184353CF00104B90 /* ApiCallViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApiCallViewController.m; sourceTree = "<group>"; };
|
||||
F3BACC301865902D003158DA /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
|
||||
F3D38E6D183CD29700D05079 /* VKStartScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VKStartScreen.h; sourceTree = "<group>"; };
|
||||
F3D38E6E183CD29700D05079 /* VKStartScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VKStartScreen.m; sourceTree = "<group>"; };
|
||||
F3DC2445183B811E00E3A93D /* Storyboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Storyboard.storyboard; sourceTree = "<group>"; };
|
||||
F3EEFF661827B1DD000BB525 /* VKSDKTestApplication.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VKSDKTestApplication.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F3EEFF691827B1DD000BB525 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
F3EEFF6B1827B1DD000BB525 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
F3EEFF6D1827B1DD000BB525 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
F3EEFF711827B1DD000BB525 /* VKSDKTestApplication-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "VKSDKTestApplication-Info.plist"; sourceTree = "<group>"; };
|
||||
F3EEFF731827B1DD000BB525 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
F3EEFF751827B1DD000BB525 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
F3EEFF771827B1DD000BB525 /* VKSDKTestApplication-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VKSDKTestApplication-Prefix.pch"; sourceTree = "<group>"; };
|
||||
F3EEFF781827B1DD000BB525 /* VKAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VKAppDelegate.h; sourceTree = "<group>"; };
|
||||
F3EEFF791827B1DD000BB525 /* VKAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VKAppDelegate.m; sourceTree = "<group>"; };
|
||||
F3EEFF7B1827B1DD000BB525 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
F3EEFFBD1827E990000BB525 /* TestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestViewController.h; sourceTree = "<group>"; };
|
||||
F3EEFFBE1827E990000BB525 /* TestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestViewController.m; sourceTree = "<group>"; };
|
||||
F3EEFFCD1827F9AF000BB525 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
|
||||
F3EEFFCF1827F9B5000BB525 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
F3EEFF631827B1DD000BB525 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F3769E671BE8D48800AEC4AF /* SafariServices.framework in Frameworks */,
|
||||
F3EEFFD01827F9B5000BB525 /* SystemConfiguration.framework in Frameworks */,
|
||||
F3EEFFCE1827F9AF000BB525 /* MobileCoreServices.framework in Frameworks */,
|
||||
F3EEFF6C1827B1DD000BB525 /* CoreGraphics.framework in Frameworks */,
|
||||
F3EEFF6E1827B1DD000BB525 /* UIKit.framework in Frameworks */,
|
||||
F3EEFF6A1827B1DD000BB525 /* Foundation.framework in Frameworks */,
|
||||
F34DED0C1D2173D6005495E5 /* VKSdkFramework.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
F34DECFE1D2173C9005495E5 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F34DED051D2173C9005495E5 /* libVKSdk.a */,
|
||||
F34DED071D2173C9005495E5 /* VKSdkResources.bundle */,
|
||||
F34DED091D2173C9005495E5 /* VKSdkFramework.framework */,
|
||||
F34DED0B1D2173C9005495E5 /* VKSdkTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3EEFF5D1827B1DD000BB525 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3EEFF6F1827B1DD000BB525 /* VKSDKTestApplication */,
|
||||
F3EEFF681827B1DD000BB525 /* Frameworks */,
|
||||
F3EEFF671827B1DD000BB525 /* Products */,
|
||||
F34DECFD1D2173C9005495E5 /* VK-ios-sdk.xcodeproj */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3EEFF671827B1DD000BB525 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3EEFF661827B1DD000BB525 /* VKSDKTestApplication.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3EEFF681827B1DD000BB525 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3769E661BE8D48800AEC4AF /* SafariServices.framework */,
|
||||
F3EEFFCF1827F9B5000BB525 /* SystemConfiguration.framework */,
|
||||
F3EEFFCD1827F9AF000BB525 /* MobileCoreServices.framework */,
|
||||
F3EEFF691827B1DD000BB525 /* Foundation.framework */,
|
||||
F3EEFF6B1827B1DD000BB525 /* CoreGraphics.framework */,
|
||||
F3EEFF6D1827B1DD000BB525 /* UIKit.framework */,
|
||||
F3BACC301865902D003158DA /* CoreFoundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3EEFF6F1827B1DD000BB525 /* VKSDKTestApplication */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3EEFF781827B1DD000BB525 /* VKAppDelegate.h */,
|
||||
F3EEFF791827B1DD000BB525 /* VKAppDelegate.m */,
|
||||
F3EEFF7B1827B1DD000BB525 /* Images.xcassets */,
|
||||
F3EEFF701827B1DD000BB525 /* Supporting Files */,
|
||||
F3DC2445183B811E00E3A93D /* Storyboard.storyboard */,
|
||||
F3D38E6D183CD29700D05079 /* VKStartScreen.h */,
|
||||
F3D38E6E183CD29700D05079 /* VKStartScreen.m */,
|
||||
F3EEFFBD1827E990000BB525 /* TestViewController.h */,
|
||||
F3EEFFBE1827E990000BB525 /* TestViewController.m */,
|
||||
F3B7EEA9184353CF00104B90 /* ApiCallViewController.h */,
|
||||
F3B7EEAA184353CF00104B90 /* ApiCallViewController.m */,
|
||||
);
|
||||
path = VKSDKTestApplication;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3EEFF701827B1DD000BB525 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F36114C11976DC770085898F /* apple.png */,
|
||||
F3EEFF711827B1DD000BB525 /* VKSDKTestApplication-Info.plist */,
|
||||
F3EEFF721827B1DD000BB525 /* InfoPlist.strings */,
|
||||
F3EEFF751827B1DD000BB525 /* main.m */,
|
||||
F3EEFF771827B1DD000BB525 /* VKSDKTestApplication-Prefix.pch */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
F3EEFF651827B1DD000BB525 /* VKSDKTestApplication */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = F3EEFF921827B1DE000BB525 /* Build configuration list for PBXNativeTarget "VKSDKTestApplication" */;
|
||||
buildPhases = (
|
||||
F3EEFF621827B1DD000BB525 /* Sources */,
|
||||
F3EEFF631827B1DD000BB525 /* Frameworks */,
|
||||
F3EEFF641827B1DD000BB525 /* Resources */,
|
||||
F34DED101D2173D6005495E5 /* Embed Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
F34DED0F1D2173D6005495E5 /* PBXTargetDependency */,
|
||||
);
|
||||
name = VKSDKTestApplication;
|
||||
productName = VKSDKTestApplication;
|
||||
productReference = F3EEFF661827B1DD000BB525 /* VKSDKTestApplication.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
F3EEFF5E1827B1DD000BB525 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = VK;
|
||||
LastUpgradeCheck = 0720;
|
||||
ORGANIZATIONNAME = VK;
|
||||
TargetAttributes = {
|
||||
F3EEFF651827B1DD000BB525 = {
|
||||
DevelopmentTeam = R26JY69RPL;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = F3EEFF611827B1DD000BB525 /* Build configuration list for PBXProject "VKSDKTestApplication" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
ru,
|
||||
);
|
||||
mainGroup = F3EEFF5D1827B1DD000BB525;
|
||||
productRefGroup = F3EEFF671827B1DD000BB525 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = F34DECFE1D2173C9005495E5 /* Products */;
|
||||
ProjectRef = F34DECFD1D2173C9005495E5 /* VK-ios-sdk.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
F3EEFF651827B1DD000BB525 /* VKSDKTestApplication */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
F34DED051D2173C9005495E5 /* libVKSdk.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libVKSdk.a;
|
||||
remoteRef = F34DED041D2173C9005495E5 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F34DED071D2173C9005495E5 /* VKSdkResources.bundle */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.cfbundle;
|
||||
path = VKSdkResources.bundle;
|
||||
remoteRef = F34DED061D2173C9005495E5 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F34DED091D2173C9005495E5 /* VKSdkFramework.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = VKSdkFramework.framework;
|
||||
remoteRef = F34DED081D2173C9005495E5 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F34DED0B1D2173C9005495E5 /* VKSdkTests.xctest */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.cfbundle;
|
||||
path = VKSdkTests.xctest;
|
||||
remoteRef = F34DED0A1D2173C9005495E5 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
F3EEFF641827B1DD000BB525 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F3DC2446183B811E00E3A93D /* Storyboard.storyboard in Resources */,
|
||||
F3EEFF741827B1DD000BB525 /* InfoPlist.strings in Resources */,
|
||||
F3EEFF7C1827B1DD000BB525 /* Images.xcassets in Resources */,
|
||||
F36114C21976DC770085898F /* apple.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
F3EEFF621827B1DD000BB525 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F3EEFFC01827E990000BB525 /* TestViewController.m in Sources */,
|
||||
F3EEFF761827B1DD000BB525 /* main.m in Sources */,
|
||||
F3D38E6F183CD29700D05079 /* VKStartScreen.m in Sources */,
|
||||
F3EEFF7A1827B1DD000BB525 /* VKAppDelegate.m in Sources */,
|
||||
F3B7EEAB184353CF00104B90 /* ApiCallViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
F34DED0F1D2173D6005495E5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = VKSdkFramework;
|
||||
targetProxy = F34DED0E1D2173D6005495E5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
F3EEFF721827B1DD000BB525 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
F3EEFF731827B1DD000BB525 /* en */,
|
||||
F36114AA197687050085898F /* ru */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
F3EEFF901827B1DE000BB525 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
F3EEFF911827B1DE000BB525 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
F3EEFF931827B1DE000BB525 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/VKSDKTestApplication",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "VKSDKTestApplication/VKSDKTestApplication-Prefix.pch";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"VKDEBUG=1",
|
||||
);
|
||||
INFOPLIST_FILE = "VKSDKTestApplication/VKSDKTestApplication-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-all_load";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.vk.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "include/**";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
F3EEFF941827B1DE000BB525 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/VKSDKTestApplication",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "VKSDKTestApplication/VKSDKTestApplication-Prefix.pch";
|
||||
INFOPLIST_FILE = "VKSDKTestApplication/VKSDKTestApplication-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "-all_load";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.vk.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "include/**";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
F3EEFF611827B1DD000BB525 /* Build configuration list for PBXProject "VKSDKTestApplication" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
F3EEFF901827B1DE000BB525 /* Debug */,
|
||||
F3EEFF911827B1DE000BB525 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
F3EEFF921827B1DE000BB525 /* Build configuration list for PBXNativeTarget "VKSDKTestApplication" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
F3EEFF931827B1DE000BB525 /* Debug */,
|
||||
F3EEFF941827B1DE000BB525 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = F3EEFF5E1827B1DD000BB525 /* Project object */;
|
||||
}
|
||||
7
example/VKSDKTestApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:VKSDKTestApplication.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?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>IDESourceControlProjectFavoriteDictionaryKey</key>
|
||||
<false/>
|
||||
<key>IDESourceControlProjectIdentifier</key>
|
||||
<string>105ED895-2076-4EF7-A570-4A1AD0537B81</string>
|
||||
<key>IDESourceControlProjectName</key>
|
||||
<string>project</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</key>
|
||||
<string>github.com:VKCOM/vk-ios-sdk.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>example/VKSDKTestApplication.xcodeproj/project.xcworkspace</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</key>
|
||||
<string>../../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>github.com:VKCOM/vk-ios-sdk.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>111</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>C8F50BCDCFDC63763FD6355FD91D619C6B03C252</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>vk-ios-sdk-pub</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// ApiCallViewController.h
|
||||
//
|
||||
// Copyright (c) 2014 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ApiCallViewController : UIViewController
|
||||
@property(nonatomic, strong) IBOutlet UILabel *methodName;
|
||||
@property(nonatomic, strong) IBOutlet UITextView *callResult;
|
||||
@property(nonatomic, strong) VKRequest *callingRequest;
|
||||
@end
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
//
|
||||
// ApiCallViewController.m
|
||||
//
|
||||
// Copyright (c) 2014 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import "ApiCallViewController.h"
|
||||
|
||||
@interface ApiCallViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation ApiCallViewController
|
||||
|
||||
- (void)dealloc {
|
||||
[self.callingRequest cancel];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.methodName.text = self.callingRequest.methodName;
|
||||
self.callingRequest.debugTiming = YES;
|
||||
self.callingRequest.requestTimeout = 10;
|
||||
|
||||
__weak __typeof(self) welf = self;
|
||||
[self.callingRequest executeWithResultBlock:^(VKResponse *response) {
|
||||
welf.callResult.text = [NSString stringWithFormat:@"Result: %@", response];
|
||||
welf.callingRequest = nil;
|
||||
NSLog(@"%@", response.request.requestTiming);
|
||||
} errorBlock:^(NSError *error) {
|
||||
welf.callResult.text = [NSString stringWithFormat:@"Error: %@", error];
|
||||
welf.callingRequest = nil;
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "8.0",
|
||||
"subtype" : "736h",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "8.0",
|
||||
"subtype" : "736h",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "8.0",
|
||||
"subtype" : "667h",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"subtype" : "retina4",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"subtype" : "retina4",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="AtZ-CU-6AO">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="B70-cf-cno">
|
||||
<objects>
|
||||
<navigationController definesPresentationContext="YES" id="AtZ-CU-6AO" sceneMemberID="viewController">
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<size key="freeformSize" width="320" height="568"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="EeE-AC-dZ1">
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<animations/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
<segue destination="EGh-wy-2rb" kind="relationship" relationship="rootViewController" id="mdg-bc-MNW"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="NjP-rd-Mhc" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-4" y="77.999999999999986"/>
|
||||
</scene>
|
||||
<!--Test View Controller-->
|
||||
<scene sceneID="Ek1-ok-6s4">
|
||||
<objects>
|
||||
<tableViewController storyboardIdentifier="START" useStoryboardIdentifierAsRestorationIdentifier="YES" id="H8u-X9-tSm" customClass="TestViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="EM5-LE-xOw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="TestRow" id="bmL-Ks-VJ7">
|
||||
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bmL-Ks-VJ7" id="tGf-qJ-E3s">
|
||||
<rect key="frame" x="0.0" y="0.0" width="287" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="1" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Test" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="8u9-CN-pfg">
|
||||
<rect key="frame" x="20" y="11" width="280" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
</tableViewCellContentView>
|
||||
<animations/>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="H8u-X9-tSm" id="d6q-Ne-Tee"/>
|
||||
<outlet property="delegate" destination="H8u-X9-tSm" id="LGW-cO-Abj"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" id="h35-e0-6fi"/>
|
||||
<connections>
|
||||
<segue destination="DpQ-o8-S5p" kind="push" identifier="API_CALL" id="vXO-94-7OA"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="lB3-O5-drk" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="855" y="77.999999999999986"/>
|
||||
</scene>
|
||||
<!--Api Call View Controller-->
|
||||
<scene sceneID="9VO-Sj-V0I">
|
||||
<objects>
|
||||
<viewController id="DpQ-o8-S5p" customClass="ApiCallViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="4Ps-EX-de8">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Method result" id="Ee9-oV-ShF">
|
||||
<rect key="frame" x="20" y="49" width="280" height="437"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
</textView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Method name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0qQ-dv-rf7">
|
||||
<rect key="frame" x="20" y="20" width="280" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout"/>
|
||||
<navigationItem key="navigationItem" id="mwC-jL-1ue"/>
|
||||
<connections>
|
||||
<outlet property="callResult" destination="Ee9-oV-ShF" id="yKd-ql-C4V"/>
|
||||
<outlet property="methodName" destination="0qQ-dv-rf7" id="iU0-av-Twu"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="VXV-0V-ane" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1298" y="77.999999999999986"/>
|
||||
</scene>
|
||||
<!--Start Screen-->
|
||||
<scene sceneID="82c-Z7-iEU">
|
||||
<objects>
|
||||
<viewController id="EGh-wy-2rb" customClass="VKStartScreen" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="IZm-d8-V7a">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="YWF-ld-CDZ">
|
||||
<rect key="frame" x="0.0" y="269" width="320" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<state key="normal" title="Get new access token"/>
|
||||
<connections>
|
||||
<action selector="authorize:" destination="EGh-wy-2rb" eventType="touchUpInside" id="wgy-u4-m5V"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="vca-Tg-iuf">
|
||||
<rect key="frame" x="0.0" y="320" width="320" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<state key="normal" title="Share dialog"/>
|
||||
<connections>
|
||||
<action selector="openShareDialog:" destination="EGh-wy-2rb" eventType="touchUpInside" id="cQu-uq-Sdy"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="gAF-tH-eqo"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics"/>
|
||||
<connections>
|
||||
<segue destination="H8u-X9-tSm" kind="push" identifier="START_WORK" id="7UU-b0-KyZ"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="hFe-TK-5Ep" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="424" y="77.999999999999986"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// TestViewController.h
|
||||
//
|
||||
// Copyright (c) 2014 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface TestViewController : UITableViewController {
|
||||
@private
|
||||
VKRequest *callingRequest;
|
||||
}
|
||||
@property(nonatomic, strong) IBOutlet UILabel *tokenLabel;
|
||||
@end
|
||||
|
|
@ -0,0 +1,258 @@
|
|||
//
|
||||
// TestViewController.m
|
||||
//
|
||||
// Copyright (c) 2014 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import "TestViewController.h"
|
||||
#import "ApiCallViewController.h"
|
||||
|
||||
@implementation TestViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.navigationController.view.backgroundColor = [UIColor whiteColor];
|
||||
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStyleDone target:self action:@selector(logout:)];
|
||||
self.tableView.tableFooterView = [UIView new];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
- (IBAction)getUser:(id)sender {
|
||||
VKRequest *request = [[VKApi users] get];
|
||||
[request executeWithResultBlock:^(VKResponse *response) {
|
||||
NSLog(@"Result: %@", response);
|
||||
} errorBlock:^(NSError *error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)getSubscriptions:(id)sender {
|
||||
VKRequest *request = [[VKApi users] getSubscriptions:@{VK_API_EXTENDED : @(1), VK_API_COUNT : @(100)}];
|
||||
request.secure = NO;
|
||||
[request executeWithResultBlock:^(VKResponse *response) {
|
||||
NSLog(@"Result: %@", response);
|
||||
|
||||
} errorBlock:^(NSError *error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}];
|
||||
}
|
||||
|
||||
static NSArray *labels = nil;
|
||||
static NSString *const USERS_GET = @"users.get";
|
||||
static NSString *const FRIENDS_GET = @"friends.get";
|
||||
static NSString *const FRIENDS_GET_FULL = @"friends.get with fields";
|
||||
static NSString *const USERS_SUBSCRIPTIONS = @"Pavel Durov subscribers";
|
||||
static NSString *const UPLOAD_PHOTO = @"Upload photo to wall";
|
||||
static NSString *const UPLOAD_PHOTO_ALBUM = @"Upload photo to album";
|
||||
static NSString *const UPLOAD_PHOTOS = @"Upload several photos to wall";
|
||||
static NSString *const TEST_CAPTCHA = @"Test captcha";
|
||||
static NSString *const CALL_UNKNOWN_METHOD = @"Call unknown method";
|
||||
static NSString *const TEST_VALIDATION = @"Test validation";
|
||||
static NSString *const MAKE_SYNCHRONOUS = @"Make synchronous request";
|
||||
static NSString *const SHARE_DIALOG = @"Test share dialog";
|
||||
static NSString *const TEST_ACTIVITY = @"Test VKActivity";
|
||||
static NSString *const TEST_APPREQUEST = @"Test app request";
|
||||
|
||||
//Fields
|
||||
static NSString *const ALL_USER_FIELDS = @"id,first_name,last_name,sex,bdate,city,country,photo_50,photo_100,photo_200_orig,photo_200,photo_400_orig,photo_max,photo_max_orig,online,online_mobile,lists,domain,has_mobile,contacts,connections,site,education,universities,schools,can_post,can_see_all_posts,can_see_audio,can_write_private_message,status,last_seen,common_count,relation,relatives,counters";
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
if (!labels)
|
||||
labels = @[USERS_GET, USERS_SUBSCRIPTIONS, FRIENDS_GET, FRIENDS_GET_FULL, UPLOAD_PHOTO, UPLOAD_PHOTO_ALBUM, UPLOAD_PHOTOS, TEST_CAPTCHA, CALL_UNKNOWN_METHOD, TEST_VALIDATION, MAKE_SYNCHRONOUS, SHARE_DIALOG, TEST_ACTIVITY, TEST_APPREQUEST];
|
||||
return labels.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TestRow"];
|
||||
UILabel *label = (UILabel *) [cell viewWithTag:1];
|
||||
label.text = labels[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
NSString *label = labels[indexPath.row];
|
||||
if ([label isEqualToString:USERS_GET]) {
|
||||
// [self callMethod:[[VKApi users] get:@{ VK_API_FIELDS : ALL_USER_FIELDS }]];
|
||||
[self callMethod:[[VKApi users] get:@{VK_API_FIELDS : @"first_name, last_name, uid, photo_100", VK_API_USER_IDS : @[@(1), @(2), @(3)]}]];
|
||||
}
|
||||
else if ([label isEqualToString:USERS_SUBSCRIPTIONS]) {
|
||||
[self callMethod:[VKRequest requestWithMethod:@"users.getFollowers" parameters:@{VK_API_USER_ID : @"1", VK_API_COUNT : @(1000), VK_API_FIELDS : ALL_USER_FIELDS} modelClass:[VKUsersArray class]]];
|
||||
}
|
||||
else if ([label isEqualToString:UPLOAD_PHOTO]) {
|
||||
[self uploadPhoto];
|
||||
}
|
||||
else if ([label isEqualToString:UPLOAD_PHOTOS]) {
|
||||
[self uploadPhotos];
|
||||
}
|
||||
else if ([label isEqualToString:TEST_CAPTCHA]) {
|
||||
[self testCaptcha];
|
||||
}
|
||||
else if ([label isEqualToString:UPLOAD_PHOTO_ALBUM]) {
|
||||
[self uploadInAlbum];
|
||||
}
|
||||
else if ([label isEqualToString:FRIENDS_GET]) {
|
||||
[self callMethod:[[VKApi friends] get]];
|
||||
}
|
||||
else if ([label isEqualToString:FRIENDS_GET_FULL]) {
|
||||
VKRequest *friendsRequest = [[VKApi friends] get:@{VK_API_FIELDS : ALL_USER_FIELDS}];
|
||||
[self callMethod:friendsRequest];
|
||||
}
|
||||
else if ([label isEqualToString:CALL_UNKNOWN_METHOD]) {
|
||||
[self callMethod:[VKRequest requestWithMethod:@"I.am.Lord.Voldemort" parameters:nil]];
|
||||
}
|
||||
else if ([label isEqualToString:TEST_VALIDATION]) {
|
||||
[self callMethod:[VKRequest requestWithMethod:@"account.testValidation" parameters:nil]];
|
||||
}
|
||||
else if ([label isEqualToString:MAKE_SYNCHRONOUS]) {
|
||||
VKUsersArray *users = [self loadUsers];
|
||||
NSLog(@"users %@", users);
|
||||
}
|
||||
else if ([label isEqualToString:SHARE_DIALOG]) {
|
||||
|
||||
|
||||
VKShareDialogController *shareDialog = [VKShareDialogController new];
|
||||
shareDialog.text = @"This post made with #vksdk #ios";
|
||||
shareDialog.vkImages = @[@"-10889156_348122347", @"7840938_319411365", @"-60479154_333497085"];
|
||||
shareDialog.shareLink = [[VKShareLink alloc] initWithTitle:@"Super puper link, but nobody knows" link:[NSURL URLWithString:@"https://vk.com/dev/ios_sdk"]];
|
||||
[shareDialog setCompletionHandler:^(VKShareDialogController *dialog, VKShareDialogControllerResult result) {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}];
|
||||
[self presentViewController:shareDialog animated:YES completion:nil];
|
||||
}
|
||||
else if ([label isEqualToString:TEST_ACTIVITY]) {
|
||||
NSArray *items = @[[UIImage imageNamed:@"apple"], @"This post made with #vksdk activity #ios", [NSURL URLWithString:@"https://vk.com/dev/ios_sdk"]];
|
||||
UIActivityViewController *activityViewController = [[UIActivityViewController alloc]
|
||||
initWithActivityItems:items
|
||||
applicationActivities:@[[VKActivity new]]];
|
||||
[activityViewController setValue:@"VK SDK" forKey:@"subject"];
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0
|
||||
[activityViewController setCompletionWithItemsHandler:nil];
|
||||
#else
|
||||
[activityViewController setCompletionHandler:nil];
|
||||
#endif
|
||||
if ([VKUtil isOperatingSystemAtLeastIOS8]) {
|
||||
UIPopoverPresentationController *popover = activityViewController.popoverPresentationController;
|
||||
popover.sourceView = self.view;
|
||||
popover.sourceRect = [tableView rectForRowAtIndexPath:indexPath];
|
||||
}
|
||||
[self presentViewController:activityViewController animated:YES completion:nil];
|
||||
}
|
||||
else if ([label isEqualToString:TEST_APPREQUEST]) {
|
||||
[self callMethod:[VKRequest requestWithMethod:@"apps.sendRequest" parameters:@{@"user_id" : @45898586, @"text" : @"Yo ho ho", @"type" : @"request", @"name" : @"I need more gold", @"key" : @"more_gold"}]];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
- (VKUsersArray *)loadUsers {
|
||||
__block VKUsersArray *users;
|
||||
VKRequest *request = [[VKApi friends] get:@{@"user_id" : @1}];
|
||||
request.waitUntilDone = YES;
|
||||
[request executeWithResultBlock:^(VKResponse *response) {
|
||||
users = response.parsedModel;
|
||||
} errorBlock:nil];
|
||||
return users;
|
||||
}
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
if ([[segue identifier] isEqualToString:@"API_CALL"]) {
|
||||
ApiCallViewController *vc = [segue destinationViewController];
|
||||
vc.callingRequest = self->callingRequest;
|
||||
self->callingRequest = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)callMethod:(VKRequest *)method {
|
||||
self->callingRequest = method;
|
||||
[self performSegueWithIdentifier:@"API_CALL" sender:self];
|
||||
}
|
||||
|
||||
- (void)testCaptcha {
|
||||
VKRequest *request = [[VKApiCaptcha new] force];
|
||||
[request executeWithResultBlock:^(VKResponse *response) {
|
||||
NSLog(@"Result: %@", response);
|
||||
} errorBlock:^(NSError *error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)uploadPhoto {
|
||||
VKRequest *request = [VKApi uploadWallPhotoRequest:[UIImage imageNamed:@"apple"] parameters:[VKImageParameters pngImage] userId:0 groupId:60479154];
|
||||
[request executeWithResultBlock:^(VKResponse *response) {
|
||||
NSLog(@"Photo: %@", response.json);
|
||||
VKPhoto *photoInfo = [(VKPhotoArray *) response.parsedModel objectAtIndex:0];
|
||||
NSString *photoAttachment = [NSString stringWithFormat:@"photo%@_%@", photoInfo.owner_id, photoInfo.id];
|
||||
VKRequest *post = [[VKApi wall] post:@{VK_API_ATTACHMENTS : photoAttachment, VK_API_OWNER_ID : @"-60479154"}];
|
||||
[post executeWithResultBlock:^(VKResponse *postResponse) {
|
||||
NSLog(@"Result: %@", postResponse);
|
||||
NSNumber *postId = postResponse.json[@"post_id"];
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://vk.com/wall-60479154_%@", postId]]];
|
||||
} errorBlock:^(NSError *error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}];
|
||||
} errorBlock:^(NSError *error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)uploadPhotos {
|
||||
VKRequest *request1 = [VKApi uploadWallPhotoRequest:[UIImage imageNamed:@"apple"] parameters:[VKImageParameters pngImage] userId:0 groupId:60479154];
|
||||
VKRequest *request2 = [VKApi uploadWallPhotoRequest:[UIImage imageNamed:@"apple"] parameters:[VKImageParameters pngImage] userId:0 groupId:60479154];
|
||||
VKRequest *request3 = [VKApi uploadWallPhotoRequest:[UIImage imageNamed:@"apple"] parameters:[VKImageParameters pngImage] userId:0 groupId:60479154];
|
||||
VKRequest *request4 = [VKApi uploadWallPhotoRequest:[UIImage imageNamed:@"apple"] parameters:[VKImageParameters pngImage] userId:0 groupId:60479154];
|
||||
VKBatchRequest *batch = [[VKBatchRequest alloc] initWithRequests:request1, request2, request3, request4, nil];
|
||||
[batch executeWithResultBlock:^(NSArray *responses) {
|
||||
NSLog(@"Photos: %@", responses);
|
||||
NSMutableArray *photosAttachments = [NSMutableArray new];
|
||||
for (VKResponse *resp in responses) {
|
||||
VKPhoto *photoInfo = [(VKPhotoArray *) resp.parsedModel objectAtIndex:0];
|
||||
[photosAttachments addObject:[NSString stringWithFormat:@"photo%@_%@", photoInfo.owner_id, photoInfo.id]];
|
||||
}
|
||||
VKRequest *post = [[VKApi wall] post:@{VK_API_ATTACHMENTS : [photosAttachments componentsJoinedByString:@","], VK_API_OWNER_ID : @"-60479154"}];
|
||||
[post executeWithResultBlock:^(VKResponse *response) {
|
||||
NSLog(@"Result: %@", response);
|
||||
NSNumber *postId = response.json[@"post_id"];
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://vk.com/wall-60479154_%@", postId]]];
|
||||
} errorBlock:^(NSError *error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}];
|
||||
} errorBlock:^(NSError *error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)uploadInAlbum {
|
||||
VKRequest *request = [VKApi uploadAlbumPhotoRequest:[UIImage imageNamed:@"apple"] parameters:[VKImageParameters pngImage] albumId:181808365 groupId:60479154];
|
||||
[request executeWithResultBlock:^(VKResponse *response) {
|
||||
NSLog(@"Result: %@", response);
|
||||
VKPhoto *photo = [(VKPhotoArray *) response.parsedModel objectAtIndex:0];
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://vk.com/photo-60479154_%@", photo.id]]];
|
||||
} errorBlock:^(NSError *error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)logout:(id)sender {
|
||||
[VKSdk forceLogout];
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
@end
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// VKAppDelegate.h
|
||||
//
|
||||
// Copyright (c) 2014 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "TestViewController.h"
|
||||
|
||||
@interface VKAppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property(strong, nonatomic) UIWindow *window;
|
||||
@end
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
//
|
||||
// VKAppDelegate.m
|
||||
//
|
||||
// Copyright (c) 2014 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import "VKAppDelegate.h"
|
||||
|
||||
@implementation VKAppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
|
||||
[VKSdk processOpenURL:url fromApplication:sourceApplication];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>VK SDK Test</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>vk3974615</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>vk3974615</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>vkauthorize</string>
|
||||
</array>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>Storyboard</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Storyboard</string>
|
||||
<key>UIMainStoryboardFile~ipad</key>
|
||||
<string>Storyboard</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// Prefix header
|
||||
//
|
||||
// The contents of this file are implicitly included at the beginning of every source file.
|
||||
//
|
||||
|
||||
#import <Availability.h>
|
||||
|
||||
#ifndef __IPHONE_3_0
|
||||
#warning "This project uses features only available in iOS SDK 3.0 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
@import VKSdkFramework;
|
||||
// OR
|
||||
// #import <VKSdkFramework/VKSdkFramework.h>
|
||||
#endif
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// VKStartScreen.h
|
||||
//
|
||||
// Copyright (c) 2014 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface VKStartScreen : UIViewController <VKSdkDelegate>
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
//
|
||||
// VKStartScreen.m
|
||||
//
|
||||
// Copyright (c) 2014 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import "VKStartScreen.h"
|
||||
|
||||
static NSString *const TOKEN_KEY = @"my_application_access_token";
|
||||
static NSString *const NEXT_CONTROLLER_SEGUE_ID = @"START_WORK";
|
||||
static NSArray *SCOPE = nil;
|
||||
|
||||
@interface VKStartScreen () <UIAlertViewDelegate, VKSdkUIDelegate>
|
||||
|
||||
@end
|
||||
|
||||
@implementation VKStartScreen
|
||||
|
||||
- (void)viewDidLoad {
|
||||
SCOPE = @[VK_PER_FRIENDS, VK_PER_WALL, VK_PER_AUDIO, VK_PER_PHOTOS, VK_PER_NOHTTPS, VK_PER_EMAIL, VK_PER_MESSAGES];
|
||||
[super viewDidLoad];
|
||||
[[VKSdk initializeWithAppId:@"3974615"] registerDelegate:self];
|
||||
[[VKSdk instance] setUiDelegate:self];
|
||||
[VKSdk wakeUpSession:SCOPE completeBlock:^(VKAuthorizationState state, NSError *error) {
|
||||
if (state == VKAuthorizationAuthorized) {
|
||||
[self startWorking];
|
||||
} else if (error) {
|
||||
[[[UIAlertView alloc] initWithTitle:nil message:[error description] delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil] show];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)startWorking {
|
||||
[self performSegueWithIdentifier:NEXT_CONTROLLER_SEGUE_ID sender:self];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
- (IBAction)authorize:(id)sender {
|
||||
[VKSdk authorize:SCOPE];
|
||||
}
|
||||
|
||||
- (IBAction)openShareDialog:(id)sender {
|
||||
VKShareDialogController *shareDialog = [VKShareDialogController new];
|
||||
shareDialog.text = @"This post created created created created and made and post and delivered using #vksdk #ios";
|
||||
shareDialog.uploadImages = @[ [VKUploadImage uploadImageWithImage:[UIImage imageNamed:@"apple"] andParams:[VKImageParameters jpegImageWithQuality:1.0] ] ];
|
||||
[shareDialog setCompletionHandler:^(VKShareDialogController *dialog, VKShareDialogControllerResult result) {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}];
|
||||
[self presentViewController:shareDialog animated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
||||
- (void)vkSdkNeedCaptchaEnter:(VKError *)captchaError {
|
||||
VKCaptchaViewController *vc = [VKCaptchaViewController captchaControllerWithError:captchaError];
|
||||
[vc presentIn:self.navigationController.topViewController];
|
||||
}
|
||||
|
||||
- (void)vkSdkTokenHasExpired:(VKAccessToken *)expiredToken {
|
||||
[self authorize:nil];
|
||||
}
|
||||
|
||||
- (void)vkSdkAccessAuthorizationFinishedWithResult:(VKAuthorizationResult *)result {
|
||||
if (result.token) {
|
||||
[self startWorking];
|
||||
} else if (result.error) {
|
||||
[[[UIAlertView alloc] initWithTitle:nil message:[NSString stringWithFormat:@"Access denied\n%@", result.error] delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil] show];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)vkSdkUserAuthorizationFailed {
|
||||
[[[UIAlertView alloc] initWithTitle:nil message:@"Access denied" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil] show];
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)vkSdkShouldPresentViewController:(UIViewController *)controller {
|
||||
[self.navigationController.topViewController presentViewController:controller animated:YES completion:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
After Width: | Height: | Size: 369 KiB |
|
|
@ -0,0 +1,2 @@
|
|||
/* Localized versions of Info.plist keys */
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// main.m
|
||||
//
|
||||
// Copyright (c) 2014 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import "VKAppDelegate.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([VKAppDelegate class]));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
/* Localized versions of Info.plist keys */
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
//
|
||||
// VKSdkFramework.h
|
||||
//
|
||||
// Copyright (c) 2015 VK.com
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
// the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for VKSdkFramework.
|
||||
FOUNDATION_EXPORT double VKSdkFrameworkVersionNumber;
|
||||
|
||||
//! Project version string for VKSdkFramework.
|
||||
FOUNDATION_EXPORT const unsigned char VKSdkFrameworkVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <VKSdkFramework/PublicHeader.h>
|
||||
#import <VKSdkFramework/VKSdk.h>
|
||||
#import <VKSdkFramework/VKAccessToken.h>
|
||||
#import <VKSdkFramework/VKPermissions.h>
|
||||
#import <VKSdkFramework/VKUtil.h>
|
||||
#import <VKSdkFramework/VKApi.h>
|
||||
#import <VKSdkFramework/VKApiConst.h>
|
||||
#import <VKSdkFramework/VKSdkVersion.h>
|
||||
#import <VKSdkFramework/VKCaptchaViewController.h>
|
||||
#import <VKSdkFramework/VKRequest.h>
|
||||
#import <VKSdkFramework/VKBatchRequest.h>
|
||||
#import <VKSdkFramework/NSError+VKError.h>
|
||||
#import <VKSdkFramework/VKApiModels.h>
|
||||
#import <VKSdkFramework/VKUploadImage.h>
|
||||
#import <VKSdkFramework/VKShareDialogController.h>
|
||||
#import <VKSdkFramework/VKActivity.h>
|
||||
#import <VKSdkFramework/OrderedDictionary.h>
|
||||
#import <VKSdkFramework/VKAuthorizeController.h>
|
||||
#import <VKSdkFramework/VKBundle.h>
|
||||
#import <VKSdkFramework/VKCaptchaView.h>
|
||||
#import <VKSdkFramework/VKUploadMessagesPhotoRequest.h>
|
||||
#import <VKSdkFramework/VKUploadPhotoBase.h>
|
||||
#import <VKSdkFramework/VKUploadPhotoRequest.h>
|
||||
#import <VKSdkFramework/VKUploadWallPhotoRequest.h>
|
||||
#import <VKSdkFramework/VKHTTPClient.h>
|
||||
#import <VKSdkFramework/VKHTTPOperation.h>
|
||||
#import <VKSdkFramework/VKJSONOperation.h>
|
||||
#import <VKSdkFramework/VKRequestsScheduler.h>
|
||||
#import <VKSdkFramework/VKSharedTransitioningObject.h>
|
||||
#import <VKSdkFramework/NSString+MD5.h>
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<string>iPhoneOS</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>CFPlugInDynamicRegisterFunction</key>
|
||||
<string></string>
|
||||
<key>CFPlugInDynamicRegistration</key>
|
||||
<string>NO</string>
|
||||
<key>CFPlugInFactories</key>
|
||||
<dict>
|
||||
<key>00000000-0000-0000-0000-000000000000</key>
|
||||
<string>MyFactoryFunction</string>
|
||||
</dict>
|
||||
<key>CFPlugInTypes</key>
|
||||
<dict>
|
||||
<key>00000000-0000-0000-0000-000000000000</key>
|
||||
<array>
|
||||
<string>00000000-0000-0000-0000-000000000000</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>CFPlugInUnloadFunction</key>
|
||||
<string></string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2015 VK.com. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "BlueBtn.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "BlueBtn@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "BlueBtn@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
library/Resources/SdkAssetCatalog.xcassets/BlueBtn_pressed.imageset/BlueBtn_pressed.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
library/Resources/SdkAssetCatalog.xcassets/BlueBtn_pressed.imageset/BlueBtn_pressed@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
library/Resources/SdkAssetCatalog.xcassets/BlueBtn_pressed.imageset/BlueBtn_pressed@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
23
library/Resources/SdkAssetCatalog.xcassets/BlueBtn_pressed.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "BlueBtn_pressed.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "BlueBtn_pressed@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "BlueBtn_pressed@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
23
library/Resources/SdkAssetCatalog.xcassets/Disclosure.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "Disclosure.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "Disclosure@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "Disclosure@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
library/Resources/SdkAssetCatalog.xcassets/Disclosure.imageset/Disclosure.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
library/Resources/SdkAssetCatalog.xcassets/Disclosure.imageset/Disclosure@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
library/Resources/SdkAssetCatalog.xcassets/Disclosure.imageset/Disclosure@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
22
library/Resources/SdkAssetCatalog.xcassets/ic_deleteattach.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_deleteattach.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_deleteattach@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
library/Resources/SdkAssetCatalog.xcassets/ic_deleteattach.imageset/ic_deleteattach.png
vendored
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
library/Resources/SdkAssetCatalog.xcassets/ic_deleteattach.imageset/ic_deleteattach@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
22
library/Resources/SdkAssetCatalog.xcassets/ic_deletephoto.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_deletephoto.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_deletephoto@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
library/Resources/SdkAssetCatalog.xcassets/ic_deletephoto.imageset/ic_deletephoto.png
vendored
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
library/Resources/SdkAssetCatalog.xcassets/ic_deletephoto.imageset/ic_deletephoto@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
33
library/Resources/SdkAssetCatalog.xcassets/ic_vk_activity_logo.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"filename" : "ic_vk_activity_logo.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"filename" : "ic_vk_activity_logo@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"filename" : "ic_vk_activity_logo@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"filename" : "ic_vk_activity_logo~ipad.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"filename" : "ic_vk_activity_logo@2x~ipad.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
library/Resources/SdkAssetCatalog.xcassets/ic_vk_activity_logo.imageset/ic_vk_activity_logo.png
vendored
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
library/Resources/SdkAssetCatalog.xcassets/ic_vk_activity_logo.imageset/ic_vk_activity_logo@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
BIN
library/Resources/SdkAssetCatalog.xcassets/ic_vk_activity_logo.imageset/ic_vk_activity_logo@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
library/Resources/SdkAssetCatalog.xcassets/ic_vk_activity_logo.imageset/ic_vk_activity_logo~ipad.png
vendored
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
33
library/Resources/SdkAssetCatalog.xcassets/ic_vk_ios7_activity_logo.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"filename" : "ic_vk_ios7_activity_logo.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"filename" : "ic_vk_ios7_activity_logo@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"filename" : "ic_vk_ios7_activity_logo@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"filename" : "ic_vk_ios7_activity_logo~ipad.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"filename" : "ic_vk_ios7_activity_logo@2x~ipad.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.2 KiB |