Bug 16386 - The mtouch "-app-arg=" option does not work for any more than 5 command line arguments
Summary: The mtouch "-app-arg=" option does not work for any more than 5 command line ...
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 7.0.4.x
Hardware: PC Mac OS
: --- enhancement
Target Milestone: 7.0.6
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2013-11-21 12:20 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2013-12-16 05:34 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test case (8.58 KB, application/zip)
2013-11-21 12:20 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2013-11-21 12:20:46 UTC
Created attachment 5495 [details]
Test case

Reported on behalf of a user.

## Steps to reproduce

Run the attached test project on device.

OR

Create a new project, add 6 or more arguments under "Project Options -> Run -> General -> Parameters," and run the project on device.


## Result

All of the expected `app-arg` options are included when launching the app:

> Launching TestCommandLineArgs.app -debugtrack -monodevelop-port 10000 -connection-mode usb -app-arg=0value -app-arg=1value -app-arg=2value -app-arg=3value -app-arg=4value -app-arg=5value -app-arg=6value -app-arg=7value

... but the Main() function only sees the first 5 command line arguments.

> arg0: 0value
> arg1: 1value
> arg2: 2value
> arg3: 3value
> arg4: 4value


## Version information

Xamarin.iOS 7.0.4.209
Tested on iPhone 4, iOS 7.0.3
OS X 10.8.5
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-11-22 07:51:49 UTC
Right now we've hardcoded a limit of 5 arguments.

I'll see if we can fix this somehow.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-11-26 08:32:46 UTC
Fixed.

monotouch/master: b0614f70e1d2a8eb82adf3e6ecceeb8d2dcc8948
Comment 3 Brandon Lyn 2013-11-26 08:52:09 UTC
Great, thanks.  Any idea when we'd be likely to see this change make its way to the Stable or Alpha channels?
Comment 4 Rolf Bjarne Kvinge [MSFT] 2013-11-26 08:54:22 UTC
Current guess would be about a month or so, but nothing is firm yet.
Comment 5 PJ 2013-12-11 18:45:44 UTC
This fix is planned to be released with Xamarin.iOS 7.0.6, which should hit the beta channel before December 23rd.
Comment 6 Sadik Ali 2013-12-16 05:34:08 UTC
I have verified issue, following are the verified steps:
1. Downloaded sample application.
2. Added 7 command line arguments.
3. Debug application and run on simulator.
4. All arguments values are printed on "Application Output,

Refer screenshot: http://screencast.com/t/DQXRjr0J 

Checked With:
ML 10.8.4
X.S 4.2.2 (build 2)
X.iOS  7.0.6.164