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

Commit 109ffaf

Browse files
author
Yue-Hsun Lin
committed
changes reflects for first use
1 parent 62a8c82 commit 109ffaf

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

safeslingerdemo/safeslingerdemo/DemoViewController.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ -(IBAction)BegineExchange:(id)sender
123123
{
124124
proto = [[safeslingerexchange alloc]init];
125125
// use default client version
126-
if([proto SetupExchange: self ServerHost:hostField.text VersionNumber: nil])
126+
if([proto SetupExchange: self ServerHost:hostField.text VersionNumber: nil FirstUse:![[NSUserDefaults standardUserDefaults] boolForKey:@"FIRST_USE"]])
127127
{
128128
[proto BeginExchange: [secretData.text dataUsingEncoding:NSUTF8StringEncoding]];
129129
// save parameters
@@ -161,6 +161,9 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField
161161
#pragma SafeSlingerDelegate Methods
162162
- (void)EndExchange:(int)status_code ErrorString:(NSString*)error_str ExchangeSet: (NSArray*)exchange_set
163163
{
164+
if(![[NSUserDefaults standardUserDefaults] boolForKey:@"FIRST_USE"])
165+
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"FIRST_USE"];
166+
164167
[self.navigationController popToRootViewControllerAnimated:YES];
165168
switch(status_code)
166169
{

safeslingerdemo/safeslingerdemo/safeslingerdemo-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
<key>CFBundlePackageType</key>
2222
<string>APPL</string>
2323
<key>CFBundleShortVersionString</key>
24-
<string>1.0.1</string>
24+
<string>1.0.2</string>
2525
<key>CFBundleSignature</key>
2626
<string>????</string>
2727
<key>CFBundleVersion</key>
28-
<string>1.0.1.1</string>
28+
<string>1.0.2.1</string>
2929
<key>LSRequiresIPhoneOS</key>
3030
<true/>
3131
<key>UIMainStoryboardFile</key>

0 commit comments

Comments
 (0)