-
Notifications
You must be signed in to change notification settings - Fork 1
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
Initial Draft of Dynamic Framework Target #2
Initial Draft of Dynamic Framework Target #2
Conversation
@khawkins Just getting the ball rolling here. I probably need some sort of template for the header comments in the framework header. |
CordovaLib/CordovaLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata should not be checked in—those are local development files. CordovaLib/CordovaLib.xcodeproj/project.xcworkspace/ should probably be added to .gitignore. |
Oops, I got used to having a .gitignore setup. |
//! Project version string for Cordova. | ||
FOUNDATION_EXPORT const unsigned char CordovaVersionString[]; | ||
|
||
// In this header, you should import all the public headers of your framework using statements like #import <Cordova/PublicHeader.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the public headers should be represented in the umbrella header, a la:
#import <Cordova/CDVViewController.h
And so on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I swore that was automated by adding them to public. I guess not. Will do.
.gitignore
Outdated
@@ -224,3 +224,4 @@ node_modules/color-support/ | |||
node_modules/fs.realpath/ | |||
node_modules/jasmine-core/ | |||
node_modules/jasmine/ | |||
CordovaLib/CordovaLib.xcodeproj/project.xcworkspace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that CordovaLib has its own .gitignore, let's just add this in there—there aren't any other CordovaLib entries in this file.
OTHER_LDFLAGS = "-all_load"; | ||
PRODUCT_BUNDLE_IDENTIFIER = com.salesforce.Cordova; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
PUBLIC_HEADERS_FOLDER_PATH = Cordova.framework/PublicHeaders; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we go with the standard value for framework targets here? I.e. $(CONTENTS_FOLDER_PATH)/Headers
.
OTHER_LDFLAGS = "-all_load"; | ||
PRODUCT_BUNDLE_IDENTIFIER = com.salesforce.Cordova; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
PUBLIC_HEADERS_FOLDER_PATH = Cordova.framework/PublicHeaders; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$(CONTENTS_FOLDER_PATH)/Headers
here too.
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
INFOPLIST_FILE = Cordova/Info.plist; | ||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; | ||
IPHONEOS_DEPLOYMENT_TARGET = 10.2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd roll this back to 8.0, as the current min versions of iOS support in CordovaLib are already less than that.
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
INFOPLIST_FILE = Cordova/Info.plist; | ||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; | ||
IPHONEOS_DEPLOYMENT_TARGET = 10.2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Roll back to 8.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. Roll back to 8.0
.
MTL_ENABLE_DEBUG_INFO = NO; | ||
ONLY_ACTIVE_ARCH = NO; | ||
OTHER_LDFLAGS = "-all_load"; | ||
PRODUCT_BUNDLE_IDENTIFIER = com.salesforce.Cordova; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd make this com.apache.cordova.Cordova.
MTL_ENABLE_DEBUG_INFO = YES; | ||
ONLY_ACTIVE_ARCH = NO; | ||
OTHER_LDFLAGS = "-all_load"; | ||
PRODUCT_BUNDLE_IDENTIFIER = com.salesforce.Cordova; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd make this com.apache.cordova.Cordova.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 here as well.
So the other body of work that we're going to need to do to make this reasonably production ready as a first class sibling to the CordovaLib library, is to integrate it into the testing environment. The tests run through the npm local package ( My thought is to add a new app and test target that links the framework instead of the static lib, but shares the same test files as the test target for the static lib. Thoughts? |
Lets discuss in the work item. My thoughts were we would probably want to
add a sample app and integrate into tests. I was going to pick your brain
on their test architecture. From what I can tell best practices for sample
apps to demonstrate dynamic frameworks is to implement them in Swift.
…On Thu, Jan 26, 2017 at 5:25 PM, Kevin Hawkins ***@***.***> wrote:
So the other body of work that we're going to need to do to make this
reasonably production ready as a first class sibling to the CordovaLib
library, is to integrate it into the testing environment. The tests run
through the npm local package (npm install, npm test), and ultimately end
up executing (among other things) tests from the
tests/cordova-ios.xcworkspace workspace, which currently links a Cordova
testing app and test suite to the CordovaLib static library.
My thought is to add a new app and test target that links the framework
instead of the static lib, but shares the same test files as the test
target for the static lib. Thoughts?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APNSeEQUmKqsqkH3KyBX90WMR5rNXWQ8ks5rWStigaJpZM4LvF9k>
.
|
CordovaLib/Cordova/Cordova.h
Outdated
@@ -0,0 +1,19 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add the standard Apache
license/copyright to every new file you're creating. That seems to be the Cordova
way.
Here you go:
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
INFOPLIST_FILE = Cordova/Info.plist; | ||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; | ||
IPHONEOS_DEPLOYMENT_TARGET = 10.2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. Roll back to 8.0
.
MTL_ENABLE_DEBUG_INFO = YES; | ||
ONLY_ACTIVE_ARCH = NO; | ||
OTHER_LDFLAGS = "-all_load"; | ||
PRODUCT_BUNDLE_IDENTIFIER = com.salesforce.Cordova; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 here as well.
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
INFOPLIST_FILE = Cordova/Info.plist; | ||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; | ||
IPHONEOS_DEPLOYMENT_TARGET = 10.2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8.0
.
OTHER_LDFLAGS = "-all_load"; | ||
PRODUCT_BUNDLE_IDENTIFIER = com.salesforce.Cordova; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
PUBLIC_HEADERS_FOLDER_PATH = Cordova.framework/PublicHeaders; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like @khawkins said, can we go with the standard value for framework targets here? I.e. $(CONTENTS_FOLDER_PATH)/Headers
- Removed .gitignore changes - Added standard header comment - Rolled iOS target back to 8.0 - Used standard header path - Added all public headers to Cordova.h
@khawkins @bhariharan - Pushed requested changes |
CordovaLib/Cordova/Cordova.h
Outdated
|
||
// In this header, you should import all the public headers of your framework using statements like #import <Cordova/PublicHeader.h> | ||
|
||
#import "CDVAvailability.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be in the same format as expected direct access from a framework consumer. E.g. #import <Cordova/CDVAvailability.h>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to Kevin's comment. Looks good otherwise.
Headers updated. @khawkins @bhariharan I think a sample app should be part of a different PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good over all. We can look at the test infrastructure in the next PR.
Platforms affected
iOS / iOS Simulator
What does this PR do?
Add's a Dynamic Framework Target for building Cordova
What testing has been done on this change?
Tested dynamic framework in application