- Fix
This commit is contained in:
parent
b0bcfad332
commit
de4cd554f0
@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN CERTIFICATE REQUEST-----
|
||||||
|
MIICpjCCAY4CAQAwYTEmMCQGCSqGSIb3DQEJARYXbWVAZ2l1c2VwcGVudWNpZm9y
|
||||||
|
YS5jb20xKjAoBgNVBAMMIVBOT2JqZWN0IEV4YW1wbGUgRGV2ZWxvcG1lbnQgQVBO
|
||||||
|
UzELMAkGA1UEBhMCSVQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2
|
||||||
|
KQB/Jer4kbnN356sYXW52m8xCOpmdVCZNlbk7bUjTtAbvO5Jjk5ccNfxFELfB/P2
|
||||||
|
JF8HfNGIiycHGnuEyfSk+9bfpvKQn8Y7dFwbQQos79M9yWmt9K1S7Cv2NNiOD0jh
|
||||||
|
TeQ7J1bXX005xychBoDZ9a+Z84Tyq5b39VWR70Dd8QuvcxkfwwLl4Wo6szWrB4C5
|
||||||
|
1hU5duHaPrid2LPSV5gYMFp0/091baTMuKU4+ef7C0iv1duyYnGgrLCWarC/CEk7
|
||||||
|
y0VXvZlI0Ax96Xh/asYZWfd4GqYKmFgsGf3iDe5f7DoXEd2MCiCkzxp0LeBx3DeY
|
||||||
|
9uardMJ2/Mwg3H4v3z8NAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEALYkQTuSN
|
||||||
|
rytueW8Im8D+jUm7K5jgSeoT9Im+hTqz/UDcIopgfQXPwjlyMfwZN6yVIxQACEa5
|
||||||
|
aw4V4Bc9h+TU9r9pTUtYNgg0gAzAekpY45ubVy8AOgZKr5uaK7hr4zrI8eKbYMzm
|
||||||
|
J+07px/+MiC4xfGeJVdrkjkYyc4M4IbH6gUNe9ml9lbFlF38FB5dHk7wp6suUKRz
|
||||||
|
zyM6fQw5TzTADS1mwbRaIeT6a74mYdlivgmXwm8Vay6jkADrKYhvvnG45ipUFBje
|
||||||
|
1ZAWigIk1rFUrLruiiNW2+NXLitrUt4DzXdYR+avhb7/SUrZhJ2yxNr3wshEZEYJ
|
||||||
|
rNcy6zXfZ6SsMw==
|
||||||
|
-----END CERTIFICATE REQUEST-----
|
||||||
BIN
APNS/Development/PNObject Development Certificate.p12
Normal file
BIN
APNS/Development/PNObject Development Certificate.p12
Normal file
Binary file not shown.
BIN
APNS/Development/aps_development.cer
Normal file
BIN
APNS/Development/aps_development.cer
Normal file
Binary file not shown.
138
APNS/Development/ck_dev.pem
Normal file
138
APNS/Development/ck_dev.pem
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
Bag Attributes
|
||||||
|
friendlyName: Apple Development IOS Push Services: org.cocoapods.demo.PNObject-Example
|
||||||
|
localKeyID: 2C 1A 30 E6 30 59 D6 2F 7C F8 4D 4F 5A 9E 63 CE 48 8E C3 AF
|
||||||
|
subject=/UID=org.cocoapods.demo.PNObject-Example/CN=Apple Development IOS Push Services: org.cocoapods.demo.PNObject-Example/OU=825G85A28E/C=US
|
||||||
|
issuer=/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFqzCCBJOgAwIBAgIIf0UhhwlHTb8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV
|
||||||
|
BAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBsZSBXb3Js
|
||||||
|
ZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBwbGUgV29ybGR3
|
||||||
|
aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw
|
||||||
|
HhcNMTYwNDAxMTcwNDE2WhcNMTcwNDAxMTcwNDE2WjCBqjEzMDEGCgmSJomT8ixk
|
||||||
|
AQEMI29yZy5jb2NvYXBvZHMuZGVtby5QTk9iamVjdC1FeGFtcGxlMVEwTwYDVQQD
|
||||||
|
DEhBcHBsZSBEZXZlbG9wbWVudCBJT1MgUHVzaCBTZXJ2aWNlczogb3JnLmNvY29h
|
||||||
|
cG9kcy5kZW1vLlBOT2JqZWN0LUV4YW1wbGUxEzARBgNVBAsMCjgyNUc4NUEyOEUx
|
||||||
|
CzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtikA
|
||||||
|
fyXq+JG5zd+erGF1udpvMQjqZnVQmTZW5O21I07QG7zuSY5OXHDX8RRC3wfz9iRf
|
||||||
|
B3zRiIsnBxp7hMn0pPvW36bykJ/GO3RcG0EKLO/TPclprfStUuwr9jTYjg9I4U3k
|
||||||
|
OydW119NOccnIQaA2fWvmfOE8quW9/VVke9A3fELr3MZH8MC5eFqOrM1qweAudYV
|
||||||
|
OXbh2j64ndiz0leYGDBadP9PdW2kzLilOPnn+wtIr9XbsmJxoKywlmqwvwhJO8tF
|
||||||
|
V72ZSNAMfel4f2rGGVn3eBqmCphYLBn94g3uX+w6FxHdjAogpM8adC3gcdw3mPbm
|
||||||
|
q3TCdvzMINx+L98/DQIDAQABo4IB5TCCAeEwHQYDVR0OBBYEFCwaMOYwWdYvfPhN
|
||||||
|
T1qeY85IjsOvMAkGA1UdEwQCMAAwHwYDVR0jBBgwFoAUiCcXCam2GGCL7Ou69kdZ
|
||||||
|
xVJUo7cwggEPBgNVHSAEggEGMIIBAjCB/wYJKoZIhvdjZAUBMIHxMIHDBggrBgEF
|
||||||
|
BQcCAjCBtgyBs1JlbGlhbmNlIG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBh
|
||||||
|
cnR5IGFzc3VtZXMgYWNjZXB0YW5jZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0
|
||||||
|
YW5kYXJkIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHVzZSwgY2VydGlmaWNhdGUg
|
||||||
|
cG9saWN5IGFuZCBjZXJ0aWZpY2F0aW9uIHByYWN0aWNlIHN0YXRlbWVudHMuMCkG
|
||||||
|
CCsGAQUFBwIBFh1odHRwOi8vd3d3LmFwcGxlLmNvbS9hcHBsZWNhLzBNBgNVHR8E
|
||||||
|
RjBEMEKgQKA+hjxodHRwOi8vZGV2ZWxvcGVyLmFwcGxlLmNvbS9jZXJ0aWZpY2F0
|
||||||
|
aW9uYXV0aG9yaXR5L3d3ZHJjYS5jcmwwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoG
|
||||||
|
CCsGAQUFBwMCMBAGCiqGSIb3Y2QGAwEEAgUAMA0GCSqGSIb3DQEBBQUAA4IBAQBf
|
||||||
|
YFj7YDtaudeJ50aCEr3g5xTYJNd38K/Bfgc02uRRLcpfZFuYoklswZyGBmzpSW1Y
|
||||||
|
4cy/H0zQuMXVNbPc00tiNgCxcOdhqMNcOSAuDp1qia4cEPNljSmrJ7V915iImBtT
|
||||||
|
qTkrqYjjHIuwtRASzOeuKNT1eNajy20z3a0N8er+Jo30bUBAL6Au6fZHJzTHb9UV
|
||||||
|
+Al9LhRgbL09iBNqPC33RqLL6CJwePEwaQb0Nb2MT7MTQ3dwGlCniBRuDCfU1sjE
|
||||||
|
/LbnDUOHs5EDAXyDma45ARRbZiTuDgHaxzQrnao2IG0wkFKzPQ5OXI2T3vHSejL4
|
||||||
|
K1wA740ZLLk1rTPbZsUt
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
Bag Attributes
|
||||||
|
friendlyName: Apple Development IOS Push Services: org.cocoapods.demo.PNObject-Example
|
||||||
|
localKeyID: 2C 1A 30 E6 30 59 D6 2F 7C F8 4D 4F 5A 9E 63 CE 48 8E C3 AF
|
||||||
|
subject=/UID=org.cocoapods.demo.PNObject-Example/CN=Apple Development IOS Push Services: org.cocoapods.demo.PNObject-Example/OU=825G85A28E/C=US
|
||||||
|
issuer=/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIFqzCCBJOgAwIBAgIIf0UhhwlHTb8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV
|
||||||
|
BAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBsZSBXb3Js
|
||||||
|
ZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBwbGUgV29ybGR3
|
||||||
|
aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw
|
||||||
|
HhcNMTYwNDAxMTcwNDE2WhcNMTcwNDAxMTcwNDE2WjCBqjEzMDEGCgmSJomT8ixk
|
||||||
|
AQEMI29yZy5jb2NvYXBvZHMuZGVtby5QTk9iamVjdC1FeGFtcGxlMVEwTwYDVQQD
|
||||||
|
DEhBcHBsZSBEZXZlbG9wbWVudCBJT1MgUHVzaCBTZXJ2aWNlczogb3JnLmNvY29h
|
||||||
|
cG9kcy5kZW1vLlBOT2JqZWN0LUV4YW1wbGUxEzARBgNVBAsMCjgyNUc4NUEyOEUx
|
||||||
|
CzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtikA
|
||||||
|
fyXq+JG5zd+erGF1udpvMQjqZnVQmTZW5O21I07QG7zuSY5OXHDX8RRC3wfz9iRf
|
||||||
|
B3zRiIsnBxp7hMn0pPvW36bykJ/GO3RcG0EKLO/TPclprfStUuwr9jTYjg9I4U3k
|
||||||
|
OydW119NOccnIQaA2fWvmfOE8quW9/VVke9A3fELr3MZH8MC5eFqOrM1qweAudYV
|
||||||
|
OXbh2j64ndiz0leYGDBadP9PdW2kzLilOPnn+wtIr9XbsmJxoKywlmqwvwhJO8tF
|
||||||
|
V72ZSNAMfel4f2rGGVn3eBqmCphYLBn94g3uX+w6FxHdjAogpM8adC3gcdw3mPbm
|
||||||
|
q3TCdvzMINx+L98/DQIDAQABo4IB5TCCAeEwHQYDVR0OBBYEFCwaMOYwWdYvfPhN
|
||||||
|
T1qeY85IjsOvMAkGA1UdEwQCMAAwHwYDVR0jBBgwFoAUiCcXCam2GGCL7Ou69kdZ
|
||||||
|
xVJUo7cwggEPBgNVHSAEggEGMIIBAjCB/wYJKoZIhvdjZAUBMIHxMIHDBggrBgEF
|
||||||
|
BQcCAjCBtgyBs1JlbGlhbmNlIG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBh
|
||||||
|
cnR5IGFzc3VtZXMgYWNjZXB0YW5jZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0
|
||||||
|
YW5kYXJkIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHVzZSwgY2VydGlmaWNhdGUg
|
||||||
|
cG9saWN5IGFuZCBjZXJ0aWZpY2F0aW9uIHByYWN0aWNlIHN0YXRlbWVudHMuMCkG
|
||||||
|
CCsGAQUFBwIBFh1odHRwOi8vd3d3LmFwcGxlLmNvbS9hcHBsZWNhLzBNBgNVHR8E
|
||||||
|
RjBEMEKgQKA+hjxodHRwOi8vZGV2ZWxvcGVyLmFwcGxlLmNvbS9jZXJ0aWZpY2F0
|
||||||
|
aW9uYXV0aG9yaXR5L3d3ZHJjYS5jcmwwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoG
|
||||||
|
CCsGAQUFBwMCMBAGCiqGSIb3Y2QGAwEEAgUAMA0GCSqGSIb3DQEBBQUAA4IBAQBf
|
||||||
|
YFj7YDtaudeJ50aCEr3g5xTYJNd38K/Bfgc02uRRLcpfZFuYoklswZyGBmzpSW1Y
|
||||||
|
4cy/H0zQuMXVNbPc00tiNgCxcOdhqMNcOSAuDp1qia4cEPNljSmrJ7V915iImBtT
|
||||||
|
qTkrqYjjHIuwtRASzOeuKNT1eNajy20z3a0N8er+Jo30bUBAL6Au6fZHJzTHb9UV
|
||||||
|
+Al9LhRgbL09iBNqPC33RqLL6CJwePEwaQb0Nb2MT7MTQ3dwGlCniBRuDCfU1sjE
|
||||||
|
/LbnDUOHs5EDAXyDma45ARRbZiTuDgHaxzQrnao2IG0wkFKzPQ5OXI2T3vHSejL4
|
||||||
|
K1wA740ZLLk1rTPbZsUt
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
Bag Attributes
|
||||||
|
friendlyName: PNObject Example Development APNS
|
||||||
|
localKeyID: 2C 1A 30 E6 30 59 D6 2F 7C F8 4D 4F 5A 9E 63 CE 48 8E C3 AF
|
||||||
|
Key Attributes: <No Attributes>
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEpAIBAAKCAQEAtikAfyXq+JG5zd+erGF1udpvMQjqZnVQmTZW5O21I07QG7zu
|
||||||
|
SY5OXHDX8RRC3wfz9iRfB3zRiIsnBxp7hMn0pPvW36bykJ/GO3RcG0EKLO/TPclp
|
||||||
|
rfStUuwr9jTYjg9I4U3kOydW119NOccnIQaA2fWvmfOE8quW9/VVke9A3fELr3MZ
|
||||||
|
H8MC5eFqOrM1qweAudYVOXbh2j64ndiz0leYGDBadP9PdW2kzLilOPnn+wtIr9Xb
|
||||||
|
smJxoKywlmqwvwhJO8tFV72ZSNAMfel4f2rGGVn3eBqmCphYLBn94g3uX+w6FxHd
|
||||||
|
jAogpM8adC3gcdw3mPbmq3TCdvzMINx+L98/DQIDAQABAoIBAQCR+JdaTGNXn0c6
|
||||||
|
b5jyYAL71MvHinJzek0FCaNmPgoqagygPazhqrSmpRKWMHtJyFC6DPlNwbsS5Rd4
|
||||||
|
PMOAbGmsD9dnT5wPQsmSeTMZ7+uciO5JE+6opGqECZdM65ohdKQdT9K1iFexrL/w
|
||||||
|
reNwNoronlWCU79UyyXmO2W/1O6xKg7vMRLRcsDRr5Kek6QO9RzwKD7Z5PucErfV
|
||||||
|
OTsGm8sYZ1sPNJVMWUc+9dsXfXiX1+zRUlM7XRCHqPOLq8krZM57ofO4f3/6OhHi
|
||||||
|
POmMms68OaRB/Eqzi4Czgu6XBU4dB3PVrpMrSgd1LsSYoh+sgOAp+Ym/S1qLqRuN
|
||||||
|
MzuCq/VhAoGBANiMbJ9GjBrOpa6ys3y71/ukkeKydioQzsaO6Uy1fl/Gnfnt/czD
|
||||||
|
0W+LT4sQzL33zainMPI5uuUU7YnqHh7yzKd8Cwh73dxPNfJ/lc1tKxFJhrr1P5B8
|
||||||
|
jqz/Z1+5UDRquwYEGhLSEsHEDC/P4dpCRoMm4mi3dd6DHy5NGZgScyMVAoGBANdY
|
||||||
|
vlTn+NY834hbWeAQlevc6jyCh1osrstb7Kq6rflQNaZh+Gg8FxlWYrEaPLa2QOIN
|
||||||
|
5zf5PE2dsVIfTx/lj8Dsxo2yf0grvzJhMJixBKJTvrPAODhWA0qdA/SA3WflnXRf
|
||||||
|
26qGgQkoKeJS4LBHDGm88N/jxv+5I1eIpkROugoZAoGBALkBp9+gDxzsBeMuK2ha
|
||||||
|
t9j3LegnHgssVuyOtkViHfjHoLohmR8zASCyPaALF1EJgDwhsxCPP9xtt8+HJHq+
|
||||||
|
ZxiEQozZ/p81UVq/pAVgylW3opLh6o+PyvmELxY6JYrS0LwADyKbNYkz7FGA4m1t
|
||||||
|
B/8O3oomi14yWhZdqosg4BtNAoGAY3rgehKrVjTKwpAIxcSDrXDhWFCoPFT17oWp
|
||||||
|
n/kbE1glYJZTjbtspEzOzKelMnahJIxtquLdI7HcT2adQ8vli6cV1jGGMQ3chmZ1
|
||||||
|
b6Qe0upC54C9t/CsFpTQVewN28gr463AqVb3VwaRyraki2pW5qXc1GDB9jJNjEtZ
|
||||||
|
G6cOtEkCgYBeTPk0WtFYPXVnKdQZ1m6pTrAMpWFDYV0FQo9d/hYDdfKpm2bV/v3c
|
||||||
|
tbh9LWKXdihQ4esHhc5yjq+/QdAGyUQchY4awaXC6e5pXhaVLm4fcZy/3/ML9wyU
|
||||||
|
WfqMiSZrHX4ZHSnH8jbdi7l9Hu1NUPIv1t7KAFH/Nlpun+rHZFvjGw==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
|
Bag Attributes
|
||||||
|
friendlyName: PNObject Example Development APNS
|
||||||
|
localKeyID: 2C 1A 30 E6 30 59 D6 2F 7C F8 4D 4F 5A 9E 63 CE 48 8E C3 AF
|
||||||
|
Key Attributes: <No Attributes>
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEpAIBAAKCAQEAtikAfyXq+JG5zd+erGF1udpvMQjqZnVQmTZW5O21I07QG7zu
|
||||||
|
SY5OXHDX8RRC3wfz9iRfB3zRiIsnBxp7hMn0pPvW36bykJ/GO3RcG0EKLO/TPclp
|
||||||
|
rfStUuwr9jTYjg9I4U3kOydW119NOccnIQaA2fWvmfOE8quW9/VVke9A3fELr3MZ
|
||||||
|
H8MC5eFqOrM1qweAudYVOXbh2j64ndiz0leYGDBadP9PdW2kzLilOPnn+wtIr9Xb
|
||||||
|
smJxoKywlmqwvwhJO8tFV72ZSNAMfel4f2rGGVn3eBqmCphYLBn94g3uX+w6FxHd
|
||||||
|
jAogpM8adC3gcdw3mPbmq3TCdvzMINx+L98/DQIDAQABAoIBAQCR+JdaTGNXn0c6
|
||||||
|
b5jyYAL71MvHinJzek0FCaNmPgoqagygPazhqrSmpRKWMHtJyFC6DPlNwbsS5Rd4
|
||||||
|
PMOAbGmsD9dnT5wPQsmSeTMZ7+uciO5JE+6opGqECZdM65ohdKQdT9K1iFexrL/w
|
||||||
|
reNwNoronlWCU79UyyXmO2W/1O6xKg7vMRLRcsDRr5Kek6QO9RzwKD7Z5PucErfV
|
||||||
|
OTsGm8sYZ1sPNJVMWUc+9dsXfXiX1+zRUlM7XRCHqPOLq8krZM57ofO4f3/6OhHi
|
||||||
|
POmMms68OaRB/Eqzi4Czgu6XBU4dB3PVrpMrSgd1LsSYoh+sgOAp+Ym/S1qLqRuN
|
||||||
|
MzuCq/VhAoGBANiMbJ9GjBrOpa6ys3y71/ukkeKydioQzsaO6Uy1fl/Gnfnt/czD
|
||||||
|
0W+LT4sQzL33zainMPI5uuUU7YnqHh7yzKd8Cwh73dxPNfJ/lc1tKxFJhrr1P5B8
|
||||||
|
jqz/Z1+5UDRquwYEGhLSEsHEDC/P4dpCRoMm4mi3dd6DHy5NGZgScyMVAoGBANdY
|
||||||
|
vlTn+NY834hbWeAQlevc6jyCh1osrstb7Kq6rflQNaZh+Gg8FxlWYrEaPLa2QOIN
|
||||||
|
5zf5PE2dsVIfTx/lj8Dsxo2yf0grvzJhMJixBKJTvrPAODhWA0qdA/SA3WflnXRf
|
||||||
|
26qGgQkoKeJS4LBHDGm88N/jxv+5I1eIpkROugoZAoGBALkBp9+gDxzsBeMuK2ha
|
||||||
|
t9j3LegnHgssVuyOtkViHfjHoLohmR8zASCyPaALF1EJgDwhsxCPP9xtt8+HJHq+
|
||||||
|
ZxiEQozZ/p81UVq/pAVgylW3opLh6o+PyvmELxY6JYrS0LwADyKbNYkz7FGA4m1t
|
||||||
|
B/8O3oomi14yWhZdqosg4BtNAoGAY3rgehKrVjTKwpAIxcSDrXDhWFCoPFT17oWp
|
||||||
|
n/kbE1glYJZTjbtspEzOzKelMnahJIxtquLdI7HcT2adQ8vli6cV1jGGMQ3chmZ1
|
||||||
|
b6Qe0upC54C9t/CsFpTQVewN28gr463AqVb3VwaRyraki2pW5qXc1GDB9jJNjEtZ
|
||||||
|
G6cOtEkCgYBeTPk0WtFYPXVnKdQZ1m6pTrAMpWFDYV0FQo9d/hYDdfKpm2bV/v3c
|
||||||
|
tbh9LWKXdihQ4esHhc5yjq+/QdAGyUQchY4awaXC6e5pXhaVLm4fcZy/3/ML9wyU
|
||||||
|
WfqMiSZrHX4ZHSnH8jbdi7l9Hu1NUPIv1t7KAFH/Nlpun+rHZFvjGw==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
1
APNS/Development/pass.txt
Normal file
1
APNS/Development/pass.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
pass : Xpm-DPBW:#FDSXU_
|
||||||
@ -253,6 +253,14 @@
|
|||||||
LastUpgradeCheck = 0720;
|
LastUpgradeCheck = 0720;
|
||||||
ORGANIZATIONNAME = "Giuseppe Nucifora";
|
ORGANIZATIONNAME = "Giuseppe Nucifora";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
|
6003F589195388D20070C39A = {
|
||||||
|
DevelopmentTeam = 825G85A28E;
|
||||||
|
SystemCapabilities = {
|
||||||
|
com.apple.Push = {
|
||||||
|
enabled = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
6003F5AD195388D20070C39A = {
|
6003F5AD195388D20070C39A = {
|
||||||
TestTargetID = 6003F589195388D20070C39A;
|
TestTargetID = 6003F589195388D20070C39A;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "0720"
|
LastUpgradeVersion = "0730"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
"0D16AB9035733B66D1E42542FCF79AEB110EE3F1" : 0,
|
"0D16AB9035733B66D1E42542FCF79AEB110EE3F1" : 0,
|
||||||
"AEB0552E99BCD7202184FC09F243A3865259D36E" : 0
|
"AEB0552E99BCD7202184FC09F243A3865259D36E" : 0
|
||||||
},
|
},
|
||||||
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "63EBCBA7-0EA2-45A7-A0E5-D9B371244728",
|
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "F9984EE9-FBF8-4451-8C8E-EB0CA1AB5EC0",
|
||||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
|
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
|
||||||
"0D16AB9035733B66D1E42542FCF79AEB110EE3F1" : "PNObject\/",
|
"0D16AB9035733B66D1E42542FCF79AEB110EE3F1" : "PNObject\/",
|
||||||
"AEB0552E99BCD7202184FC09F243A3865259D36E" : "..\/..\/..\/Purplenetwork\/GIT\/iOS\/packman-ios"
|
"AEB0552E99BCD7202184FC09F243A3865259D36E" : "..\/..\/..\/Purplenetwork\/GIT\/iOS\/packman-ios"
|
||||||
|
|||||||
@ -17,6 +17,9 @@
|
|||||||
#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
||||||
#import <FBSDKLoginKit/FBSDKLoginKit.h>
|
#import <FBSDKLoginKit/FBSDKLoginKit.h>
|
||||||
#import <FBSDKShareKit/FBSDKShareKit.h>
|
#import <FBSDKShareKit/FBSDKShareKit.h>
|
||||||
|
#import "UIDevice-Hardware.h"
|
||||||
|
|
||||||
|
#import "PNInstallation.h"
|
||||||
|
|
||||||
|
|
||||||
@implementation PNObjectAppDelegate
|
@implementation PNObjectAppDelegate
|
||||||
@ -44,6 +47,23 @@
|
|||||||
|
|
||||||
PNObjectViewController *viewController = [[PNObjectViewController alloc] init];
|
PNObjectViewController *viewController = [[PNObjectViewController alloc] init];
|
||||||
|
|
||||||
|
switch ([[UIDevice currentDevice] deviceFamily]) {
|
||||||
|
case UIDeviceFamilyiPhone:
|
||||||
|
case UIDeviceFamilyiPod:
|
||||||
|
case UIDeviceFamilyiPad: {
|
||||||
|
UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound);
|
||||||
|
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes categories:nil];
|
||||||
|
[application registerUserNotificationSettings:settings];
|
||||||
|
[application registerForRemoteNotifications];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case UIDeviceFamilyAppleTV:
|
||||||
|
case UIDeviceFamilyUnknown:
|
||||||
|
default: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_window.rootViewController = viewController;
|
_window.rootViewController = viewController;
|
||||||
|
|
||||||
_window.backgroundColor = [UIColor whiteColor];
|
_window.backgroundColor = [UIColor whiteColor];
|
||||||
@ -88,4 +108,35 @@
|
|||||||
annotation:annotation];
|
annotation:annotation];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark - Remote Notification
|
||||||
|
|
||||||
|
- (void) application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
||||||
|
PNInstallation *installation = [PNInstallation currentInstallation];
|
||||||
|
|
||||||
|
[installation setDeviceTokenFromData:deviceToken];
|
||||||
|
|
||||||
|
[installation saveLocally];
|
||||||
|
|
||||||
|
NSLog(@"%@",installation);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
|
||||||
|
|
||||||
|
NSLog(@"%@",notificationSettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
|
||||||
|
|
||||||
|
NSLog(@"%@",userInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
|
||||||
|
|
||||||
|
NSLog(@"%@",userInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark -
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -1,41 +1,42 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- AFNetworking (3.0.4):
|
- AFNetworking (3.1.0):
|
||||||
- AFNetworking/NSURLSession (= 3.0.4)
|
- AFNetworking/NSURLSession (= 3.1.0)
|
||||||
- AFNetworking/Reachability (= 3.0.4)
|
- AFNetworking/Reachability (= 3.1.0)
|
||||||
- AFNetworking/Security (= 3.0.4)
|
- AFNetworking/Security (= 3.1.0)
|
||||||
- AFNetworking/Serialization (= 3.0.4)
|
- AFNetworking/Serialization (= 3.1.0)
|
||||||
- AFNetworking/UIKit (= 3.0.4)
|
- AFNetworking/UIKit (= 3.1.0)
|
||||||
- AFNetworking/NSURLSession (3.0.4):
|
- AFNetworking/NSURLSession (3.1.0):
|
||||||
- AFNetworking/Reachability
|
- AFNetworking/Reachability
|
||||||
- AFNetworking/Security
|
- AFNetworking/Security
|
||||||
- AFNetworking/Serialization
|
- AFNetworking/Serialization
|
||||||
- AFNetworking/Reachability (3.0.4)
|
- AFNetworking/Reachability (3.1.0)
|
||||||
- AFNetworking/Security (3.0.4)
|
- AFNetworking/Security (3.1.0)
|
||||||
- AFNetworking/Serialization (3.0.4)
|
- AFNetworking/Serialization (3.1.0)
|
||||||
- AFNetworking/UIKit (3.0.4):
|
- AFNetworking/UIKit (3.1.0):
|
||||||
- AFNetworking/NSURLSession
|
- AFNetworking/NSURLSession
|
||||||
- Bolts (1.6.0):
|
- Bolts (1.7.0):
|
||||||
- Bolts/AppLinks (= 1.6.0)
|
- Bolts/AppLinks (= 1.7.0)
|
||||||
- Bolts/Tasks (= 1.6.0)
|
- Bolts/Tasks (= 1.7.0)
|
||||||
- Bolts/AppLinks (1.6.0):
|
- Bolts/AppLinks (1.7.0):
|
||||||
- Bolts/Tasks
|
- Bolts/Tasks
|
||||||
- Bolts/Tasks (1.6.0)
|
- Bolts/Tasks (1.7.0)
|
||||||
- CocoaSecurity (1.2.4)
|
- CocoaSecurity (1.2.4)
|
||||||
- CodFis-Helper (0.1.3)
|
- CodFis-Helper (0.1.3)
|
||||||
- Expecta (1.0.5)
|
- Expecta (1.0.5)
|
||||||
- Expecta+Snapshots (2.0.0):
|
- Expecta+Snapshots (3.0.0):
|
||||||
- Expecta (~> 1.0)
|
- Expecta (~> 1.0)
|
||||||
- FBSnapshotTestCase/Core (~> 2.0.3)
|
- FBSnapshotTestCase/Core (~> 2.0)
|
||||||
|
- Specta (~> 1.0)
|
||||||
- FBSDKCoreKit (4.10.1):
|
- FBSDKCoreKit (4.10.1):
|
||||||
- Bolts (~> 1.5)
|
- Bolts (~> 1.5)
|
||||||
- FBSDKLoginKit (4.10.1):
|
- FBSDKLoginKit (4.10.1):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSDKShareKit (4.10.1):
|
- FBSDKShareKit (4.10.1):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSnapshotTestCase (2.0.7):
|
- FBSnapshotTestCase (2.1.0):
|
||||||
- FBSnapshotTestCase/SwiftSupport (= 2.0.7)
|
- FBSnapshotTestCase/SwiftSupport (= 2.1.0)
|
||||||
- FBSnapshotTestCase/Core (2.0.7)
|
- FBSnapshotTestCase/Core (2.1.0)
|
||||||
- FBSnapshotTestCase/SwiftSupport (2.0.7):
|
- FBSnapshotTestCase/SwiftSupport (2.1.0):
|
||||||
- FBSnapshotTestCase/Core
|
- FBSnapshotTestCase/Core
|
||||||
- NACrypto (1.0.6)
|
- NACrypto (1.0.6)
|
||||||
- NSDate_Utils (0.1.3)
|
- NSDate_Utils (0.1.3)
|
||||||
@ -84,19 +85,19 @@ DEPENDENCIES:
|
|||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
PNObject:
|
PNObject:
|
||||||
:path: "../"
|
:path: ../
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93
|
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
|
||||||
Bolts: f52a250053bb517ca874523c3913776359ab3def
|
Bolts: a0058fa3b331c5a1e4402d534f2dae36dbff31e4
|
||||||
CocoaSecurity: d288a6f87e0f363823d2cb83e753814a6944f71a
|
CocoaSecurity: d288a6f87e0f363823d2cb83e753814a6944f71a
|
||||||
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
||||||
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
||||||
Expecta+Snapshots: 29b38dd695bc72a0ed2bea833937d78df41943ba
|
Expecta+Snapshots: c343f410c7a6392f3e22e78f94c44b6c0749a516
|
||||||
FBSDKCoreKit: d2aaed5e9ab7d8d6301c533376a1fbff1cf3deb5
|
FBSDKCoreKit: d2aaed5e9ab7d8d6301c533376a1fbff1cf3deb5
|
||||||
FBSDKLoginKit: 699ff169080e3072de4b9b0faca90bf23dc36deb
|
FBSDKLoginKit: 699ff169080e3072de4b9b0faca90bf23dc36deb
|
||||||
FBSDKShareKit: 2fd887cce0056bdda91f99b2021d724a4fed8e88
|
FBSDKShareKit: 2fd887cce0056bdda91f99b2021d724a4fed8e88
|
||||||
FBSnapshotTestCase: 7e85180d0d141a0cf472352edda7e80d7eaeb547
|
FBSnapshotTestCase: 366ecd378511d7716c79991cd8067d1eed23578d
|
||||||
NACrypto: ce3900f1775f1b0cc27ce7c4953b94c598a74149
|
NACrypto: ce3900f1775f1b0cc27ce7c4953b94c598a74149
|
||||||
NSDate_Utils: 68669d2c81f310ee13026c791f4f0ed227b94c65
|
NSDate_Utils: 68669d2c81f310ee13026c791f4f0ed227b94c65
|
||||||
NSString-Helper: b4183f73f0a00c6fcd607edebb6c35a7a461376d
|
NSString-Helper: b4183f73f0a00c6fcd607edebb6c35a7a461376d
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFHTTPSessionManager.h
|
// AFHTTPSessionManager.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -150,7 +150,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@param URLString The URL string used to create the request URL.
|
@param URLString The URL string used to create the request URL.
|
||||||
@param parameters The parameters to be encoded according to the client request serializer.
|
@param parameters The parameters to be encoded according to the client request serializer.
|
||||||
@param progress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
@param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
||||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@param URLString The URL string used to create the request URL.
|
@param URLString The URL string used to create the request URL.
|
||||||
@param parameters The parameters to be encoded according to the client request serializer.
|
@param parameters The parameters to be encoded according to the client request serializer.
|
||||||
@param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
@param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
||||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@param URLString The URL string used to create the request URL.
|
@param URLString The URL string used to create the request URL.
|
||||||
@param parameters The parameters to be encoded according to the client request serializer.
|
@param parameters The parameters to be encoded according to the client request serializer.
|
||||||
@param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
|
@param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
|
||||||
@param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
@param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
||||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFHTTPSessionManager.m
|
// AFHTTPSessionManager.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFNetworkReachabilityManager.h
|
// AFNetworkReachabilityManager.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFNetworkReachabilityManager.m
|
// AFNetworkReachabilityManager.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -106,7 +106,7 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@interface AFNetworkReachabilityManager ()
|
@interface AFNetworkReachabilityManager ()
|
||||||
@property (readwrite, nonatomic, strong) id networkReachability;
|
@property (readonly, nonatomic, assign) SCNetworkReachabilityRef networkReachability;
|
||||||
@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
|
@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
|
||||||
@property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock;
|
@property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock;
|
||||||
@end
|
@end
|
||||||
@ -123,24 +123,24 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
|||||||
return _sharedManager;
|
return _sharedManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __clang_analyzer__
|
|
||||||
+ (instancetype)managerForDomain:(NSString *)domain {
|
+ (instancetype)managerForDomain:(NSString *)domain {
|
||||||
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]);
|
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]);
|
||||||
|
|
||||||
AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
|
AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
|
||||||
|
|
||||||
|
CFRelease(reachability);
|
||||||
|
|
||||||
return manager;
|
return manager;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __clang_analyzer__
|
|
||||||
+ (instancetype)managerForAddress:(const void *)address {
|
+ (instancetype)managerForAddress:(const void *)address {
|
||||||
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address);
|
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address);
|
||||||
AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
|
AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
|
||||||
|
|
||||||
|
CFRelease(reachability);
|
||||||
|
|
||||||
return manager;
|
return manager;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
+ (instancetype)manager
|
+ (instancetype)manager
|
||||||
{
|
{
|
||||||
@ -164,7 +164,7 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
|||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.networkReachability = CFBridgingRelease(reachability);
|
_networkReachability = CFRetain(reachability);
|
||||||
self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown;
|
self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
@ -177,6 +177,10 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
|||||||
|
|
||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
[self stopMonitoring];
|
[self stopMonitoring];
|
||||||
|
|
||||||
|
if (_networkReachability != NULL) {
|
||||||
|
CFRelease(_networkReachability);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
@ -213,14 +217,13 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
id networkReachability = self.networkReachability;
|
|
||||||
SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL};
|
SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL};
|
||||||
SCNetworkReachabilitySetCallback((__bridge SCNetworkReachabilityRef)networkReachability, AFNetworkReachabilityCallback, &context);
|
SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context);
|
||||||
SCNetworkReachabilityScheduleWithRunLoop((__bridge SCNetworkReachabilityRef)networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);
|
SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);
|
||||||
|
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{
|
||||||
SCNetworkReachabilityFlags flags;
|
SCNetworkReachabilityFlags flags;
|
||||||
if (SCNetworkReachabilityGetFlags((__bridge SCNetworkReachabilityRef)networkReachability, &flags)) {
|
if (SCNetworkReachabilityGetFlags(self.networkReachability, &flags)) {
|
||||||
AFPostReachabilityStatusChange(flags, callback);
|
AFPostReachabilityStatusChange(flags, callback);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -231,7 +234,7 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SCNetworkReachabilityUnscheduleFromRunLoop((__bridge SCNetworkReachabilityRef)self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);
|
SCNetworkReachabilityUnscheduleFromRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFSecurityPolicy.h
|
// AFSecurityPolicy.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFSecurityPolicy.m
|
// AFSecurityPolicy.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFURLRequestSerialization.h
|
// AFURLRequestSerialization.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -30,6 +30,31 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns a percent-escaped string following RFC 3986 for a query string key or value.
|
||||||
|
RFC 3986 states that the following characters are "reserved" characters.
|
||||||
|
- General Delimiters: ":", "#", "[", "]", "@", "?", "/"
|
||||||
|
- Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "="
|
||||||
|
|
||||||
|
In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow
|
||||||
|
query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/"
|
||||||
|
should be percent-escaped in the query string.
|
||||||
|
|
||||||
|
@param string The string to be percent-escaped.
|
||||||
|
|
||||||
|
@return The percent-escaped string.
|
||||||
|
*/
|
||||||
|
FOUNDATION_EXPORT NSString * AFPercentEscapedStringFromString(NSString *string);
|
||||||
|
|
||||||
|
/**
|
||||||
|
A helper method to generate encoded url query parameters for appending to the end of a URL.
|
||||||
|
|
||||||
|
@param parameters A dictionary of key/values to be encoded.
|
||||||
|
|
||||||
|
@return A url encoded query string
|
||||||
|
*/
|
||||||
|
FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameters);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary.
|
The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary.
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFURLRequestSerialization.m
|
// AFURLRequestSerialization.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -44,7 +44,7 @@ typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id
|
|||||||
- parameter string: The string to be percent-escaped.
|
- parameter string: The string to be percent-escaped.
|
||||||
- returns: The percent-escaped string.
|
- returns: The percent-escaped string.
|
||||||
*/
|
*/
|
||||||
static NSString * AFPercentEscapedStringFromString(NSString *string) {
|
NSString * AFPercentEscapedStringFromString(NSString *string) {
|
||||||
static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // does not include "?" or "/" due to RFC 3986 - Section 3.4
|
static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // does not include "?" or "/" due to RFC 3986 - Section 3.4
|
||||||
static NSString * const kAFCharactersSubDelimitersToEncode = @"!$&'()*+,;=";
|
static NSString * const kAFCharactersSubDelimitersToEncode = @"!$&'()*+,;=";
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ static NSString * AFPercentEscapedStringFromString(NSString *string) {
|
|||||||
FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary);
|
FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary);
|
||||||
FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value);
|
FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value);
|
||||||
|
|
||||||
static NSString * AFQueryStringFromParameters(NSDictionary *parameters) {
|
NSString * AFQueryStringFromParameters(NSDictionary *parameters) {
|
||||||
NSMutableArray *mutablePairs = [NSMutableArray array];
|
NSMutableArray *mutablePairs = [NSMutableArray array];
|
||||||
for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) {
|
for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) {
|
||||||
[mutablePairs addObject:[pair URLEncodedStringValue]];
|
[mutablePairs addObject:[pair URLEncodedStringValue]];
|
||||||
@ -500,7 +500,7 @@ forHTTPHeaderField:(NSString *)field
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {
|
if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {
|
||||||
if (query) {
|
if (query && query.length > 0) {
|
||||||
mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]];
|
mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFURLResponseSerialization.h
|
// AFURLResponseSerialization.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFURLResponseSerialization.m
|
// AFURLResponseSerialization.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -115,7 +115,9 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
|||||||
NSError *validationError = nil;
|
NSError *validationError = nil;
|
||||||
|
|
||||||
if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) {
|
if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) {
|
||||||
if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]]) {
|
if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]] &&
|
||||||
|
!([response MIMEType] == nil && [data length] == 0)) {
|
||||||
|
|
||||||
if ([data length] > 0 && [response URL]) {
|
if ([data length] > 0 && [response URL]) {
|
||||||
NSMutableDictionary *mutableUserInfo = [@{
|
NSMutableDictionary *mutableUserInfo = [@{
|
||||||
NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]],
|
NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]],
|
||||||
@ -240,41 +242,16 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization.
|
|
||||||
// See https://github.com/rails/rails/issues/1742
|
|
||||||
NSStringEncoding stringEncoding = self.stringEncoding;
|
|
||||||
if (response.textEncodingName) {
|
|
||||||
CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)response.textEncodingName);
|
|
||||||
if (encoding != kCFStringEncodingInvalidId) {
|
|
||||||
stringEncoding = CFStringConvertEncodingToNSStringEncoding(encoding);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
id responseObject = nil;
|
id responseObject = nil;
|
||||||
NSError *serializationError = nil;
|
NSError *serializationError = nil;
|
||||||
@autoreleasepool {
|
// Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization.
|
||||||
NSString *responseString = [[NSString alloc] initWithData:data encoding:stringEncoding];
|
// See https://github.com/rails/rails/issues/1742
|
||||||
if (responseString && ![responseString isEqualToString:@" "]) {
|
BOOL isSpace = [data isEqualToData:[NSData dataWithBytes:" " length:1]];
|
||||||
// Workaround for a bug in NSJSONSerialization when Unicode character escape codes are used instead of the actual character
|
if (data.length > 0 && !isSpace) {
|
||||||
// See http://stackoverflow.com/a/12843465/157142
|
|
||||||
data = [responseString dataUsingEncoding:NSUTF8StringEncoding];
|
|
||||||
|
|
||||||
if (data) {
|
|
||||||
if ([data length] > 0) {
|
|
||||||
responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError];
|
responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError];
|
||||||
} else {
|
} else {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
NSDictionary *userInfo = @{
|
|
||||||
NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"Data failed decoding as a UTF-8 string", @"AFNetworking", nil),
|
|
||||||
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Could not decode string: %@", @"AFNetworking", nil), responseString]
|
|
||||||
};
|
|
||||||
|
|
||||||
serializationError = [NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (self.removesKeysWithNullValues && responseObject) {
|
if (self.removesKeysWithNullValues && responseObject) {
|
||||||
responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);
|
responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFURLSessionManager.h
|
// AFURLSessionManager.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -51,6 +51,7 @@
|
|||||||
- `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`
|
- `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`
|
||||||
- `URLSession:task:didReceiveChallenge:completionHandler:`
|
- `URLSession:task:didReceiveChallenge:completionHandler:`
|
||||||
- `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`
|
- `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`
|
||||||
|
- `URLSession:task:needNewBodyStream:`
|
||||||
- `URLSession:task:didCompleteWithError:`
|
- `URLSession:task:didCompleteWithError:`
|
||||||
|
|
||||||
### `NSURLSessionDataDelegate`
|
### `NSURLSessionDataDelegate`
|
||||||
@ -213,8 +214,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
Creates an `NSURLSessionDataTask` with the specified request.
|
Creates an `NSURLSessionDataTask` with the specified request.
|
||||||
|
|
||||||
@param request The HTTP request for the request.
|
@param request The HTTP request for the request.
|
||||||
@param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
@param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
@param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
||||||
*/
|
*/
|
||||||
- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
|
- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
|
||||||
@ -231,7 +232,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@param request The HTTP request for the request.
|
@param request The HTTP request for the request.
|
||||||
@param fileURL A URL to the local file to be uploaded.
|
@param fileURL A URL to the local file to be uploaded.
|
||||||
@param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
@param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
||||||
|
|
||||||
@see `attemptsToRecreateUploadTasksForBackgroundSessions`
|
@see `attemptsToRecreateUploadTasksForBackgroundSessions`
|
||||||
@ -246,7 +247,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@param request The HTTP request for the request.
|
@param request The HTTP request for the request.
|
||||||
@param bodyData A data object containing the HTTP body to be uploaded.
|
@param bodyData A data object containing the HTTP body to be uploaded.
|
||||||
@param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
@param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
||||||
*/
|
*/
|
||||||
- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
|
- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
|
||||||
@ -258,7 +259,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
Creates an `NSURLSessionUploadTask` with the specified streaming request.
|
Creates an `NSURLSessionUploadTask` with the specified streaming request.
|
||||||
|
|
||||||
@param request The HTTP request for the request.
|
@param request The HTTP request for the request.
|
||||||
@param progress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
@param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
||||||
*/
|
*/
|
||||||
- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request
|
- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request
|
||||||
@ -273,7 +274,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
Creates an `NSURLSessionDownloadTask` with the specified request.
|
Creates an `NSURLSessionDownloadTask` with the specified request.
|
||||||
|
|
||||||
@param request The HTTP request for the request.
|
@param request The HTTP request for the request.
|
||||||
@param progress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
@param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
|
@param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
|
||||||
@param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
|
@param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
|
||||||
|
|
||||||
@ -288,7 +289,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
Creates an `NSURLSessionDownloadTask` with the specified resume data.
|
Creates an `NSURLSessionDownloadTask` with the specified resume data.
|
||||||
|
|
||||||
@param resumeData The data used to resume downloading.
|
@param resumeData The data used to resume downloading.
|
||||||
@param progress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
@param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
||||||
@param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
|
@param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
|
||||||
@param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
|
@param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFURLSessionManager.m
|
// AFURLSessionManager.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -222,15 +222,15 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
|
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
|
||||||
if ([object isKindOfClass:[NSURLSessionTask class]]) {
|
if ([object isKindOfClass:[NSURLSessionTask class]] || [object isKindOfClass:[NSURLSessionDownloadTask class]]) {
|
||||||
if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) {
|
if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) {
|
||||||
self.downloadProgress.completedUnitCount = [change[@"new"] longLongValue];
|
self.downloadProgress.completedUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
|
||||||
} else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))]) {
|
} else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))]) {
|
||||||
self.downloadProgress.totalUnitCount = [change[@"new"] longLongValue];
|
self.downloadProgress.totalUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
|
||||||
} else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) {
|
} else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) {
|
||||||
self.uploadProgress.completedUnitCount = [change[@"new"] longLongValue];
|
self.uploadProgress.completedUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
|
||||||
} else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToSend))]) {
|
} else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToSend))]) {
|
||||||
self.uploadProgress.totalUnitCount = [change[@"new"] longLongValue];
|
self.uploadProgress.totalUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ([object isEqual:self.downloadProgress]) {
|
else if ([object isEqual:self.downloadProgress]) {
|
||||||
@ -983,7 +983,7 @@ didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
|
|||||||
disposition = NSURLSessionAuthChallengePerformDefaultHandling;
|
disposition = NSURLSessionAuthChallengePerformDefaultHandling;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
disposition = NSURLSessionAuthChallengeRejectProtectionSpace;
|
disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
disposition = NSURLSessionAuthChallengePerformDefaultHandling;
|
disposition = NSURLSessionAuthChallengePerformDefaultHandling;
|
||||||
@ -1030,7 +1030,7 @@ didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
|
|||||||
disposition = NSURLSessionAuthChallengeUseCredential;
|
disposition = NSURLSessionAuthChallengeUseCredential;
|
||||||
credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
|
credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
|
||||||
} else {
|
} else {
|
||||||
disposition = NSURLSessionAuthChallengeRejectProtectionSpace;
|
disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
disposition = NSURLSessionAuthChallengePerformDefaultHandling;
|
disposition = NSURLSessionAuthChallengePerformDefaultHandling;
|
||||||
|
|||||||
2
Example/Pods/AFNetworking/LICENSE
generated
2
Example/Pods/AFNetworking/LICENSE
generated
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
8
Example/Pods/AFNetworking/README.md
generated
8
Example/Pods/AFNetworking/README.md
generated
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
[](https://travis-ci.org/AFNetworking/AFNetworking)
|
[](https://travis-ci.org/AFNetworking/AFNetworking)
|
||||||
[](https://codecov.io/github/AFNetworking/AFNetworking?branch=master)
|
[](https://codecov.io/github/AFNetworking/AFNetworking?branch=master)
|
||||||
[](https://img.shields.io/cocoapods/v/AFNetworking.svg)
|
[](https://img.shields.io/cocoapods/v/AFNetworking.svg)
|
||||||
[](https://github.com/Carthage/Carthage)
|
[](https://github.com/Carthage/Carthage)
|
||||||
[](http://cocoadocs.org/docsets/AFNetworking)
|
[](http://cocoadocs.org/docsets/AFNetworking)
|
||||||
[](http://twitter.com/AFNetworking)
|
[](http://twitter.com/AFNetworking)
|
||||||
@ -201,7 +201,7 @@ uploadTask = [manager
|
|||||||
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
|
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
|
||||||
AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];
|
AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];
|
||||||
|
|
||||||
NSURL *URL = [NSURL URLWithString:@"http://example.com/upload"];
|
NSURL *URL = [NSURL URLWithString:@"http://httpbin.org/get"];
|
||||||
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
|
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
|
||||||
|
|
||||||
NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
|
NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
|
||||||
@ -236,7 +236,7 @@ NSDictionary *parameters = @{@"foo": @"bar", @"baz": @[@1, @2, @3]};
|
|||||||
#### URL Form Parameter Encoding
|
#### URL Form Parameter Encoding
|
||||||
|
|
||||||
```objective-c
|
```objective-c
|
||||||
[[AFHTTPRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters];
|
[[AFHTTPRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters error:nil];
|
||||||
```
|
```
|
||||||
|
|
||||||
POST http://example.com/
|
POST http://example.com/
|
||||||
@ -247,7 +247,7 @@ NSDictionary *parameters = @{@"foo": @"bar", @"baz": @[@1, @2, @3]};
|
|||||||
#### JSON Parameter Encoding
|
#### JSON Parameter Encoding
|
||||||
|
|
||||||
```objective-c
|
```objective-c
|
||||||
[[AFJSONRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters];
|
[[AFJSONRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters error:nil];
|
||||||
```
|
```
|
||||||
|
|
||||||
POST http://example.com/
|
POST http://example.com/
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFAutoPurgingImageCache.h
|
// AFAutoPurgingImageCache.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -135,7 +135,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
after purge limit.
|
after purge limit.
|
||||||
|
|
||||||
@param memoryCapacity The total memory capacity of the cache in bytes.
|
@param memoryCapacity The total memory capacity of the cache in bytes.
|
||||||
@param preferredMemoryUsageAfterPurge The preferred memory usage after purge in bytes.
|
@param preferredMemoryCapacity The preferred memory usage after purge in bytes.
|
||||||
|
|
||||||
@return The new `AutoPurgingImageCache` instance.
|
@return The new `AutoPurgingImageCache` instance.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFAutoPurgingImageCache.m
|
// AFAutoPurgingImageCache.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -44,8 +44,8 @@
|
|||||||
|
|
||||||
CGSize imageSize = CGSizeMake(image.size.width * image.scale, image.size.height * image.scale);
|
CGSize imageSize = CGSizeMake(image.size.width * image.scale, image.size.height * image.scale);
|
||||||
CGFloat bytesPerPixel = 4.0;
|
CGFloat bytesPerPixel = 4.0;
|
||||||
CGFloat bytesPerRow = imageSize.width * bytesPerPixel;
|
CGFloat bytesPerSize = imageSize.width * imageSize.height;
|
||||||
self.totalBytes = (UInt64)bytesPerPixel * (UInt64)bytesPerRow;
|
self.totalBytes = (UInt64)bytesPerPixel * (UInt64)bytesPerSize;
|
||||||
self.lastAccessDate = [NSDate date];
|
self.lastAccessDate = [NSDate date];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFImageDownloader.h
|
// AFImageDownloader.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -129,7 +129,7 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
|
|||||||
task are executed in the order they were added.
|
task are executed in the order they were added.
|
||||||
|
|
||||||
@param request The URL request.
|
@param request The URL request.
|
||||||
@param request The identifier to use for the download receipt that will be created for this request. This must be a unique identifier that does not represent any other request.
|
@param receiptID The identifier to use for the download receipt that will be created for this request. This must be a unique identifier that does not represent any other request.
|
||||||
@param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`.
|
@param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`.
|
||||||
@param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred.
|
@param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred.
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFImageDownloader.m
|
// AFImageDownloader.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -52,7 +52,8 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@interface AFImageDownloaderMergedTask : NSObject
|
@interface AFImageDownloaderMergedTask : NSObject
|
||||||
@property (nonatomic, strong) NSString *identifier;
|
@property (nonatomic, strong) NSString *URLIdentifier;
|
||||||
|
@property (nonatomic, strong) NSUUID *identifier;
|
||||||
@property (nonatomic, strong) NSURLSessionDataTask *task;
|
@property (nonatomic, strong) NSURLSessionDataTask *task;
|
||||||
@property (nonatomic, strong) NSMutableArray <AFImageDownloaderResponseHandler*> *responseHandlers;
|
@property (nonatomic, strong) NSMutableArray <AFImageDownloaderResponseHandler*> *responseHandlers;
|
||||||
|
|
||||||
@ -60,10 +61,11 @@
|
|||||||
|
|
||||||
@implementation AFImageDownloaderMergedTask
|
@implementation AFImageDownloaderMergedTask
|
||||||
|
|
||||||
- (instancetype)initWithIdentifier:(NSString *)identifier task:(NSURLSessionDataTask *)task {
|
- (instancetype)initWithURLIdentifier:(NSString *)URLIdentifier identifier:(NSUUID *)identifier task:(NSURLSessionDataTask *)task {
|
||||||
if (self = [self init]) {
|
if (self = [self init]) {
|
||||||
self.identifier = identifier;
|
self.URLIdentifier = URLIdentifier;
|
||||||
self.task = task;
|
self.task = task;
|
||||||
|
self.identifier = identifier;
|
||||||
self.responseHandlers = [[NSMutableArray alloc] init];
|
self.responseHandlers = [[NSMutableArray alloc] init];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
@ -186,10 +188,19 @@
|
|||||||
failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure {
|
failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure {
|
||||||
__block NSURLSessionDataTask *task = nil;
|
__block NSURLSessionDataTask *task = nil;
|
||||||
dispatch_sync(self.synchronizationQueue, ^{
|
dispatch_sync(self.synchronizationQueue, ^{
|
||||||
NSString *identifier = request.URL.absoluteString;
|
NSString *URLIdentifier = request.URL.absoluteString;
|
||||||
|
if (URLIdentifier == nil) {
|
||||||
|
if (failure) {
|
||||||
|
NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorBadURL userInfo:nil];
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
failure(request, nil, error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 1) Append the success and failure blocks to a pre-existing request if it already exists
|
// 1) Append the success and failure blocks to a pre-existing request if it already exists
|
||||||
AFImageDownloaderMergedTask *existingMergedTask = self.mergedTasks[identifier];
|
AFImageDownloaderMergedTask *existingMergedTask = self.mergedTasks[URLIdentifier];
|
||||||
if (existingMergedTask != nil) {
|
if (existingMergedTask != nil) {
|
||||||
AFImageDownloaderResponseHandler *handler = [[AFImageDownloaderResponseHandler alloc] initWithUUID:receiptID success:success failure:failure];
|
AFImageDownloaderResponseHandler *handler = [[AFImageDownloaderResponseHandler alloc] initWithUUID:receiptID success:success failure:failure];
|
||||||
[existingMergedTask addResponseHandler:handler];
|
[existingMergedTask addResponseHandler:handler];
|
||||||
@ -218,6 +229,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3) Create the request and set up authentication, validation and response serialization
|
// 3) Create the request and set up authentication, validation and response serialization
|
||||||
|
NSUUID *mergedTaskIdentifier = [NSUUID UUID];
|
||||||
NSURLSessionDataTask *createdTask;
|
NSURLSessionDataTask *createdTask;
|
||||||
__weak __typeof__(self) weakSelf = self;
|
__weak __typeof__(self) weakSelf = self;
|
||||||
|
|
||||||
@ -226,7 +238,9 @@
|
|||||||
completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
|
completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
|
||||||
dispatch_async(self.responseQueue, ^{
|
dispatch_async(self.responseQueue, ^{
|
||||||
__strong __typeof__(weakSelf) strongSelf = weakSelf;
|
__strong __typeof__(weakSelf) strongSelf = weakSelf;
|
||||||
AFImageDownloaderMergedTask *mergedTask = [strongSelf safelyRemoveMergedTaskWithIdentifier:identifier];
|
AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[URLIdentifier];
|
||||||
|
if ([mergedTask.identifier isEqual:mergedTaskIdentifier]) {
|
||||||
|
mergedTask = [strongSelf safelyRemoveMergedTaskWithURLIdentifier:URLIdentifier];
|
||||||
if (error) {
|
if (error) {
|
||||||
for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) {
|
for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) {
|
||||||
if (handler.failureBlock) {
|
if (handler.failureBlock) {
|
||||||
@ -247,6 +261,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
[strongSelf safelyDecrementActiveTaskCount];
|
[strongSelf safelyDecrementActiveTaskCount];
|
||||||
[strongSelf safelyStartNextTaskIfNecessary];
|
[strongSelf safelyStartNextTaskIfNecessary];
|
||||||
});
|
});
|
||||||
@ -257,10 +272,11 @@
|
|||||||
success:success
|
success:success
|
||||||
failure:failure];
|
failure:failure];
|
||||||
AFImageDownloaderMergedTask *mergedTask = [[AFImageDownloaderMergedTask alloc]
|
AFImageDownloaderMergedTask *mergedTask = [[AFImageDownloaderMergedTask alloc]
|
||||||
initWithIdentifier:identifier
|
initWithURLIdentifier:URLIdentifier
|
||||||
|
identifier:mergedTaskIdentifier
|
||||||
task:createdTask];
|
task:createdTask];
|
||||||
[mergedTask addResponseHandler:handler];
|
[mergedTask addResponseHandler:handler];
|
||||||
self.mergedTasks[identifier] = mergedTask;
|
self.mergedTasks[URLIdentifier] = mergedTask;
|
||||||
|
|
||||||
// 5) Either start the request or enqueue it depending on the current active request count
|
// 5) Either start the request or enqueue it depending on the current active request count
|
||||||
if ([self isActiveRequestCountBelowMaximumLimit]) {
|
if ([self isActiveRequestCountBelowMaximumLimit]) {
|
||||||
@ -280,8 +296,8 @@
|
|||||||
|
|
||||||
- (void)cancelTaskForImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt {
|
- (void)cancelTaskForImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt {
|
||||||
dispatch_sync(self.synchronizationQueue, ^{
|
dispatch_sync(self.synchronizationQueue, ^{
|
||||||
NSString *identifier = imageDownloadReceipt.task.originalRequest.URL.absoluteString;
|
NSString *URLIdentifier = imageDownloadReceipt.task.originalRequest.URL.absoluteString;
|
||||||
AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[identifier];
|
AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[URLIdentifier];
|
||||||
NSUInteger index = [mergedTask.responseHandlers indexOfObjectPassingTest:^BOOL(AFImageDownloaderResponseHandler * _Nonnull handler, __unused NSUInteger idx, __unused BOOL * _Nonnull stop) {
|
NSUInteger index = [mergedTask.responseHandlers indexOfObjectPassingTest:^BOOL(AFImageDownloaderResponseHandler * _Nonnull handler, __unused NSUInteger idx, __unused BOOL * _Nonnull stop) {
|
||||||
return handler.uuid == imageDownloadReceipt.receiptID;
|
return handler.uuid == imageDownloadReceipt.receiptID;
|
||||||
}];
|
}];
|
||||||
@ -301,20 +317,26 @@
|
|||||||
|
|
||||||
if (mergedTask.responseHandlers.count == 0 && mergedTask.task.state == NSURLSessionTaskStateSuspended) {
|
if (mergedTask.responseHandlers.count == 0 && mergedTask.task.state == NSURLSessionTaskStateSuspended) {
|
||||||
[mergedTask.task cancel];
|
[mergedTask.task cancel];
|
||||||
|
[self removeMergedTaskWithURLIdentifier:URLIdentifier];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
- (AFImageDownloaderMergedTask*)safelyRemoveMergedTaskWithIdentifier:(NSString *)identifier {
|
- (AFImageDownloaderMergedTask*)safelyRemoveMergedTaskWithURLIdentifier:(NSString *)URLIdentifier {
|
||||||
__block AFImageDownloaderMergedTask *mergedTask = nil;
|
__block AFImageDownloaderMergedTask *mergedTask = nil;
|
||||||
dispatch_sync(self.synchronizationQueue, ^{
|
dispatch_sync(self.synchronizationQueue, ^{
|
||||||
mergedTask = self.mergedTasks[identifier];
|
mergedTask = [self removeMergedTaskWithURLIdentifier:URLIdentifier];
|
||||||
[self.mergedTasks removeObjectForKey:identifier];
|
|
||||||
|
|
||||||
});
|
});
|
||||||
return mergedTask;
|
return mergedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//This method should only be called from safely within the synchronizationQueue
|
||||||
|
- (AFImageDownloaderMergedTask *)removeMergedTaskWithURLIdentifier:(NSString *)URLIdentifier {
|
||||||
|
AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[URLIdentifier];
|
||||||
|
[self.mergedTasks removeObjectForKey:URLIdentifier];
|
||||||
|
return mergedTask;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)safelyDecrementActiveTaskCount {
|
- (void)safelyDecrementActiveTaskCount {
|
||||||
dispatch_sync(self.synchronizationQueue, ^{
|
dispatch_sync(self.synchronizationQueue, ^{
|
||||||
if (self.activeRequestCount > 0) {
|
if (self.activeRequestCount > 0) {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFNetworkActivityIndicatorManager.h
|
// AFNetworkActivityIndicatorManager.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// AFNetworkActivityIndicatorManager.m
|
// AFNetworkActivityIndicatorManager.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIActivityIndicatorView+AFNetworking.h
|
// UIActivityIndicatorView+AFNetworking.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIActivityIndicatorView+AFNetworking.m
|
// UIActivityIndicatorView+AFNetworking.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIButton+AFNetworking.h
|
// UIButton+AFNetworking.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIButton+AFNetworking.m
|
// UIButton+AFNetworking.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -220,7 +220,7 @@ static const char * af_backgroundImageDownloadReceiptKeyForState(UIControlState
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
[self cancelImageDownloadTaskForState:state];
|
[self cancelBackgroundImageDownloadTaskForState:state];
|
||||||
|
|
||||||
AFImageDownloader *downloader = [[self class] sharedImageDownloader];
|
AFImageDownloader *downloader = [[self class] sharedImageDownloader];
|
||||||
id <AFImageRequestCache> imageCache = downloader.imageCache;
|
id <AFImageRequestCache> imageCache = downloader.imageCache;
|
||||||
@ -253,7 +253,7 @@ static const char * af_backgroundImageDownloadReceiptKeyForState(UIControlState
|
|||||||
} else if(responseObject) {
|
} else if(responseObject) {
|
||||||
[strongSelf setBackgroundImage:responseObject forState:state];
|
[strongSelf setBackgroundImage:responseObject forState:state];
|
||||||
}
|
}
|
||||||
[strongSelf af_setImageDownloadReceipt:nil forState:state];
|
[strongSelf af_setBackgroundImageDownloadReceipt:nil forState:state];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIImageView+AFNetworking.h
|
// UIImageView+AFNetworking.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIImageView+AFNetworking.m
|
// UIImageView+AFNetworking.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// UIKit+AFNetworking.h
|
// UIKit+AFNetworking.h
|
||||||
//
|
//
|
||||||
// Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIProgressView+AFNetworking.h
|
// UIProgressView+AFNetworking.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIProgressView+AFNetworking.m
|
// UIProgressView+AFNetworking.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// UIRefreshControl+AFNetworking.m
|
// UIRefreshControl+AFNetworking.m
|
||||||
//
|
//
|
||||||
// Copyright (c) 2014 AFNetworking (http://afnetworking.com)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// UIRefreshControl+AFNetworking.m
|
// UIRefreshControl+AFNetworking.m
|
||||||
//
|
//
|
||||||
// Copyright (c) 2014 AFNetworking (http://afnetworking.com)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIWebView+AFNetworking.h
|
// UIWebView+AFNetworking.h
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// UIWebView+AFNetworking.m
|
// UIWebView+AFNetworking.m
|
||||||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -147,7 +147,9 @@
|
|||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
self.af_URLSessionTask = dataTask;
|
self.af_URLSessionTask = dataTask;
|
||||||
|
if (progress != nil) {
|
||||||
*progress = [self.sessionManager downloadProgressForTask:dataTask];
|
*progress = [self.sessionManager downloadProgressForTask:dataTask];
|
||||||
|
}
|
||||||
[self.af_URLSessionTask resume];
|
[self.af_URLSessionTask resume];
|
||||||
|
|
||||||
if ([self.delegate respondsToSelector:@selector(webViewDidStartLoad:)]) {
|
if ([self.delegate respondsToSelector:@selector(webViewDidStartLoad:)]) {
|
||||||
|
|||||||
@ -11,10 +11,11 @@
|
|||||||
#import "BFCancellationToken.h"
|
#import "BFCancellationToken.h"
|
||||||
#import "BFCancellationTokenRegistration.h"
|
#import "BFCancellationTokenRegistration.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface BFCancellationToken ()
|
@interface BFCancellationToken ()
|
||||||
|
|
||||||
@property (nonatomic, assign, getter=isCancellationRequested) BOOL cancellationRequested;
|
@property (nullable, nonatomic, strong) NSMutableArray *registrations;
|
||||||
@property (nonatomic, strong) NSMutableArray *registrations;
|
|
||||||
@property (nonatomic, strong) NSObject *lock;
|
@property (nonatomic, strong) NSObject *lock;
|
||||||
@property (nonatomic) BOOL disposed;
|
@property (nonatomic) BOOL disposed;
|
||||||
|
|
||||||
@ -30,11 +31,13 @@
|
|||||||
|
|
||||||
@implementation BFCancellationToken
|
@implementation BFCancellationToken
|
||||||
|
|
||||||
|
@synthesize cancellationRequested = _cancellationRequested;
|
||||||
|
|
||||||
#pragma mark - Initializer
|
#pragma mark - Initializer
|
||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
_registrations = [NSMutableArray array];
|
_registrations = [NSMutableArray array];
|
||||||
_lock = [NSObject new];
|
_lock = [NSObject new];
|
||||||
@ -124,11 +127,9 @@
|
|||||||
if (self.disposed) {
|
if (self.disposed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
[self.registrations makeObjectsPerformSelector:@selector(dispose)];
|
||||||
|
self.registrations = nil;
|
||||||
self.disposed = YES;
|
self.disposed = YES;
|
||||||
for (BFCancellationTokenRegistration *registration in self.registrations) {
|
|
||||||
[registration dispose];
|
|
||||||
}
|
|
||||||
[self.registrations removeAllObjects];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,3 +140,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@ -12,10 +12,12 @@
|
|||||||
|
|
||||||
#import "BFCancellationToken.h"
|
#import "BFCancellationToken.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface BFCancellationTokenRegistration ()
|
@interface BFCancellationTokenRegistration ()
|
||||||
|
|
||||||
@property (nonatomic, weak) BFCancellationToken *token;
|
@property (nonatomic, weak) BFCancellationToken *token;
|
||||||
@property (nonatomic, strong) BFCancellationBlock cancellationObserverBlock;
|
@property (nullable, nonatomic, strong) BFCancellationBlock cancellationObserverBlock;
|
||||||
@property (nonatomic, strong) NSObject *lock;
|
@property (nonatomic, strong) NSObject *lock;
|
||||||
@property (nonatomic) BOOL disposed;
|
@property (nonatomic) BOOL disposed;
|
||||||
|
|
||||||
@ -38,7 +40,7 @@
|
|||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
_lock = [NSObject new];
|
_lock = [NSObject new];
|
||||||
|
|
||||||
@ -73,3 +75,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#import "BFCancellationToken.h"
|
#import "BFCancellationToken.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface BFCancellationToken (BFCancellationTokenSource)
|
@interface BFCancellationToken (BFCancellationTokenSource)
|
||||||
|
|
||||||
- (void)cancel;
|
- (void)cancel;
|
||||||
@ -28,7 +30,7 @@
|
|||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
_token = [BFCancellationToken new];
|
_token = [BFCancellationToken new];
|
||||||
|
|
||||||
@ -58,3 +60,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
8
Example/Pods/Bolts/Bolts/Common/BFExecutor.m
generated
8
Example/Pods/Bolts/Bolts/Common/BFExecutor.m
generated
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
#import <pthread.h>
|
#import <pthread.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Get the remaining stack-size of the current thread.
|
Get the remaining stack-size of the current thread.
|
||||||
|
|
||||||
@ -22,7 +24,7 @@
|
|||||||
@note This function cannot be inlined, as otherwise the internal implementation could fail to report the proper
|
@note This function cannot be inlined, as otherwise the internal implementation could fail to report the proper
|
||||||
remaining stack space.
|
remaining stack space.
|
||||||
*/
|
*/
|
||||||
__attribute__((noinline)) static size_t remaining_stack_size(size_t *__nonnull restrict totalSize) {
|
__attribute__((noinline)) static size_t remaining_stack_size(size_t *restrict totalSize) {
|
||||||
pthread_t currentThread = pthread_self();
|
pthread_t currentThread = pthread_self();
|
||||||
|
|
||||||
// NOTE: We must store stack pointers as uint8_t so that the pointer math is well-defined
|
// NOTE: We must store stack pointers as uint8_t so that the pointer math is well-defined
|
||||||
@ -116,7 +118,7 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *__nonnull r
|
|||||||
|
|
||||||
- (instancetype)initWithBlock:(void(^)(void(^block)()))block {
|
- (instancetype)initWithBlock:(void(^)(void(^block)()))block {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
_block = block;
|
_block = block;
|
||||||
|
|
||||||
@ -130,3 +132,5 @@ __attribute__((noinline)) static size_t remaining_stack_size(size_t *__nonnull r
|
|||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
20
Example/Pods/Bolts/Bolts/Common/BFTask.h
generated
20
Example/Pods/Bolts/Bolts/Common/BFTask.h
generated
@ -29,6 +29,18 @@ extern NSInteger const kBFMultipleErrorsError;
|
|||||||
*/
|
*/
|
||||||
extern NSString *const BFTaskMultipleExceptionsException;
|
extern NSString *const BFTaskMultipleExceptionsException;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
An error userInfo key used if there were multiple errors on <BFTask taskForCompletionOfAllTasks:>.
|
||||||
|
Value type is `NSArray<NSError *> *`.
|
||||||
|
*/
|
||||||
|
extern NSString *const BFTaskMultipleErrorsUserInfoKey;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
An error userInfo key used if there were multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
|
||||||
|
Value type is `NSArray<NSException *> *`.
|
||||||
|
*/
|
||||||
|
extern NSString *const BFTaskMultipleExceptionsUserInfoKey;
|
||||||
|
|
||||||
@class BFExecutor;
|
@class BFExecutor;
|
||||||
@class BFTask;
|
@class BFTask;
|
||||||
|
|
||||||
@ -82,6 +94,14 @@ typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *task);
|
|||||||
*/
|
*/
|
||||||
+ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray<BFTask *> *)tasks;
|
+ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray<BFTask *> *)tasks;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns a task that will be completed once there is at least one successful task.
|
||||||
|
The first task to successuly complete will set the result, all other tasks results are
|
||||||
|
ignored.
|
||||||
|
@param tasks An `NSArray` of the tasks to use as an input.
|
||||||
|
*/
|
||||||
|
+ (instancetype)taskForCompletionOfAnyTask:(nullable NSArray<BFTask *> *)tasks;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns a task that will be completed a certain amount of time in the future.
|
Returns a task that will be completed a certain amount of time in the future.
|
||||||
@param millis The approximate number of milliseconds to wait before the
|
@param millis The approximate number of milliseconds to wait before the
|
||||||
|
|||||||
137
Example/Pods/Bolts/Bolts/Common/BFTask.m
generated
137
Example/Pods/Bolts/Bolts/Common/BFTask.m
generated
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
#import "Bolts.h"
|
#import "Bolts.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
__attribute__ ((noinline)) void warnBlockingOperationOnMainThread() {
|
__attribute__ ((noinline)) void warnBlockingOperationOnMainThread() {
|
||||||
NSLog(@"Warning: A long-running operation is being executed on the main thread. \n"
|
NSLog(@"Warning: A long-running operation is being executed on the main thread. \n"
|
||||||
" Break on warnBlockingOperationOnMainThread() to debug.");
|
" Break on warnBlockingOperationOnMainThread() to debug.");
|
||||||
@ -23,6 +25,9 @@ NSString *const BFTaskErrorDomain = @"bolts";
|
|||||||
NSInteger const kBFMultipleErrorsError = 80175001;
|
NSInteger const kBFMultipleErrorsError = 80175001;
|
||||||
NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException";
|
NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException";
|
||||||
|
|
||||||
|
NSString *const BFTaskMultipleErrorsUserInfoKey = @"errors";
|
||||||
|
NSString *const BFTaskMultipleExceptionsUserInfoKey = @"exceptions";
|
||||||
|
|
||||||
@interface BFTask () {
|
@interface BFTask () {
|
||||||
id _result;
|
id _result;
|
||||||
NSError *_error;
|
NSError *_error;
|
||||||
@ -45,7 +50,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
_lock = [[NSObject alloc] init];
|
_lock = [[NSObject alloc] init];
|
||||||
_condition = [[NSCondition alloc] init];
|
_condition = [[NSCondition alloc] init];
|
||||||
@ -56,7 +61,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
|
|
||||||
- (instancetype)initWithResult:(id)result {
|
- (instancetype)initWithResult:(id)result {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
[self trySetResult:result];
|
[self trySetResult:result];
|
||||||
|
|
||||||
@ -65,7 +70,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
|
|
||||||
- (instancetype)initWithError:(NSError *)error {
|
- (instancetype)initWithError:(NSError *)error {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
[self trySetError:error];
|
[self trySetError:error];
|
||||||
|
|
||||||
@ -74,7 +79,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
|
|
||||||
- (instancetype)initWithException:(NSException *)exception {
|
- (instancetype)initWithException:(NSException *)exception {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
[self trySetException:exception];
|
[self trySetException:exception];
|
||||||
|
|
||||||
@ -83,7 +88,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
|
|
||||||
- (instancetype)initCancelled {
|
- (instancetype)initCancelled {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
[self trySetCancelled];
|
[self trySetCancelled];
|
||||||
|
|
||||||
@ -92,7 +97,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
|
|
||||||
#pragma mark - Task Class methods
|
#pragma mark - Task Class methods
|
||||||
|
|
||||||
+ (instancetype)taskWithResult:(id)result {
|
+ (instancetype)taskWithResult:(nullable id)result {
|
||||||
return [[self alloc] initWithResult:result];
|
return [[self alloc] initWithResult:result];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +113,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
return [[self alloc] initCancelled];
|
return [[self alloc] initCancelled];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (instancetype)taskForCompletionOfAllTasks:(NSArray<BFTask *> *)tasks {
|
+ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray<BFTask *> *)tasks {
|
||||||
__block int32_t total = (int32_t)tasks.count;
|
__block int32_t total = (int32_t)tasks.count;
|
||||||
if (total == 0) {
|
if (total == 0) {
|
||||||
return [self taskWithResult:nil];
|
return [self taskWithResult:nil];
|
||||||
@ -131,10 +136,10 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
[errors addObject:task.error];
|
[errors addObject:task.error];
|
||||||
}
|
}
|
||||||
} else if (task.cancelled) {
|
} else if (task.cancelled) {
|
||||||
OSAtomicIncrement32(&cancelled);
|
OSAtomicIncrement32Barrier(&cancelled);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OSAtomicDecrement32(&total) == 0) {
|
if (OSAtomicDecrement32Barrier(&total) == 0) {
|
||||||
if (exceptions.count > 0) {
|
if (exceptions.count > 0) {
|
||||||
if (exceptions.count == 1) {
|
if (exceptions.count == 1) {
|
||||||
tcs.exception = [exceptions firstObject];
|
tcs.exception = [exceptions firstObject];
|
||||||
@ -142,7 +147,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
NSException *exception =
|
NSException *exception =
|
||||||
[NSException exceptionWithName:BFTaskMultipleExceptionsException
|
[NSException exceptionWithName:BFTaskMultipleExceptionsException
|
||||||
reason:@"There were multiple exceptions."
|
reason:@"There were multiple exceptions."
|
||||||
userInfo:@{ @"exceptions": exceptions }];
|
userInfo:@{ BFTaskMultipleExceptionsUserInfoKey: exceptions }];
|
||||||
tcs.exception = exception;
|
tcs.exception = exception;
|
||||||
}
|
}
|
||||||
} else if (errors.count > 0) {
|
} else if (errors.count > 0) {
|
||||||
@ -151,7 +156,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
} else {
|
} else {
|
||||||
NSError *error = [NSError errorWithDomain:BFTaskErrorDomain
|
NSError *error = [NSError errorWithDomain:BFTaskErrorDomain
|
||||||
code:kBFMultipleErrorsError
|
code:kBFMultipleErrorsError
|
||||||
userInfo:@{ @"errors": errors }];
|
userInfo:@{ BFTaskMultipleErrorsUserInfoKey: errors }];
|
||||||
tcs.error = error;
|
tcs.error = error;
|
||||||
}
|
}
|
||||||
} else if (cancelled > 0) {
|
} else if (cancelled > 0) {
|
||||||
@ -166,12 +171,78 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
return tcs.task;
|
return tcs.task;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (instancetype)taskForCompletionOfAllTasksWithResults:(NSArray<BFTask *> *)tasks {
|
+ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray<BFTask *> *)tasks {
|
||||||
return [[self taskForCompletionOfAllTasks:tasks] continueWithSuccessBlock:^id(BFTask *task) {
|
return [[self taskForCompletionOfAllTasks:tasks] continueWithSuccessBlock:^id(BFTask *task) {
|
||||||
return [tasks valueForKey:@"result"];
|
return [tasks valueForKey:@"result"];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (instancetype)taskForCompletionOfAnyTask:(nullable NSArray<BFTask *> *)tasks
|
||||||
|
{
|
||||||
|
__block int32_t total = (int32_t)tasks.count;
|
||||||
|
if (total == 0) {
|
||||||
|
return [self taskWithResult:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
__block int completed = 0;
|
||||||
|
__block int32_t cancelled = 0;
|
||||||
|
|
||||||
|
NSObject *lock = [NSObject new];
|
||||||
|
NSMutableArray<NSError *> *errors = [NSMutableArray new];
|
||||||
|
NSMutableArray<NSException *> *exceptions = [NSMutableArray new];
|
||||||
|
|
||||||
|
BFTaskCompletionSource *source = [BFTaskCompletionSource taskCompletionSource];
|
||||||
|
for (BFTask *task in tasks) {
|
||||||
|
[task continueWithBlock:^id(BFTask *task) {
|
||||||
|
if (task.exception != nil) {
|
||||||
|
@synchronized(lock) {
|
||||||
|
[exceptions addObject:task.exception];
|
||||||
|
}
|
||||||
|
} else if (task.error != nil) {
|
||||||
|
@synchronized(lock) {
|
||||||
|
[errors addObject:task.error];
|
||||||
|
}
|
||||||
|
} else if (task.cancelled) {
|
||||||
|
OSAtomicIncrement32Barrier(&cancelled);
|
||||||
|
} else {
|
||||||
|
if(OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) {
|
||||||
|
[source setResult:task.result];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OSAtomicDecrement32Barrier(&total) == 0 &&
|
||||||
|
OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) {
|
||||||
|
if (cancelled > 0) {
|
||||||
|
[source cancel];
|
||||||
|
} else if (exceptions.count > 0) {
|
||||||
|
if (exceptions.count == 1) {
|
||||||
|
source.exception = exceptions.firstObject;
|
||||||
|
} else {
|
||||||
|
NSException *exception =
|
||||||
|
[NSException exceptionWithName:BFTaskMultipleExceptionsException
|
||||||
|
reason:@"There were multiple exceptions."
|
||||||
|
userInfo:@{ @"exceptions": exceptions }];
|
||||||
|
source.exception = exception;
|
||||||
|
}
|
||||||
|
} else if (errors.count > 0) {
|
||||||
|
if (errors.count == 1) {
|
||||||
|
source.error = errors.firstObject;
|
||||||
|
} else {
|
||||||
|
NSError *error = [NSError errorWithDomain:BFTaskErrorDomain
|
||||||
|
code:kBFMultipleErrorsError
|
||||||
|
userInfo:@{ @"errors": errors }];
|
||||||
|
source.error = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Abort execution of per tasks continuations
|
||||||
|
return nil;
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
return source.task;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
+ (instancetype)taskWithDelay:(int)millis {
|
+ (instancetype)taskWithDelay:(int)millis {
|
||||||
BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource];
|
BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource];
|
||||||
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, millis * NSEC_PER_MSEC);
|
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, millis * NSEC_PER_MSEC);
|
||||||
@ -181,8 +252,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
return tcs.task;
|
return tcs.task;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (instancetype)taskWithDelay:(int)millis
|
+ (instancetype)taskWithDelay:(int)millis cancellationToken:(nullable BFCancellationToken *)token {
|
||||||
cancellationToken:(BFCancellationToken *)token {
|
|
||||||
if (token.cancellationRequested) {
|
if (token.cancellationRequested) {
|
||||||
return [BFTask cancelledTask];
|
return [BFTask cancelledTask];
|
||||||
}
|
}
|
||||||
@ -207,13 +277,13 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
|
|
||||||
#pragma mark - Custom Setters/Getters
|
#pragma mark - Custom Setters/Getters
|
||||||
|
|
||||||
- (id)result {
|
- (nullable id)result {
|
||||||
@synchronized(self.lock) {
|
@synchronized(self.lock) {
|
||||||
return _result;
|
return _result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)trySetResult:(id)result {
|
- (BOOL)trySetResult:(nullable id)result {
|
||||||
@synchronized(self.lock) {
|
@synchronized(self.lock) {
|
||||||
if (self.completed) {
|
if (self.completed) {
|
||||||
return NO;
|
return NO;
|
||||||
@ -225,7 +295,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSError *)error {
|
- (nullable NSError *)error {
|
||||||
@synchronized(self.lock) {
|
@synchronized(self.lock) {
|
||||||
return _error;
|
return _error;
|
||||||
}
|
}
|
||||||
@ -244,7 +314,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSException *)exception {
|
- (nullable NSException *)exception {
|
||||||
@synchronized(self.lock) {
|
@synchronized(self.lock) {
|
||||||
return _exception;
|
return _exception;
|
||||||
}
|
}
|
||||||
@ -293,12 +363,6 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setCompleted {
|
|
||||||
@synchronized(self.lock) {
|
|
||||||
_completed = YES;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)runContinuations {
|
- (void)runContinuations {
|
||||||
@synchronized(self.lock) {
|
@synchronized(self.lock) {
|
||||||
[self.condition lock];
|
[self.condition lock];
|
||||||
@ -313,19 +377,17 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
|
|
||||||
#pragma mark - Chaining methods
|
#pragma mark - Chaining methods
|
||||||
|
|
||||||
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
|
- (BFTask *)continueWithExecutor:(BFExecutor *)executor withBlock:(BFContinuationBlock)block {
|
||||||
withBlock:(BFContinuationBlock)block {
|
|
||||||
return [self continueWithExecutor:executor block:block cancellationToken:nil];
|
return [self continueWithExecutor:executor block:block cancellationToken:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
|
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
|
||||||
block:(BFContinuationBlock)block
|
block:(BFContinuationBlock)block
|
||||||
cancellationToken:(BFCancellationToken *)cancellationToken {
|
cancellationToken:(nullable BFCancellationToken *)cancellationToken {
|
||||||
BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource];
|
BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource];
|
||||||
|
|
||||||
// Capture all of the state that needs to used when the continuation is complete.
|
// Capture all of the state that needs to used when the continuation is complete.
|
||||||
void (^wrappedBlock)() = ^() {
|
dispatch_block_t executionBlock = ^{
|
||||||
[executor execute:^{
|
|
||||||
if (cancellationToken.cancellationRequested) {
|
if (cancellationToken.cancellationRequested) {
|
||||||
[tcs cancel];
|
[tcs cancel];
|
||||||
return;
|
return;
|
||||||
@ -365,18 +427,19 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
} else {
|
} else {
|
||||||
tcs.result = result;
|
tcs.result = result;
|
||||||
}
|
}
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOL completed;
|
BOOL completed;
|
||||||
@synchronized(self.lock) {
|
@synchronized(self.lock) {
|
||||||
completed = self.completed;
|
completed = self.completed;
|
||||||
if (!completed) {
|
if (!completed) {
|
||||||
[self.callbacks addObject:[wrappedBlock copy]];
|
[self.callbacks addObject:[^{
|
||||||
|
[executor execute:executionBlock];
|
||||||
|
} copy]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (completed) {
|
if (completed) {
|
||||||
wrappedBlock();
|
[executor execute:executionBlock];
|
||||||
}
|
}
|
||||||
|
|
||||||
return tcs.task;
|
return tcs.task;
|
||||||
@ -386,8 +449,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
return [self continueWithExecutor:[BFExecutor defaultExecutor] block:block cancellationToken:nil];
|
return [self continueWithExecutor:[BFExecutor defaultExecutor] block:block cancellationToken:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BFTask *)continueWithBlock:(BFContinuationBlock)block
|
- (BFTask *)continueWithBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken {
|
||||||
cancellationToken:(BFCancellationToken *)cancellationToken {
|
|
||||||
return [self continueWithExecutor:[BFExecutor defaultExecutor] block:block cancellationToken:cancellationToken];
|
return [self continueWithExecutor:[BFExecutor defaultExecutor] block:block cancellationToken:cancellationToken];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,7 +460,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
|
|
||||||
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
|
- (BFTask *)continueWithExecutor:(BFExecutor *)executor
|
||||||
successBlock:(BFContinuationBlock)block
|
successBlock:(BFContinuationBlock)block
|
||||||
cancellationToken:(BFCancellationToken *)cancellationToken {
|
cancellationToken:(nullable BFCancellationToken *)cancellationToken {
|
||||||
if (cancellationToken.cancellationRequested) {
|
if (cancellationToken.cancellationRequested) {
|
||||||
return [BFTask cancelledTask];
|
return [BFTask cancelledTask];
|
||||||
}
|
}
|
||||||
@ -416,8 +478,7 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
return [self continueWithExecutor:[BFExecutor defaultExecutor] successBlock:block cancellationToken:nil];
|
return [self continueWithExecutor:[BFExecutor defaultExecutor] successBlock:block cancellationToken:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block
|
- (BFTask *)continueWithSuccessBlock:(BFContinuationBlock)block cancellationToken:(nullable BFCancellationToken *)cancellationToken {
|
||||||
cancellationToken:(BFCancellationToken *)cancellationToken {
|
|
||||||
return [self continueWithExecutor:[BFExecutor defaultExecutor] successBlock:block cancellationToken:cancellationToken];
|
return [self continueWithExecutor:[BFExecutor defaultExecutor] successBlock:block cancellationToken:cancellationToken];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,3 +531,5 @@ NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsExcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@ -12,15 +12,11 @@
|
|||||||
|
|
||||||
#import "BFTask.h"
|
#import "BFTask.h"
|
||||||
|
|
||||||
@interface BFTaskCompletionSource ()
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@property (nonatomic, strong, readwrite) BFTask *task;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@interface BFTask (BFTaskCompletionSource)
|
@interface BFTask (BFTaskCompletionSource)
|
||||||
|
|
||||||
- (BOOL)trySetResult:(id)result;
|
- (BOOL)trySetResult:(nullable id)result;
|
||||||
- (BOOL)trySetError:(NSError *)error;
|
- (BOOL)trySetError:(NSError *)error;
|
||||||
- (BOOL)trySetException:(NSException *)exception;
|
- (BOOL)trySetException:(NSException *)exception;
|
||||||
- (BOOL)trySetCancelled;
|
- (BOOL)trySetCancelled;
|
||||||
@ -37,7 +33,7 @@
|
|||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (!self) return nil;
|
if (!self) return self;
|
||||||
|
|
||||||
_task = [[BFTask alloc] init];
|
_task = [[BFTask alloc] init];
|
||||||
|
|
||||||
@ -46,7 +42,7 @@
|
|||||||
|
|
||||||
#pragma mark - Custom Setters/Getters
|
#pragma mark - Custom Setters/Getters
|
||||||
|
|
||||||
- (void)setResult:(id)result {
|
- (void)setResult:(nullable id)result {
|
||||||
if (![self.task trySetResult:result]) {
|
if (![self.task trySetResult:result]) {
|
||||||
[NSException raise:NSInternalInconsistencyException
|
[NSException raise:NSInternalInconsistencyException
|
||||||
format:@"Cannot set the result on a completed task."];
|
format:@"Cannot set the result on a completed task."];
|
||||||
@ -74,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)trySetResult:(id)result {
|
- (BOOL)trySetResult:(nullable id)result {
|
||||||
return [self.task trySetResult:result];
|
return [self.task trySetResult:result];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,3 +87,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
13
Example/Pods/Bolts/Bolts/Common/Bolts.h
generated
13
Example/Pods/Bolts/Bolts/Common/Bolts.h
generated
@ -8,7 +8,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Bolts/BoltsVersion.h>
|
|
||||||
#import <Bolts/BFCancellationToken.h>
|
#import <Bolts/BFCancellationToken.h>
|
||||||
#import <Bolts/BFCancellationTokenRegistration.h>
|
#import <Bolts/BFCancellationTokenRegistration.h>
|
||||||
#import <Bolts/BFCancellationTokenSource.h>
|
#import <Bolts/BFCancellationTokenSource.h>
|
||||||
@ -28,16 +27,12 @@
|
|||||||
#import <Bolts/BFWebViewAppLinkResolver.h>
|
#import <Bolts/BFWebViewAppLinkResolver.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface Bolts : NSObject
|
/**
|
||||||
|
A string containing the version of the Bolts Framework used by the current application.
|
||||||
/*!
|
|
||||||
Returns the version of the Bolts Framework as an NSString.
|
|
||||||
@returns The NSString representation of the current version.
|
|
||||||
*/
|
*/
|
||||||
+ (NSString *)version;
|
extern NSString *const BoltsFrameworkVersionString;
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
8
Example/Pods/Bolts/Bolts/Common/Bolts.m
generated
8
Example/Pods/Bolts/Bolts/Common/Bolts.m
generated
@ -10,10 +10,8 @@
|
|||||||
|
|
||||||
#import "Bolts.h"
|
#import "Bolts.h"
|
||||||
|
|
||||||
@implementation Bolts
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
+ (NSString *)version {
|
NSString *const BoltsFrameworkVersionString = @"1.7.0";
|
||||||
return BOLTS_VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
1
Example/Pods/Bolts/Bolts/Common/BoltsVersion.h
generated
1
Example/Pods/Bolts/Bolts/Common/BoltsVersion.h
generated
@ -1 +0,0 @@
|
|||||||
#define BOLTS_VERSION @"1.6.0"
|
|
||||||
11
Example/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.m
generated
11
Example/Pods/Bolts/Bolts/iOS/BFAppLinkNavigation.m
generated
@ -10,13 +10,8 @@
|
|||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
#import "BFAppLinkNavigation.h"
|
#import <Bolts/Bolts.h>
|
||||||
#import "BFTaskCompletionSource.h"
|
|
||||||
#import "BFAppLinkTarget.h"
|
|
||||||
#import "BoltsVersion.h"
|
|
||||||
#import "BFWebViewAppLinkResolver.h"
|
|
||||||
#import "BFExecutor.h"
|
|
||||||
#import "BFTask.h"
|
|
||||||
#import "BFMeasurementEvent_Internal.h"
|
#import "BFMeasurementEvent_Internal.h"
|
||||||
#import "BFAppLink_Internal.h"
|
#import "BFAppLink_Internal.h"
|
||||||
|
|
||||||
@ -65,7 +60,7 @@ static id<BFAppLinkResolving> defaultResolver;
|
|||||||
|
|
||||||
// Add applink protocol data
|
// Add applink protocol data
|
||||||
if (!appLinkData[BFAppLinkUserAgentKeyName]) {
|
if (!appLinkData[BFAppLinkUserAgentKeyName]) {
|
||||||
appLinkData[BFAppLinkUserAgentKeyName] = [NSString stringWithFormat:@"Bolts iOS %@", BOLTS_VERSION];
|
appLinkData[BFAppLinkUserAgentKeyName] = [NSString stringWithFormat:@"Bolts iOS %@", BoltsFrameworkVersionString];
|
||||||
}
|
}
|
||||||
if (!appLinkData[BFAppLinkVersionKeyName]) {
|
if (!appLinkData[BFAppLinkVersionKeyName]) {
|
||||||
appLinkData[BFAppLinkVersionKeyName] = BFAppLinkVersion;
|
appLinkData[BFAppLinkVersionKeyName] = BFAppLinkVersion;
|
||||||
|
|||||||
@ -27,7 +27,6 @@ static const CGFloat BFCloseButtonHeight = 12.0;
|
|||||||
@property (nonatomic, strong) UILabel *labelView;
|
@property (nonatomic, strong) UILabel *labelView;
|
||||||
@property (nonatomic, strong) UIButton *closeButton;
|
@property (nonatomic, strong) UIButton *closeButton;
|
||||||
@property (nonatomic, strong) UITapGestureRecognizer *insideTapGestureRecognizer;
|
@property (nonatomic, strong) UITapGestureRecognizer *insideTapGestureRecognizer;
|
||||||
@property (nonatomic, strong) UIView *viewToMoveWithNavController;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|||||||
@ -248,6 +248,9 @@ static NSString *const BFWebViewAppLinkResolverShouldFallbackKey = @"should_fall
|
|||||||
break;
|
break;
|
||||||
#ifdef __TVOS_9_0
|
#ifdef __TVOS_9_0
|
||||||
case UIUserInterfaceIdiomTV:
|
case UIUserInterfaceIdiomTV:
|
||||||
|
#endif
|
||||||
|
#ifdef __IPHONE_9_3
|
||||||
|
case UIUserInterfaceIdiomCarPlay:
|
||||||
#endif
|
#endif
|
||||||
case UIUserInterfaceIdiomUnspecified:
|
case UIUserInterfaceIdiomUnspecified:
|
||||||
default:
|
default:
|
||||||
|
|||||||
27
Example/Pods/Bolts/README.md
generated
27
Example/Pods/Bolts/README.md
generated
@ -1,13 +1,14 @@
|
|||||||
Bolts
|
Bolts
|
||||||
============
|
============
|
||||||
[](https://travis-ci.org/BoltsFramework/Bolts-iOS)
|
[](https://travis-ci.org/BoltsFramework/Bolts-ObjC)
|
||||||
[](https://codecov.io/github/BoltsFramework/Bolts-iOS?branch=master)
|
[](https://codecov.io/github/BoltsFramework/Bolts-ObjC?branch=master)
|
||||||
[](https://github.com/Carthage/Carthage)
|
[](https://cocoapods.org/pods/Bolts)
|
||||||
[](http://cocoadocs.org/docsets/Bolts/)
|
[](https://github.com/BoltsFramework/Bolts-ObjC/blob/master/LICENSE)
|
||||||
[](http://cocoadocs.org/docsets/Bolts/)
|
|
||||||
[](https://github.com/BoltsFramework/Bolts-iOS/blob/master/LICENSE)
|
|
||||||
[](https://www.versioneye.com/objective-c/bolts/references)
|
[](https://www.versioneye.com/objective-c/bolts/references)
|
||||||
|
|
||||||
|
[](https://cocoapods.org/pods/Bolts)
|
||||||
|
[](https://github.com/Carthage/Carthage)
|
||||||
|
|
||||||
Bolts is a collection of low-level libraries designed to make developing mobile
|
Bolts is a collection of low-level libraries designed to make developing mobile
|
||||||
apps easier. Bolts was designed by Parse and Facebook for our own internal use,
|
apps easier. Bolts was designed by Parse and Facebook for our own internal use,
|
||||||
and we have decided to open source these libraries to make them available to
|
and we have decided to open source these libraries to make them available to
|
||||||
@ -17,7 +18,7 @@ do they require having a Parse or Facebook developer account.
|
|||||||
Bolts includes:
|
Bolts includes:
|
||||||
|
|
||||||
* "Tasks", which make organization of complex asynchronous code more manageable. A task is kind of like a JavaScript Promise, but available for iOS and Android.
|
* "Tasks", which make organization of complex asynchronous code more manageable. A task is kind of like a JavaScript Promise, but available for iOS and Android.
|
||||||
* An implementation of the [App Links protocol](http://www.applinks.org), helping you link to content in other apps and handle incoming deep-links.
|
* An implementation of the [App Links protocol](http://applinks.org/), helping you link to content in other apps and handle incoming deep-links.
|
||||||
|
|
||||||
For more information, see the [Bolts iOS API Reference](http://boltsframework.github.io/docs/ios/).
|
For more information, see the [Bolts iOS API Reference](http://boltsframework.github.io/docs/ios/).
|
||||||
|
|
||||||
@ -59,7 +60,7 @@ self.saveAsync(obj).continueWithBlock {
|
|||||||
(task: BFTask!) -> BFTask in
|
(task: BFTask!) -> BFTask in
|
||||||
if task.isCancelled() {
|
if task.isCancelled() {
|
||||||
// the save was cancelled.
|
// the save was cancelled.
|
||||||
} else if task.error() {
|
} else if task.error != nil {
|
||||||
// the save failed.
|
// the save failed.
|
||||||
} else {
|
} else {
|
||||||
// the object was saved successfully.
|
// the object was saved successfully.
|
||||||
@ -237,7 +238,7 @@ findAsync(query).continueWithSuccessBlock {
|
|||||||
return self.findAsync(query)
|
return self.findAsync(query)
|
||||||
}.continueWithBlock {
|
}.continueWithBlock {
|
||||||
(task: BFTask!) -> AnyObject! in
|
(task: BFTask!) -> AnyObject! in
|
||||||
if task.error() {
|
if task.error != nil {
|
||||||
// This error handler WILL be called.
|
// This error handler WILL be called.
|
||||||
// The error will be the NSError returned above.
|
// The error will be the NSError returned above.
|
||||||
// Let's handle the error by returning a new value.
|
// Let's handle the error by returning a new value.
|
||||||
@ -503,7 +504,7 @@ We are likely to add some concept like this to Bolts at some point in the future
|
|||||||
|
|
||||||
# App Links
|
# App Links
|
||||||
|
|
||||||
[App Links](http://www.applinks.org) provide a cross-platform mechanism that allows a developer to define and publish a deep-linking scheme for their content, allowing other apps to link directly to an experience optimized for the device they are running on. Whether you are building an app that receives incoming links or one that may link out to other apps' content, Bolts provides tools to simplify implementation of the [App Links protocol](http://www.applinks.org/documentation).
|
[App Links](http://applinks.org/) provide a cross-platform mechanism that allows a developer to define and publish a deep-linking scheme for their content, allowing other apps to link directly to an experience optimized for the device they are running on. Whether you are building an app that receives incoming links or one that may link out to other apps' content, Bolts provides tools to simplify implementation of the [App Links protocol](http://applinks.org/documentation).
|
||||||
|
|
||||||
## Handling an App Link
|
## Handling an App Link
|
||||||
|
|
||||||
@ -629,7 +630,7 @@ The following code assumes that the view controller has an `openedAppLinkURL` `N
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
In a navigaton-controller view hierarchy, the banner should be displayed above the navigation bar, and `BFAppLinkReturnToRefererController` provides an `initForDisplayAboveNavController` method to assist with this.
|
In a navigation-controller view hierarchy, the banner should be displayed above the navigation bar, and `BFAppLinkReturnToRefererController` provides an `initForDisplayAboveNavController` method to assist with this.
|
||||||
|
|
||||||
## Analytics
|
## Analytics
|
||||||
|
|
||||||
@ -675,8 +676,8 @@ App Links Measurement Events sends additional information from App Links Intents
|
|||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
You can download the latest framework files from our [Releases page](https://github.com/BoltsFramework/Bolts-iOS/releases).
|
You can download the latest framework files from our [Releases page](https://github.com/BoltsFramework/Bolts-ObjC/releases).
|
||||||
|
|
||||||
Bolts is also available through [CocoaPods](http://cocoapods.org). To install it simply add the following line to your Podfile:
|
Bolts is also available through [CocoaPods](https://cocoapods.org/). To install it simply add the following line to your Podfile:
|
||||||
|
|
||||||
pod 'Bolts'
|
pod 'Bolts'
|
||||||
|
|||||||
@ -1,11 +1,3 @@
|
|||||||
//
|
|
||||||
// EXPMatchers+FBSnapshotTest.h
|
|
||||||
// Artsy
|
|
||||||
//
|
|
||||||
// Created by Daniel Doubrovkine on 1/14/14.
|
|
||||||
// Copyright (c) 2014 Artsy Inc. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Expecta/Expecta.h>
|
#import <Expecta/Expecta.h>
|
||||||
#import "ExpectaObject+FBSnapshotTest.h"
|
#import "ExpectaObject+FBSnapshotTest.h"
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,3 @@
|
|||||||
//
|
|
||||||
// EXPMatchers+FBSnapshotTest.h
|
|
||||||
// Artsy
|
|
||||||
//
|
|
||||||
// Created by Daniel Doubrovkine on 1/14/14.
|
|
||||||
// Copyright (c) 2014 Artsy Inc. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "EXPMatchers+FBSnapshotTest.h"
|
#import "EXPMatchers+FBSnapshotTest.h"
|
||||||
#import <Expecta/EXPMatcherHelpers.h>
|
#import <Expecta/EXPMatcherHelpers.h>
|
||||||
#import <FBSnapshotTestCase/FBSnapshotTestController.h>
|
#import <FBSnapshotTestCase/FBSnapshotTestController.h>
|
||||||
@ -102,11 +94,6 @@ void setGlobalReferenceImageDir(char *reference) {
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// If you're bringing in Speca via CocoaPods
|
|
||||||
// use the test path to get the test's image file URL
|
|
||||||
|
|
||||||
#if __has_include(<Specta/Specta.h>)
|
|
||||||
#import <Specta/Specta.h>
|
#import <Specta/Specta.h>
|
||||||
#import <Specta/SpectaUtility.h>
|
#import <Specta/SpectaUtility.h>
|
||||||
#import <Specta/SPTExample.h>
|
#import <Specta/SPTExample.h>
|
||||||
@ -130,6 +117,11 @@ NSString *sanitizedTestPath(){
|
|||||||
EXPMatcherImplementationBegin(haveValidSnapshot, (void)){
|
EXPMatcherImplementationBegin(haveValidSnapshot, (void)){
|
||||||
__block NSError *error = nil;
|
__block NSError *error = nil;
|
||||||
|
|
||||||
|
prerequisite(^BOOL{
|
||||||
|
return actual;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
match(^BOOL{
|
match(^BOOL{
|
||||||
NSString *referenceImageDir = [self _getDefaultReferenceDirectory];
|
NSString *referenceImageDir = [self _getDefaultReferenceDirectory];
|
||||||
NSString *name = sanitizedTestPath();
|
NSString *name = sanitizedTestPath();
|
||||||
@ -144,6 +136,10 @@ EXPMatcherImplementationBegin(haveValidSnapshot, (void)){
|
|||||||
});
|
});
|
||||||
|
|
||||||
failureMessageForTo(^NSString *{
|
failureMessageForTo(^NSString *{
|
||||||
|
if (!actual) {
|
||||||
|
return [EXPExpectFBSnapshotTest combinedError:@"Nil was passed into haveValidSnapshot." test:sanitizedTestPath() error:nil];
|
||||||
|
}
|
||||||
|
|
||||||
return [EXPExpectFBSnapshotTest combinedError:@"expected a matching snapshot in" test:sanitizedTestPath() error:error];
|
return [EXPExpectFBSnapshotTest combinedError:@"expected a matching snapshot in" test:sanitizedTestPath() error:error];
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -159,7 +155,7 @@ EXPMatcherImplementationBegin(recordSnapshot, (void)) {
|
|||||||
BOOL actualIsViewLayerOrViewController = ([actual isKindOfClass:UIView.class] || [actual isKindOfClass:CALayer.class] || [actual isKindOfClass:UIViewController.class]);
|
BOOL actualIsViewLayerOrViewController = ([actual isKindOfClass:UIView.class] || [actual isKindOfClass:CALayer.class] || [actual isKindOfClass:UIViewController.class]);
|
||||||
|
|
||||||
prerequisite(^BOOL{
|
prerequisite(^BOOL{
|
||||||
return actualIsViewLayerOrViewController;
|
return actual && actualIsViewLayerOrViewController;
|
||||||
});
|
});
|
||||||
|
|
||||||
match(^BOOL{
|
match(^BOOL{
|
||||||
@ -178,6 +174,10 @@ EXPMatcherImplementationBegin(recordSnapshot, (void)) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
failureMessageForTo(^NSString *{
|
failureMessageForTo(^NSString *{
|
||||||
|
if (!actual) {
|
||||||
|
return [EXPExpectFBSnapshotTest combinedError:@"Nil was passed into recordSnapshot." test:sanitizedTestPath() error:nil];
|
||||||
|
}
|
||||||
|
|
||||||
if (!actualIsViewLayerOrViewController) {
|
if (!actualIsViewLayerOrViewController) {
|
||||||
return [EXPExpectFBSnapshotTest combinedError:@"Expected a View, Layer or View Controller." test:sanitizedTestPath() error:nil];
|
return [EXPExpectFBSnapshotTest combinedError:@"Expected a View, Layer or View Controller." test:sanitizedTestPath() error:nil];
|
||||||
}
|
}
|
||||||
@ -198,54 +198,12 @@ EXPMatcherImplementationBegin(recordSnapshot, (void)) {
|
|||||||
}
|
}
|
||||||
EXPMatcherImplementationEnd
|
EXPMatcherImplementationEnd
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
// If you don't have Speca stub the functions
|
|
||||||
|
|
||||||
EXPMatcherImplementationBegin(haveValidSnapshot, (void)){
|
|
||||||
|
|
||||||
prerequisite(^BOOL{
|
|
||||||
return NO;
|
|
||||||
});
|
|
||||||
|
|
||||||
failureMessageForTo(^NSString *{
|
|
||||||
return @"you need Specta installed via CocoaPods to use haveValidSnapshot, use haveValidSnapshotNamed instead";
|
|
||||||
});
|
|
||||||
|
|
||||||
failureMessageForNotTo(^NSString *{
|
|
||||||
return @"you need Specta installed via CocoaPods to use haveValidSnapshot, use haveValidSnapshotNamed instead";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
EXPMatcherImplementationEnd
|
|
||||||
|
|
||||||
|
|
||||||
EXPMatcherImplementationBegin(recordSnapshot, (void)) {
|
|
||||||
|
|
||||||
prerequisite(^BOOL{
|
|
||||||
return NO;
|
|
||||||
});
|
|
||||||
|
|
||||||
failureMessageForTo(^NSString *{
|
|
||||||
return @"you need Specta installed via CocoaPods to use recordSnapshot, use recordSnapshotNamed instead";
|
|
||||||
});
|
|
||||||
|
|
||||||
failureMessageForNotTo(^NSString *{
|
|
||||||
return @"you need Specta installed via CocoaPods to use recordSnapshot, use recordSnapshotNamed instead";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
EXPMatcherImplementationEnd
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EXPMatcherImplementationBegin(haveValidSnapshotNamed, (NSString *snapshot)){
|
EXPMatcherImplementationBegin(haveValidSnapshotNamed, (NSString *snapshot)){
|
||||||
BOOL snapshotIsNil = (snapshot == nil);
|
BOOL snapshotIsNil = (snapshot == nil);
|
||||||
__block NSError *error = nil;
|
__block NSError *error = nil;
|
||||||
|
|
||||||
prerequisite(^BOOL{
|
prerequisite(^BOOL{
|
||||||
return !(snapshotIsNil);
|
return actual && !(snapshotIsNil);
|
||||||
});
|
});
|
||||||
|
|
||||||
match(^BOOL{
|
match(^BOOL{
|
||||||
@ -260,6 +218,10 @@ EXPMatcherImplementationBegin(haveValidSnapshotNamed, (NSString *snapshot)){
|
|||||||
});
|
});
|
||||||
|
|
||||||
failureMessageForTo(^NSString *{
|
failureMessageForTo(^NSString *{
|
||||||
|
if (!actual) {
|
||||||
|
return [EXPExpectFBSnapshotTest combinedError:@"Nil was passed into haveValidSnapshotNamed." test:sanitizedTestPath() error:nil];
|
||||||
|
}
|
||||||
|
|
||||||
return [EXPExpectFBSnapshotTest combinedError:@"expected a matching snapshot named" test:snapshot error:error];
|
return [EXPExpectFBSnapshotTest combinedError:@"expected a matching snapshot named" test:snapshot error:error];
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -295,6 +257,9 @@ EXPMatcherImplementationBegin(recordSnapshotNamed, (NSString *snapshot)) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
failureMessageForTo(^NSString *{
|
failureMessageForTo(^NSString *{
|
||||||
|
if (!actual) {
|
||||||
|
return [EXPExpectFBSnapshotTest combinedError:@"Nil was passed into recordSnapshotNamed." test:sanitizedTestPath() error:nil];
|
||||||
|
}
|
||||||
if (!actualIsViewLayerOrViewController) {
|
if (!actualIsViewLayerOrViewController) {
|
||||||
return [EXPExpectFBSnapshotTest combinedError:@"Expected a View, Layer or View Controller." test:snapshot error:nil];
|
return [EXPExpectFBSnapshotTest combinedError:@"Expected a View, Layer or View Controller." test:snapshot error:nil];
|
||||||
}
|
}
|
||||||
|
|||||||
20
Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIApplication+StrictKeyWindow.h
generated
Normal file
20
Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIApplication+StrictKeyWindow.h
generated
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2015, Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD-style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@interface UIApplication (StrictKeyWindow)
|
||||||
|
|
||||||
|
/**
|
||||||
|
@return The receiver's @c keyWindow. Raises an assertion if @c nil.
|
||||||
|
*/
|
||||||
|
- (UIWindow *)fb_strictKeyWindow;
|
||||||
|
|
||||||
|
@end
|
||||||
27
Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIApplication+StrictKeyWindow.m
generated
Normal file
27
Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIApplication+StrictKeyWindow.m
generated
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2015, Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD-style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <FBSnapshotTestCase/UIApplication+StrictKeyWindow.h>
|
||||||
|
|
||||||
|
@implementation UIApplication (StrictKeyWindow)
|
||||||
|
|
||||||
|
- (UIWindow *)fb_strictKeyWindow
|
||||||
|
{
|
||||||
|
UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
|
||||||
|
if (!keyWindow) {
|
||||||
|
[NSException raise:@"FBSnapshotTestCaseNilKeyWindowException"
|
||||||
|
format:@"Snapshot tests must be hosted by an application with a key window. Please ensure your test"
|
||||||
|
" host sets up a key window at launch (either via storyboards or programmatically) and doesn't"
|
||||||
|
" do anything to remove it while snapshot tests are running."];
|
||||||
|
}
|
||||||
|
return keyWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#import <FBSnapshotTestCase/UIImage+Snapshot.h>
|
#import <FBSnapshotTestCase/UIImage+Snapshot.h>
|
||||||
|
#import <FBSnapshotTestCase/UIApplication+StrictKeyWindow.h>
|
||||||
|
|
||||||
@implementation UIImage (Snapshot)
|
@implementation UIImage (Snapshot)
|
||||||
|
|
||||||
@ -43,11 +44,16 @@
|
|||||||
NSAssert1(CGRectGetWidth(bounds), @"Zero width for view %@", view);
|
NSAssert1(CGRectGetWidth(bounds), @"Zero width for view %@", view);
|
||||||
NSAssert1(CGRectGetHeight(bounds), @"Zero height for view %@", view);
|
NSAssert1(CGRectGetHeight(bounds), @"Zero height for view %@", view);
|
||||||
|
|
||||||
UIWindow *window = view.window;
|
// If the input view is already a UIWindow, then just use that. Otherwise wrap in a window.
|
||||||
if (window == nil) {
|
UIWindow *window = [view isKindOfClass:[UIWindow class]] ? (UIWindow *)view : view.window;
|
||||||
window = [[UIWindow alloc] initWithFrame:bounds];
|
BOOL removeFromSuperview = NO;
|
||||||
|
if (!window) {
|
||||||
|
window = [[UIApplication sharedApplication] fb_strictKeyWindow];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!view.window && view != window) {
|
||||||
[window addSubview:view];
|
[window addSubview:view];
|
||||||
[window makeKeyAndVisible];
|
removeFromSuperview = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0);
|
UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0);
|
||||||
@ -56,6 +62,11 @@
|
|||||||
|
|
||||||
UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext();
|
UIImage *snapshot = UIGraphicsGetImageFromCurrentImageContext();
|
||||||
UIGraphicsEndImageContext();
|
UIGraphicsEndImageContext();
|
||||||
|
|
||||||
|
if (removeFromSuperview) {
|
||||||
|
[view removeFromSuperview];
|
||||||
|
}
|
||||||
|
|
||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#import <FBSnapshotTestCase/FBSnapshotTestCasePlatform.h>
|
#import <FBSnapshotTestCase/FBSnapshotTestCasePlatform.h>
|
||||||
|
#import <FBSnapshotTestCase/FBSnapshotTestController.h>
|
||||||
|
|
||||||
#import <QuartzCore/QuartzCore.h>
|
#import <QuartzCore/QuartzCore.h>
|
||||||
|
|
||||||
@ -48,7 +49,7 @@
|
|||||||
/**
|
/**
|
||||||
Similar to our much-loved XCTAssert() macros. Use this to perform your test. No need to write an explanation, though.
|
Similar to our much-loved XCTAssert() macros. Use this to perform your test. No need to write an explanation, though.
|
||||||
@param layer The layer to snapshot
|
@param layer The layer to snapshot
|
||||||
@param identifier An optional identifier, used is there are multiple snapshot tests in a given -test method.
|
@param identifier An optional identifier, used if there are multiple snapshot tests in a given -test method.
|
||||||
@param suffixes An NSOrderedSet of strings for the different suffixes
|
@param suffixes An NSOrderedSet of strings for the different suffixes
|
||||||
@param tolerance The percentage of pixels that can differ and still count as an 'identical' layer
|
@param tolerance The percentage of pixels that can differ and still count as an 'identical' layer
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#import <FBSnapshotTestCase/FBSnapshotTestCasePlatform.h>
|
#import <FBSnapshotTestCase/FBSnapshotTestCasePlatform.h>
|
||||||
|
#import <FBSnapshotTestCase/UIApplication+StrictKeyWindow.h>
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
BOOL FBSnapshotTestCaseIs64Bit(void)
|
BOOL FBSnapshotTestCaseIs64Bit(void)
|
||||||
@ -34,7 +35,8 @@ NSOrderedSet *FBSnapshotTestCaseDefaultSuffixes(void)
|
|||||||
NSString *FBDeviceAgnosticNormalizedFileName(NSString *fileName)
|
NSString *FBDeviceAgnosticNormalizedFileName(NSString *fileName)
|
||||||
{
|
{
|
||||||
UIDevice *device = [UIDevice currentDevice];
|
UIDevice *device = [UIDevice currentDevice];
|
||||||
CGSize screenSize = [[UIApplication sharedApplication] keyWindow].bounds.size;
|
UIWindow *keyWindow = [[UIApplication sharedApplication] fb_strictKeyWindow];
|
||||||
|
CGSize screenSize = keyWindow.bounds.size;
|
||||||
NSString *os = device.systemVersion;
|
NSString *os = device.systemVersion;
|
||||||
|
|
||||||
fileName = [NSString stringWithFormat:@"%@_%@%@_%.0fx%.0f", fileName, device.model, os, screenSize.width, screenSize.height];
|
fileName = [NSString stringWithFormat:@"%@_%@%@_%.0fx%.0f", fileName, device.model, os, screenSize.width, screenSize.height];
|
||||||
|
|||||||
@ -28,6 +28,21 @@ extern NSString *const FBSnapshotTestControllerErrorDomain;
|
|||||||
*/
|
*/
|
||||||
extern NSString *const FBReferenceImageFilePathKey;
|
extern NSString *const FBReferenceImageFilePathKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Errors returned by the methods of FBSnapshotTestController sometimes contain this key in the `userInfo` dictionary.
|
||||||
|
*/
|
||||||
|
extern NSString *const FBReferenceImageKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Errors returned by the methods of FBSnapshotTestController sometimes contain this key in the `userInfo` dictionary.
|
||||||
|
*/
|
||||||
|
extern NSString *const FBCapturedImageKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Errors returned by the methods of FBSnapshotTestController sometimes contain this key in the `userInfo` dictionary.
|
||||||
|
*/
|
||||||
|
extern NSString *const FBDiffedImageKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Provides the heavy-lifting for FBSnapshotTestCase. It loads and saves images, along with performing the actual pixel-
|
Provides the heavy-lifting for FBSnapshotTestCase. It loads and saves images, along with performing the actual pixel-
|
||||||
by-pixel comparison of images.
|
by-pixel comparison of images.
|
||||||
|
|||||||
@ -18,6 +18,9 @@
|
|||||||
|
|
||||||
NSString *const FBSnapshotTestControllerErrorDomain = @"FBSnapshotTestControllerErrorDomain";
|
NSString *const FBSnapshotTestControllerErrorDomain = @"FBSnapshotTestControllerErrorDomain";
|
||||||
NSString *const FBReferenceImageFilePathKey = @"FBReferenceImageFilePathKey";
|
NSString *const FBReferenceImageFilePathKey = @"FBReferenceImageFilePathKey";
|
||||||
|
NSString *const FBReferenceImageKey = @"FBReferenceImageKey";
|
||||||
|
NSString *const FBCapturedImageKey = @"FBCapturedImageKey";
|
||||||
|
NSString *const FBDiffedImageKey = @"FBDiffedImageKey";
|
||||||
|
|
||||||
typedef NS_ENUM(NSUInteger, FBTestSnapshotFileNameType) {
|
typedef NS_ENUM(NSUInteger, FBTestSnapshotFileNameType) {
|
||||||
FBTestSnapshotFileNameTypeReference,
|
FBTestSnapshotFileNameTypeReference,
|
||||||
@ -126,25 +129,25 @@ typedef NS_ENUM(NSUInteger, FBTestSnapshotFileNameType) {
|
|||||||
tolerance:(CGFloat)tolerance
|
tolerance:(CGFloat)tolerance
|
||||||
error:(NSError **)errorPtr
|
error:(NSError **)errorPtr
|
||||||
{
|
{
|
||||||
if (CGSizeEqualToSize(referenceImage.size, image.size)) {
|
BOOL sameImageDimensions = CGSizeEqualToSize(referenceImage.size, image.size);
|
||||||
BOOL imagesEqual = [referenceImage fb_compareWithImage:image tolerance:tolerance];
|
if (sameImageDimensions && [referenceImage fb_compareWithImage:image tolerance:tolerance]) {
|
||||||
if (NULL != errorPtr) {
|
return YES;
|
||||||
*errorPtr = [NSError errorWithDomain:FBSnapshotTestControllerErrorDomain
|
|
||||||
code:FBSnapshotTestControllerErrorCodeImagesDifferent
|
|
||||||
userInfo:@{
|
|
||||||
NSLocalizedDescriptionKey: @"Images different",
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
return imagesEqual;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != errorPtr) {
|
if (NULL != errorPtr) {
|
||||||
|
NSString *errorDescription = sameImageDimensions ? @"Images different" : @"Images different sizes";
|
||||||
|
NSString *errorReason = sameImageDimensions ? [NSString stringWithFormat:@"image pixels differed by more than %.2f%% from the reference image", tolerance * 100]
|
||||||
|
: [NSString stringWithFormat:@"referenceImage:%@, image:%@", NSStringFromCGSize(referenceImage.size), NSStringFromCGSize(image.size)];
|
||||||
|
FBSnapshotTestControllerErrorCode errorCode = sameImageDimensions ? FBSnapshotTestControllerErrorCodeImagesDifferent : FBSnapshotTestControllerErrorCodeImagesDifferentSizes;
|
||||||
|
|
||||||
*errorPtr = [NSError errorWithDomain:FBSnapshotTestControllerErrorDomain
|
*errorPtr = [NSError errorWithDomain:FBSnapshotTestControllerErrorDomain
|
||||||
code:FBSnapshotTestControllerErrorCodeImagesDifferentSizes
|
code:errorCode
|
||||||
userInfo:@{
|
userInfo:@{
|
||||||
NSLocalizedDescriptionKey: @"Images different sizes",
|
NSLocalizedDescriptionKey: errorDescription,
|
||||||
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"referenceImage:%@, image:%@",
|
NSLocalizedFailureReasonErrorKey: errorReason,
|
||||||
NSStringFromCGSize(referenceImage.size),
|
FBReferenceImageKey: referenceImage,
|
||||||
NSStringFromCGSize(image.size)],
|
FBCapturedImageKey: image,
|
||||||
|
FBDiffedImageKey: [referenceImage fb_diffWithImage:image],
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
@ -279,11 +282,10 @@ typedef NS_ENUM(NSUInteger, FBTestSnapshotFileNameType) {
|
|||||||
UIImage *snapshot = [self _imageForViewOrLayer:viewOrLayer];
|
UIImage *snapshot = [self _imageForViewOrLayer:viewOrLayer];
|
||||||
BOOL imagesSame = [self compareReferenceImage:referenceImage toImage:snapshot tolerance:tolerance error:errorPtr];
|
BOOL imagesSame = [self compareReferenceImage:referenceImage toImage:snapshot tolerance:tolerance error:errorPtr];
|
||||||
if (!imagesSame) {
|
if (!imagesSame) {
|
||||||
[self saveFailedReferenceImage:referenceImage
|
NSError *saveError = nil;
|
||||||
testImage:snapshot
|
if ([self saveFailedReferenceImage:referenceImage testImage:snapshot selector:selector identifier:identifier error:&saveError] == NO) {
|
||||||
selector:selector
|
NSLog(@"Error saving test images: %@", saveError);
|
||||||
identifier:identifier
|
}
|
||||||
error:errorPtr];
|
|
||||||
}
|
}
|
||||||
return imagesSame;
|
return imagesSame;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,15 +9,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public extension FBSnapshotTestCase {
|
public extension FBSnapshotTestCase {
|
||||||
public func FBSnapshotVerifyView(view: UIView, identifier: String = "", suffixes: NSOrderedSet = FBSnapshotTestCaseDefaultSuffixes(), file: String = __FILE__, line: UInt = __LINE__) {
|
public func FBSnapshotVerifyView(view: UIView, identifier: String = "", suffixes: NSOrderedSet = FBSnapshotTestCaseDefaultSuffixes(), tolerance: CGFloat = 0, file: StaticString = #file, line: UInt = #line) {
|
||||||
FBSnapshotVerifyViewOrLayer(view, identifier: identifier, suffixes: suffixes)
|
FBSnapshotVerifyViewOrLayer(view, identifier: identifier, suffixes: suffixes, tolerance: tolerance, file: file, line: line)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func FBSnapshotVerifyLayer(layer: CALayer, identifier: String = "", suffixes: NSOrderedSet = FBSnapshotTestCaseDefaultSuffixes(), file: String = __FILE__, line: UInt = __LINE__) {
|
public func FBSnapshotVerifyLayer(layer: CALayer, identifier: String = "", suffixes: NSOrderedSet = FBSnapshotTestCaseDefaultSuffixes(), tolerance: CGFloat = 0, file: StaticString = #file, line: UInt = #line) {
|
||||||
FBSnapshotVerifyViewOrLayer(layer, identifier: identifier, suffixes: suffixes)
|
FBSnapshotVerifyViewOrLayer(layer, identifier: identifier, suffixes: suffixes, tolerance: tolerance, file: file, line: line)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func FBSnapshotVerifyViewOrLayer(viewOrLayer: AnyObject, identifier: String = "", suffixes: NSOrderedSet = FBSnapshotTestCaseDefaultSuffixes(), file: String = __FILE__, line: UInt = __LINE__) {
|
private func FBSnapshotVerifyViewOrLayer(viewOrLayer: AnyObject, identifier: String = "", suffixes: NSOrderedSet = FBSnapshotTestCaseDefaultSuffixes(), tolerance: CGFloat = 0, file: StaticString = #file, line: UInt = #line) {
|
||||||
let envReferenceImageDirectory = self.getReferenceImageDirectoryWithDefault(FB_REFERENCE_IMAGE_DIR)
|
let envReferenceImageDirectory = self.getReferenceImageDirectoryWithDefault(FB_REFERENCE_IMAGE_DIR)
|
||||||
var error: NSError?
|
var error: NSError?
|
||||||
var comparisonSuccess = false
|
var comparisonSuccess = false
|
||||||
@ -27,7 +27,7 @@ public extension FBSnapshotTestCase {
|
|||||||
let referenceImagesDirectory = "\(envReferenceImageDirectory)\(suffix)"
|
let referenceImagesDirectory = "\(envReferenceImageDirectory)\(suffix)"
|
||||||
if viewOrLayer.isKindOfClass(UIView) {
|
if viewOrLayer.isKindOfClass(UIView) {
|
||||||
do {
|
do {
|
||||||
try compareSnapshotOfView(viewOrLayer as! UIView, referenceImagesDirectory: referenceImagesDirectory, identifier: identifier, tolerance: 0)
|
try compareSnapshotOfView(viewOrLayer as! UIView, referenceImagesDirectory: referenceImagesDirectory, identifier: identifier, tolerance: tolerance)
|
||||||
comparisonSuccess = true
|
comparisonSuccess = true
|
||||||
} catch let error1 as NSError {
|
} catch let error1 as NSError {
|
||||||
error = error1
|
error = error1
|
||||||
@ -35,7 +35,7 @@ public extension FBSnapshotTestCase {
|
|||||||
}
|
}
|
||||||
} else if viewOrLayer.isKindOfClass(CALayer) {
|
} else if viewOrLayer.isKindOfClass(CALayer) {
|
||||||
do {
|
do {
|
||||||
try compareSnapshotOfLayer(viewOrLayer as! CALayer, referenceImagesDirectory: referenceImagesDirectory, identifier: identifier, tolerance: 0)
|
try compareSnapshotOfLayer(viewOrLayer as! CALayer, referenceImagesDirectory: referenceImagesDirectory, identifier: identifier, tolerance: tolerance)
|
||||||
comparisonSuccess = true
|
comparisonSuccess = true
|
||||||
} catch let error1 as NSError {
|
} catch let error1 as NSError {
|
||||||
error = error1
|
error = error1
|
||||||
@ -58,7 +58,7 @@ public extension FBSnapshotTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func assert(assertion: Bool, message: String, file: String, line: UInt) {
|
func assert(assertion: Bool, message: String, file: StaticString, line: UInt) {
|
||||||
if !assertion {
|
if !assertion {
|
||||||
XCTFail(message, file: file, line: line)
|
XCTFail(message, file: file, line: line)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
../../../Bolts/Bolts/Common/BoltsVersion.h
|
|
||||||
1
Example/Pods/Headers/Private/FBSnapshotTestCase/UIApplication+StrictKeyWindow.h
generated
Symbolic link
1
Example/Pods/Headers/Private/FBSnapshotTestCase/UIApplication+StrictKeyWindow.h
generated
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIApplication+StrictKeyWindow.h
|
||||||
55
Example/Pods/Manifest.lock
generated
55
Example/Pods/Manifest.lock
generated
@ -1,41 +1,42 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- AFNetworking (3.0.4):
|
- AFNetworking (3.1.0):
|
||||||
- AFNetworking/NSURLSession (= 3.0.4)
|
- AFNetworking/NSURLSession (= 3.1.0)
|
||||||
- AFNetworking/Reachability (= 3.0.4)
|
- AFNetworking/Reachability (= 3.1.0)
|
||||||
- AFNetworking/Security (= 3.0.4)
|
- AFNetworking/Security (= 3.1.0)
|
||||||
- AFNetworking/Serialization (= 3.0.4)
|
- AFNetworking/Serialization (= 3.1.0)
|
||||||
- AFNetworking/UIKit (= 3.0.4)
|
- AFNetworking/UIKit (= 3.1.0)
|
||||||
- AFNetworking/NSURLSession (3.0.4):
|
- AFNetworking/NSURLSession (3.1.0):
|
||||||
- AFNetworking/Reachability
|
- AFNetworking/Reachability
|
||||||
- AFNetworking/Security
|
- AFNetworking/Security
|
||||||
- AFNetworking/Serialization
|
- AFNetworking/Serialization
|
||||||
- AFNetworking/Reachability (3.0.4)
|
- AFNetworking/Reachability (3.1.0)
|
||||||
- AFNetworking/Security (3.0.4)
|
- AFNetworking/Security (3.1.0)
|
||||||
- AFNetworking/Serialization (3.0.4)
|
- AFNetworking/Serialization (3.1.0)
|
||||||
- AFNetworking/UIKit (3.0.4):
|
- AFNetworking/UIKit (3.1.0):
|
||||||
- AFNetworking/NSURLSession
|
- AFNetworking/NSURLSession
|
||||||
- Bolts (1.6.0):
|
- Bolts (1.7.0):
|
||||||
- Bolts/AppLinks (= 1.6.0)
|
- Bolts/AppLinks (= 1.7.0)
|
||||||
- Bolts/Tasks (= 1.6.0)
|
- Bolts/Tasks (= 1.7.0)
|
||||||
- Bolts/AppLinks (1.6.0):
|
- Bolts/AppLinks (1.7.0):
|
||||||
- Bolts/Tasks
|
- Bolts/Tasks
|
||||||
- Bolts/Tasks (1.6.0)
|
- Bolts/Tasks (1.7.0)
|
||||||
- CocoaSecurity (1.2.4)
|
- CocoaSecurity (1.2.4)
|
||||||
- CodFis-Helper (0.1.3)
|
- CodFis-Helper (0.1.3)
|
||||||
- Expecta (1.0.5)
|
- Expecta (1.0.5)
|
||||||
- Expecta+Snapshots (2.0.0):
|
- Expecta+Snapshots (3.0.0):
|
||||||
- Expecta (~> 1.0)
|
- Expecta (~> 1.0)
|
||||||
- FBSnapshotTestCase/Core (~> 2.0.3)
|
- FBSnapshotTestCase/Core (~> 2.0)
|
||||||
|
- Specta (~> 1.0)
|
||||||
- FBSDKCoreKit (4.10.1):
|
- FBSDKCoreKit (4.10.1):
|
||||||
- Bolts (~> 1.5)
|
- Bolts (~> 1.5)
|
||||||
- FBSDKLoginKit (4.10.1):
|
- FBSDKLoginKit (4.10.1):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSDKShareKit (4.10.1):
|
- FBSDKShareKit (4.10.1):
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSnapshotTestCase (2.0.7):
|
- FBSnapshotTestCase (2.1.0):
|
||||||
- FBSnapshotTestCase/SwiftSupport (= 2.0.7)
|
- FBSnapshotTestCase/SwiftSupport (= 2.1.0)
|
||||||
- FBSnapshotTestCase/Core (2.0.7)
|
- FBSnapshotTestCase/Core (2.1.0)
|
||||||
- FBSnapshotTestCase/SwiftSupport (2.0.7):
|
- FBSnapshotTestCase/SwiftSupport (2.1.0):
|
||||||
- FBSnapshotTestCase/Core
|
- FBSnapshotTestCase/Core
|
||||||
- NACrypto (1.0.6)
|
- NACrypto (1.0.6)
|
||||||
- NSDate_Utils (0.1.3)
|
- NSDate_Utils (0.1.3)
|
||||||
@ -84,19 +85,19 @@ DEPENDENCIES:
|
|||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
PNObject:
|
PNObject:
|
||||||
:path: "../"
|
:path: ../
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93
|
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
|
||||||
Bolts: f52a250053bb517ca874523c3913776359ab3def
|
Bolts: a0058fa3b331c5a1e4402d534f2dae36dbff31e4
|
||||||
CocoaSecurity: d288a6f87e0f363823d2cb83e753814a6944f71a
|
CocoaSecurity: d288a6f87e0f363823d2cb83e753814a6944f71a
|
||||||
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
CodFis-Helper: 28be4c74d7202542459d72354f59b1215871de87
|
||||||
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
|
||||||
Expecta+Snapshots: 29b38dd695bc72a0ed2bea833937d78df41943ba
|
Expecta+Snapshots: c343f410c7a6392f3e22e78f94c44b6c0749a516
|
||||||
FBSDKCoreKit: d2aaed5e9ab7d8d6301c533376a1fbff1cf3deb5
|
FBSDKCoreKit: d2aaed5e9ab7d8d6301c533376a1fbff1cf3deb5
|
||||||
FBSDKLoginKit: 699ff169080e3072de4b9b0faca90bf23dc36deb
|
FBSDKLoginKit: 699ff169080e3072de4b9b0faca90bf23dc36deb
|
||||||
FBSDKShareKit: 2fd887cce0056bdda91f99b2021d724a4fed8e88
|
FBSDKShareKit: 2fd887cce0056bdda91f99b2021d724a4fed8e88
|
||||||
FBSnapshotTestCase: 7e85180d0d141a0cf472352edda7e80d7eaeb547
|
FBSnapshotTestCase: 366ecd378511d7716c79991cd8067d1eed23578d
|
||||||
NACrypto: ce3900f1775f1b0cc27ce7c4953b94c598a74149
|
NACrypto: ce3900f1775f1b0cc27ce7c4953b94c598a74149
|
||||||
NSDate_Utils: 68669d2c81f310ee13026c791f4f0ed227b94c65
|
NSDate_Utils: 68669d2c81f310ee13026c791f4f0ed227b94c65
|
||||||
NSString-Helper: b4183f73f0a00c6fcd607edebb6c35a7a461376d
|
NSString-Helper: b4183f73f0a00c6fcd607edebb6c35a7a461376d
|
||||||
|
|||||||
1731
Example/Pods/Pods.xcodeproj/project.pbxproj
generated
1731
Example/Pods/Pods.xcodeproj/project.pbxproj
generated
File diff suppressed because it is too large
Load Diff
@ -1,36 +1,39 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "0700"
|
LastUpgradeVersion = "0730"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
buildImplicitDependencies = "YES">
|
buildImplicitDependencies = "YES">
|
||||||
<BuildActionEntries>
|
<BuildActionEntries>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
buildForAnalyzing = "YES"
|
|
||||||
buildForTesting = "YES"
|
buildForTesting = "YES"
|
||||||
buildForRunning = "YES"
|
buildForRunning = "YES"
|
||||||
buildForProfiling = "YES"
|
buildForProfiling = "YES"
|
||||||
buildForArchiving = "YES">
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = 'primary'
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = '97690789A9825EB1AAD67920'
|
BlueprintIdentifier = "A3CB6254A84F4D5ACF17C190D4B5F2E6"
|
||||||
BlueprintName = 'PNObject'
|
BuildableName = "PNObject.framework"
|
||||||
ReferencedContainer = 'container:Pods.xcodeproj'
|
BlueprintName = "PNObject"
|
||||||
BuildableName = 'PNObject.framework'>
|
ReferencedContainer = "container:Pods.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
</BuildActionEntries>
|
</BuildActionEntries>
|
||||||
</BuildAction>
|
</BuildAction>
|
||||||
<TestAction
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
buildConfiguration = "Debug">
|
<Testables>
|
||||||
|
</Testables>
|
||||||
<AdditionalOptions>
|
<AdditionalOptions>
|
||||||
</AdditionalOptions>
|
</AdditionalOptions>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
@ -38,17 +41,25 @@
|
|||||||
ignoresPersistentStateOnLaunch = "NO"
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
debugDocumentVersioning = "YES"
|
debugDocumentVersioning = "YES"
|
||||||
debugServiceExtension = "internal"
|
debugServiceExtension = "internal"
|
||||||
buildConfiguration = "Debug"
|
|
||||||
allowLocationSimulation = "YES">
|
allowLocationSimulation = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "A3CB6254A84F4D5ACF17C190D4B5F2E6"
|
||||||
|
BuildableName = "PNObject.framework"
|
||||||
|
BlueprintName = "PNObject"
|
||||||
|
ReferencedContainer = "container:Pods.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
<AdditionalOptions>
|
<AdditionalOptions>
|
||||||
</AdditionalOptions>
|
</AdditionalOptions>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
savedToolIdentifier = ""
|
savedToolIdentifier = ""
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
debugDocumentVersioning = "YES"
|
debugDocumentVersioning = "YES">
|
||||||
buildConfiguration = "Release"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
||||||
</ProfileAction>
|
</ProfileAction>
|
||||||
<AnalyzeAction
|
<AnalyzeAction
|
||||||
buildConfiguration = "Debug">
|
buildConfiguration = "Debug">
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>3.0.4</string>
|
<string>3.1.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -20,7 +20,6 @@
|
|||||||
#import "BFTask.h"
|
#import "BFTask.h"
|
||||||
#import "BFTaskCompletionSource.h"
|
#import "BFTaskCompletionSource.h"
|
||||||
#import "Bolts.h"
|
#import "Bolts.h"
|
||||||
#import "BoltsVersion.h"
|
|
||||||
|
|
||||||
FOUNDATION_EXPORT double BoltsVersionNumber;
|
FOUNDATION_EXPORT double BoltsVersionNumber;
|
||||||
FOUNDATION_EXPORT const unsigned char BoltsVersionString[];
|
FOUNDATION_EXPORT const unsigned char BoltsVersionString[];
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.6.0</string>
|
<string>1.7.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.0.0</string>
|
<string>3.0.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.0.7</string>
|
<string>2.1.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ This application makes use of the following third party libraries:
|
|||||||
|
|
||||||
## AFNetworking
|
## AFNetworking
|
||||||
|
|
||||||
Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>FooterText</key>
|
<key>FooterText</key>
|
||||||
<string>Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
<string>Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ This application makes use of the following third party libraries:
|
|||||||
|
|
||||||
## AFNetworking
|
## AFNetworking
|
||||||
|
|
||||||
Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>FooterText</key>
|
<key>FooterText</key>
|
||||||
<string>Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
|
<string>Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user