Skip to content
Merged

Card #720

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
daeb134
[NEW] create info/face/card #711
ckrey Jul 19, 2022
4792f5e
[FIX] image size reduction to 192x192 for card
ckrey Jul 20, 2022
05eb6d4
[FIX] image selection/scaling on iPad
ckrey Jul 20, 2022
397c0c2
[FIX] dynamic setttings panel due to new line
ckrey Jul 20, 2022
0af19df
[FIX] view background colours
ckrey Jul 20, 2022
39317c9
[NEW] experimental version create/list/delete shares/views in collabo…
ckrey Aug 2, 2022
cf09eb0
[NEW] lock all (!?) changes to configuration with by 'locked' setting…
ckrey Aug 2, 2022
7dc2129
[FIX] refresh shares list when returning from new share
ckrey Aug 4, 2022
0bd4cda
[NEW] sorted view of shares
ckrey Aug 4, 2022
23caecb
[NEW] version 16.2.0 including (automatic) translations
ckrey Aug 4, 2022
2eb7c6c
[NEW] update translations
ckrey Aug 4, 2022
8fe57aa
[NEW] 16.2.0 Changelog
ckrey Aug 4, 2022
d11f49c
[FIX] sharing UI issues
ckrey Aug 5, 2022
f5511c2
[FIX] UI responsiveness and language
ckrey Aug 5, 2022
60cd7e1
[NEW] 16.2.2 Changelog
ckrey Aug 5, 2022
39b3735
[NEW] rename Share/Sharing to Tour
ckrey Aug 7, 2022
9190673
[NEW] 16.2.3 Tours
ckrey Aug 7, 2022
0765bf0
[NEW] direct open of tours url
ckrey Aug 8, 2022
c9604de
[NEW] 16.2.4
ckrey Aug 8, 2022
e10785b
[FIX] corrupted Settings screen
ckrey Aug 8, 2022
ee42a07
[NEW] 16.2.5
ckrey Aug 8, 2022
af900b1
[FIX] mark positions triggered by "visits" correctly
ckrey Aug 22, 2022
e27c42d
[NEW] 16.3.0
ckrey Sep 8, 2022
ab745e2
[NEW] Danish Translation
ckrey Sep 8, 2022
a20712e
[NEW] tag 16.3.0
ckrey Sep 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
OwnTracks iOS App Release Notes
===================================

## OwnTracks 16.3.0 iOS/ipadOS/macOS
* Release Date 2022-09-08

** Danish (Dansk) Translation and bug fixes

[NEW] Danish Translation
[FIX] mark positions triggered by "visits" correctly

## OwnTracks 16.2.5 iOS/ipadOS/macOS
* Release Date 2022-08-08

** Sharing with non-OwnTracks users, Card editing

[NEW] lock all changes to configuration with by 'locked' setting #707
[NEW] create/list/delete tours in collaboration with ot-recorder
[NEW] Edit card info and photo

## OwnTracks 16.1.3 iOS/ipadOS/macOS
* Release Date 2022-02-17

Expand Down
123 changes: 87 additions & 36 deletions OwnTracks/OwnTracks.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file modified OwnTracks/OwnTracks/Base.lproj/Localizable.strings
Binary file not shown.
2 changes: 2 additions & 0 deletions OwnTracks/OwnTracks/Base.lproj/OwnTracks-Info-Mac.plist
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ No information of your address book will be uploaded to any server.</string>
<string>Your location is used to share and record it on a server of your choice</string>
<key>NSMotionUsageDescription</key>
<string>OwnTracks delivers your step count, floors climbed and distance walked on request</string>
<key>NSCameraUsageDescription</key>
<string>OwnTracks uses your camera on request to create a Card</string>
<key>NSUserActivityTypes</key>
<array>
<string>NSUserActivityTypeBrowsingWeb</string>
Expand Down
2 changes: 2 additions & 0 deletions OwnTracks/OwnTracks/Base.lproj/OwnTracks-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>OwnTracks uses your camera on request to create a Card</string>
<key>NSContactsUsageDescription</key>
<string>If you allow OwnTracks to access your contacts, you can link your devices to contacts.
OwnTracks will then display the contact name and image instead of the device Id.
Expand Down
550 changes: 457 additions & 93 deletions OwnTracks/OwnTracks/Base.lproj/Storyboard.storyboard

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions OwnTracks/OwnTracks/Connection.m
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,10 @@ - (UInt16)sendData:(NSData *)data
}

- (void)HTTPerror:(NSString *)message {
OwnTracksAppDelegate *delegate = (OwnTracksAppDelegate *)[UIApplication sharedApplication].delegate;

[delegate.navigationController alert:@"HTTP"
message:message];
OwnTracksAppDelegate *ad = (OwnTracksAppDelegate *)[UIApplication sharedApplication].delegate;
[ad.navigationController alert:@"HTTP"
message:message];
}

- (void)sendHTTP:(NSString *)topic data:(NSData *)data {
Expand Down
19 changes: 19 additions & 0 deletions OwnTracks/OwnTracks/CreateCardTVC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// CreateCardTVC.h
// OwnTracks
//
// Created by Christoph Krey on 18.07.22.
// Copyright © 2022 OwnTracks. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface CreateCardTVC : UITableViewController <UINavigationControllerDelegate, UIImagePickerControllerDelegate>
@property (weak, nonatomic) IBOutlet UITextField *name;
@property (weak, nonatomic) IBOutlet UIImageView *cardImage;

@end

NS_ASSUME_NONNULL_END
122 changes: 122 additions & 0 deletions OwnTracks/OwnTracks/CreateCardTVC.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
//
// CreateCardTVC.m
// OwnTracks
//
// Created by Christoph Krey on 18.07.22.
// Copyright © 2022 OwnTracks. All rights reserved.
//

#import "CreateCardTVC.h"
#import "CoreData.h"
#import "Settings.h"
#import "OwnTracksAppDelegate.h"
#import "Friend+CoreDataClass.h"

@interface CreateCardTVC ()
@property (weak, nonatomic) IBOutlet UIBarButtonItem *saveButton;

@end

@implementation CreateCardTVC

- (void)viewDidLoad {
[super viewDidLoad];

// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;

// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
NSManagedObjectContext *moc = [CoreData sharedInstance].mainMOC;
NSString *topic = [Settings theGeneralTopicInMOC:moc];
Friend *myself = [Friend existsFriendWithTopic:topic
inManagedObjectContext:moc];
if (!self.name.text || self.name.text.length == 0) {
self.name.text = myself.name ? myself.name : myself.tid;
}
if (!self.cardImage.image) {
self.cardImage.image = myself.image ? [UIImage imageWithData:myself.image] : nil;
}
}

#pragma UIImagePickerControllerDelegate

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
NSLog(@"imagePickerController imagePickerControllerDidCancel");
[picker dismissViewControllerAnimated:TRUE
completion:^{
//
}];
}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<UIImagePickerControllerInfoKey,id> *)info {
NSLog(@"imagePickerController didFinishPickingMediaWithInfo %@", info);
UIImage *editedImage = info[@"UIImagePickerControllerEditedImage"];

NSLog(@"editedImage %f, %f, %f",
editedImage.size.width,
editedImage.size.height,
editedImage.scale);

CGFloat scale = 192.0 / MIN(editedImage.size.width, editedImage.size.height);
CGSize size = CGSizeApplyAffineTransform(editedImage.size,
CGAffineTransformMakeScale(scale, scale));

UIGraphicsBeginImageContextWithOptions(CGSizeMake(192.0, 192.0), FALSE, 1.0);
[editedImage drawInRect:CGRectMake((192.0 - size.width) / 2,
(192.0 - size.height) / 2,
size.width, size.height)
];
UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

self.cardImage.image = scaledImage;

NSLog(@"cardImage %f, %f, %f",
self.cardImage.image.size.width,
self.cardImage.image.size.height,
self.cardImage.image.scale);

[picker dismissViewControllerAnimated:TRUE
completion:^{
//
}];

}
- (IBAction)takePhotoPressed:(UIButton *)sender {
NSLog(@"imagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera %d", [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]);
NSLog(@"imagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera %@", [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera]);

UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePickerController.mediaTypes = @[@"public.image"];
imagePickerController.allowsEditing = TRUE;
imagePickerController.delegate = self;
[self presentViewController:imagePickerController
animated:TRUE
completion:^{
//
}];
}

- (IBAction)selectPressed:(UIButton *)sender {
NSLog(@"imagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary %d", [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]);
NSLog(@"imagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary %@", [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary]);

UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePickerController.mediaTypes = @[@"public.image"];
imagePickerController.allowsEditing = TRUE;
imagePickerController.delegate = self;
[self presentViewController:imagePickerController
animated:TRUE
completion:^{
//
}];
}

@end
20 changes: 20 additions & 0 deletions OwnTracks/OwnTracks/CreateTourTVC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// CreateTourTVC.h
// OwnTracks
//
// Created by Christoph Krey on 18.07.22.
// Copyright © 2022 OwnTracks. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface CreateTourTVC : UITableViewController <UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UITextField *label;
@property (weak, nonatomic) IBOutlet UIDatePicker *from;
@property (weak, nonatomic) IBOutlet UIDatePicker *to;

@end

NS_ASSUME_NONNULL_END
49 changes: 49 additions & 0 deletions OwnTracks/OwnTracks/CreateTourTVC.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// CreateTourTVC.m
// OwnTracks
//
// Created by Christoph Krey on 18.07.22.
// Copyright © 2022 OwnTracks. All rights reserved.
//

#import "CreateTourTVC.h"
#import "Tours.h"

@interface CreateTourTVC ()
@property (weak, nonatomic) IBOutlet UIBarButtonItem *saveButton;

@end

@implementation CreateTourTVC

- (void)viewDidLoad {
[super viewDidLoad];

// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;

// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
self.from.date = [NSDate now];
self.to.date = [self.from.date dateByAddingTimeInterval:3600.0];
self.saveButton.enabled = FALSE;
self.label.delegate = self;
}

- (IBAction)labelChanged:(UITextField *)sender {
if (self.label.text.length > 0) {
self.saveButton.enabled = TRUE;
} else {
self.saveButton.enabled = FALSE;
}
}

- (IBAction)tappedOutsideText:(UITapGestureRecognizer *)sender {
[self.label resignFirstResponder];
}

@end
10 changes: 5 additions & 5 deletions OwnTracks/OwnTracks/FeaturedContentVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ @implementation FeaturedContentVC

- (void)viewDidLoad {
[super viewDidLoad];
OwnTracksAppDelegate *delegate = (OwnTracksAppDelegate *)[UIApplication sharedApplication].delegate;
[delegate addObserver:self
forKeyPath:@"action"
options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew
context:nil];
OwnTracksAppDelegate *ad = (OwnTracksAppDelegate *)[UIApplication sharedApplication].delegate;
[ad addObserver:self
forKeyPath:@"action"
options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew
context:nil];
self.UIhtml.UIDelegate = self;
self.UIhtml.navigationDelegate = self;
}
Expand Down
Loading