0

I have been working with PhoneGap to access the camera, which works locally when built to the iPhone, but when I upload to TestFlight, the same method fails and gives me the following:

'NSInvalidArgumentException', reason: '[__NSCFString JSONObject]'

The arguments that are being passed are as follows:

[["Camera1856949628","Camera","takePicture",[25,0,1,100,100,1,0,false,false,false,null,0]]]

From what I gather its failing in CDVJSON.m when converting an NSString to JSONObject which in turn is an NSArray.

Any suggestions on what might be causing this?

4

1 回答 1

0

因为您的代码在运行时才使用 JSONObject 。所以 CDVJSON.m 没有在应用程序中链接。

通过在您的项目中添加“其他链接器标志:-all_load”来解决此问题。正如这个答案所建议的:https ://stackoverflow.com/a/17581430/2570865

于 2014-05-28T06:21:18.763 回答