Skip to content

Commit 503233c

Browse files
author
SpiralArm Consulting Ltd
committed
app updated ready for app store submission
1 parent f8b4d42 commit 503233c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+295
-300
lines changed

Diff for: README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,28 @@ My plan is to:
1212
- *1.2* Modify the watch app functionally into WatchTips
1313
- *1.3* Update the Flutter app to WatchTips
1414
- *1.4* See if I can bridge between the 2 app (as the Titanium version does)
15-
- **1.5 Tidy up both the Flutter code and the iOS project and use it to submit the app into the App Store**
15+
- *2.0* Tidy up both the Flutter code and the iOS project and use it to submit the app into the App Store
16+
17+
18+
## Generating a Distro build
19+
The only way, so far, I have found of creating a distro build is following this seqence.
20+
21+
### Set the Bundle ID
22+
BEFORE adding the Watchit app target set the final bundle ID, as the Watch app need to use the same prefix. If not you may need to update all references BEFORE creating the final Archive.
23+
24+
### Change ALL the Version and Build values
25+
This MUST for each target (in this case 3) to **$(FLUTTER_BUILD_NAME)** and **$(FLUTTER_BUILD_NUMBER)** respectively, otherwise although the test runs work, the Archive will not unless the version numbers match.
26+
27+
### Run the Flutter build first
28+
This will fail, but it generates the *correct shell scripts* to enable iOS to carry out the build (*flutter build ios --release*).
29+
30+
### Create Archive in XCode
31+
- 1 Select Generic Device + watchOS Device as the destination
32+
- 2 Run Product -> Archive
33+
- 3 If build successful , run the Validate App
34+
- 4 If validate successful - upload to App Store!!!
35+
36+
1637

1738
## Versions
1839

Diff for: ios/Runner.xcodeproj/project.pbxproj

+12-9
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,9 @@
533533
"$(inherited)",
534534
"$(PROJECT_DIR)/Flutter",
535535
);
536-
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips;
536+
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator;
537537
PRODUCT_NAME = "$(TARGET_NAME)";
538+
TARGETED_DEVICE_FAMILY = 1;
538539
VERSIONING_SYSTEM = "apple-generic";
539540
};
540541
name = Profile;
@@ -557,7 +558,7 @@
557558
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
558559
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
559560
MTL_FAST_MATH = YES;
560-
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp.watchkitextension;
561+
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp.watchkitextension;
561562
PRODUCT_NAME = "${TARGET_NAME}";
562563
SDKROOT = watchos;
563564
SKIP_INSTALL = YES;
@@ -586,7 +587,7 @@
586587
INFOPLIST_FILE = "WatchTips Extension/Info.plist";
587588
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
588589
MTL_FAST_MATH = YES;
589-
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp.watchkitextension;
590+
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp.watchkitextension;
590591
PRODUCT_NAME = "${TARGET_NAME}";
591592
SDKROOT = watchos;
592593
SKIP_INSTALL = YES;
@@ -614,7 +615,7 @@
614615
INFOPLIST_FILE = "WatchTips Extension/Info.plist";
615616
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
616617
MTL_FAST_MATH = YES;
617-
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp.watchkitextension;
618+
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp.watchkitextension;
618619
PRODUCT_NAME = "${TARGET_NAME}";
619620
SDKROOT = watchos;
620621
SKIP_INSTALL = YES;
@@ -644,7 +645,7 @@
644645
INFOPLIST_FILE = WatchTips/Info.plist;
645646
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
646647
MTL_FAST_MATH = YES;
647-
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp;
648+
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp;
648649
PRODUCT_NAME = "$(TARGET_NAME)";
649650
SDKROOT = watchos;
650651
SKIP_INSTALL = YES;
@@ -674,7 +675,7 @@
674675
IBSC_MODULE = WatchTips_Extension;
675676
INFOPLIST_FILE = WatchTips/Info.plist;
676677
MTL_FAST_MATH = YES;
677-
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp;
678+
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp;
678679
PRODUCT_NAME = "$(TARGET_NAME)";
679680
SDKROOT = watchos;
680681
SKIP_INSTALL = YES;
@@ -703,7 +704,7 @@
703704
IBSC_MODULE = WatchTips_Extension;
704705
INFOPLIST_FILE = WatchTips/Info.plist;
705706
MTL_FAST_MATH = YES;
706-
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp;
707+
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp;
707708
PRODUCT_NAME = "$(TARGET_NAME)";
708709
SDKROOT = watchos;
709710
SKIP_INSTALL = YES;
@@ -834,8 +835,9 @@
834835
"$(inherited)",
835836
"$(PROJECT_DIR)/Flutter",
836837
);
837-
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips;
838+
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator;
838839
PRODUCT_NAME = "$(TARGET_NAME)";
840+
TARGETED_DEVICE_FAMILY = 1;
839841
VERSIONING_SYSTEM = "apple-generic";
840842
};
841843
name = Debug;
@@ -858,8 +860,9 @@
858860
"$(inherited)",
859861
"$(PROJECT_DIR)/Flutter",
860862
);
861-
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips;
863+
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator;
862864
PRODUCT_NAME = "$(TARGET_NAME)";
865+
TARGETED_DEVICE_FAMILY = 1;
863866
VERSIONING_SYSTEM = "apple-generic";
864867
};
865868
name = Release;

Diff for: ios/Runner/AppDelegate.m

+6-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ @implementation WTUserInfoHandler
88
NSDictionary *info;
99

1010
- (void) updateUserInfo:(nonnull NSDictionary<NSString *, id> *)userInfo{
11-
NSLog(@"Update Recieved");
11+
//NSLog(@"Update Recieved");
1212
if(info != userInfo){
1313
info = userInfo;
1414
if(sink!=nil){
@@ -18,13 +18,13 @@ - (void) updateUserInfo:(nonnull NSDictionary<NSString *, id> *)userInfo{
1818
}
1919

2020
- (FlutterError*)onListenWithArguments:(id)arguments eventSink:(FlutterEventSink)eventSink {
21-
NSLog(@"Adding Flutter Listener");
21+
//NSLog(@"Adding Flutter Listener");
2222
sink = eventSink;
2323
return nil;
2424
}
2525

2626
- (FlutterError*)onCancelWithArguments:(id)arguments {
27-
NSLog(@"Removing Flutter Listener");
27+
//NSLog(@"Removing Flutter Listener");
2828
if(sink!=nil){
2929
sink = nil;
3030
}
@@ -36,8 +36,6 @@ - (FlutterError*)onCancelWithArguments:(id)arguments {
3636

3737
@implementation AppDelegate
3838

39-
#pragma mark watch session delegates
40-
4139
// Event triggered when userInfo Rxd
4240
- (void)session:(nonnull WCSession *)session didReceiveUserInfo:(nonnull NSDictionary<NSString *, id> *)userInfo
4341
{
@@ -46,11 +44,6 @@ - (void)session:(nonnull WCSession *)session didReceiveUserInfo:(nonnull NSDicti
4644
}
4745
}
4846

49-
50-
51-
52-
#pragma mark watch session methods
53-
5447
// Method used to enable the Watch session
5548
- (void)activateSession
5649
{
@@ -60,7 +53,6 @@ - (void)activateSession
6053

6154
// create our eventChannel
6255
-(FlutterEventChannel *) activateChannel {
63-
NSLog(@"activateChannel");
6456
userInfoStreamHandler = [[WTUserInfoHandler alloc] init];
6557
FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController;
6658
FlutterEventChannel *eventChannel = [FlutterEventChannel eventChannelWithName:@"uk.spiralarm.watchtips/tipinfo/watchdata" binaryMessenger:controller];
@@ -83,6 +75,7 @@ - (WCSession *)watchSession
8375
}
8476
return watchSession;
8577
}
78+
8679
- (void)dealloc
8780
{
8881
if (watchSession != nil) {
@@ -105,6 +98,8 @@ - (BOOL)application:(UIApplication *)application
10598
if([@"activateSession" isEqualToString:call.method]){
10699
[self activateSession];
107100
result(@"WatchTips Activated");
101+
}else {
102+
result(FlutterMethodNotImplemented);;
108103
}
109104

110105
}];

0 commit comments

Comments
 (0)