Hi i have just created an iOS app with pushwoosh

I added the sdk, edited my appdelegate and plist. ##

The error i get is:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary pw_arrayForKey:]: unrecognized selector sent to instance 0x16e7f940'

I hope someone can help me, i don't know what i am doing wrong.

The full output is:

2016-08-18 00:24:45.400 mytestapp[2746:1040560] [PW] [I] +[UIApplication(Pushwoosh)] Pushwoosh: Initializing application runtime
2016-08-18 00:24:45.571 mytestapp[2746:1040560] [PW] [I] -[PushNotificationManager] Will show push notifications alert: 1
2016-08-18 00:24:46.197 mytestapp[2746:1040560] [PW] [I] -[PWLocationTracker] location services authorization status has not been determined yet
2016-08-18 00:24:47.859 mytestapp[2746:1040560] [PW] [I] -[PWRequestManager] 
x
|    Pushwoosh request:
| Url:      https://cp.pushwoosh.com/json/1.3/registerUser
| Payload:  {"request":{"hwid":"AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA","userId":"AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA","application":"11111-111AA","v":"4.1.0","device_type":1}}
| Status:   "200 no error"
| Response: {"status_code": 200, "status_message": "OK","response":null}
x
2016-08-18 00:24:48.076 mytestapp[2746:1040560] [PW] [I] -[PWRequestManager] 
x
|    Pushwoosh request:
| Url:      https://cp.pushwoosh.com/json/1.3/registerDevice
| Payload:  {"request":{"sounds":[],"timezone":"-18000","device_type":1,"userId":"AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA","push_token":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","application":"111111-111AA","os_version":"9.3.4","language":"en","gateway":"sandbox","device_model":"iPhone5,1","hwid":"AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA","package":"aaaaaaaaa.com.mytestapp","jailbroken":0,"app_version":"1.0","v":"4.1.0"}}
| Status:   "200 no error"
| Response: {"status_code":200,"status_message":"OK","response":{"iosCategories":[]}}
x
2016-08-18 00:24:48.078 mytestapp[2746:1040560] [PW] [I] __57-[PWPushNotificationsManagerCommon] Registered for push notifications: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2016-08-18 00:24:48.288 mytestapp[2746:1040560] [PW] [I] -[PWRequestManager] 
x
|    Pushwoosh request:
| Url:      https://cp.pushwoosh.com/json/1.3/getInApps
| Payload:  {"request":{"language":"en","hwid":"AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA","userId":"AAAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA","application":"11111-111AA","v":"4.1.0","device_type":1}}
| Status:   "200 no error"
| Response: {"status_code":200,"status_message":"OK","response":{"inApps":[]}}
x
2016-08-18 00:24:48.290 mytestapp[2746:1040560] -[__NSCFDictionary pw_arrayForKey:]: unrecognized selector sent to instance 0x16e7f940
2016-08-18 00:24:48.291 mytestapp[2746:1040560] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary pw_arrayForKey:]: unrecognized selector sent to instance 0x16e7f940'
*** First throw call stack:
(0x21421b0b 0x20bdedff 0x21427455 0x214250ab 0x2134f298 0x22be87 0x23b379 0x23ae63 0x2192c50d 0x2193bc87 0x21c3684d 0x21b9787f 0x21b89f8f 0x21c38b0d 0x1c4cb93 0x1c51659 0x213e3755 0x213e1c4f 0x213301c9 0x2132ffbd 0x2294caf9 0x25a69435 0x1884ac 0x20fdc873)
libc++abi.dylib: terminating with uncaught exception of type NSException
asked 18 Aug '16, 06:07
alexlozanob's gravatar image

alexlozanob
213

Were you able to solve this? I have the same problem.

(25 Aug '16, 13:59) gustavoamgarten gustavoamgarten's gravatar image

i haven't solve it yet

(25 Aug '16, 15:24) alexlozanob alexlozanob's gravatar image

I was having the same problem. In order to solve this issue, you must add -ObjC linker flag to your project.

Select the project file. Select the target. Go to Build Settings and scroll down to the Linking section. On the Other Linking Flags field, double click the right side and press the + symbol. Add -ObjC.

I hope it helps.

permanent link
answered 26 Aug '16, 12:09
gustavoamgarten's gravatar image

gustavoamgarten
213

That fixed it thank you gustavoamgarten

(30 Aug '16, 06:12) alexlozanob alexlozanob's gravatar image

Thank you for your contribution, gustavoamgarten!

(30 Aug '16, 08:43) Nikolai Nikolai's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×353
×91
×32
×30
×25

question asked: 18 Aug '16, 06:07

question was seen: 825 times

last updated: 30 Aug '16, 08:43