Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

Commit

Permalink
changes reflects for first use
Browse files Browse the repository at this point in the history
  • Loading branch information
Yue-Hsun Lin committed Feb 1, 2015
1 parent 62a8c82 commit 109ffaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion safeslingerdemo/safeslingerdemo/DemoViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ -(IBAction)BegineExchange:(id)sender
{
proto = [[safeslingerexchange alloc]init];
// use default client version
if([proto SetupExchange: self ServerHost:hostField.text VersionNumber: nil])
if([proto SetupExchange: self ServerHost:hostField.text VersionNumber: nil FirstUse:![[NSUserDefaults standardUserDefaults] boolForKey:@"FIRST_USE"]])
{
[proto BeginExchange: [secretData.text dataUsingEncoding:NSUTF8StringEncoding]];
// save parameters
Expand Down Expand Up @@ -161,6 +161,9 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField
#pragma SafeSlingerDelegate Methods
- (void)EndExchange:(int)status_code ErrorString:(NSString*)error_str ExchangeSet: (NSArray*)exchange_set
{
if(![[NSUserDefaults standardUserDefaults] boolForKey:@"FIRST_USE"])
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"FIRST_USE"];

[self.navigationController popToRootViewControllerAnimated:YES];
switch(status_code)
{
Expand Down
4 changes: 2 additions & 2 deletions safeslingerdemo/safeslingerdemo/safeslingerdemo-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<string>1.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.1.1</string>
<string>1.0.2.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
Expand Down

0 comments on commit 109ffaf

Please sign in to comment.