Skip to content
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

iOS SDK with CocoaPods #972

Closed
wants to merge 2 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
30 changes: 11 additions & 19 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ xmlns:android="http://schemas.android.com/apk/res/android">

<license>MIT</license>

<dependency id="cordova-plugin-cocoapod-support" version="1.6.0" />

<engines>
<engine name="cordova" version=">=3.2.0" />
</engines>
Expand Down Expand Up @@ -63,6 +65,8 @@ xmlns:android="http://schemas.android.com/apk/res/android">
</platform>

<platform name="ios">
<pods-config ios-min-version="8.0" use-frameworks="true"/>

<hook type="after_plugin_install" src="scripts/ios/after_plugin_install.js" />
<hook type="before_plugin_uninstall" src="scripts/ios/before_plugin_uninstall.js" />

Expand All @@ -89,26 +93,14 @@ xmlns:android="http://schemas.android.com/apk/res/android">
<header-file src="src/ios/FirebasePlugin.h" />
<source-file src="src/ios/FirebasePlugin.m" />

<header-file src="src/ios/Firebase/Firebase.h" />

<framework custom="true" src="src/ios/Crashlytics/Crashlytics.framework" />
<framework custom="true" src="src/ios/Crashlytics/Fabric.framework" />
<framework custom="true" src="src/ios/Firebase/Analytics/GoogleAppMeasurement.framework" />
<framework custom="true" src="src/ios/Firebase/Analytics/MeasurementNanoPB.framework" />
<framework custom="true" src="src/ios/Firebase/Analytics/FirebaseCore.framework" />
<framework custom="true" src="src/ios/Firebase/Analytics/FirebaseAnalytics.framework" />
<framework custom="true" src="src/ios/Firebase/Analytics/GoogleUtilities.framework" />
<framework custom="true" src="src/ios/Firebase/Analytics/nanopb.framework" />
<framework custom="true" src="src/ios/Firebase/Analytics/FirebaseInstanceID.framework" />
<framework custom="true" src="src/ios/Firebase/Analytics/FirebaseCoreDiagnostics.framework" />
<framework custom="true" src="src/ios/Firebase/Auth/GTMSessionFetcher.framework" />
<framework custom="true" src="src/ios/Firebase/Auth/FirebaseAuth.framework" />
<framework custom="true" src="src/ios/Firebase/Messaging/FirebaseMessaging.framework" />
<framework custom="true" src="src/ios/Firebase/Performance/GoogleToolboxForMac.framework" />
<framework custom="true" src="src/ios/Firebase/Performance/FirebasePerformance.framework" />
<framework custom="true" src="src/ios/Firebase/RemoteConfig/Protobuf.framework" />
<framework custom="true" src="src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework" />
<framework custom="true" src="src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework" />
<framework src="Firebase/Core" type="podspec" spec="5.14.0"/>
<framework src="Firebase/Auth" type="podspec" spec="5.14.0"/>
<framework src="Firebase/Messaging" type="podspec" spec="5.14.0"/>
<framework src="Firebase/Performance" type="podspec" spec="5.14.0"/>
<framework src="Firebase/RemoteConfig" type="podspec" spec="5.14.0"/>
<framework src="Fabric" type="podspec" spec="1.9.0"/>
<framework src="Crashlytics" type="podspec" spec="3.12.0"/>
</platform>

<platform name="browser">
Expand Down
11 changes: 6 additions & 5 deletions scripts/ios/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {
xcodeProject.parseSync();

// Build the body of the script to be executed during the build phase.
var script = '"' + '\\"${SRCROOT}\\"' + "/\\\"" + utilities.getAppName(context) + "\\\"/Plugins/" + utilities.getPluginId() + "/Fabric.framework/run" + '"';
var script = '"' + '\\"${PODS_ROOT}/Fabric/run\\"' + '"';

// Generate a unique ID for our new build phase.
var id = xcodeProject.generateUuid();
Expand All @@ -47,7 +47,7 @@ module.exports = {
isa: "PBXShellScriptBuildPhase",
buildActionMask: 2147483647,
files: [],
inputPaths: [],
inputPaths: ['"' + '$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)' + '"'],
name: comment,
outputPaths: [],
runOnlyForDeploymentPostprocessing: 0,
Expand Down Expand Up @@ -96,6 +96,7 @@ module.exports = {

var buildPhases = xcodeProject.hash.project.objects.PBXShellScriptBuildPhase;

var commentTest = comment.replace(/"/g, '');
for (var buildPhaseId in buildPhases) {

var buildPhase = xcodeProject.hash.project.objects.PBXShellScriptBuildPhase[buildPhaseId];
Expand All @@ -105,12 +106,12 @@ module.exports = {
// Dealing with a build phase block.

// If the name of this block matches ours, then we want to delete it.
shouldDelete = buildPhase.name && buildPhase.name.indexOf(comment) !== -1;
shouldDelete = buildPhase.name && buildPhase.name.indexOf(commentTest) !== -1;
} else {
// Dealing with a comment block.

// If this is a comment block that matches ours, then we want to delete it.
shouldDelete = buildPhaseId === comment;
shouldDelete = buildPhase === commentTest;
}

if (shouldDelete) {
Expand All @@ -133,7 +134,7 @@ module.exports = {

// We remove the reference to the block by filtering out the the ones that match.
nativeTarget.buildPhases = nativeTarget.buildPhases.filter(function (buildPhase) {
return buildPhase.comment !== comment;
return buildPhase.comment !== commentTest;
});
}

Expand Down
Binary file not shown.

This file was deleted.

210 changes: 0 additions & 210 deletions src/ios/Crashlytics/Crashlytics.framework/Headers/Answers.h

This file was deleted.

33 changes: 0 additions & 33 deletions src/ios/Crashlytics/Crashlytics.framework/Headers/CLSAttributes.h

This file was deleted.

Loading