Is it possible to customize some labels in this app? Adding labels like "Den Light" "living room blinds", or Fan high, medium, low...
This sure would make the app useful to Arduino DIYers.
Bluefruit LE App - custom labels
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Bluefruit LE App - custom labels
I don't think there's a label configuration interface in the app itself, but the project files are available here: http://github.com/adafruit/Bluefruit_LE_Connect
Editing button labels in Xcode is pretty easy.
Editing button labels in Xcode is pretty easy.
- southernatheart
- Posts: 79
- Joined: Tue Mar 22, 2011 10:54 pm
Re: Bluefruit LE App - custom labels
Don't we have to have an apple developer license to edit and install the app on our iphone?
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Bluefruit LE App - custom labels
I'd have to check Apple's terms of service.. I'm registered myself, and it's easy to forget limits once they're gone.
IIRC, it's possible to load things onto a personal device without having to pay the $99 registration, you just can't distribute it anywhere.
IIRC, it's possible to load things onto a personal device without having to pay the $99 registration, you just can't distribute it anywhere.
- southernatheart
- Posts: 79
- Joined: Tue Mar 22, 2011 10:54 pm
Re: Bluefruit LE App - custom labels
I've used xcode a little, to work with AppleScript and make a form, but it looked all around the different files in your test app for a place to edit labels and couldn't find anywhere. Can you give me a idea or where to start or which file to look into to add labels. Thanks
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Bluefruit LE App - custom labels
Let's see..
The interface lives in the '.xib' files, which are stored in the 'UI' folder in the Xcode project. The ones whose names start with 'PinIOViewController' seem to be the relevant ones, and it looks like those are just starter templates that get copied and named in the code.
Our coders have good naming habits, so the code which creates the pin views will probably be in the file 'PinIOViewController.m'.. and yes, there's a function named 'initializeCells' in there.
That loops over the pins by number, creating a new cell object and assigning information to each one. This section looks like a pretty strong candidate for the field names:
which, as an aside, seems to be searching for the labels using the 'tag' attribute rather than linking directly.. that makes sense in a situation like this where we're copying the template over and over.
The item named 'pinLabel' seems like a probable candidate.. and yes, we have a match between the viewWithTag parameter of '100' and the tag of the text field that says 'Pin 1' in the .xib file.
That means this line sets the name of each cell:
You can assign arbitrary names by creating an array of NSString objects :
then using the loop index to select those:
The interface lives in the '.xib' files, which are stored in the 'UI' folder in the Xcode project. The ones whose names start with 'PinIOViewController' seem to be the relevant ones, and it looks like those are just starter templates that get copied and named in the code.
Our coders have good naming habits, so the code which creates the pin views will probably be in the file 'PinIOViewController.m'.. and yes, there's a function named 'initializeCells' in there.
That loops over the pins by number, creating a new cell object and assigning information to each one. This section looks like a pretty strong candidate for the field names:
Code: Select all
//Assign properties via tags
cell.pinLabel = (UILabel*)[cell viewWithTag:100];
cell.modeLabel = (UILabel*)[cell viewWithTag:101];
cell.valueLabel = (UILabel*)[cell viewWithTag:102];
The item named 'pinLabel' seems like a probable candidate.. and yes, we have a match between the viewWithTag parameter of '100' and the tag of the text field that says 'Pin 1' in the .xib file.
That means this line sets the name of each cell:
Code: Select all
cell.pinLabel.text = [NSString stringWithFormat:@"Pin %d", cell.digitalPin];
Code: Select all
NSArray * buttonNames = [NSArray arrayWithObjects:
@"Foo",
@"Bar",
@"Baz",
@"Quux",
nil];
Code: Select all
cell.pinLabel.text = [ buttonNames objectAtIndex: i ];
- southernatheart
- Posts: 79
- Joined: Tue Mar 22, 2011 10:54 pm
Re: Bluefruit LE App - custom labels
Code: Select all
NSArray * buttonNames = [NSArray arrayWithObjects:
@"Foo",
@"Bar",
@"Baz",
@"Quux",
nil];
Then I assume I replace the line
Code: Select all
cell.pinLabel.text = [NSString stringWithFormat:@"Pin %d", cell.digitalPin];
Code: Select all
cell.pinLabel.text = [ buttonNames objectAtIndex: i ];
- southernatheart
- Posts: 79
- Joined: Tue Mar 22, 2011 10:54 pm
Re: Bluefruit LE App - custom labels
I changed it slightly to this and it builds:
And I replaced the line
with the new line, and it builds. Now to figure out how to load this app to my iPhone! If this is possible, this will really be cool!!
Code: Select all
NSArray * buttonNames;
buttonNames= [NSArray arrayWithObjects:
@"Start",
@"Stop",
@"Fan",
@"High",
nil];
Code: Select all
cell.pinLabel.text = [NSString stringWithFormat:@"Pin %d", cell.digitalPin];
- southernatheart
- Posts: 79
- Joined: Tue Mar 22, 2011 10:54 pm
Re: Bluefruit LE App - custom labels
I am only coming up with: I have to pay $99 a year!IIRC, it's possible to load things onto a personal device without having to pay the $99 registration, you just can't distribute it anywhere.
Am I missing something somewhere? It really would be nice to be able to customize this app to suite my uses...
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Bluefruit LE App - custom labels
You'll probably need to check with Apple. Like I said earlier, I'm already registered as an Apple Developer so I don't see a lot of things that people new to the platform do.
- southernatheart
- Posts: 79
- Joined: Tue Mar 22, 2011 10:54 pm
Re: Bluefruit LE App - custom labels
It is clear that us non developers can not make our own apps for iOS, so to even slightly modify the test/example app is out of our reach. I would think that it wouldn't be too time intensive to modify the Bluefruiit LE app to give the user some ability to customize it bit, to use in their projects. I would think there would be quite a few Arduino DIYers who would vote for this option. If anyone has the ability and know how to do this we'd all appreciate it!
Thanks.
Thanks.
- southernatheart
- Posts: 79
- Joined: Tue Mar 22, 2011 10:54 pm
Re: Bluefruit LE App - custom labels
Something like this with your BLE board would give endless possibilities!
https://www.kickstarter.com/projects/16 ... ect-in-5-m
https://www.kickstarter.com/projects/16 ... ect-in-5-m
Please be positive and constructive with your questions and comments.