Skip to content

Keystone PoC #24407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 6 additions & 8 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
swiftlint_version: 0.58.2

excluded:
- BuildTools/.build
- DerivedData
- Modules/.build
- Scripts
- WordPress/DerivedData
- fastlane
- vendor
included:
- Sources
- Tests
- Modules/Sources
- Modules/Tests
- WordPress

# Rules – Opt-in only, so we can progressively introduce new ones
#
Expand Down
16 changes: 8 additions & 8 deletions Scripts/BuildPhases/GenerateCredentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ ensure_is_in_input_files_list $EXAMPLE_SECRETS_FILE
SECRETS_DESTINATION_FILE="${BUILD_DIR}/Secrets/Secrets.swift"
mkdir -p $(dirname "$SECRETS_DESTINATION_FILE")

# If the WordPress Production Secrets are available for WordPress, use them
if [ -f "$WORDPRESS_SECRETS_FILE" ] && [ "${TARGET_NAME}" == "WordPress" ]; then
echo "Applying Production Secrets"
cp -v "$WORDPRESS_SECRETS_FILE" "${SECRETS_DESTINATION_FILE}"
exit 0
fi
# # If the WordPress Production Secrets are available for WordPress, use them
# if [ -f "$WORDPRESS_SECRETS_FILE" ] && [ "${TARGET_NAME}" == "WordPress" ]; then
# echo "Applying Production Secrets"
# cp -v "$WORDPRESS_SECRETS_FILE" "${SECRETS_DESTINATION_FILE}"
# exit 0
# fi

# If the Jetpack Secrets are available (and if we're building Jetpack) use them
if [ -f "$JETPACK_SECRETS_FILE" ] && [ "${TARGET_NAME}" == "Jetpack" ]; then
# if [ -f "$JETPACK_SECRETS_FILE" ] && [ "${TARGET_NAME}" == "Jetpack" ]; then
echo "Applying Jetpack Secrets"
cp -v "$JETPACK_SECRETS_FILE" "${SECRETS_DESTINATION_FILE}"
exit 0
fi
# fi

EXTERNAL_CONTRIBUTOR_RELEASE_MSG="External contributors should not need to perform a Release build"

Expand Down
82 changes: 0 additions & 82 deletions Sources/Keystone/Keystone.h

This file was deleted.

82 changes: 82 additions & 0 deletions Sources/Keystone/WordPress.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#import <Foundation/Foundation.h>

//! Project version number for WordPress.
FOUNDATION_EXPORT double WordPressVersionNumber;

//! Project version string for WordPress.
FOUNDATION_EXPORT const unsigned char WordPressVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <WordPress/PublicHeader.h>

#import <WordPress/ActivityLogViewController.h>
#import <WordPress/AccountService.h>

#import <WordPress/Blog.h>
#import <WordPress/BlogService.h>
#import <WordPress/BlogSyncFacade.h>
#import <WordPress/BlogDetailsViewController.h>

#import <WordPress/CommentService.h>
#import <WordPress/CommentsViewController.h>
#import <WordPress/Constants.h>

#import <WordPress/LocalCoreDataService.h>

#import <WordPress/Media.h>
#import <WordPress/MediaService.h>
#import <WordPress/MenuItem.h>
#import <WordPress/MenuItemsViewController.h>
#import <WordPress/MenusService.h>
#import <WordPress/MenusViewController.h>
#import <WordPress/Media+Extensions.h>

#import <WordPress/NSObject+Helpers.h>

#import <WordPress/PageSettingsViewController.h>
#import <WordPress/PostContentProvider.h>
#import <WordPress/PostCategory.h>
#import <WordPress/PostCategoryService.h>
#import <WordPress/PostContentProvider.h>
#import <WordPress/PostHelper.h>
#import <WordPress/PostMetaButton.h>
#import <WordPress/PostService.h>
#import <WordPress/PostServiceOptions.h>
#import <WordPress/PostSettingsViewController.h>
#import <WordPress/PostTag.h>
#import <WordPress/PostTagService.h>

#import <WordPress/ReaderGapMarker.h>
#import <WordPress/ReaderPost.h>
#import <WordPress/ReaderPostService.h>
#import <WordPress/ReaderSiteService.h>
#import <WordPress/ReaderSiteService_Internal.h>
#import <WordPress/ReaderTopicService.h>

#import <WordPress/SettingsSelectionViewController.h>
#import <WordPress/SettingsMultiTextViewController.h>
#import <WordPress/SettingTableViewCell.h>
#import <WordPress/SettingsTextViewController.h>
#import <WordPress/SharingViewController.h>
#import <WordPress/SiteSettingsViewController.h>
#import <WordPress/SourcePostAttribution.h>
#import <WordPress/StatsViewController.h>
#import <WordPress/SuggestionsTableView.h>
#import <WordPress/SuggestionsTableViewCell.h>

#import <WordPress/Theme.h>
#import <WordPress/ThemeService.h>

#import <WordPress/UIAlertControllerProxy.h>
#import <WordPress/UIApplication+Helpers.h>
#import <WordPress/UIView+Subviews.h>

#import <WordPress/WPAccount.h>
#import <WordPress/WPActivityDefaults.h>
#import <WordPress/WPAppAnalytics.h>
#import <WordPress/WPUploadStatusButton.h>
#import <WordPress/WPError.h>
#import <WordPress/WPTableViewHandler.h>
#import <WordPress/WPTabBarController.h>
#import <WordPress/WPLogger.h>

FOUNDATION_EXTERN void SetCocoaLumberjackObjCLogLevel(NSUInteger ddLogLevelRawValue);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you decide to rename Keystone to WordPress?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a temporary change to avoid changing IB files and Core Data schemas.

3 changes: 2 additions & 1 deletion WordPress/Classes/System/main.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Foundation
import UIKit
import WordPress

let isRunningTests = NSClassFromString("XCTestCase") != nil
let appDelegateClass = isRunningTests ? "TestingAppDelegate" : NSStringFromClass(WordPressAppDelegate.self)
let appDelegateClass = isRunningTests ? "TestingAppDelegate" : NSStringFromClass(WordPress.WordPressAppDelegate.self)

UIApplicationMain(
CommandLine.argc,
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/Utility/Analytics/WPAppAnalytics.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (void)initializeAppTracking
- (void)registerTrackers
{
[WPAnalytics registerTracker:[WPAnalyticsTrackerWPCom new]];
[WPAnalytics registerTracker:[AnalyticsTrackerAutomatticTracks new]];
// [WPAnalytics registerTracker:[AnalyticsTrackerAutomatticTracks new]];
}

- (void)clearTrackers
Expand Down
4 changes: 3 additions & 1 deletion WordPress/Classes/Utility/ViewLoading/NibLoadable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public extension NibLoadable {
}

static var defaultBundle: Bundle {
return Bundle.main
return Bundle(for: BundleToken.self)
}

static var defaultNib: UINib {
Expand All @@ -37,3 +37,5 @@ public extension NibLoadable {
return result
}
}

private final class BundleToken {}
2 changes: 1 addition & 1 deletion WordPress/Classes/ViewRelated/System/WPTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ - (UINavigationController *)notificationsNavigationController
if (self.shouldUseStaticScreens) {
rootViewController = [[MovedToJetpackViewController alloc] initWithSource:MovedToJetpackSourceNotifications];
} else {
UIStoryboard *notificationsStoryboard = [UIStoryboard storyboardWithName:@"Notifications" bundle:nil];
UIStoryboard *notificationsStoryboard = [UIStoryboard storyboardWithName:@"Notifications" bundle:[NSBundle bundleForClass:[WPTabBarController class]]];
self.notificationsViewController = [notificationsStoryboard instantiateInitialViewController];
rootViewController = self.notificationsViewController;
}
Expand Down
Loading