Skip to content

Commit

Permalink
app updated ready for app store submission
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiralArm Consulting Ltd committed Jan 29, 2019
1 parent f8b4d42 commit 503233c
Show file tree
Hide file tree
Showing 54 changed files with 295 additions and 300 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,28 @@ My plan is to:
- *1.2* Modify the watch app functionally into WatchTips
- *1.3* Update the Flutter app to WatchTips
- *1.4* See if I can bridge between the 2 app (as the Titanium version does)
- **1.5 Tidy up both the Flutter code and the iOS project and use it to submit the app into the App Store**
- *2.0* Tidy up both the Flutter code and the iOS project and use it to submit the app into the App Store


## Generating a Distro build
The only way, so far, I have found of creating a distro build is following this seqence.

### Set the Bundle ID
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.

### Change ALL the Version and Build values
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.

### Run the Flutter build first
This will fail, but it generates the *correct shell scripts* to enable iOS to carry out the build (*flutter build ios --release*).

### Create Archive in XCode
- 1 Select Generic Device + watchOS Device as the destination
- 2 Run Product -> Archive
- 3 If build successful , run the Validate App
- 4 If validate successful - upload to App Store!!!



## Versions

Expand Down
21 changes: 12 additions & 9 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,9 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
Expand All @@ -557,7 +558,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -586,7 +587,7 @@
INFOPLIST_FILE = "WatchTips Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -614,7 +615,7 @@
INFOPLIST_FILE = "WatchTips Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -644,7 +645,7 @@
INFOPLIST_FILE = WatchTips/Info.plist;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -674,7 +675,7 @@
IBSC_MODULE = WatchTips_Extension;
INFOPLIST_FILE = WatchTips/Info.plist;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -703,7 +704,7 @@
IBSC_MODULE = WatchTips_Extension;
INFOPLIST_FILE = WatchTips/Info.plist;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -834,8 +835,9 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -858,8 +860,9 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.watchtips;
PRODUCT_BUNDLE_IDENTIFIER = uk.spiralarm.tipcalculator;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand Down
17 changes: 6 additions & 11 deletions ios/Runner/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ @implementation WTUserInfoHandler
NSDictionary *info;

- (void) updateUserInfo:(nonnull NSDictionary<NSString *, id> *)userInfo{
NSLog(@"Update Recieved");
//NSLog(@"Update Recieved");
if(info != userInfo){
info = userInfo;
if(sink!=nil){
Expand All @@ -18,13 +18,13 @@ - (void) updateUserInfo:(nonnull NSDictionary<NSString *, id> *)userInfo{
}

- (FlutterError*)onListenWithArguments:(id)arguments eventSink:(FlutterEventSink)eventSink {
NSLog(@"Adding Flutter Listener");
//NSLog(@"Adding Flutter Listener");
sink = eventSink;
return nil;
}

- (FlutterError*)onCancelWithArguments:(id)arguments {
NSLog(@"Removing Flutter Listener");
//NSLog(@"Removing Flutter Listener");
if(sink!=nil){
sink = nil;
}
Expand All @@ -36,8 +36,6 @@ - (FlutterError*)onCancelWithArguments:(id)arguments {

@implementation AppDelegate

#pragma mark watch session delegates

// Event triggered when userInfo Rxd
- (void)session:(nonnull WCSession *)session didReceiveUserInfo:(nonnull NSDictionary<NSString *, id> *)userInfo
{
Expand All @@ -46,11 +44,6 @@ - (void)session:(nonnull WCSession *)session didReceiveUserInfo:(nonnull NSDicti
}
}




#pragma mark watch session methods

// Method used to enable the Watch session
- (void)activateSession
{
Expand All @@ -60,7 +53,6 @@ - (void)activateSession

// create our eventChannel
-(FlutterEventChannel *) activateChannel {
NSLog(@"activateChannel");
userInfoStreamHandler = [[WTUserInfoHandler alloc] init];
FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController;
FlutterEventChannel *eventChannel = [FlutterEventChannel eventChannelWithName:@"uk.spiralarm.watchtips/tipinfo/watchdata" binaryMessenger:controller];
Expand All @@ -83,6 +75,7 @@ - (WCSession *)watchSession
}
return watchSession;
}

- (void)dealloc
{
if (watchSession != nil) {
Expand All @@ -105,6 +98,8 @@ - (BOOL)application:(UIApplication *)application
if([@"activateSession" isEqualToString:call.method]){
[self activateSession];
result(@"WatchTips Activated");
}else {
result(FlutterMethodNotImplemented);;
}

}];
Expand Down
Loading

0 comments on commit 503233c

Please sign in to comment.